KingJigglypuff

Sceptile Installation Requirements

Nov 9th, 2024 (edited)
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.95 KB | None | 0 0
  1. [NOTICE FOR REMIX USERS]: EVEN IF ALL STEPS ARE FOLLOWED, AND ALL FILE AND CODE CHANGES ARE MADE, THE GAME WILL STILL CRASH IF ATTEMPTING TO USE LEECH SEED OR THE STICK TAUNT. I STRONGLY RECOMMEND YOU TO EITHER WAIT FOR REX, OR INSTALL YOUR FAVORITE REMIX CHARACTERS INTO P+EX. IF YOU WISH TO IGNORE THIS WARNING, THEN YOU MAY CONTINUE FOLLOWING THIS GUIDE, BUT I WILL NOT OFFER SUPPORT FOR THOSE USING REMIX.
  2.  
  3. This document is only for people who aren't using the latest P+Ex (as of this document, the latest P+Ex is v1.5.1) and want to add Sceptile into their own Ex build. If you're already on v1.5.1 or are using a build based off it, then you can ignore this guide.
  4.  
  5. If you're not on a build that's based off of P+Ex v1.5, then you will need the following to make Sceptile work [any code or file mentions here you can grab from the P+Ex Github (https://github.com/KingJigglypuff/project-plus-ex)]:
  6.  
  7. <ItemEx Engine>
  8. You will need to completely integrate the ItemEx engine into your build if it lacks it, as the engine requires specific code and file changes, even if they don't relate to Sceptile. Below are a list of files which were edited in P+Ex v1.5 for ItemEx integration.
  9.  
  10. <ItemEx File Checks>
  11. ItemEx.asm (Source/Community): Contains the entire coding backend for the ItemEx engine.
  12. DoubleCherry.asm (Source/Community): Contains coding necessary to make the Double Cherry item work.
  13. info_training.pac (pf/info2): Misc Data[20] and Misc Data[130] have been modified for changes made with ItemEx
  14. The "fire", "hammerbros", and "hammerbroshammer" folders (pf/item): Contains item variants for Moltres and the Hammer Bros. Assist Trophy.
  15. Itm01Param.pac, Itm02Param.pac, and Itm8249Param.pac (pf/item): Contains param info for the previously mentioned item variants.
  16. ItmCommonBrres.pac (pf/item): Contains the models, textures, and animations for every item in the game.
  17. ItmCommonParam.pac (pf/item): Contains the PSA coding for every item in the game.
  18. ItmParam.pac (pf/item): Contains param data for every item in the game.
  19. mu_menumain.pac (pf/menu2): The MenuRule_en archive has been modified to include rule settings related to ItemEx. To save yourself the time, simply make your edits to sc_selcharacter2.pac (also in pf/menu2), and export its MenuRule_en archive and import it into your mu_menumain.pac.
  20. common3.pac (pf/system): Delete the ItmCommonBrres, ItmCommonParam, and ItmParam archives.
  21.  
  22. [NOTE FOR REMIX USERS]: Due to REMIX using the 242 extension, you will need to make a single tweak to the ItemEx.asm file. Find the parameter named "BRAWLEX_FIGHTER_NAMES", and replace the offset with the following: 0x817C88E0. Additionally, you won't be able to integrate all of the menu changes, as the all of the added textures make REMIX's sc_selcharacter2.pac too big to load (the game will crash upon entering the CSS or the Rules menu). The second best thing is to integrate everything except the added textures. I'd personally recommend you just wait for REX, but if you really want to have Sceptile in REMIX, then continue following this guide.
  23.  
  24. <Generate and Throw Item PSA Command>
  25. Stemming off from ItemEx comes another item-related code. All you need is the GenerateAndThrowItem.asm file (Source/Community/PSA).
  26.  
  27. <Additional Item Search Target Modes Code>
  28. This code is responsible for having the Leech Seed orbs home in onto Sceptile. If this code is absent from your build, any healing orbs emitted by Leech Seed will simply circle in-place.
  29.  
  30. To obtain this code, you can do one of two things:
  31. 1.) Copy over Misc.asm (Source/P+Ex)
  32. 2.) If you only want the code, copy the following, and add it to your codeset:
  33. ####################################################################################
  34. Additional Item Search Target Modes [Kapedani] #
  35. # #
  36. # 0x14: TeamOwnerTaskId #
  37. # 0xXYY where 0xX + 0x12B = nodeId, 0 for just regular position #
  38. ####################################################################################
  39. .alias g_ftManager = 0x80B87C28
  40. .alias ftManager__getFighter = 0x80814f20
  41. .alias g_ftEntryManager = 0x80B87c48
  42. .alias ftEntryManager__getEntryIdFromTaskId = 0x80823f90
  43.  
  44. .macro lwd(<reg>, <addr>)
  45. {
  46. .alias temp_Lo = <addr> & 0xFFFF
  47. .alias temp_Hi_ = <addr> / 0x10000
  48. .alias temp_r = temp_Lo / 0x8000
  49. .alias temp_Hi = temp_Hi_ + temp_r
  50. lis <reg>, temp_Hi
  51. lwz <reg>, temp_Lo(<reg>)
  52. }
  53. .macro lwi(<reg>, <val>)
  54. {
  55. .alias temp_Hi = <val> / 0x10000
  56. .alias temp_Lo = <val> & 0xFFFF
  57. lis <reg>, temp_Hi
  58. ori <reg>, <reg>, temp_Lo
  59. }
  60. .macro call(<addr>)
  61. {
  62. %lwi(r12, <addr>)
  63. mtctr r12
  64. bctrl
  65. }
  66. .macro branch(<addr>)
  67. {
  68. %lwi(r12, <addr>)
  69. mtctr r12
  70. bctr
  71. }
  72.  
  73. HOOK @ $8099234c # BaseItem::searchTarget
  74. {
  75. andi. r10, r30, 0xff # filter extra parameters out to get option
  76. cmplwi r10, 20 # \ check if additional option 0x14
  77. bne+ %end% # /
  78. lwz r3, 0x60(r27) # \
  79. lwz r3, 0xd8(r3) # |
  80. lwz r3, 0x18(r3) # |
  81. lwz r12, 0x0(r3) # | this->moduleAccesser->moduleEnumeration->teamModule->getTeamOwnerId()
  82. lwz r12, 0x28(r12) # |
  83. mtctr r12 # |
  84. bctrl # /
  85. %branch (0x80992924) # branch to emitterTaskId case (case 6) but with teamOwnerTaskId in r3
  86. }
  87. op rlwinm r0, r10, 2, 0, 29 @ $80992358
  88.  
  89. HOOK @ $80992fc8 # BaseItem::searchTarget
  90. {
  91. rlwinm. r23,r30,24,28,31 # \ check if selected node is 0 (skip if it is)
  92. beq+ end # / mask and shift (value >> 8) & 0xf
  93. ## Get special node pos
  94. lwz r4, 0x0(r28) # get found task id
  95. %lwd (r3, g_ftEntryManager) # \
  96. li r5, 0 # |
  97. %call (ftEntryManager__getEntryIdFromTaskId) # | Check if emitterTaskId belongs to a fighter
  98. cmpwi r3, 0 # |
  99. blt+ end # /
  100. mr r4, r3 # \
  101. %lwd (r3, g_ftManager) # |
  102. li r5, -1 # | moduleAccesser = g_ftManager->getFighter(entryId, -1)
  103. %call (ftManager__getFighter) # |
  104.  
  105. lwz r22, 0x60(r3) # \
  106. addi r4, r23, 0x12B # |
  107. lwz r22, 0xd8(r22) # |
  108. lwz r3, 0x4(r22) # |
  109. lwz r12, 0x8(r3) # | nodeId = stageObject->moduleAccesser->moduleEnumeration->modelModule->getCorectNodeId(0x12B + node)
  110. lwz r12, 0x8c(r12) # |
  111. mtctr r12 # |
  112. bctrl # /
  113. mr r5, r3 # \
  114. li r6, 0x0 # |
  115. mr r3, r29 # |
  116. lwz r4, 0x4(r22) # |
  117. lwz r12, 0x8(r4) # | pos = moduleEnumeration->modelModule->getNodeGlobalPosition(nodeId)
  118. lwz r12, 0x98(r12) # |
  119. mtctr r12 # |
  120. bctrl # /
  121. end:
  122. cmpwi r30, 1 # Original operation
  123. }
  124.  
  125. <Item Custom IC-Basics>
  126. This code is responsible for item-related matters, and is used within Sceptile's item articles. Without it, the game will crash when attempting to use Leech Seed or the stick taunt.
  127.  
  128. To obtain this code, you can do one of two things:
  129. 1.) Copy over IC-Basics.asm (Source/Community/PSA)
  130. 2.) If you only want the code, copy the following, and add it to your codeset:
  131.  
  132. ###############################################################################################
  133. Item Custom IC-Basic[21021] = EmitterTask, IC-Basic[21022] = TeamOwnerTask [MarioDox, Kapedani]
  134. ###############################################################################################
  135. HOOK @ $809CA83C #getVariableIntCore/[itValueAccesser]
  136. {
  137. cmplwi r0, 21 #original op + 1
  138. beq- customIC_21
  139. cmplwi r0, 22
  140. bne+ %END%
  141. customIC_22:
  142. lwz r3, 0xd8(r28) # \
  143. lwz r3, 0x18(r3) # |
  144. lwz r12, 0x0(r3) # | moduleAccesser->moduleEnumeration->teamModule->getTeamOwnerTaskId()
  145. lwz r12, 0x28(r12) # |
  146. mtctr r12 # |
  147. bctrl # /
  148. b gotTaskId
  149. customIC_21:
  150. lwz r3, 0x8C8(r3) #emitterTaskId
  151. gotTaskId:
  152. addis r0, r3, 0x1
  153. cmplwi r0, 0xFFFF
  154. beq- customIC_21_fail
  155. lis r12, 0x8002 #\
  156. ori r12, r12, 0xDC40 #| getTask/[gfTask]
  157. mtctr r12 #|
  158. bctrl #/
  159. b goToEnd
  160. customIC_21_fail:
  161. li r3, 0
  162. goToEnd:
  163. lis r12, 0x809C
  164. ori r12, r12, 0xAC74
  165. mtctr r12
  166. bctrl
  167. }
  168.  
  169. <Graphic Effect Animation>
  170. While this isn't required, Sceptile's Neutral Air will look different without this change. All you need to do is open P+Ex's common3.pac (pf/system), open the ef_common archive, export Model Data[17], and import it into your own common3's ef_common, replacing the Model Data of the same index.
  171.  
  172. [NOTE FOR REMIX USERS]: If you're running PMEX REMIX v0.95 DX with both hotfixes and no additional changes (this includes added characters), then you can take the contents of this download, and place them into your build. https://www.mediafire.com/file/l57kk019jbn8fhg/PMEX_REMIX_v0.95DX_Unofficial_ItemEx_Integration_Pack.7z/file
  173.  
  174. If you have additional changes, make sure nothing conflicts, then rebuild BOOST.gct (and optionally, NETBOOST.gct) by dragging and dropping BOOST.txt (and optionally, NETBOOST.txt) over GCTRealMate. However, do note that REMIX is very close to the code limit, and any further code changes run the risk of breaking the build.
  175.  
  176. If you run into any trouble trying to get things to work, there are one of three Discord servers you can join:
  177. Custom Brawl Modding (CBM for short): https://discord.gg/GbxJhbv
  178. My dedicated server (Meme Machine): https://discord.gg/PngDxcC
  179. PMEX REMIX (ONLY JOIN IF YOU USE REMIX): https://discord.gg/NXqUmCmgD9
  180.  
  181. If you join any of these servers looking for help, please keep it to the appropriate help channels.
Add Comment
Please, Sign In to add comment