Fantafaust

HM Integration

Aug 26th, 2025 (edited)
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.23 KB | None | 0 0
  1. HM Integration/Move Tutor Hijack Tutorial
  2.  
  3. --------------------------------------------------------------------------------------------------
  4.  
  5. This tutorial will let you maintain the base game HM cut-ins, but you don't have to teach any pokemon HMs unless you desperately want to teach a pokemon Fly for some reason.
  6. It uses AdrsValueSet and CheckHeadbuttCompatibility to fake the existence of a new tutor who checks for compatibility for the HM being asked for(ie you clicked a CUT tree) among your available pokemon.
  7. So long as such a Pokemon is found, it will use that Pokemon for the HM animation.
  8.  
  9. --------------------------------------------------------------------------------------------------
  10.  
  11. There are SIX sections to this tutorial. Read ALL sections first, then follow the instructions one by one.
  12.  
  13. Programs Needed:
  14. Newest Canary DSPRE build(check the pins in DSPRE Support)
  15. HxD(or another hex editor) - https://mh-nexus.de/en/downloads.php?product=HxD20
  16.  
  17. Pre-Existing Edits needed:
  18. Surf check removal hex edit in Overlay_1, from the Discord:
  19. https://discord.com/channels/446824489045721090/468060243688161300/1258565663736463473
  20.  
  21.  
  22. -------------------------------------------WAZA Section-------------------------------------------
  23. 1----------------------------------------WAZA OSHIE Edits-----------------------------------------
  24. -----------------------------------------------HXD------------------------------------------------
  25.  
  26. In your extracted rom Contents folder, navigate to data\fielddata\wazaoshie. You'll see a file called waza_oshie.bin.
  27. Edit the file extension to say .bin.bak aka:
  28. waza_oshie.bin.bak
  29.  
  30. Download my replacement file from the next post after this tutorial in the Discord's Tutorial Zone:
  31. https://discord.com/channels/446824489045721090/477197363954581542/1409795456929894522
  32. Place that .bin file in the folder.
  33.  
  34. You're done with this section.
  35.  
  36.  
  37. -------------------------------------------ARM9 Section-------------------------------------------
  38. 2-----------------------------------------ARM9 Tutor Hex------------------------------------------
  39. -----------------------------------------------HXD------------------------------------------------
  40.  
  41. Open the Arm9.bin in a hex editor and navigate to 0xFE930
  42. If you have not previously edited your Overlay_1 move tutor table specifically, copy the following bytes:
  43.  
  44. 23 01 28 00 BD 00 20 01 D2 00 20 00 C4 00 30 00 CD 00 20 01 09 00 40 00 07 00 40 00 14 01 30 01 08 00 40 00 BA 01 28 01 91 01 28 01 D2 01 30 00 7C 01 20 01 AD 00 20 02 B4 00 28 02 3A 01 30 00 0E 01 28 02 1B 01 40 01 C8 00 30 01 F6 00 28 01 EB 00 28 02 44 01 28 01 AC 01 40 00 9A 01 30 00 9E 01 28 01 B9 01 20 01 EF 00 28 01 92 01 28 01 4E 01 28 01 89 01 28 02 83 01 30 02 54 01 20 01 0F 01 30 00 01 01 30 01 1A 01 28 00 85 01 28 00 81 00 28 02 FD 00 30 02 A2 00 28 01 DC 00 40 01 51 00 20 02 6E 01 30 02 64 01 20 02 84 01 20 02 15 01 20 02 10 01 30 02 D7 00 30 02 43 00 20 01 8F 00 40 01 4F 01 20 02 C2 01 20 00 1D 00 00 03 0F 00 00 0B 13 00 00 0B 39 00 00 0B 46 00 00 0B FA 00 00 0B F9 00 00 0B 7F 00 00 0B AF 01 00 0B 94 00 00 0B
  45.  
  46. Confirm you're at 0xFE930, and if using HXD, use CTRL+B to paste in those copied bytes.
  47.  
  48. Save and you're done with this section.
  49.  
  50.  
  51. ----------------------------------------Overlay_1 Section-----------------------------------------
  52. 3-----------------------------------------Table Repoint-------------------------------------------
  53. -----------------------------------------------HXD------------------------------------------------
  54.  
  55. Open an uncompressed and marked uncompressed Overlay_1 in a hex editor.
  56. In this section we're repointing the move tutor table from Overlay_1 to the ARM9 area from the previous section.
  57. Copy the following bytes:
  58.  
  59. 30 E9 0F 02
  60.  
  61. Use the copied bytes to replace the following bytes(E0 93 20 02) at all of these locations:
  62. 0x1D320
  63. 0x1D324
  64. 0x1D4FC
  65. 0x1D74C
  66.  
  67.  
  68. Then we'll be changing the expected table length from 34 to 3D. Navigate to and edit these locations:
  69. 0x1D312
  70. 0x1D4EA
  71.  
  72. Save and you're done with this section.
  73.  
  74.  
  75. ----------------------------------------Script Section 1------------------------------------------
  76. 4-----------------------------------------HM Integration------------------------------------------
  77. ----------------------------------------------DSPRE-----------------------------------------------
  78.  
  79. In this we use checks for both the HM item itself, the appropriate badge, and pokemon compatibility(no teaching), as well as adding the flight system logic and flag checks.
  80. -
  81. In DSPRE back up your Script File 146.
  82. Import the Script File 146 file from the attached post in the Discord's Tutorial Zone:
  83. https://discord.com/channels/446824489045721090/477197363954581542/1412040581776936970
  84.  
  85. Search the script for HM0 and confirm that all instances of:
  86. CheckBadge ? 0x800C
  87. are accurate to your game, as like me you may intend to have different gym badges allow HM use.
  88.  
  89. ie the script/function that has:
  90. CheckItem ITEM_HM01 1 0x800C
  91. should also have:
  92. CheckBadge 1 0x800C
  93.  
  94. Vanilla as follows:
  95. Cut - Hive Badge
  96. CheckItem ITEM_HM01 1 0x800C
  97. CheckBadge 1 0x800C
  98.  
  99. Fly - Storm Badge
  100. CheckItem ITEM_HM02 1 0x800C
  101. CheckBadge 4 0x800C
  102.  
  103. Strength - Plain Badge
  104. CheckItem ITEM_HM04 1 0x800C
  105. CheckBadge 2 0x800C
  106.  
  107. Whirlpool - Glacier Badge
  108. CheckItem ITEM_HM05 1 0x800C
  109. CheckBadge 6 0x800C
  110.  
  111. Rock Smash - Zephyr Badge
  112. CheckItem ITEM_HM06 1 0x800C
  113. CheckBadge 0 0x800C
  114.  
  115. Waterfall - Rising Badge
  116. CheckItem ITEM_HM07 1 0x800C
  117. CheckBadge 7 0x800C
  118.  
  119. Rock Climb - Earth Badge
  120. CheckItem ITEM_HM08 1 0x800C
  121. CheckBadge 15 0x800C
  122.  
  123. Save the script and this section is done.
  124.  
  125.  
  126. ----------------------------------------Script Section 2------------------------------------------
  127. 5------------------------------------------Flight NPCs--------------------------------------------
  128. ----------------------------------------------DSPRE-----------------------------------------------
  129.  
  130. Now we'll add the Flight NPC and Flight Pokemon to each town. You can replace them with whomever you want and whatever pokemon you prefer, but I used the bird tamer and in Kanto I used Pidgeot, in Johto I used Noctowl.
  131. Add these NPCs to the Event files in your towns, and take note of the overworld ID of the pokemon you chose.
  132.  
  133. Now to the town Script files. The important part is to make sure the command:
  134. CMD_775 255 ??
  135. has the overworld ID of the pokemon npc from your event file instead of the question marks.
  136. So add these scripts to the bottom of each town Script File's Scripts section, renumbering these scripts to be just past the existing scripts, ie if the last one was 17, you would make these 18 and 19.
  137.  
  138. JOHTO
  139.  
  140. Script 200:
  141. ClearFlag 2585
  142. SetVar 0x800D 0
  143. CommonScript 0x2723
  144. CheckFlag 2585
  145. JumpIf DIFFERENT Function#200
  146. SendBackFollowingPoke
  147. CMD_775 255 ??
  148. FadeScreen 6 1 0 0
  149. WaitTime 32 0x800C
  150. Warp 0x40B0 0 0x40B1 0x40B2 Down
  151. FadeScreen 6 1 1 0
  152. WaitFadeScreen
  153. ReleaseAll
  154. End
  155.  
  156. Script 201:
  157. FacePlayer
  158. LockAll
  159. PlayCry SPECIES_NOCTOWL 0
  160. Message 21
  161. WaitCry
  162. WaitButton
  163. CloseMessage
  164. ReleaseAll
  165. End
  166.  
  167. -
  168.  
  169. Next, add this function in the Functions section, it will automatically renumber itself.
  170.  
  171. Function 200:
  172. ReleaseAll
  173. End
  174. ----------
  175. KANTO
  176.  
  177. Script 200:
  178. ClearFlag 2585
  179. SetVar 0x800D 1
  180. CommonScript 0x2723
  181. CheckFlag 2585
  182. JumpIf DIFFERENT Function#200
  183. SendBackFollowingPoke
  184. CMD_775 255 ??
  185. FadeScreen 6 1 0 0
  186. WaitTime 32 0x800C
  187. Warp 0x40B0 0 0x40B1 0x40B2 Down
  188. FadeScreen 6 1 1 0
  189. WaitFadeScreen
  190. ReleaseAll
  191. End
  192.  
  193. Script 201:
  194. FacePlayer
  195. LockAll
  196. PlayCry SPECIES_PIDGEOT 0
  197. Message 21
  198. WaitCry
  199. WaitButton
  200. CloseMessage
  201. ReleaseAll
  202. End
  203.  
  204. Next, add this function in the Functions section, it will automatically renumber itself.
  205.  
  206. Function 200:
  207. ReleaseAll
  208. End
  209.  
  210. ----------
  211.  
  212. Save and this section is done.
  213.  
  214.  
  215. -------------------------------------------Text Section-------------------------------------------
  216. 6------------------------------------------HM/Fly Text--------------------------------------------
  217. ----------------------------------------------DSPRE-----------------------------------------------
  218.  
  219. Open Text Archive 211 in DSPRE and import my version of the file from the discord Tutorial Zone:
  220. https://discord.com/channels/446824489045721090/477197363954581542/1409795456929894522
  221.  
  222. Save and this tutorial is done.
Advertisement
Add Comment
Please, Sign In to add comment