From 2f7347a4d3678bd691c1b35cd5fda8381501065f Mon Sep 17 00:00:00 2001 From: lasyan3 Date: Sun, 3 Nov 2019 16:29:59 +0100 Subject: [PATCH] [XCX] Add mod for more Reward Tickets. --- .../patches.txt | 91 +++++++++++++++++++ .../XenobladeX_mod_BladeMoreTickets/rules.txt | 41 +++++++++ Mods/XenobladeX/readme.md | 2 +- 3 files changed, 133 insertions(+), 1 deletion(-) create mode 100644 Mods/XenobladeX/XenobladeX_mod_BladeMoreTickets/patches.txt create mode 100644 Mods/XenobladeX/XenobladeX_mod_BladeMoreTickets/rules.txt diff --git a/Mods/XenobladeX/XenobladeX_mod_BladeMoreTickets/patches.txt b/Mods/XenobladeX/XenobladeX_mod_BladeMoreTickets/patches.txt new file mode 100644 index 00000000..3c09a756 --- /dev/null +++ b/Mods/XenobladeX/XenobladeX_mod_BladeMoreTickets/patches.txt @@ -0,0 +1,91 @@ +[XCX_BLADE_MORETICKETS] +moduleMatches = 0xF882D5CF, 0x30B6E091 ; 1.0.1E, 1.0.2U + +codeCaveSize = 0x60 + +0x00000000 = .short $mult +_mult = 0x00000000 +0x00000004 = .byte $uncap +_uncap = 0x00000004 + +; ---------------------------------------------------------------------------- +; WHO : cfs::CfSocialManager::addTradeTicket((int, unsigned int)) +; WHAT : Multiply the reward tickets given in many occasions + +_moreTickets = 0x00000008 +0x00000008 = lis r28, _mult@ha +0x0000000C = lhz r28, _mult@l(r28) +0x00000010 = mullw r28, r4, r28 +0x00000014 = blr + +0x022CA874 = bla _moreTickets + +; ---------------------------------------------------------------------------- +; WHO : cfs::CfSocialManager::addTradeTicket((int, unsigned int)) +; WHAT : Ignore the max number of tickets we can get + +_uncapTickets = 0x00000018 +0x00000018 = lis r5, _uncap@ha +0x0000001C = lbz r5, _uncap@l(r5) +0x00000020 = cmpwi r5, 1 +0x00000024 = beqlr +0x00000028 = mr r3, r25 +0x0000002C = blr + +0x022CAC5C = bla _uncapTickets + +; ---------------------------------------------------------------------------- +; WHO : menu::MenuMultiQuestInfoWindow::displayInfo((menu::MenuObject *,bool)) +; WHAT : + +_dispBefore = 0x00000030 +0x00000030 = lhz r26, 0x8C(r1) +0x00000034 = lis r24, _mult@ha +0x00000038 = lhz r24, _mult@l(r24) +0x0000003C = mullw r26, r26, r24 +0x00000040 = blr + +0x02B94718 = bla _dispBefore + +; ---------------------------------------------------------------------------- +; WHO : menu::MenuMultiQuestResult::setup((void)) +; WHAT : + +_dispAfter = 0x00000044 +0x00000044 = lhz r5, 0x5778(r29) +0x00000048 = lis r3, _mult@ha +0x0000004C = lhz r3, _mult@l(r3) +0x00000050 = mullw r5, r5, r3 +0x00000054 = blr + +0x02B9FE2C = bla _dispAfter + +##################################################################################################### +[XCX_BLADE_MORETICKETS_1U] +moduleMatches = 0xAB97DE6B ; 1.0.1U + +codeCaveSize = 0x30 + +0x00000000 = .short $mult +_mult = 0x00000000 +0x00000004 = .byte $uncap +_uncap = 0x00000004 + +_moreTickets = 0x00000008 +0x00000008 = lis r28, _mult@ha +0x0000000C = lhz r28, _mult@l(r28) +0x00000010 = mullw r28, r4, r28 +0x00000014 = blr + +0x022CA804 = bla _moreTickets + +_uncapTickets = 0x00000018 +0x00000018 = lis r5, _uncap@ha +0x0000001C = lbz r5, _uncap@l(r5) +0x00000020 = cmpwi r5, 1 +0x00000024 = beqlr +0x00000028 = mr r3, r25 +0x0000002C = blr + +0x022CABEC = bla _uncapTickets + diff --git a/Mods/XenobladeX/XenobladeX_mod_BladeMoreTickets/rules.txt b/Mods/XenobladeX/XenobladeX_mod_BladeMoreTickets/rules.txt new file mode 100644 index 00000000..c6e52dfd --- /dev/null +++ b/Mods/XenobladeX/XenobladeX_mod_BladeMoreTickets/rules.txt @@ -0,0 +1,41 @@ +[Definition] +titleIds = 0005000010116100,00050000101C4C00,00050000101C4D00 +name = "More Reward Tickets" +path = "Xenoblade Chronicles X/Mods/BLADE/More Reward Tickets" +description = Increase the Tickets gained with Squad tasks and missions. Uncapped presets ignore max tickets. +version = 3 + +[Preset] +name = "Gain more Tickets (x2)" +$mult = 2 +$uncap = 0 + +[Preset] +name = "Gain more Tickets (x5)" +$mult = 5 +$uncap = 0 + +[Preset] +name = "Gain more Tickets (x10)" +$mult = 10 +$uncap = 0 + +[Preset] +name = "Gain more Tickets (x100)" +$mult = 100 +$uncap = 0 + +[Preset] +name = "Gain more Tickets (x10 Uncapped)" +$mult = 10 +$uncap = 1 + +[Preset] +name = "Gain more Tickets (x100 Uncapped)" +$mult = 100 +$uncap = 1 + +[Preset] +name = "Gain more Tickets (x1000 Uncapped)" +$mult = 1000 +$uncap = 1 diff --git a/Mods/XenobladeX/readme.md b/Mods/XenobladeX/readme.md index d385c5c8..7e3d05ff 100644 --- a/Mods/XenobladeX/readme.md +++ b/Mods/XenobladeX/readme.md @@ -74,5 +74,5 @@ - **Force weather**: Force selected weather. Just select a preset and unload/reload the pack. ### Requirements -The most important requirement is of course cemuhook. All my mods have been tested and are known to work with cemuhook **0.5.6.7**. +The most important requirement is of course cemuhook. All my mods have been tested and are known to work with cemuhook **0.5.7.3**. All mods are compatibles with Xenoblade versions **1.0.1E** and **1.0.2U** (some of them with 1.0.1U), and are not supposed to impact savegames but be sure to make save backup just in case!