From cc7f642ef67c1813549346406e070b3a6dad2d14 Mon Sep 17 00:00:00 2001 From: Intra Date: Mon, 23 Dec 2024 05:50:23 -0600 Subject: [PATCH] New tenstion point mod is a convienence mod, sets your TP to max when booting the game, because it resets to 0 everytime you save & quit has some other fun options as well --- .../Mods/BattleTensionPoints/patch_tp.asm | 42 +++++++++++++++++++ .../Mods/BattleTensionPoints/rules.txt | 31 ++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 src/XenobladeChroniclesX/Mods/BattleTensionPoints/patch_tp.asm create mode 100644 src/XenobladeChroniclesX/Mods/BattleTensionPoints/rules.txt diff --git a/src/XenobladeChroniclesX/Mods/BattleTensionPoints/patch_tp.asm b/src/XenobladeChroniclesX/Mods/BattleTensionPoints/patch_tp.asm new file mode 100644 index 00000000..29fda9bd --- /dev/null +++ b/src/XenobladeChroniclesX/Mods/BattleTensionPoints/patch_tp.asm @@ -0,0 +1,42 @@ +[XCX_BootWithTP] +moduleMatches = 0xF882D5CF, 0x30B6E091, 0x7672271D, 0x218F6E07, 0xAB97DE6B, 0x676EB33E, 0x785CA8A9 ; 1.0.1E, 1.0.2U, 1.0.2J, 1.0.0E, 1.0.1U, 1.0.0U, 1.0.0J +.origin = codecave +BoolBootWithTP: +.uint 0 + +_BootWithTP: +li r3, $everyloadingscreen +cmpwi r3, 0 +bne _applymaxTP +lis r3, BoolBootWithTP@ha +lwz r3, BoolBootWithTP@l(r3) +cmpwi r3, 0 +bne+ _BootWithTPExit +_applymaxTP: +lwz r3,0x98(r10) +stw r3,0x94(r10) +lis r3, BoolBootWithTP@ha +stw r3, BoolBootWithTP@l(r3) +_BootWithTPExit: +li r3, 1 +blr + +[XCX_BootWithTP_v101E_v102U] +moduleMatches = 0xF882D5CF, 0x30B6E091, 0x218F6E07 ; 1.0.1E, 1.0.2U, 1.0.0E +0x02367C1C = bla _BootWithTP +0x025B50A4 = lwz r3,0x94+$memoffset(r12) + +[XCX_BootWithTP_v102J] +moduleMatches = 0x7672271D ; 1.0.2J +0x02367450 = bla _BootWithTP +0x025B4680 = lwz r3,0x94+$memoffset(r12) + +[XCX_BootWithTP_v100U] +moduleMatches = 0xAB97DE6B, 0x676EB33E ; 1.0.1U, 1.0.0U +0x02367BAC = bla _BootWithTP +0x025B5034 = lwz r3,0x94+$memoffset(r12) + +[XCX_BootWithTP_v100J] +moduleMatches = 0x785CA8A9 ; 1.0.0J +0x023672DC = bla _BootWithTP +0x025B3BA4 = lwz r3,0x94+$memoffset(r12) diff --git a/src/XenobladeChroniclesX/Mods/BattleTensionPoints/rules.txt b/src/XenobladeChroniclesX/Mods/BattleTensionPoints/rules.txt new file mode 100644 index 00000000..6f02eaa4 --- /dev/null +++ b/src/XenobladeChroniclesX/Mods/BattleTensionPoints/rules.txt @@ -0,0 +1,31 @@ +[Definition] +titleIds = 0005000010116100,00050000101C4C00,00050000101C4D00 +name = Boot with max TP +path = "Xenoblade Chronicles X/Mods/Battle/Start with max TP" +description = When ever you boot the game you'll have your current max TP (tension points) instead of 0.|Is a nice convienence option. +#Credits: Intra +version = 6 + +[Default] +$everyloadingscreen = 0 +$memoffset = 0 + +[Preset] +name = Max TP on boot +$everyloadingscreen = 0 + +[Preset] +name = Max TP Every time you skip travel or die +$everyloadingscreen = 1 + +[Preset] +name = CHEAT: Infinite TP +$memoffset = 4 + +[Preset] +name = CHALLENGE: No TP +$memoffset = -4 + +[Preset] +name = WEIRD: TP always equals HP +$memoffset = -0x10