Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct the look of suit syle equipment #5987

Merged

Conversation

TiberonKalkaz
Copy link
Contributor

@TiberonKalkaz TiberonKalkaz commented Jul 6, 2024

I affirm:

  • I understand that if I do not agree to the following points by completing the checkboxes my PR will be ignored.
  • I understand I should leave resolving conversations to the LandSandBoat team so that reviewers won't miss what was said.
  • I have read and understood the Contributing Guide and the Code of Conduct.
  • I have tested my code and the things my code has changed since the last commit in the PR and will test after any later commits.

What does this pull request do?

Items which have look impacts to equip slots outside of the equipment slots that they occupy were not being displayed correctly.
This PR looks to address that issue. More details and images can be found below.

Changes in this PR.

  1. Created a new db column rslotlook in item_equipments.sql. This repesents a bitmask of the SLOT TYPE which are overrided by a piece of gear for appearance. This is distinctly different from the rslot column which is the bit mask for equipment slots which are exclusive with this item being equipped.
  2. Populated this new column by:
  • freshly importing the item_equipments.sql
  • adding the column via heidiSQL
  • identifying all of the gear which had an rslot value and testing which did not display correctly
  • updating each gap item - which was generally all the "suits" aside from the moogle suit, adenium suit, and black choco suit (these all restrict equip of hands/legs/feet).
  • adding back in the 3-4 comments that existed in the orginal SQL
  1. Because I populated a new column - the PR refuses to show every single line of the sql - I've included a table below which summarizes which items have a delta in the new column.
  2. Plumbed this new column value into CItem, exposing getter and setter functions
  3. Updated the UpdateRemovedSlots to have distinct lockstyle and non-lockstyle versions
  4. Updated EquipArmor to enforce look changes
  5. Updated UnequipItem to consider that equipment looks may need to be reset to equipped gear, not just 0.

Steps to test these changes

  1. Equip something bulky/noticeable in head/body/hands/legs/feet. I used the mnk relic set, melee. Its bulky ish and purple
  2. Add an item from the below list and put into a lock style.
25715	korrigan_suit
25726	kupo_suit
25756	wyrmking_suit
25757	wyrmking_suit_+1
26954	behemoth_suit
26955	behemoth_suit_+1
26963	onca_suit
27854	mandra._suit
27855	mandra._suit_+1
27866	goblin_suit
27867	g._moogle_suit
27906	chocobo_suit_+1
27911	chocobo_suit
  1. Add equipment into the lockstyle in any other slot that will be overriden like hands/legs/feet
    example:
    image

  2. Apply the lock style - and note that there is no "underneath equipment" clipping through

  3. Remove lockstyle, ensure nothing is missing (like the characters hands, legs, or feet)

  4. Create a lockstyle with just the suit and have the full melee set equipped

  5. Apply the lock style - and note that there is no "underneath equipment" clipping through

  6. Remove lockstyle, ensure nothing is missing (like the characters hands, legs, or feet)

  7. Equip the suit item- note that there is no "underneath equipment" clipping through and only the required equip is removed (usually just legs)

  8. Unequip the suit directly - note that hands/legs/feet are as expected and 100% not just missing/invisible

  9. Re-equip the suit

  10. Unequip the suit by equipping an item into its restricted equip slot (i.e. legs) - note that hands/legs/feet are as expected and 100% not just missing/invisible

  11. Repeat 9 - 12 using equipsets

  12. Repeat 9 - 12 using luashitacast

Items impacted by this change:
image

Pre change examples:
image

Post change examples:
image

Note The above pictures are taken from ASB testing on PR: AirSkyBoat#3677
I did not re-test all suits - rather focused most of my testin on the Onca Suit while doing work on LSB.

Rev 2

Found and fixed a bug on the following steps:

  1. Equip single slot occupancy gear in all visible slots (melee set used)
  2. Create a lock style set of this or similar gear which is all single slot occupancy gear
  3. Apply the lock style
  4. Now equip a suit (Onca) - no visible change due to lockstyle
  5. Remove lockstyle
  6. Due to a restiction I had placed to only update the gear look if not lockstyled - at this point, there would be gear clipping through the suit. This restriciton was not required and has been removed.
 void UpdateRemovedSlotsLook(CCharEntity* PChar)
{
        if (!PChar || PChar->getStyleLocked())

updated to

 void UpdateRemovedSlotsLook(CCharEntity* PChar)
{
        if (!PChar)
@TiberonKalkaz TiberonKalkaz force-pushed the multi_slot_equipment_appearance branch 2 times, most recently from 1724862 to cf58d5d Compare July 6, 2024 04:16
@TiberonKalkaz TiberonKalkaz force-pushed the multi_slot_equipment_appearance branch from cf58d5d to ba43875 Compare July 7, 2024 21:23
@claywar claywar merged commit 436bc75 into LandSandBoat:base Jul 12, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants