Skip to content

Commit 09207ed

Browse files
authored
[XCX] Add various quality-of-life mods and cheats(#675)
Thanks to @intra0 for these awesome new mods! **Quality-of-Life Improvements:** - Start Battles with Maximum Tension Points (TP): Players now begin combat with full TP, eliminating the need to build up TP at the start of each encounter.​ - Skell TP Retention: Skells will no longer lose their accumulated TP when the player exits them, addressing a mechanic that many found frustrating.​ - Camera Settings Memory Fix: Resolves an issue where camera settings would reset upon entering areas with ceilings, ensuring a consistent viewing experience.​ **Optional Features:** - Disable Automatic HP Regeneration: Introduces an option to turn off the automatic healing of HP, allowing for a more challenging gameplay experience.​ - Synchronized HP and TP Mode: Offers a new mode where HP and TP values are linked, introducing unique strategic considerations.​ **Additional Modifications:** - Blade Division Change: Restores the ability to change Blade divisions, a feature previously inaccessible in offline mode.​ - Skell Flight Module Toggle: Allows players to manually enable or disable the Skell flight module, providing greater control over Skell capabilities.
1 parent a8ab6fd commit 09207ed

File tree

34 files changed

+2599
-43
lines changed

34 files changed

+2599
-43
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[XCX_SkellFlight_v101E_v102U]
2+
moduleMatches = 0xF882D5CF, 0x30B6E091, 0x218F6E07 ; 1.0.1E, 1.0.2U, 1.0.0E
3+
; GetSkyUnit__Q2_3cfs19CfCompoPropertyDollCFv
4+
0x025CE8DC = li r3, $mod
5+
6+
[XCX_SkellFlight_v102J]
7+
moduleMatches = 0x7672271D ; 1.0.2J
8+
0x025CDEB8 = li r3, $mod
9+
10+
[XCX_SkellFlight_v100U]
11+
moduleMatches = 0xAB97DE6B, 0x676EB33E ; 1.0.1U, 1.0.0U
12+
0x025CE86C = li r3, $mod
13+
14+
[XCX_SkellFlight_v100J]
15+
moduleMatches = 0x785CA8A9 ; 1.0.0J
16+
0x025CD3DC = li r3, $mod
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[Definition]
2+
titleIds = 0005000010116100,00050000101C4C00,00050000101C4D00
3+
name = "Enable/Disable Skell Flight"
4+
path = "Xenoblade Chronicles X/Mods/Battle/Skell Flight Unlocked"
5+
description = Fly with your Skell before A Girl's Wings, or Disable the flight module after A Girl's Wings.
6+
#Credits: Intra
7+
version = 6
8+
9+
[Default]
10+
$mod = 1
11+
12+
[Preset]
13+
name = Force Enable
14+
15+
[Preset]
16+
name = Force Disable
17+
$mod = 0
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[XCX_InfiniteFuel_v101E_v102U]
2+
moduleMatches = 0xF882D5CF, 0x30B6E091, 0x218F6E07 ; 1.0.1E, 1.0.2U, 1.0.0E
3+
0x025CE7C8 = lfs f1, 0x3184(r3)
4+
5+
[XCX_InfiniteFuel_v102J]
6+
moduleMatches = 0x7672271D ; 1.0.2J
7+
0x025CDDA4 = lfs f1, 0x3184(r3)
8+
9+
[XCX_InfiniteFuel_v100U]
10+
moduleMatches = 0xAB97DE6B, 0x676EB33E ; 1.0.1U, 1.0.0U
11+
0x025CE758 = lfs f1, 0x3184(r3)
12+
13+
[XCX_InfiniteFuel_v100J]
14+
moduleMatches = 0x785CA8A9 ; 1.0.0J
15+
0x025CD2C8 = lfs f1, 0x3184(r3)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[Definition]
2+
titleIds = 0005000010116100,00050000101C4C00,00050000101C4D00
3+
name = "Infinite Fuel"
4+
path = "Xenoblade Chronicles X/Mods/Battle/Infinite Fuel"
5+
description = Makes your skell fuel always be at its max.
6+
#Credits: Intra
7+
version = 6
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
[XCX_BootWithTP_Data]
2+
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
3+
.origin = codecave
4+
5+
;adress offsets for all the various stats a character has
6+
currentHP = 0x84
7+
currentTP = 0x94
8+
maxHP = 0x88
9+
maxTP = 0x98
10+
meleeAttack = 0x9C
11+
rangedAttack = 0xA0
12+
potential = 0xA4
13+
defence = 0xA8
14+
meleeAccuracy = 0xAC
15+
rangedAccuracy = 0xB0
16+
evasion = 0xB4
17+
physicalRes = 0xBC
18+
beamRes = 0xC0
19+
etherRes = 0xC4
20+
thermalRes = 0xC8
21+
electricRes = 0xCC
22+
gravityRes = 0xD0
23+
24+
;array of flags that check if applied max tp on boot to a specific character/skell
25+
BoolBootWithTP:
26+
.byte $QoL-1, $QoL-1, $QoL-1, $QoL-1, $QoLSkell-1, $QoLSkell-1, $QoLSkell-1, $QoLSkell-1
27+
;keeps track if entered a function from ground or skell so that code that only applies to one can be conditionally executed
28+
BoolIsInnerOrDoll:
29+
.uint 0
30+
;prevents a bug of delayed character getting max tp after boot
31+
;if a character position is not in your party at boot and then you add a character to that position
32+
;its flag was never set and so that character then gets the mod applied to them way later than expected.
33+
;with this fix it is still possible to trigure it by starting with exactly 1 character in your party and then recruiting a character within 1 skip travel
34+
;the bug can also happen by seeing a loading screen over 2 billion times to loop to negative (end even then won't apply to positions that its already applies before)
35+
;that is such specific circumstances with such a minor bug that I don't care to fix it further
36+
;the proper way to fix this would be to find a section of code that runs after ground boot and skell boot, does not need skell boot to happen to run, and does not get called in any other section of the game.
37+
;then uses that spot set the flags above and nothing else. currently not worth it for such a minor bug
38+
NumOfTimesLoadingScreenRan:
39+
.uint 0
40+
;array of cheat settings for ground
41+
InnerCheatSettingsArray:
42+
.short $TPCheat, $HPCheat, $noHPcheatnodieifdamagelt, $TPupdatecheatdieat0TP, $TPupdatecheatnegative, $HPupdatecheatnegative
43+
;array of cheat settings for skell
44+
DollCheatSettingsArray:
45+
.short $TPCheatSkell, $HPCheatSkell, $noHPcheatnodieifdamageltSkell, $TPupdatecheatdieat0TPSkell, $TPupdatecheatnegativeSkell, $HPupdatecheatnegativeSkell
46+
;array of syncronous settings for ground
47+
InnerSyncSettingsArray:
48+
.byte $HPboundtoTP, $HPboundtoTPNegative, $TPboundtoHP, $TPboundtoHPNegative
49+
;array of syncronous settings for skell
50+
DollSyncSettingsArray:
51+
.byte $HPboundtoTPSkell, $HPboundtoTPNegativeSkell, $TPboundtoHPSkell, $TPboundtoHPNegativeSkell
52+
;array of after battle heal settings for ground
53+
InnerSlipHealSettingsArray:
54+
.byte $afterbattleheal, $afterbattlerestoretp, $skiptravelheal
55+
;array of after battle heal settings for ground
56+
DollSlipHealSettingsArray:
57+
.byte $afterbattleheal, $afterbattlerestoretp, $skiptravelhealSkell
58+
;storage space for current hp for each character
59+
StoreCurrentHP:
60+
.uint 0, 0, 0, 0
61+
;storage space for current hp for each skell
62+
StoreCurrentHPDoll:
63+
.uint 0, 0, 0, 0
64+
;array of pointers to the storage space for characters stats
65+
;below that, the stprage space for each characters stats
66+
StoreCharacterStatsPointers:
67+
.uint StoreCharacter0Stats, StoreCharacter1Stats, StoreCharacter2Stats, StoreCharacter3Stats
68+
StoreCharacter0Stats:
69+
.uint 0, 0, 0, 0, 0, 0, 0, 0
70+
StoreCharacter1Stats:
71+
.uint 0, 0, 0, 0, 0, 0, 0, 0
72+
StoreCharacter2Stats:
73+
.uint 0, 0, 0, 0, 0, 0, 0, 0
74+
StoreCharacter3Stats:
75+
.uint 0, 0, 0, 0, 0, 0, 0, 0
76+
;array of pointers to the storage space for skells stats
77+
;below that, the stprage space for each skells stats
78+
StoreCharacterStatsDollPointers:
79+
.uint StoreCharacter0StatsDoll, StoreCharacter1StatsDoll, StoreCharacter2StatsDoll, StoreCharacter3StatsDoll
80+
StoreCharacter0StatsDoll:
81+
.uint 0, 0, 0, 0, 0, 0, 0, 0
82+
StoreCharacter1StatsDoll:
83+
.uint 0, 0, 0, 0, 0, 0, 0, 0
84+
StoreCharacter2StatsDoll:
85+
.uint 0, 0, 0, 0, 0, 0, 0, 0
86+
StoreCharacter3StatsDoll:
87+
.uint 0, 0, 0, 0, 0, 0, 0, 0
88+
;array of offsets for each of the stats. used to lower code duplication
89+
PointerStatsOffsets:
90+
.short maxHP, meleeAttack, rangedAttack, potential, defence, meleeAccuracy, rangedAccuracy, evasion
91+
;multiple function pointers arrays used to make the checksetting function usable for all setting types from all sections:
92+
FunctionPointerArrayCheatBoot:
93+
.uint NoTensionCheat, InfiniteTensionCheat, TensionEqualsHealthCheat, HPTPMod_blr, NoHealthCheat, InfiniteHealthCheat, HealthEqualsTensionCheat, HPTPMod_blr
94+
FunctionPointerArrayCheatTP:
95+
.uint NoTensionCheat, InfiniteTensionCheat, TensionEqualsHealthCheat, TensionUpdatesFromHealthCheatTP, NoHealthCheat, InfiniteHealthCheat, HealthEqualsTensionCheatTP, HealthUpdatesFromTensionCheatTP
96+
FunctionPointerArrayCheatHP:
97+
.uint NoTensionCheat, InfiniteTensionCheat, TensionEqualsHealthCheat, TensionUpdatesFromHealthCheatHP, NoHealthCheatHP, InfiniteHealthCheat, HealthEqualsTensionCheat, HealthUpdatesFromTensionCheatHP
98+
FunctionPointerArraySync:
99+
.uint addTPHPSynchronous, addTPHPAsynchronous, addTPHPDecreaseOnly, addTPHPIncreaseOnly
100+
;lookup table for all the settings above if applying to ground characters
101+
LookupTableforInner:
102+
.uint InnerCheatSettingsArray, InnerSyncSettingsArray, InnerSlipHealSettingsArray, BoolBootWithTP, StoreCurrentHP, StoreCharacterStatsPointers
103+
;lookup table for all the settings above if applying to skells
104+
LookupTableforDoll:
105+
.uint DollCheatSettingsArray, DollSyncSettingsArray, DollSlipHealSettingsArray, BoolBootWithTP+4, StoreCurrentHPDoll, StoreCharacterStatsDollPointers
106+
107+
;only piece of data used in the tphp_features file
108+
;is used to tell the update hp function of the mod if the current heal is an out of battle heal
109+
CurrentSlipHealPosition:
110+
.uint 0
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
[XCX_BootWithTP_Features]
2+
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
3+
.origin = codecave
4+
;currently missing features:
5+
;a way to ignore max hp / max tp
6+
;a way to fix your character health being shown on screen after battle if continously below its max
7+
;a way to detect if the slip heal function is currently appling to a human or skell
8+
9+
10+
;This function is the exact same as 0x021D50F4 = nop
11+
;the extra code is needed to make the cheat only apply when the apropriate option is selected in the rules.txt
12+
;prevents skells from losing 50 GP/sec while out of them
13+
StopSkellLosingGP:
14+
li r4, $disableSkellLosingGP
15+
cmpwi r4, 0
16+
beq _StopSkellLosingGPExit
17+
mflr r4
18+
addi r4, r4, 8
19+
mtlr r4
20+
blr
21+
_StopSkellLosingGPExit:
22+
lwz r3, 0x24(r30)
23+
blr
24+
25+
;no healing is the exact same as 0x021764F4 = blr
26+
;prevents RegistDamage::HealHide::DamageSystem::HandleKey from ever being called
27+
;the extra code is needed to make the dont update TP option work
28+
;stops out of battle heals, and can also stop TP udating from out of battle heals in the sync settings
29+
DontUpdateHP:
30+
li r11, $afterbattleheal
31+
cmpwi r11, 0
32+
bne _DontUpdateHPExit
33+
mtlr r0
34+
blr
35+
_DontUpdateHPExit:
36+
li r11, $afterbattlerestoretp
37+
cmpwi r11, 0
38+
bne _SkipDontUpdateTPslip
39+
lis r9, CurrentSlipHealPosition@ha
40+
lwz r11, CurrentSlipHealPosition@l(r9)
41+
addi r11, r11, 1
42+
cmpwi r11, 8
43+
blt+ _CheckIFCountTooHigh
44+
li r11, 0
45+
_CheckIFCountTooHigh:
46+
stw r11, CurrentSlipHealPosition@l(r9)
47+
_SkipDontUpdateTPslip:
48+
or r11, r1, r1
49+
blr
50+
51+
[XCX_BootWithTP_Features_v101E_v102U]
52+
moduleMatches = 0xF882D5CF, 0x30B6E091, 0x218F6E07 ; 1.0.1E, 1.0.2U, 1.0.0E
53+
;prevents skells from losing 50 GP/sec while out of them
54+
0x021D50EC = bla StopSkellLosingGP
55+
;stops out of battle heals
56+
0x021764F8 = bla DontUpdateHP
57+
58+
[XCX_BootWithTP_Features_v102J]
59+
moduleMatches = 0x7672271D ; 1.0.2J
60+
0x021D4BB8 = bla StopSkellLosingGP
61+
0x02175FC4 = bla DontUpdateHP
62+
63+
[XCX_BootWithTP_Features_v100U]
64+
moduleMatches = 0xAB97DE6B, 0x676EB33E ; 1.0.1U, 1.0.0U
65+
0x021D50EC = bla StopSkellLosingGP
66+
0x021764F8 = bla DontUpdateHP
67+
68+
[XCX_BootWithTP_Features_v100J]
69+
moduleMatches = 0x785CA8A9 ; 1.0.0J
70+
0x021D4934 = bla StopSkellLosingGP
71+
0x02175D40 = bla DontUpdateHP

0 commit comments

Comments
 (0)