From 9d539b0a1a42eb41a508376803a58b71547e3c95 Mon Sep 17 00:00:00 2001 From: intra0 Date: Fri, 13 Dec 2024 20:04:37 -0600 Subject: [PATCH] Add new Save File Mods --- .../patch_OnlineBattleRating.asm | 10 + .../Cheats/OnlineBattleRating/rules.txt | 35 ++++ .../patch_OnlineRaceRating.asm | 10 + .../Cheats/OnlineRaceRating/rules.txt | 50 +++++ .../Cheats/TrophyCheat/patch_TrophyCheat.asm | 94 ++++++++++ src/MarioKart8/Cheats/TrophyCheat/rules.txt | 171 ++++++++++++++++++ .../patch_UnlockCharacter.asm | 26 +++ .../Cheats/UnlockCharacters/rules.txt | 7 + .../UnlockStamps/patch_UnlockStamps.asm | 24 +++ src/MarioKart8/Cheats/UnlockStamps/rules.txt | 7 + 10 files changed, 434 insertions(+) create mode 100644 src/MarioKart8/Cheats/OnlineBattleRating/patch_OnlineBattleRating.asm create mode 100644 src/MarioKart8/Cheats/OnlineBattleRating/rules.txt create mode 100644 src/MarioKart8/Cheats/OnlineRaceRating/patch_OnlineRaceRating.asm create mode 100644 src/MarioKart8/Cheats/OnlineRaceRating/rules.txt create mode 100644 src/MarioKart8/Cheats/TrophyCheat/patch_TrophyCheat.asm create mode 100644 src/MarioKart8/Cheats/TrophyCheat/rules.txt create mode 100644 src/MarioKart8/Cheats/UnlockCharacters/patch_UnlockCharacter.asm create mode 100644 src/MarioKart8/Cheats/UnlockCharacters/rules.txt create mode 100644 src/MarioKart8/Cheats/UnlockStamps/patch_UnlockStamps.asm create mode 100644 src/MarioKart8/Cheats/UnlockStamps/rules.txt diff --git a/src/MarioKart8/Cheats/OnlineBattleRating/patch_OnlineBattleRating.asm b/src/MarioKart8/Cheats/OnlineBattleRating/patch_OnlineBattleRating.asm new file mode 100644 index 00000000..b1954f4d --- /dev/null +++ b/src/MarioKart8/Cheats/OnlineBattleRating/patch_OnlineBattleRating.asm @@ -0,0 +1,10 @@ +[MarioKart8_OnlineBattleRating_v42] +moduleMatches = 0x9F0A90B7 ; v4.2(EU/NA/JP) +.origin = codecave +ChangeOnlineBattleRating: +li r10, $battlevr +stw r10, 0x1a24(r29) +blr + +;this mod makes 0x2e6b6664 = $battlevr +0x024DCE58 = bla ChangeOnlineBattleRating diff --git a/src/MarioKart8/Cheats/OnlineBattleRating/rules.txt b/src/MarioKart8/Cheats/OnlineBattleRating/rules.txt new file mode 100644 index 00000000..4b890ec1 --- /dev/null +++ b/src/MarioKart8/Cheats/OnlineBattleRating/rules.txt @@ -0,0 +1,35 @@ +[Definition] +titleIds = 000500001010EC00,000500001010ED00,000500001010EB00 +name = Change Online Battle Rating +path = "Mario Kart 8/Cheats/Online Battle Rating" +description = Change Your Online Battle Rating! +#Credits: Intra +version = 7 + +[Default] +$battlevr = 1000 + +[Preset] +category = Battle Rating: +name = 1 +$battlevr = 1 + +[Preset] +category = Battle Rating: +name = 1000 +Default = 1 + +[Preset] +category = Battle Rating: +name = 2000 +$battlevr = 2000 + +[Preset] +category = Battle Rating: +name = 3000 +$battlevr = 3000 + +[Preset] +category = Battle Rating: +name = 4000 +$battlevr = 4000 diff --git a/src/MarioKart8/Cheats/OnlineRaceRating/patch_OnlineRaceRating.asm b/src/MarioKart8/Cheats/OnlineRaceRating/patch_OnlineRaceRating.asm new file mode 100644 index 00000000..89a17bfa --- /dev/null +++ b/src/MarioKart8/Cheats/OnlineRaceRating/patch_OnlineRaceRating.asm @@ -0,0 +1,10 @@ +[MarioKart8_OnlineRaceRating_v42] +moduleMatches = 0x9F0A90B7 ; v4.2(EU/NA/JP) +.origin = codecave +ChangeOnlineRaceRating: +li r8, $racevr +stw r8, 0x1a20(r29) +blr + +;this mod makes 0x2e6b6660 = $racevr +0x024DCE2C = bla ChangeOnlineRaceRating diff --git a/src/MarioKart8/Cheats/OnlineRaceRating/rules.txt b/src/MarioKart8/Cheats/OnlineRaceRating/rules.txt new file mode 100644 index 00000000..20ff480c --- /dev/null +++ b/src/MarioKart8/Cheats/OnlineRaceRating/rules.txt @@ -0,0 +1,50 @@ +[Definition] +titleIds = 000500001010EC00,000500001010ED00,000500001010EB00 +name = Change Online Race Rating +path = "Mario Kart 8/Cheats/Online Race Rating" +description = Change Your Online Race Rating!|150cc lobbies start happening at 5000vr. +#Credits: Intra +version = 7 + +[Default] +$racevr = 1000 + +[Preset] +category = Race Rating: +name = 1 +$racevr = 1 + +[Preset] +category = Race Rating: +name = 1000 +Default = 1 + +[Preset] +category = Race Rating: +name = 2000 +$racevr = 2000 + +[Preset] +category = Race Rating: +name = 3000 +$racevr = 3000 + +[Preset] +category = Race Rating: +name = 4000 +$racevr = 4000 + +[Preset] +category = Race Rating: +name = 5000 +$racevr = 5000 + +[Preset] +category = Race Rating: +name = 6000 +$racevr = 6000 + +[Preset] +category = Race Rating: +name = 7000 +$racevr = 7000 diff --git a/src/MarioKart8/Cheats/TrophyCheat/patch_TrophyCheat.asm b/src/MarioKart8/Cheats/TrophyCheat/patch_TrophyCheat.asm new file mode 100644 index 00000000..ab7973b6 --- /dev/null +++ b/src/MarioKart8/Cheats/TrophyCheat/patch_TrophyCheat.asm @@ -0,0 +1,94 @@ +[MarioKart8_GoldTrophy] +moduleMatches = 0x9F0A90B7, 0xD09700CE ; v4.2(EU/NA/JP), v4.1(EU/NA/JP) +.origin = codecave + +WriteTrophies: +addi r11, r11, -1 +mtctr r12 +_forloopWriteTrophies: + stbu r8, 1(r11) + bdnz _forloopWriteTrophies +blr + +CheckandChangeTrophies: +mflr r0 +;check cheat +li r8, $cheattype +cmpwi r8, 3 +beq Cheat3StarEVERYTHING +cmpwi r8, 2 +beq CheatEntireEngineClass +cmpwi r8, 1 +beq CheatSpecificCup +b CheckandChangeTrophies_Exit + +CheatSpecificCup: +li r8, $trophy +addi r11, r7, 0x5c4+$addroffset +stb r8, $cup(r11) +li r8, $stars +addi r11, r7, 0x5c4+$addroffset-0x100 +stb r8, $cup(r11) +b CheckandChangeTrophies_Exit + +CheatEntireEngineClass: +li r12, 12 +li r8, $trophy +addi r11, r7, 0x5c4+$addroffset +bl WriteTrophies +li r8, $stars +addi r11, r7, 0x5c4+$addroffset-0x100 +bl WriteTrophies +b CheckandChangeTrophies_Exit + +Cheat3StarEVERYTHING: +li r12, 12 +;50cc +li r8, $trophy +addi r11, r7, 0x5c4 +bl WriteTrophies +li r8, $stars +addi r11, r7, 0x5c4-0x100 +bl WriteTrophies +;100cc +li r8, $trophy +addi r11, r7, 0x5c4+0x20 +bl WriteTrophies +li r8, $stars +addi r11, r7, 0x5c4+0x20-0x100 +bl WriteTrophies +;150cc +li r8, $trophy +addi r11, r7, 0x5c4+0x40 +bl WriteTrophies +li r8, $stars +addi r11, r7, 0x5c4+0x40-0x100 +bl WriteTrophies +;Mirror +li r8, $trophy +addi r11, r7, 0x5c4+0x80 +bl WriteTrophies +li r8, $stars +addi r11, r7, 0x5c4+0x80-0x100 +bl WriteTrophies +;200cc +li r8, $trophy +addi r11, r7, 0x5c4+0x60 +bl WriteTrophies +li r8, $stars +addi r11, r7, 0x5c4+0x60-0x100 +bl WriteTrophies + +CheckandChangeTrophies_Exit: +mtlr r0 +lwz r8, 0(r29) +blr + +[MarioKart8_GoldTrophy_v42] +moduleMatches = 0x9F0A90B7 ; v4.2(EU/NA/JP) +;modifies near 0x2E6B520C +0x024D97F8 = bla CheckandChangeTrophies + +[MarioKart8_GoldTrophy_v41] +moduleMatches = 0xD09700CE ; v4.1(EU/NA/JP) +0x024d9474 = bla CheckandChangeTrophies diff --git a/src/MarioKart8/Cheats/TrophyCheat/rules.txt b/src/MarioKart8/Cheats/TrophyCheat/rules.txt new file mode 100644 index 00000000..5f4cf7a0 --- /dev/null +++ b/src/MarioKart8/Cheats/TrophyCheat/rules.txt @@ -0,0 +1,171 @@ +[Definition] +titleIds = 000500001010EC00,000500001010ED00,000500001010EB00 +name = Gold Trophy / 3 stars +path = "Mario Kart 8/Cheats/Grand Prix Trophies" +description = Cheat in Grand Prix Trohpies!|Must complete or quit a Grand Prix to save changes. +#Credits: Intra +version = 7 + +[Default] +$addroffset = 0 +$cup = 0 +$cheattype = 1 +$trophy = 0 +$stars = 0 + +[Preset] +category = Cheat Type +name = Change EVERYTHING (200/mirror/150/100/50) +$cheattype = 3 + +[Preset] +category = Cheat Type +name = Change Entire Engine Class +$cheattype = 2 + +[Preset] +category = Cheat Type +name = Change Specific Cup (activates by cursor moving onto 50cc) +$cheattype = 1 + +[Preset] +category = Engine Class +condition = $cheattype != 3 +name = 50cc +$addroffset = 0 + +[Preset] +category = Engine Class +condition = $cheattype != 3 +name = 100cc +$addroffset = 0x20 + +[Preset] +category = Engine Class +condition = $cheattype != 3 +name = 150cc +$addroffset = 0x40 + +[Preset] +category = Engine Class +condition = $cheattype != 3 +name = Mirror +$addroffset = 0x80 + +[Preset] +category = Engine Class +condition = $cheattype != 3 +name = 200cc +$addroffset = 0x60 + +[Preset] +category = Course +condition = $cheattype == 1 +name = Mushroom Cup +$cup = 0 + +[Preset] +category = Course +condition = $cheattype == 1 +name = Flower Cup +$cup = 1 + +[Preset] +category = Course +condition = $cheattype == 1 +name = Star Cup +$cup = 2 + +[Preset] +category = Course +condition = $cheattype == 1 +name = Special Cup +$cup = 3 + +[Preset] +category = Course +condition = $cheattype == 1 +name = Shell Cup +$cup = 4 + +[Preset] +category = Course +condition = $cheattype == 1 +name = Banana Cup +$cup = 5 + +[Preset] +category = Course +condition = $cheattype == 1 +name = Leaf Cup +$cup = 6 + +[Preset] +category = Course +condition = $cheattype == 1 +name = Lightning Cup +$cup = 7 + +[Preset] +category = Course +condition = $cheattype == 1 +name = Egg Cup +$cup = 8 + +[Preset] +category = Course +condition = $cheattype == 1 +name = Triforce Cup +$cup = 9 + +[Preset] +category = Course +condition = $cheattype == 1 +name = Crossing Cup +$cup = 10 + +[Preset] +category = Course +condition = $cheattype == 1 +name = Bell Cup +$cup = 11 + +[Preset] +category = Trophy +name = Gold +$trophy = 3 + +[Preset] +category = Trophy +name = Silver +$trophy = 2 + +[Preset] +category = Trophy +name = Bronze +$trophy = 1 + +[Preset] +category = Trophy +name = None +$trophy = 0 + +[Preset] +category = Stars +name = 3 +$stars = 3 + +[Preset] +category = Stars +name = 2 +$stars = 2 + +[Preset] +category = Stars +name = 1 +$stars = 1 + +[Preset] +category = Stars +name = 0 +$stars = 0 diff --git a/src/MarioKart8/Cheats/UnlockCharacters/patch_UnlockCharacter.asm b/src/MarioKart8/Cheats/UnlockCharacters/patch_UnlockCharacter.asm new file mode 100644 index 00000000..595eb1c7 --- /dev/null +++ b/src/MarioKart8/Cheats/UnlockCharacters/patch_UnlockCharacter.asm @@ -0,0 +1,26 @@ +[MarioKart8_UnlockCharacter] +moduleMatches = 0x9F0A90B7, 0xD09700CE ; v4.2(EU/NA/JP), v4.1(EU/NA/JP) +.origin = codecave + +UnlockCharactersMod: +;r11 == 0x2e6b6690 +lis r30, 0x0303 +ori r30, r30, 0x0303 +stw r30, 0x0(r11) +stw r30, 0x4(r11) +stw r30, 0x8(r11) +stw r30, 0xC(r11) +stw r30, 0x10(r11) +stw r30, 0x14(r11) +stw r30, 0x18(r11) +sth r30, 0x1C(r11) +lbzx r30, r11, r0 +blr + +[MarioKart8_UnlockCharacter_v42] +moduleMatches = 0x9F0A90B7 ; v4.2(EU/NA/JP) +0x024D76AC = bla UnlockCharactersMod + +[MarioKart8_UnlockCharacter_v41] +moduleMatches = 0xD09700CE ; v4.1(EU/NA/JP) +0x024D7328 = bla UnlockCharactersMod diff --git a/src/MarioKart8/Cheats/UnlockCharacters/rules.txt b/src/MarioKart8/Cheats/UnlockCharacters/rules.txt new file mode 100644 index 00000000..fe03e083 --- /dev/null +++ b/src/MarioKart8/Cheats/UnlockCharacters/rules.txt @@ -0,0 +1,7 @@ +[Definition] +titleIds = 000500001010EC00,000500001010ED00,000500001010EB00 +name = Unlock Characters! +path = "Mario Kart 8/Cheats/Unlock Characters" +description = Unlock Every Character! +#Credits: Intra +version = 7 diff --git a/src/MarioKart8/Cheats/UnlockStamps/patch_UnlockStamps.asm b/src/MarioKart8/Cheats/UnlockStamps/patch_UnlockStamps.asm new file mode 100644 index 00000000..654ad929 --- /dev/null +++ b/src/MarioKart8/Cheats/UnlockStamps/patch_UnlockStamps.asm @@ -0,0 +1,24 @@ +[MarioKart8_UnlockCharacter] +moduleMatches = 0x9F0A90B7, 0xD09700CE ; v4.2(EU/NA/JP), v4.1(EU/NA/JP) +.origin = codecave + +UnlockStamps: +;r11 == 0x2e6b6790 +li r12, 3 ;; +li r30, 90 +mtctr r30 +addi r30, r11, 10-1 +_forloopUnlockStamps: + stbu r12, 1(r30) + bdnz _forloopUnlockStamps + +lbzx r30,r11,r0 +blr + +[MarioKart8_UnlockCharacter_v42] +moduleMatches = 0x9F0A90B7 ; v4.2(EU/NA/JP) +0x024D7A6C = bla UnlockStamps + +[MarioKart8_UnlockCharacter_v41] +moduleMatches = 0xD09700CE ; v4.1(EU/NA/JP) +0x024D76E8 = bla UnlockStamps diff --git a/src/MarioKart8/Cheats/UnlockStamps/rules.txt b/src/MarioKart8/Cheats/UnlockStamps/rules.txt new file mode 100644 index 00000000..04aee1df --- /dev/null +++ b/src/MarioKart8/Cheats/UnlockStamps/rules.txt @@ -0,0 +1,7 @@ +[Definition] +titleIds = 000500001010EC00,000500001010ED00,000500001010EB00 +name = Unlock Stamps! +path = "Mario Kart 8/Cheats/Unlock Stamps" +description = Unlock All 100 Stamps! +#Credits: Intra +version = 7