Skip to content

Commit

Permalink
Merge pull request #96 from irdkwia/master
Browse files Browse the repository at this point in the history
Adds a patch for an extra menu to choose the starter
  • Loading branch information
theCapypara authored Mar 25, 2021
2 parents 65eab01 + 7c75cae commit c08e2e4
Show file tree
Hide file tree
Showing 15 changed files with 1,049 additions and 9 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
; For use with ARMIPS
; 2021/03/23
; For Explorers of Sky EU Only
; ------------------------------------------------------------------------------
; Adds a menu to choose the starter after the quiz
; ------------------------------------------------------------------------------


.relativeinclude on
.nds
.arm

.definelabel SpecialStringID, 0xA35

.definelabel OrgSize, 0x2E80
.definelabel ExtendSize, 0x1000
.definelabel OverlayStart, 0x0238AC80


.definelabel RandMax, 0x02002274

.definelabel MenuCreateOptionString, 0x020225EC

.definelabel ChangeBorderColor, 0x02027D74

.definelabel CreateNormalMenu, 0x0202B3E0
.definelabel FreeNormalMenu, 0x0202B7B8
.definelabel GetNormalMenuResult, 0x0202B870

.definelabel CreateAdvancedMenu, 0x0202BD14
.definelabel FreeAdvancedMenu, 0x0202BF38
.definelabel IsAdvancedMenuActive, 0x0202BFD0
.definelabel GetAdvancedMenuCurrentOption, 0x0202BFF0
.definelabel GetAdvancedMenuResult, 0x0202C004

.definelabel IsDBActive, 0x0202F474
.definelabel ShowMessageInDB, 0x0202F4A8
.definelabel ShowDB, 0x0202F698

.definelabel CreatePortraitBox, 0x0202F8A0
.definelabel ShowPortraitBox, 0x0202F984
.definelabel HidePortraitBox, 0x0202F9D0

.definelabel PrepDBUnk1, 0x020238B4

.definelabel UnknownFuncCase0, 0x0204A4D0

.definelabel SetPortraitPkmnID, 0x0204DB0C
.definelabel SetPortraitExpressionID, 0x0204DB2C
.definelabel SetPortraitUnknownAttr, 0x0204DB3C
.definelabel SetPortraitAttrStruct, 0x0204DB80


.definelabel BegSwitch, 0x0238B0E0
.definelabel EndSwitch, 0x0238B1F4

.definelabel case0_alt1, 0x0238B220
.definelabel case0_alt2, 0x0238B234

.definelabel HookEventSeq, 0x0238B908

.definelabel EndCodeSwitch, 0x0238C8B4

.definelabel WaitForNextStep, 0x0238C98C

.definelabel OldGetPersonalityResult, 0x0238C8E8

.definelabel BorderColorTable, 0x0238CB50
.definelabel PortraitAttrStruct, 0x0238CB54
.definelabel QuizMenu1, 0x0238CBB4
.definelabel PlayersListPkmnID, 0x0238CBF8
.definelabel MenuOptionString, 0x0238D9B0

.definelabel GlobalStructPointer, 0x0238D9E0
;0x2 = CurrentDialogueBoxID [0x1]
;0x3 = CurrentMenuID [0x1]
;0x5 = CurrentPortraitBoXID [0x1]
;0x20 = NextSwitchCase [0x4]
;0x30 = WaitingCase [0x4]
;0x5F = Gender [0x1]

.definelabel DBLayout5, 0x0238D9EC
.definelabel DBLayout6, 0x0238D9FC
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
; For use with ARMIPS
; 2021/03/23
; For Explorers of Sky JP Only
; ------------------------------------------------------------------------------
; Adds a menu to choose the starter after the quiz
; ------------------------------------------------------------------------------

; WARNING! Not tested!

.relativeinclude on
.nds
.arm

.definelabel SpecialStringID, 0xA35 ;Guess

.definelabel OrgSize, 0x2E80
.definelabel ExtendSize, 0x1000
.definelabel OverlayStart, 0x0238B6A0


.definelabel RandMax, 0x02002274

.definelabel MenuCreateOptionString, 0x02022440

.definelabel ChangeBorderColor, 0x02027DE0

.definelabel CreateNormalMenu, 0x0202B444
.definelabel FreeNormalMenu, 0x0202B81C
.definelabel GetNormalMenuResult, 0x0202B8D4

.definelabel CreateAdvancedMenu, 0x0202BD78
.definelabel FreeAdvancedMenu, 0x0202BF9C
.definelabel IsAdvancedMenuActive, 0x0202C034
.definelabel GetAdvancedMenuCurrentOption, 0x0202C054
.definelabel GetAdvancedMenuResult, 0x0202C068

.definelabel IsDBActive, 0x0202F4C4
.definelabel ShowMessageInDB, 0x0202F4F8
.definelabel ShowDB, 0x0202F6E8

.definelabel CreatePortraitBox, 0x0202F8F0
.definelabel ShowPortraitBox, 0x0202F9D4
.definelabel HidePortraitBox, 0x0202FA20

.definelabel PrepDBUnk1, 0x020236E0

.definelabel UnknownFuncCase0, 0x0204A500

.definelabel SetPortraitPkmnID, 0x0204DB34
.definelabel SetPortraitExpressionID, 0x0204DB54
.definelabel SetPortraitUnknownAttr, 0x0204DB64
.definelabel SetPortraitAttrStruct, 0x0204DBA8


.definelabel BegSwitch, 0x0238BB00
.definelabel EndSwitch, 0x0238BC14

.definelabel case0_alt1, 0x0238BC40
.definelabel case0_alt2, 0x0238BC54

.definelabel HookEventSeq, 0x0238C328

.definelabel EndCodeSwitch, 0x0238D2D8

.definelabel WaitForNextStep, 0x0238D3B0

.definelabel OldGetPersonalityResult, 0x0238D30C

.definelabel BorderColorTable, 0x0238D578
.definelabel PortraitAttrStruct, 0x0238D57C
.definelabel QuizMenu1, 0x0238D5DC
.definelabel PlayersListPkmnID, 0x0238D620
.definelabel MenuOptionString, 0x0238E3D8

.definelabel GlobalStructPointer, 0x0238E408
;0x2 = CurrentDialogueBoxID [0x1]
;0x3 = CurrentMenuID [0x1]
;0x5 = CurrentPortraitBoXID [0x1]
;0x20 = NextSwitchCase [0x4]
;0x30 = WaitingCase [0x4]
;0x5F = Gender [0x1]

.definelabel DBLayout5, 0x0238E414
.definelabel DBLayout6, 0x0238E424
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
; For use with ARMIPS
; 2021/03/23
; For Explorers of Sky NA Only
; ------------------------------------------------------------------------------
; Adds a menu to choose the starter after the quiz
; ------------------------------------------------------------------------------


.relativeinclude on
.nds
.arm

.definelabel SpecialStringID, 0xA35

.definelabel OrgSize, 0x2E80
.definelabel ExtendSize, 0x1000
.definelabel OverlayStart, 0x0238A140


.definelabel RandMax, 0x02002274

.definelabel MenuCreateOptionString, 0x020223F0

.definelabel ChangeBorderColor, 0x02027A80

.definelabel CreateNormalMenu, 0x0202B0EC
.definelabel FreeNormalMenu, 0x0202B4C4
.definelabel GetNormalMenuResult, 0x0202B57C

.definelabel CreateAdvancedMenu, 0x0202BA20
.definelabel FreeAdvancedMenu, 0x0202BC44
.definelabel IsAdvancedMenuActive, 0x0202BCDC
.definelabel GetAdvancedMenuCurrentOption, 0x0202BCFC
.definelabel GetAdvancedMenuResult, 0x0202BD10

.definelabel IsDBActive, 0x0202F180
.definelabel ShowMessageInDB, 0x0202F1B4
.definelabel ShowDB, 0x0202F3A4

.definelabel CreatePortraitBox, 0x0202F5AC
.definelabel ShowPortraitBox, 0x0202F690
.definelabel HidePortraitBox, 0x0202F6DC

.definelabel PrepDBUnk1, 0x02023690

.definelabel UnknownFuncCase0, 0x0204A198

.definelabel SetPortraitPkmnID, 0x0204D7D4
.definelabel SetPortraitExpressionID, 0x0204D7F4
.definelabel SetPortraitUnknownAttr, 0x0204D804
.definelabel SetPortraitAttrStruct, 0x0204D848


.definelabel BegSwitch, 0x0238A5A0
.definelabel EndSwitch, 0x0238A6B4

.definelabel case0_alt1, 0x0238A6E0
.definelabel case0_alt2, 0x0238A6F4

.definelabel HookEventSeq, 0x0238ADC8

.definelabel EndCodeSwitch, 0x0238BD74

.definelabel WaitForNextStep, 0x0238BE4C

.definelabel OldGetPersonalityResult, 0x0238BDA8

.definelabel BorderColorTable, 0x0238C010
.definelabel PortraitAttrStruct, 0x0238C014
.definelabel QuizMenu1, 0x0238C074
.definelabel PlayersListPkmnID, 0x238C0B8
.definelabel MenuOptionString, 0x0238CE70

.definelabel GlobalStructPointer, 0x0238CEA0
;0x2 = CurrentDialogueBoxID [0x1]
;0x3 = CurrentMenuID [0x1]
;0x5 = CurrentPortraitBoXID [0x1]
;0x20 = NextSwitchCase [0x4]
;0x30 = WaitingCase [0x4]
;0x5F = Gender [0x1]

