Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [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.
- 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.
- 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)]:
- <ItemEx Engine>
- 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.
- <ItemEx File Checks>
- ItemEx.asm (Source/Community): Contains the entire coding backend for the ItemEx engine.
- DoubleCherry.asm (Source/Community): Contains coding necessary to make the Double Cherry item work.
- info_training.pac (pf/info2): Misc Data[20] and Misc Data[130] have been modified for changes made with ItemEx
- The "fire", "hammerbros", and "hammerbroshammer" folders (pf/item): Contains item variants for Moltres and the Hammer Bros. Assist Trophy.
- Itm01Param.pac, Itm02Param.pac, and Itm8249Param.pac (pf/item): Contains param info for the previously mentioned item variants.
- ItmCommonBrres.pac (pf/item): Contains the models, textures, and animations for every item in the game.
- ItmCommonParam.pac (pf/item): Contains the PSA coding for every item in the game.
- ItmParam.pac (pf/item): Contains param data for every item in the game.
- 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.
- common3.pac (pf/system): Delete the ItmCommonBrres, ItmCommonParam, and ItmParam archives.
- [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.
- <Generate and Throw Item PSA Command>
- Stemming off from ItemEx comes another item-related code. All you need is the GenerateAndThrowItem.asm file (Source/Community/PSA).
- <Additional Item Search Target Modes Code>
- 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.
- To obtain this code, you can do one of two things:
- 1.) Copy over Misc.asm (Source/P+Ex)
- 2.) If you only want the code, copy the following, and add it to your codeset:
- ####################################################################################
- Additional Item Search Target Modes [Kapedani] #
- # #
- # 0x14: TeamOwnerTaskId #
- # 0xXYY where 0xX + 0x12B = nodeId, 0 for just regular position #
- ####################################################################################
- .alias g_ftManager = 0x80B87C28
- .alias ftManager__getFighter = 0x80814f20
- .alias g_ftEntryManager = 0x80B87c48
- .alias ftEntryManager__getEntryIdFromTaskId = 0x80823f90
- .macro lwd(<reg>, <addr>)
- {
- .alias temp_Lo = <addr> & 0xFFFF
- .alias temp_Hi_ = <addr> / 0x10000
- .alias temp_r = temp_Lo / 0x8000
- .alias temp_Hi = temp_Hi_ + temp_r
- lis <reg>, temp_Hi
- lwz <reg>, temp_Lo(<reg>)
- }
- .macro lwi(<reg>, <val>)
- {
- .alias temp_Hi = <val> / 0x10000
- .alias temp_Lo = <val> & 0xFFFF
- lis <reg>, temp_Hi
- ori <reg>, <reg>, temp_Lo
- }
- .macro call(<addr>)
- {
- %lwi(r12, <addr>)
- mtctr r12
- bctrl
- }
- .macro branch(<addr>)
- {
- %lwi(r12, <addr>)
- mtctr r12
- bctr
- }
- HOOK @ $8099234c # BaseItem::searchTarget
- {
- andi. r10, r30, 0xff # filter extra parameters out to get option
- cmplwi r10, 20 # \ check if additional option 0x14
- bne+ %end% # /
- lwz r3, 0x60(r27) # \
- lwz r3, 0xd8(r3) # |
- lwz r3, 0x18(r3) # |
- lwz r12, 0x0(r3) # | this->moduleAccesser->moduleEnumeration->teamModule->getTeamOwnerId()
- lwz r12, 0x28(r12) # |
- mtctr r12 # |
- bctrl # /
- %branch (0x80992924) # branch to emitterTaskId case (case 6) but with teamOwnerTaskId in r3
- }
- op rlwinm r0, r10, 2, 0, 29 @ $80992358
- HOOK @ $80992fc8 # BaseItem::searchTarget
- {
- rlwinm. r23,r30,24,28,31 # \ check if selected node is 0 (skip if it is)
- beq+ end # / mask and shift (value >> 8) & 0xf
- ## Get special node pos
- lwz r4, 0x0(r28) # get found task id
- %lwd (r3, g_ftEntryManager) # \
- li r5, 0 # |
- %call (ftEntryManager__getEntryIdFromTaskId) # | Check if emitterTaskId belongs to a fighter
- cmpwi r3, 0 # |
- blt+ end # /
- mr r4, r3 # \
- %lwd (r3, g_ftManager) # |
- li r5, -1 # | moduleAccesser = g_ftManager->getFighter(entryId, -1)
- %call (ftManager__getFighter) # |
- lwz r22, 0x60(r3) # \
- addi r4, r23, 0x12B # |
- lwz r22, 0xd8(r22) # |
- lwz r3, 0x4(r22) # |
- lwz r12, 0x8(r3) # | nodeId = stageObject->moduleAccesser->moduleEnumeration->modelModule->getCorectNodeId(0x12B + node)
- lwz r12, 0x8c(r12) # |
- mtctr r12 # |
- bctrl # /
- mr r5, r3 # \
- li r6, 0x0 # |
- mr r3, r29 # |
- lwz r4, 0x4(r22) # |
- lwz r12, 0x8(r4) # | pos = moduleEnumeration->modelModule->getNodeGlobalPosition(nodeId)
- lwz r12, 0x98(r12) # |
- mtctr r12 # |
- bctrl # /
- end:
- cmpwi r30, 1 # Original operation
- }
- <Item Custom IC-Basics>
- 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.
- To obtain this code, you can do one of two things:
- 1.) Copy over IC-Basics.asm (Source/Community/PSA)
- 2.) If you only want the code, copy the following, and add it to your codeset:
- ###############################################################################################
- Item Custom IC-Basic[21021] = EmitterTask, IC-Basic[21022] = TeamOwnerTask [MarioDox, Kapedani]
- ###############################################################################################
- HOOK @ $809CA83C #getVariableIntCore/[itValueAccesser]
- {
- cmplwi r0, 21 #original op + 1
- beq- customIC_21
- cmplwi r0, 22
- bne+ %END%
- customIC_22:
- lwz r3, 0xd8(r28) # \
- lwz r3, 0x18(r3) # |
- lwz r12, 0x0(r3) # | moduleAccesser->moduleEnumeration->teamModule->getTeamOwnerTaskId()
- lwz r12, 0x28(r12) # |
- mtctr r12 # |
- bctrl # /
- b gotTaskId
- customIC_21:
- lwz r3, 0x8C8(r3) #emitterTaskId
- gotTaskId:
- addis r0, r3, 0x1
- cmplwi r0, 0xFFFF
- beq- customIC_21_fail
- lis r12, 0x8002 #\
- ori r12, r12, 0xDC40 #| getTask/[gfTask]
- mtctr r12 #|
- bctrl #/
- b goToEnd
- customIC_21_fail:
- li r3, 0
- goToEnd:
- lis r12, 0x809C
- ori r12, r12, 0xAC74
- mtctr r12
- bctrl
- }
- <Graphic Effect Animation>
- 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.
- [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
- 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.
- If you run into any trouble trying to get things to work, there are one of three Discord servers you can join:
- Custom Brawl Modding (CBM for short): https://discord.gg/GbxJhbv
- My dedicated server (Meme Machine): https://discord.gg/PngDxcC
- PMEX REMIX (ONLY JOIN IF YOU USE REMIX): https://discord.gg/NXqUmCmgD9
- 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