Fantafaust

HGSS Repel Chain Tutorial

Oct 31st, 2024 (edited)
330
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.58 KB | None | 0 0
  1. HGSS Repel Chain Tutorial
  2. Based on: https://ds-pokemon-hacking.github.io/docs/generation-iv/guides/pt-reusable_repel/
  3.  
  4. There are THREE sections to this tutorial for new users. Read ALL sections first, then follow the instructions one by one.
  5. Old Users, follow the Old Users section first, then the rest.
  6.  
  7. Programs Needed:
  8. A text editor like Word, Notepad, or Notepad++
  9. Newest Canary DSPRE build(you should know where to get this)
  10. HxD(or another hex editor) - https://mh-nexus.de/en/downloads.php?product=HxD20
  11.  
  12.  
  13. --------------------------------------------OLD USERS-----------------------------------------------
  14. REVERSION-------------------------------REVERSION Section-------------------------------------------
  15.  
  16. FOR PREVIOUS USERS OF THIS TUTORIAL ONLY, NEW USERS SKIP THIS
  17.  
  18. -------------------------------------------Script File 3-------------------------------------------
  19. -----------------------------------------------DSPRE-----------------------------------------------
  20.  
  21. This is a necessary fix if coming from an old version of DSPRE, since Canary has been updated to account for it. If you have only used the Canary build of DSPRE or started from scratch on the Canary version, you can skip this section.
  22.  
  23. Use the Canary version of DSPRE to open a vanilla rom of HG or SS. Export the Script File 3 from this. Then close DSPRE.
  24. Open up your main HG or SS folder with the Canary DSPRE and open the Script Editor and open Script File 3. Import the vanilla Script file 3 that was exported earlier.
  25.  
  26. This section is now done.
  27.  
  28. ---------------------------------------------ARM9.bin-----------------------------------------------
  29.  
  30. in the hex editor open ARM9.bin and go to address 43D74(make SURE it says this offset in the bottom left corner)
  31. Use CTRL+B as above to replace the previously edited hex with this:
  32. ----------------------------------------------------------------------------------------------------
  33. 00 20 70 47 F8 B5 05 1C 80 30 00 68 C0 68 E6 F7 57 FC 07 1C 28 1C 80 30 00 68 C0 68 E5 F7 84 F8 A9 68 00 90 48 1C A8 60 28 1C 0E 78 FC F7 44 F8 01 1C 28 1C 80 30 00 68 FC F7 E2 FA 04 1C 28 1C FC F7 3A F8 80 35 01 1C 28 68 FC F7 D9 FA 05 1C 00 2E 0E D1 38 1C E6 F7 EF F8 06 1C 00 98 E5 F7 DF F8 01 1C 09 04 30 1C 09 0C 2A 1C 17 F0 F6 FE 0D E0 38 1C E6 F7 C4 F8 06 1C 00 98 E5 F7 D0 F8 01 1C 09 04 30 1C 09 0C 2A 1C 17 F0 3B FF 20 80 00 20 F8 BD
  34.  
  35. ----------------------------------------------------------------------------------------------------
  36.  
  37. This will restore the actual Dex Check along with the dummy check, and therefore fix Prof Oak.
  38. This section is now done.
  39. Consider yourself a new user now :)
  40. ----------------------------------------------------------------------------------------------------
  41. ----------------------------------------------------------------------------------------------------
  42.  
  43.  
  44.  
  45.  
  46.  
  47. --------------------------------------------NEW USERS-----------------------------------------------
  48. -------------------------------------------REPEL Section-------------------------------------------
  49. 1----------------------------------------Script File Edits-----------------------------------------
  50. -----------------------------------------------DSPRE-----------------------------------------------
  51.  
  52. In DSPRE open Script File 3.
  53. Completely replace the Script 23 entry with the following:
  54. ---------------------------------------------------------------------------------------------------
  55. Script 23:
  56. PlayFanfare 1500
  57. LockAll
  58. CheckItem 79 1 0x800C
  59. CompareVarValue 0x800C 1
  60. JumpIf EQUAL Function#177
  61. CheckItem 76 1 0x800C
  62. CompareVarValue 0x800C 1
  63. JumpIf EQUAL Function#177
  64. CheckItem 77 1 0x800C
  65. CompareVarValue 0x800C 1
  66. JumpIf EQUAL Function#177
  67. Message 65
  68. WaitAB
  69. CloseMessage
  70. ReleaseAll
  71. End
  72. ---------------------------------------------------------------------------------------------------
  73.  
  74. Switch to the Functions tab and ADD these functions AFTER function 156
  75. ---------------------------------------------------------------------------------------------------
  76. Function 177:
  77. Message 66
  78. OpenTouchScreen
  79. YesNoTouchScreen 0x800C
  80. CompareVarValue 0x800C 0
  81. JumpIf EQUAL Function#178
  82. CloseMessage
  83. CloseTouchScreen
  84. ReleaseAll
  85. End
  86.  
  87. Function 178:
  88. MultiTouchStandardText 1 1 0 1 0x800C
  89. CheckItem 79 1 0x8000
  90. CompareVarValue 0x8000 1
  91. CallIf EQUAL Function#179
  92. CheckItem 76 1 0x8000
  93. CompareVarValue 0x8000 1
  94. CallIf EQUAL Function#180
  95. CheckItem 77 1 0x8000
  96. CompareVarValue 0x8000 1
  97. CallIf EQUAL Function#181
  98. CreateMultiTouchBox 33 255 3
  99. CloseMultiTouch
  100. CompareVarValue 0x800C 0
  101. JumpIf EQUAL Function#182
  102. CompareVarValue 0x800C 1
  103. JumpIf EQUAL Function#183
  104. CompareVarValue 0x800C 2
  105. JumpIf EQUAL Function#184
  106. CloseTouchScreen
  107. CloseMessage
  108. ReleaseAll
  109. End
  110.  
  111. Function 179:
  112. CreateMultiTouchBox 30 255 0
  113. Return
  114.  
  115. Function 180:
  116. CreateMultiTouchBox 31 255 1
  117. Return
  118.  
  119. Function 181:
  120. CreateMultiTouchBox 32 255 2
  121. Return
  122.  
  123. Function 182:
  124. CloseTouchScreen
  125. CloseMessage
  126. AdrsValueSet 0x020FB0DC 33
  127. AdrsValueSet 0x020FB0DD 203
  128. AdrsValueSet 0x020FB0DE 15
  129. AdrsValueSet 0x020FCB60 100
  130. DummyNationalDexCheck
  131. AdrsValueSet 0x020FB0DC 117
  132. AdrsValueSet 0x020FB0DD 61
  133. AdrsValueSet 0x020FB0DE 4
  134. TakeItem 79 1 0x8000
  135. PlayFanfare 1535
  136. WaitFanfare 1535
  137. TextPlayerName 0
  138. TextItem 1 79
  139. Message 67
  140. WaitButton
  141. CloseMessage
  142. ReleaseAll
  143. Return
  144.  
  145. Function 183:
  146. CloseTouchScreen
  147. CloseMessage
  148. AdrsValueSet 0x020FB0DC 33
  149. AdrsValueSet 0x020FB0DD 203
  150. AdrsValueSet 0x020FB0DE 15
  151. AdrsValueSet 0x020FCB60 150
  152. DummyNationalDexCheck
  153. AdrsValueSet 0x020FB0DC 117
  154. AdrsValueSet 0x020FB0DD 61
  155. AdrsValueSet 0x020FB0DE 4
  156. TakeItem 76 1 0x8000
  157. PlayFanfare 1535
  158. WaitFanfare 1535
  159. TextPlayerName 0
  160. TextItem 1 76
  161. Message 67
  162. WaitButton
  163. CloseMessage
  164. ReleaseAll
  165. Return
  166.  
  167. Function 184:
  168. CloseTouchScreen
  169. CloseMessage
  170. AdrsValueSet 0x020FB0DC 33
  171. AdrsValueSet 0x020FB0DD 203
  172. AdrsValueSet 0x020FB0DE 15
  173. AdrsValueSet 0x020FCB60 250
  174. DummyNationalDexCheck
  175. AdrsValueSet 0x020FB0DC 117
  176. AdrsValueSet 0x020FB0DD 61
  177. AdrsValueSet 0x020FB0DE 4
  178. TakeItem 77 1 0x8000
  179. PlayFanfare 1535
  180. WaitFanfare 1535
  181. TextPlayerName 0
  182. TextItem 1 77
  183. Message 67
  184. WaitButton
  185. CloseMessage
  186. ReleaseAll
  187. Return
  188. ---------------------------------------------------------------------------------------------------
  189.  
  190. Save Script File 3 with the Save Current File button on the left.
  191. Confirm you saved, there should be no asterisks on the tabs in the right panel.
  192. This section is now done.
  193.  
  194.  
  195.  
  196. ---------------------------------------------------------------------------------------------------
  197. 2-------------------------------------Text Archive Additions---------------------------------------
  198. ---------------------------------------------------------------------------------------------------
  199.  
  200. In DSPRE open the Text Editor and edit the following text archives to have the text specified,
  201. at the number entry specified.
  202. Start with Text Archive 40.
  203. ---------------------------------------------------------------------------------------------------
  204. [Text Archive 40]
  205. 66: Repel’s effect wore off...\nWould you like to use another one? \v0200\x0001\x0000
  206. 67: \v0103ぁ\x0000\x0000 used the\n\v0108ぁ\x0001\x0000.\rWild Pokémon will be repelled.
  207. ---------------------------------------------------------------------------------------------------
  208.  
  209. Save Text Archive 40 with the Save Current Archive button on the left.
  210. Open Text Archive 191
  211. ---------------------------------------------------------------------------------------------------
  212. [Text Archive 191]
  213. 30: Repel
  214. 31: Super Repel
  215. 32: Max Repel
  216. 33: CANCEL
  217. ---------------------------------------------------------------------------------------------------
  218.  
  219. Save Text Archive 191 with the Save Current Archive button on the left.
  220. This section is now done.
  221.  
  222.  
  223.  
  224. ----------------------------------------------FINAL-------------------------------------------------
  225. 3----------------------------------------Hex Edit Section-------------------------------------------
  226. ---------------------------------------------ARM9.bin-----------------------------------------------
  227.  
  228. Open the Arm9.bin in HxD and go to offset 0FCB20(make SURE it says this offset in the bottom left corner)
  229. Copy the following hex code(numbers, spaces, and letters):
  230. ----------------------------------------------------------------------------------------------------
  231. 03 48 01 68 03 48 09 18 03 48 02 78 0A 70 70 47 80 18 11 02 19 69 00 00 60 CB 0F 02
  232.  
  233. ----------------------------------------------------------------------------------------------------
  234.  
  235. Use CTRL+B to replace the hex starting at offset 0FCB20
  236. Save, and you're done.
Advertisement
Add Comment
Please, Sign In to add comment