Skip to content

Conversation

@inspectredc
Copy link
Member

@inspectredc inspectredc commented Oct 12, 2023

Increases documentation for equipment. Moves to using macros where applicable in SOH code and transfers the rest from decomp. Changes names to match closer to decomp, e.g. BGS -> BIGGORON. Stops the use of Inventory_ChangeEquipment with PLAYER equipment enums instead using the EQUIP_VALUE enums. Notably a fair amount of the GameInteractor force boots process was changed to use this method so will need checking that it still functions properly.

Build Artifacts

@garrettjoecox
Copy link
Contributor

#3200 relevant but not quite the same, if yours gets merged first I'll just remove the equip changes from my script

@garrettjoecox
Copy link
Contributor

Conflicts here, otherwise ready to merge

@inspectredc
Copy link
Member Author

inspectredc commented Oct 27, 2023

Updated now, hopefully managed to cover all the additions from MS shuffle.

One thing i did change from MS shuffle was a section in z_parameter where instead of reading

gSaveContext.equips.equipment = (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_MASTER_SWORD) && 
     gSaveContext.equips.buttonItems[0] == ITEM_NONE) ? 0x1120 :0x1122;

it now reads

gSaveContext.equips.equipment = (EQUIP_VALUE_SWORD_MASTER << (EQUIP_TYPE_SWORD * 4)) |
                                (EQUIP_VALUE_SHIELD_HYLIAN << (EQUIP_TYPE_SHIELD * 4)) |
                                (EQUIP_VALUE_TUNIC_KOKIRI << (EQUIP_TYPE_TUNIC * 4)) |
                                (EQUIP_VALUE_BOOTS_KOKIRI << (EQUIP_TYPE_BOOTS * 4));

if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_MASTER_SWORD) && 
    gSaveContext.equips.buttonItems[0] == ITEM_NONE) {
    gSaveContext.equips.equipment &= (u16) ~(0xF << (EQUIP_TYPE_SWORD * 4));
}

effectively doing the vanilla behaviour and then editing the value afterwards only for the master sword shuffle.

i did this because it was just neater to write out this way with the docs

@Archez
Copy link
Contributor

Archez commented Oct 29, 2023

One thing i did change from MS shuffle was a section in z_parameter where instead of reading
effectively doing the vanilla behaviour and then editing the value afterwards only for the master sword shuffle.

i did this because it was just neater to write out this way with the docs

I agree and like this change, especially the part about retaining the vanilla behavior and only applying the rando specific part after it. Helps with readability and keeps the vanilla code as untouched as possible 👍

@garrettjoecox garrettjoecox merged commit 5dd82f5 into HarbourMasters:develop Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants