From 5e675ad528ac4d65739dfd37836d98c1e2cba5b2 Mon Sep 17 00:00:00 2001 From: intra0 Date: Thu, 12 Dec 2024 12:57:37 -0600 Subject: [PATCH] Update XCX/Max Money Makes it so the user can change the max money ammount --- .../Mods/MaxMoney/patch_maxmoney.asm | 122 +++++++++--------- .../Mods/MaxMoney/rules.txt | 38 +++++- 2 files changed, 100 insertions(+), 60 deletions(-) diff --git a/src/XenobladeChroniclesX/Mods/MaxMoney/patch_maxmoney.asm b/src/XenobladeChroniclesX/Mods/MaxMoney/patch_maxmoney.asm index b522bba1..ba86c742 100644 --- a/src/XenobladeChroniclesX/Mods/MaxMoney/patch_maxmoney.asm +++ b/src/XenobladeChroniclesX/Mods/MaxMoney/patch_maxmoney.asm @@ -1,87 +1,91 @@ [XCX_MAXMONEY_V101E_V102U] moduleMatches = 0xF882D5CF, 0x30B6E091, 0x218F6E07 ; 1.0.1E, 1.0.2U, 1.0.0E +maxMoney = $maxAmount ; fw::Util::addMoney((int)) -0x027F6C28 = lis r12, 0x3B9B -0x027F6C30 = addi r12, r12, -0x3601 -0x027F6C3C = lis r3, 0x3B9B -0x027F6C40 = addi r3, r3, -0x3601 +0x027F6C28 = lis r12, maxMoney@ha +0x027F6C30 = addi r12, r12, maxMoney@l +0x027F6C3C = lis r3, maxMoney@ha +0x027F6C40 = addi r3, r3, maxMoney@l ; fw::Util::setMoney((unsigned int)) -0x027F6BA8 = lis r4, 0x3B9B -0x027F6BAC = addi r4, r4, -0x3601 +0x027F6BA8 = lis r4, maxMoney@ha +0x027F6BAC = addi r4, r4, maxMoney@l ; fw::Util::setTradeTicket((unsigned int)) -0x027F6D00 = lis r0, 0x3B9A -0x027F6D04 = ori r0, r0, 0xC9FF +0x027F6D00 = lis r0, maxMoney@ha +0x027F6D04 = addi r0, r0, maxMoney@l ; fw::Util::setMiranium((unsigned int)) -0x027F6D9C = lis r0, 0x3B9A -0x027F6DA0 = ori r0, r0, 0xC9FF +0x027F6D9C = lis r0, maxMoney@ha +0x027F6DA0 = addi r0, r0, maxMoney@l ; fw::Util::addMiranium((int)) -0x027F6DFC = lis r0, 0x3B9A -0x027F6E04 = ori r0, r0, 0xC9FF -0x027F6E14 = lis r12, 0x3B9B -0x027F6E18 = addi r12, r12, -0x3601 +0x027F6DFC = lis r0, maxMoney@ha +0x027F6E04 = addi r0, r0, maxMoney@l +0x027F6E14 = lis r12, maxMoney@ha +0x027F6E18 = addi r12, r12, maxMoney@l -[XCX_MAXMONEY_V102J] ; ########################################################### +[XCX_MAXMONEY_V102J] moduleMatches = 0x7672271D ; 1.0.2J +maxMoney = $maxAmount ; fw::Util::addMoney((int)) -0x027F47CC = lis r12, 0x3B9B -0x027F47D4 = addi r12, r12, -0x3601 -0x027F47E0 = lis r3, 0x3B9B -0x027F47E4 = addi r3, r3, -0x3601 +0x027F47CC = lis r12, maxMoney@ha +0x027F47D4 = addi r12, r12, maxMoney@l +0x027F47E0 = lis r3, maxMoney@ha +0x027F47E4 = addi r3, r3, maxMoney@l ; fw::Util::setMoney((unsigned int)) -0x027F474C = lis r4, 0x3B9B -0x027F4750 = addi r4, r4, -0x3601 +0x027F474C = lis r4, maxMoney@ha +0x027F4750 = addi r4, r4, maxMoney@l ; fw::Util::setTradeTicket((unsigned int)) -0x027f48A4 = lis r0, 0x3B9A -0x027f48A8 = ori r0, r0, 0xC9FF +0x027f48A4 = lis r0, maxMoney@ha +0x027f48A8 = addi r0, r0, maxMoney@l ; fw::Util::setMiranium((unsigned int)) -0x027F4940 = lis r0, 0x3B9A -0x027F4944 = ori r0, r0, 0xC9FF +0x027F4940 = lis r0, maxMoney@ha +0x027F4944 = addi r0, r0, maxMoney@l ; fw::Util::addMiranium((int)) -0x027F49A0 = lis r0, 0x3B9A -0x027f49A8 = ori r0, r0, 0xC9FF -0x027f49B8 = lis r12, 0x3B9B -0x027f49BC = addi r12, r12, -0x3601 +0x027F49A0 = lis r0, maxMoney@ha +0x027f49A8 = addi r0, r0, maxMoney@l +0x027f49B8 = lis r12, maxMoney@ha +0x027f49BC = addi r12, r12, maxMoney@l -[XCX_MAXMONEY_V100U] ; ########################################################### +[XCX_MAXMONEY_V100U] moduleMatches = 0xAB97DE6B, 0x676EB33E ; 1.0.1U, 1.0.0U +maxMoney = $maxAmount ; fw::Util::addMoney((int)) -0x027F6BAC = lis r12, 0x3B9B -0x027F6BB4 = addi r12, r12, -0x3601 -0x027F6BC0 = lis r3, 0x3B9B -0x027F6BC4 = addi r3, r3, -0x3601 +0x027F6BAC = lis r12, maxMoney@ha +0x027F6BB4 = addi r12, r12, maxMoney@l +0x027F6BC0 = lis r3, maxMoney@ha +0x027F6BC4 = addi r3, r3, maxMoney@l ; fw::Util::setMoney((unsigned int)) -0x027F6B2C = lis r4, 0x3B9B -0x027F6B30 = addi r4, r4, -0x3601 +0x027F6B2C = lis r4, maxMoney@ha +0x027F6B30 = addi r4, r4, maxMoney@l ; fw::Util::setTradeTicket((unsigned int)) -0x027F6C84 = lis r0, 0x3B9A -0x027F6C88 = ori r0, r0, 0xC9FF +0x027F6C84 = lis r0, maxMoney@ha +0x027F6C88 = addi r0, r0, maxMoney@l ; fw::Util::setMiranium((unsigned int)) -0x027F6D20 = lis r0, 0x3B9A -0x027F6D24 = ori r0, r0, 0xC9FF +0x027F6D20 = lis r0, maxMoney@ha +0x027F6D24 = addi r0, r0, maxMoney@l ; fw::Util::addMiranium((int)) -0x027F6D80 = lis r0, 0x3B9A -0x027F6D88 = ori r0, r0, 0xC9FF -0x027F6D98 = lis r12, 0x3B9B -0x027F6D9C = addi r12, r12, -0x3601 +0x027F6D80 = lis r0, maxMoney@ha +0x027F6D88 = addi r0, r0, maxMoney@l +0x027F6D98 = lis r12, maxMoney@ha +0x027F6D9C = addi r12, r12, maxMoney@l -[XCX_MAXMONEY_V100J] ; ########################################################### +[XCX_MAXMONEY_V100J] moduleMatches = 0x785CA8A9 ; 1.0.0J +maxMoney = $maxAmount ; fw::Util::addMoney((int)) -0x027F37A0 = lis r12, 0x3B9B -0x027F37A8 = addi r12, r12, -0x3601 -0x027F37B4 = lis r3, 0x3B9B -0x027F37B8 = addi r3, r3, -0x3601 +0x027F37A0 = lis r12, maxMoney@ha +0x027F37A8 = addi r12, r12, maxMoney@l +0x027F37B4 = lis r3, maxMoney@ha +0x027F37B8 = addi r3, r3, maxMoney@l ; fw::Util::setMoney((unsigned int)) -0x027F3720 = lis r4, 0x3B9B -0x027F3724 = addi r4, r4, -0x3601 +0x027F3720 = lis r4, maxMoney@ha +0x027F3724 = addi r4, r4, maxMoney@l ; fw::Util::setTradeTicket((unsigned int)) -0x027F3878 = lis r0, 0x3B9A -0x027F387C = ori r0, r0, 0xC9FF +0x027F3878 = lis r0, maxMoney@ha +0x027F387C = addi r0, r0, maxMoney@l ; fw::Util::setMiranium((unsigned int)) -0x027F3914 = lis r0, 0x3B9A -0x027F3918 = ori r0, r0, 0xC9FF +0x027F3914 = lis r0, maxMoney@ha +0x027F3918 = addi r0, r0, maxMoney@l ; fw::Util::addMiranium((int)) -0x027F3974 = lis r0, 0x3B9A -0x027F397C = ori r0, r0, 0xC9FF -0x027F398C = lis r12, 0x3B9B -0x027F3990 = addi r12, r12, -0x3601 +0x027F3974 = lis r0, maxMoney@ha +0x027F397C = addi r0, r0, maxMoney@l +0x027F398C = lis r12, maxMoney@ha +0x027F3990 = addi r12, r12, maxMoney@l diff --git a/src/XenobladeChroniclesX/Mods/MaxMoney/rules.txt b/src/XenobladeChroniclesX/Mods/MaxMoney/rules.txt index d9130097..7db12be2 100644 --- a/src/XenobladeChroniclesX/Mods/MaxMoney/rules.txt +++ b/src/XenobladeChroniclesX/Mods/MaxMoney/rules.txt @@ -2,5 +2,41 @@ titleIds = 0005000010116100,00050000101C4C00,00050000101C4D00 name = "Max Money" path = "Xenoblade Chronicles X/Mods/Maximus/Max Money" -description = "Increase maximum money to 999 999 999." +description = "Increase (or decrease) the maximum money you can hold." version = 6 + +[Default] +$maxAmount = 0x3B9AC9FF #999999999 + +[Preset] +name = 0 +$maxAmount = 0 + +[Preset] +name = 9,999 +$maxAmount = 0x270F + +[Preset] +name = 99,999 +$maxAmount = 0x1869F + +[Preset] +name = 999,999 +$maxAmount = 0xF423F + +[Preset] +name = 9,999,999 +$maxAmount = 0x98967F + +[Preset] +name = 99,999,999 (Default) +$maxAmount = 0x5F5E0FF + +[Preset] +name = 999,999,999 (Recommended) +$maxAmount = 0x3B9AC9FF +default = 1 + +[Preset] +name = 2,140,000,000 #2147483647 risk negative money +$maxAmount = 0x7F8DCF00