.definelabel DBLayout5, 0x0238CEAC
.definelabel DBLayout6, 0x0238CEBC
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
; For use with ARMIPS
; 2021/03/23
; For Explorers of Sky All Versions
; ------------------------------------------------------------------------------
; Selects the correct version to use
; ------------------------------------------------------------------------------

.relativeinclude on

; Selects the correct region to apply the patch
.if PPMD_GameVer == GameVer_EoS_NA
.include "na/offsets.asm"
.include "common/patch.asm"
.elseif PPMD_GameVer == GameVer_EoS_EU
.include "eu/offsets.asm"
.include "common/patch.asm"
.elseif PPMD_GameVer == GameVer_EoS_JP
.include "jp/offsets.asm"
.include "common/patch.asm"
.endif

.relativeinclude off
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
; For use with ARMIPS
; 2021/03/23
; For Explorers of Sky All Versions
; ------------------------------------------------------------------------------
; Gets rid of the personality quiz
; ------------------------------------------------------------------------------
.org HookBeforeQuestions
.area 0x4*14
mov r1,#0xE
ldr r3,[r0, #+0x0]
mov r0,#0x0
strb r1,[r3, #+0x0]
mov r1,#9
str r1,[r3, #+0x24]
strb r0,[r3, #+0x5e]
strb r0,[r3, #+0x5f]
ldr r1,[r3, #+0x20]
add r1,r1,#0x1
str r1,[r3, #+0x20]
mov r1,#0x6F
mov r2,#0x1
bl SetGameVariable
.endarea
.org HookAfterQuestions
.area 0x4
mov r2,#0x48
.endarea
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
; For use with ARMIPS
; 2021/03/23
; For Explorers of Sky EU Only
; ------------------------------------------------------------------------------
; Adds a menu to choose the starter after the quiz
; ------------------------------------------------------------------------------


.relativeinclude on
.nds
.arm

.definelabel SetGameVariable, 0x0204BB58
.definelabel HookBeforeQuestions, 0x0238B240
.definelabel HookAfterQuestions, 0x0238B7BC
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
; For use with ARMIPS
; 2021/03/23
; For Explorers of Sky JP Only
; ------------------------------------------------------------------------------
; Adds a menu to choose the starter after the quiz
; ------------------------------------------------------------------------------

; WARNING! Not tested!

.relativeinclude on
.nds
.arm

.definelabel SetGameVariable, 0x0204BB80
.definelabel HookBeforeQuestions, 0x0238BC60
.definelabel HookAfterQuestions, 0x0238C1DC
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
; For use with ARMIPS
; 2021/03/23
; For Explorers of Sky NA Only
; ------------------------------------------------------------------------------
; Adds a menu to choose the starter after the quiz
; ------------------------------------------------------------------------------


.relativeinclude on
.nds
.arm

.definelabel SetGameVariable, 0x0204B820
.definelabel HookBeforeQuestions, 0x0238A700
.definelabel HookAfterQuestions, 0x0238AC7C
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
; For use with ARMIPS
; 2021/03/23
; For Explorers of Sky All Versions
; ------------------------------------------------------------------------------
; Selects the correct version to use
; ------------------------------------------------------------------------------

.relativeinclude on

; Selects the correct region to apply the patch
.if PPMD_GameVer == GameVer_EoS_NA
.include "na/offsets.asm"
.include "common/patch.asm"
.elseif PPMD_GameVer == GameVer_EoS_EU
.include "eu/offsets.asm"
.include "common/patch.asm"
.elseif PPMD_GameVer == GameVer_EoS_JP
.include "jp/offsets.asm"
.include "common/patch.asm"
.endif

.relativeinclude off
14 changes: 14 additions & 0 deletions skytemple_files/_resources/ppmdu_config/pmd2data.xml
Original file line number Diff line number Diff line change
Expand Up @@ -962,6 +962,20 @@
</OpenBin>
</Patch>

<!-- A patch to let the player choose its starter after the quiz -->
<Patch id="ChooseStarter" >
<OpenBin filepath="overlay/overlay_0013.bin">
<Include filename ="irdkwia_asm_mods/choose_starter/selector_overlay13.asm"/>
</OpenBin>
</Patch>

<!-- A patch to let the player choose its starter after the quiz -->
<Patch id="SkipQuiz" >
<OpenBin filepath="overlay/overlay_0013.bin">
<Include filename ="irdkwia_asm_mods/skip_quiz/selector_overlay13.asm"/>
</OpenBin>
</Patch>

<!-- A patch that fixes the unused dungeon chance -->
<Patch id="UnusedDungeonChancePatch" >
<OpenBin filepath="overlay/overlay_0029.bin">
Expand Down
Loading

0 comments on commit c08e2e4

Please sign in to comment.