cemu_graphic_packs/Modifications/XenobladeX_mod_LootForceChest/patches.txt

28 lines
1.2 KiB
Plaintext

[XCX_LOOT_FORCECHEST]
moduleMatches = 0xF882D5CF, 0x30B6E091 ; 1.0.1E, 1.0.2U
codeCaveSize = 0x10
0x00000000 = .byte $mod
_chest = 0x00000000
_changeQuality = 0x00000004
0x00000004 = lis r3, _chest@ha
0x00000008 = lbz r3, _chest@l(r3)
0x0000000C = blr
0x021AADB8 = bla _changeQuality
0x021AADBC = blr
; ----------------------------------------------------------------------------
; WHO : ItemDrop::CItemDropManager::calcRank((unsigned short, int))
; WHAT : Override the chest quality you get when the game initially decided you get no chest at all
; : It's a bit tough to explain, but the function calcRank does this:
; : 1) Calculate luck for gold chest, if success exit with gold quality (1), else process next step
; : 2) Calculate luck for silver chest, if success exit with silver quality (2), else process next step
; : 3) Calculate luck for bronze chest, if success exit with bronze quality (3), else process next step
; : 4) No chest at all, exit with no chest (0)
; : --> The mod below only changes this last step. So even if you put 1 value (gold chest), you'll still get a silver chest if the game succeeded the step 2.
;0x21AAF18 = li r3, 1 ; 0 = nothing (default), 1 = gold, 2 = silver, 3 = bronze