Kitty Corp Meow Mix Forums

Help & Tutorials => Texture and Portrait Tutorials => Topic started by: KingJigglypuff on February 26, 2019, 04:16:52 PM



Title: [Intermediate] 50 Costume Code Implementation Guide
Post by: KingJigglypuff on February 26, 2019, 04:16:52 PM
-Introduction-
For those out of the loop, PyotrLuzhin had plans for a 20 Costume Project (dubbed 20 CP), which would allow users to surpass Brawl's 10 costume limit (15 if you took the time to edit cosmetics to prevent cosmetic bleeding) with a new 20 costume limit. In Pyotr's absence, DukeItOut (http://forums.kc-mm.com/index.php?action=profile;u=35523) has released a 50 Costume Code (dubbed 50 CC), which further pushes that limit to 50 costumes. This guide will help you implement 50 CC into your custom build.

-Credits-
PyotrLuzhin: For his work on 20 CP.
DukeItOut: For his work on 50 CC.
Sammi_Husky: For his work on the bx_fighter.rel

-Requirements-
-Your sc_selcharacter.pac file (located in pf > menu2).
-Your info.pac file (if using a Project M-based build, located in pf > info2).
-Your STGRESULT.pac file (located in pf > stage > melee).
-Your InfFaceXXX.brres files (located in info > portrite). You must extract every single file and put them into their own folder. If you're missing any vBrawl files, then dump them from your ISO and insert them into the same folder (skip any file conflicts, as otherwise, you would be replacing your custom InfFace files by mistake).
-Duke's edited sora_menu_main.rel (https://www.dropbox.com/s/zzrn1zkzerqgxdf/sora_menu_main.rel?dl=0) file (place this inside the pf > module directory)
-BrawlCrate (Current version is v0.23) (https://github.com/soopercool101/BrawlCrate/releases/tag/BrawlCrate_v0.23)

-Disclaimers-
General Disclaimer: In case of potential user-side mistakes, please back up your build before attempting to implement 50 CC into it as we will not be held responsible if something happens in your build.

Disclaimer for adding costumes: Avoid using Costume 12, as that's what FitFighterDark uses.

Disclaimer for Brawl users: The Stock Icons used on the Stage Selection Screen (sc_selmap.pac) are currently unsupported by the 50 CC Engine. While they can be converted to prevent crashing, I would recommend editing your sc_selmap.pac file to remove them them through other means, as I will not go over on how to convert your sc_selmap.pac file.

Disclaimer for BrawlEx/PMEX Users: In addition to the requirements above, you'll also need to replace your bx_fighter.rel (located in pf > module) with this edited version (https://www.dropbox.com/s/03xi5nfb1hwzz8a/CSSSlotConfig%20Expansion.zip?dl=0) (made by Sammi_Husky and I). Additionally, you'll need to increase the size of whichever CSSSlotXX.dat files you plan on adding additional costumes to in addition to editing your FighterXX.dat files to enable the two unknown flags under the HasCostume flags (you can use BrawlCrate to do both of these tasks).

Disclaimer for adding more than 10 costumes: Upon adding an 11th costume, BrawlCrate's conversion will assume your 11th costume onward is a new Cosmetic ID and will require you to manually rename any associated textures and PAT0 entries, or else they will crash upon loading (because the game tried to find a texture that doesn't exist)

-Required Codes-
Before you begin, you'll need to insert the following codes into your codeset (GCT file):
Quote
Set Masquerade Costume Count to Zero to have up to 50 costumes [DukeItOut]
* C284CFFC 00000004
* 700CFFFE 41820014
* 3D808084 618CD004
* 7D8903A6 4E800420
* 7C600039 00000000
* 0484D00C 56E506BE
* 0481C3D4 540306BE
* 0045A374 00000034
* 020E1F0E 00000BB9
* C20E1F24 00000003
* 2C1F002D 40A2000C
* 38602328 48000008
* 1C630032 00000000
* C20E8B08 00000003
* 2C050035 40A2000C
* 38602328 48000008
* 1C630032 00000000
* C20E8C04 00000003
* 2C050035 40A2000C
* 38602328 48000008
* 1C630032 00000000
* 0484D518 56E606BE
* 0484D814 56E606BE
* 0484DAF0 56E606BE
* 0484DED4 56E506BE
* 0484CC28 56E006BE
* 0484CB6C 56E506BE
* C20E1F24 00000003
* 2C1F002D 40A2000C
* 38602328 48000008
* 1C630032 00000000
* 0482A830 54C016BA
* 0482AB20 54C016BA
* 0482AB3C 54C0073E
* 0482AB5C 54C0073E
* 0482AB6C 54C0073E
* 0482AB8C 54C0073E
* 0482ABAC 54C0073E
* 0482ABBC 54C0073E
* 0482ABDC 54C0073E
* 0482ABFC 54C0073E
* 0482AC0C 54C0073E
* 0482A84C 54C0073E
* 0482A86C 54C0073E
* 0482A87C 54C0073E
* 0482A89C 54C0073E
* 0482A8BC 54C0073E
* 0482A8CC 54C0073E
* 0482A8EC 54C0073E
* 0482A90C 54C0073E
* 0482A91C 54C0073E
This code is the 50 CC Engine and will require converting all your BPs and Stock Icons to work with the 50 CC system (I'll go over how to do so with the next section).

Quote
* 00692507 00000032
* 046A17D8 30346400
* 00692DA7 00000032
This code applies a patch to the Stock Icons used in the Classic Mode CSS and Co-Op Single Player Mode CSS. For organization purposes, you can just add this code to the end of the 50 CC Engine code.

Now this next code is entirely dependent on if you're using a Project M or PMEX based build.

If your build is based off Project M, then search for this code...
Quote
Individual Stock Icons (info.pac) V2.4 ASV [ds22, wiiztec]
* C20E2168 0000002C
* 818100E8 3D609018
* 896BF37F 2C0B0002
* 4082007C 392000A5
* 3D408058 614A8000
* 897F0002 1D6B00A0
* 7D4A5A14 896A009E
* 80BF0020 2C050006
* 41810020 2C050000
* 40820030 3CA08128
* 60A5AE64 80A50000
* 2C050006 4081001C
* 7D8A58AE 2C0C00CC
* 4082000C 39600003
* 48000008 396B0003
* 7D8A58AE 2C0C00CC
* 40820014 2C0B0000
* 4182000C 39600000
* 4BFFFFE8 3FA08045
* 38C0003D 3BBD56D8
* 38E00000 7CC903A6
* 88DD0002 7C0C3000
* 4182001C 88DD0003
* 7C0C3000 41820010
* 3BBD0010 38E70001
* 4200FFE0 2C07003D
* 4082000C 3FA08045
* 3BBD56D8 899D0000
* 2C0C0042 40A20008
* 39800025 88C100ED
* 2C0900A5 4082002C
* 7CCA582E 54C6801E
* 54C6463E 396B0003
* 996A009E 2C1B0004
* 40820010 892A009C
* 39290003 992A009E
* 1D8C000A 7D8C3214
* 38EC0001 2C1B0000
* 4082000C 7C882378
* 7FFCFB78 3D8080C2
* A18C4314 3BA05F65
* 7C0CE800 4182000C
* 6D1E8000 48000008
* 6CFE8000 83BC008C
* 60000000 00000000
* 040E215C 60000000
* 040E2160 60000000
* C203D8B4 00000005
* 2C09000B 40820018
* 3C600006 38631C00
* 3C800002 38847180
* 7C641A14 881B001C
* 60000000 00000000
* 044218EC 00095F00
* 0442190C 00180000
* 04494990 00095F00
* 044949EC 80C23A60
* 044949F0 00180000
..and replace it with this code.
Quote
Individual Stock Icons (info.pac) V2.6 50CC [ds22, wiiztec, DukeItOut]
* C20E2168 0000002C
* 818100E8 3D609018
* 896BF37F 2C0B0002
* 4082007C 392000A5
* 3D408058 614A8000
* 897F0002 1D6B00A0
* 7D4A5A14 896A009E
* 80BF0020 2C050006
* 41810020 2C050000
* 40820030 3CA08128
* 60A5AE64 80A50000
* 2C050006 4081001C
* 7D8A58AE 2C0C00CC
* 4082000C 39600003
* 48000008 396B0003
* 7D8A58AE 2C0C00CC
* 40820014 2C0B0000
* 4182000C 39600000
* 4BFFFFE8 3FA08045
* 38C0003D 3BBD56D8
* 7CC903A6 88DD0002
* 7C0C3000 41820020
* 88DD0003 7C0C3000
* 41820014 3BBD0010
* 4200FFE4 3FA08045
* 3BBD56D8 7D876378
* 899D0000 2C0C0042
* 40A20008 39800025
* 88C100ED 2C0900A5
* 4082002C 7CCA582E
* 54C6801E 54C6463E
* 396B0003 996A009E
* 2C1B0004 40820010
* 892A009C 39290003
* 992A009E 1D8C0032
* 2C07002D 40A20008
* 39802328 7D8C3214
* 38EC0001 2C1B0000
* 4082000C 7C882378
* 7FFCFB78 3D8080C2
* A18C4314 3BA05F65
* 7C0CE800 4182000C
* 6D1E8000 48000008
* 6CFE8000 83BC008C
* 60000000 00000000
* 040E215C 60000000
* 040E2160 60000000
* C203D8B4 00000005
* 2C09000B 40820018
* 3C600006 38631C00
* 3C800002 38847180
* 7C641A14 881B001C
* 60000000 00000000
* 044218EC 00095F00
* 0442190C 00180000
* 04494990 00095F00
* 044949EC 80C23A60
* 044949F0 00180000
This code replacement will convert the Stock Icons used in Multiplayer battles for 50 CP compatibility.

However, if your build is based off of PMEX, then you would instead search for this code...
Quote
[PMEX] Individual Stock Icons (info.pac) PMEX0.5 ASV [ds22, wiiztec, PyotrLuzhin]
* C20E2168 0000002C
* 818100E8 3D609018
* 896BF37F 2C0B0002
* 4082007C 392000A5
* 3D408058 614A8000
* 897F0002 1D6B00A0
* 7D4A5A14 896A009E
* 80BF0020 2C050006
* 41810020 2C050000
* 40820030 3CA08128
* 60A5AE64 80A50000
* 2C050006 4081001C
* 7D8A58AE 2C0C00CC
* 4082000C 39600003
* 48000008 396B0003
* 7D8A58AE 2C0C00CC
* 40820014 2C0B0000
* 4182000C 39600000
* 4BFFFFE8 3FA0817D
* 38C0007D 3BBD5AC0
* 38E00000 7CC903A6
* 88DD0002 7C0C3000
* 4182001C 88DD0003
* 7C0C3000 41820010
* 3BBD0010 38E70001
* 4200FFE0 2C07003D
* 4082000C 3FA0817D
* 3BBD5AC0 899D0000
* 2C0C0042 40A20008
* 39800025 88C100ED
* 2C0900A5 4082002C
* 7CCA582E 54C6801E
* 54C6463E 396B0003
* 996A009E 2C1B0004
* 40820010 892A009C
* 39290003 992A009E
* 1D8C000A 7D8C3214
* 38EC0001 2C1B0000
* 4082000C 7C882378
* 7FFCFB78 3D8080C2
* A18C4314 3BA05F65
* 7C0CE800 4182000C
* 6D1E8000 48000008
* 6CFE8000 83BC008C
* 60000000 00000000
* 040E215C 60000000
* 040E2160 60000000
* C203D8B4 00000005
* 2C09000B 40820018
* 3C600006 38631C00
* 3C800002 38847180
* 7C641A14 881B001C
* 60000000 00000000
* 044218EC 00095F00
* 0442190C 00180000
* 04494990 00095F00
* 044949EC 80C23A60
* 044949F0 00180000
...and replace it with this code.
Quote
Individual Stock Icons (info.pac) V2.6 PMEx + 50CC [ds22, wiiztec, DukeItOut, PyotrLuzhin, KingJigglypuff]
* C20E2168 0000002C
* 818100E8 3D609018
* 896BF37F 2C0B0002
* 4082007C 392000A5
* 3D408058 614A8000
* 897F0002 1D6B00A0
* 7D4A5A14 896A009E
* 80BF0020 2C050006
* 41810020 2C050000
* 40820030 3CA08128
* 60A5AE64 80A50000
* 2C050006 4081001C
* 7D8A58AE 2C0C00CC
* 4082000C 39600003
* 48000008 396B0003
* 7D8A58AE 2C0C00CC
* 40820014 2C0B0000
* 4182000C 39600000
* 4BFFFFE8 3FA0817D
* 38C0007D 3BBD5AC0
* 7CC903A6 88DD0002
* 7C0C3000 41820020
* 88DD0003 7C0C3000
* 41820014 3BBD0010
* 4200FFE4 3FA0817D
* 3BBD5AC0 7D876378
* 899D0000 2C0C0042
* 40A20008 39800025
* 88C100ED 2C0900A5
* 4082002C 7CCA582E
* 54C6801E 54C6463E
* 396B0003 996A009E
* 2C1B0004 40820010
* 892A009C 39290003
* 992A009E 1D8C0032
* 2C07002D 40A20008
* 39802328 7D8C3214
* 38EC0001 2C1B0000
* 4082000C 7C882378
* 7FFCFB78 3D8080C2
* A18C4314 3BA05F65
* 7C0CE800 4182000C
* 6D1E8000 48000008
* 6CFE8000 83BC008C
* 60000000 00000000
* 040E215C 60000000
* 040E2160 60000000
* C203D8B4 00000005
* 2C09000B 40820018
* 3C600006 38631C00
* 3C800002 38847180
* 7C641A14 881B001C
* 60000000 00000000
* 044218EC 00095F00
* 0442190C 00180000
* 04494990 00095F00
* 044949EC 80C23A60
* 044949F0 00180000
This code does the same thing as the previous, except edited to be compatible with PMEX's memory range.

Once you have your codes inserted and your files extracted, you'll then need to use BrawlCrate to convert your files.

-Converting sc_selcharacter.pac-
After opening your sc_selcharacter.pac in BrawlCrate, navigate to MiscData[90], right click on any of the Stock Icon textures and click "Convert to Expanded 50-Stock System". After converting, a PAT0 animation will be leftover. Delete this, as the sc_selcharacter's Stock Icons do not require a PAT0 animation to work. Save afterward.

-Converting info.pac-
After opening your info.pac in BrawlCrate, navigate to MiscData[30], right click on any of the Stock Icon textures and click "Convert to Expanded 50-Stock System". The associated PAT0 animation will automatically update alongside the conversion. Save afterward.

-Converting STGRESULT.pac-
After opening your STGRESULT.pac in BrawlCrate, navigate to MiscData[120], right click on any of the Stock Icon textures, and click "Convert to Expanded 50-Stock System". After converting, a PAT0 animation will be leftover. Open this PAT0 animation, rename its texture reference from "lambert87" to "stock_lambert87", export it, navigate to MiscData[110], and replace the PAT0 animation of the same name with the PAT0 you exported. You can then delete the leftover PAT0 in MiscData[120]. Save afterward.

-Converting StockFaceTex.brres-
After opening your StockFaceTex.brres in BrawlCrate, open the Textures folder, right click on any of the Stock Icon textures, and click "Convert to Expanded 50-Stock System". After converting, a PAT0 animation will be leftover. You can delete this PAT0 animation and save afterward.

-Converting InfFace files-
When converting any stock icons, you'll be met with a window asking if you want to convert your InfFace files. If this is your first time, click Yes, navigate to the folder you extracted your files to, select it, and click OK. After you've done this once, you can click No whenever the window pops up.

Once you're done converting all your files, you can now insert them back into your SD Card (or Virtual SD Card if emulating) and enjoy the benefits of expanding your costume count.


Title: Re: [Intermediate] 50 Costume Project Implementation Guide
Post by: Lillith on February 26, 2019, 06:12:30 PM
Now, Pikachu can realise its true potential with 49 hats!

It's absolutely fantastic that this is up now, I need to look at it soon as I can. haha.


Title: Re: [Intermediate] 50 Costume Code Implementation Guide
Post by: DukeItOut on February 27, 2019, 07:26:07 PM
A few other things to keep conscious about:

Both Brawl and PM packed the costume flag data tightly together. If not using BrawlEX, you'll need to find free memory space to move expanded characters to so that they don't fight. (If you've rearranged your common .pac files akin to how PM did, free space should be available around 80546000-80547000 for this kind of thing.)

Keep conscious that this does not avoid sc_selcharacter.pac filesize limitations. You either need to use a code to load RSPs on the CSS (which is not compatible with .pcs files and is unstable) or use colorsmash once you hit a certain size, though otherwise things are basically the same.

Likewise, this holds true for the PM-style stock icons in-game, too. Once you get to about beyond 200 additional of what LTE has (which itself is probably around 70 more than in PM), you'll start needing to either compromise UI resolution or use generic stock icons like with Brawl.

Similar stock icon issues plague the SSS in terms of compromising filesize, which is related to the lack of current support for SSS stocks.


Title: Re: [Intermediate] 50 Costume Code Implementation Guide
Post by: szion on February 27, 2019, 11:13:33 PM
If my build doesnt use stock icons or BP's can I skip those portions?


Title: Re: [Intermediate] 50 Costume Code Implementation Guide
Post by: KingJigglypuff on February 28, 2019, 07:22:49 AM
If your build doesn't use either of those, then you don't even need to use 50 CC, as what 50 CC does is multiply Cosmetic IDs for Stock Icons and BPs by 50 to prevent cosmetic bleeding with more than 10 costumes.

CSPs don't bleed into each other, as those go by ID, rather by name.


Title: Re: [Intermediate] 50 Costume Code Implementation Guide
Post by: Lillith on February 28, 2019, 08:35:42 PM
It's entirely possible I'm blind or missing something obvious, but what needs to be done involving BPs? They're all funky and distorted and such ...For a bit of reference, currently I'm only using this to expand to 20 costumes, not the full 50 (So treating them like Wario, just using 2 cosmetic slots), if that helps.

(https://i.imgur.com/Nh9kBtj.jpg)

Edit: It's also entirely possible that this is a by-product of not doing everything, seems my BP names are messed up too. If so, then damn.


Title: Re: [Intermediate] 50 Costume Code Implementation Guide
Post by: KingJigglypuff on March 01, 2019, 08:41:19 AM
I have an entire section in the tutorial dedicated to InfFace file conversion.

-Converting InfFace files-
When converting any stock icons, you'll be met with a window asking if you want to convert your InfFace files. If this is your first time, click Yes, navigate to the folder you extracted your files to, select it, and click OK. After you've done this once, you can click No whenever the window pops up.


Title: Re: [Intermediate] 50 Costume Code Implementation Guide
Post by: Lillith on March 01, 2019, 02:33:15 PM
Ah, I keep forgetting that that's what they're actually called. Yikes.
Apologies for the stupidity, haha.


Title: Re: [Intermediate] 50 Costume Code Implementation Guide
Post by: StupidMarioFan1 on March 02, 2019, 01:35:15 AM
Would you mind going over how to edit the FighterXX.dat? At first I didn't think it was needed since I was able to get 15 costumes working without it but then I ran into a problem trying to load Costumes 12 & 13.
Costume 12 loads the Dark files ("Emerald" characters from Subspace) while 13 always freezes. I think it's supposed to be loading the Fake files which most characters don't have but even Samus froze despite having those so I'm not sure.
(https://imgur.com/e6CdjmA.png)

Anyways since you said that we'd have to edit it to allow 15 costumes I'm assuming that it'll move which ID the Dark & Fake costumes use, however I'm not sure how to edit it in BrawlCrate.
This is what the file looks like when I open it in BrawlCrate:
(https://imgur.com/Bx5eUa4.png)

There were no options to add "Has CostumeXX" or to add anything really. I thought maybe you had typed the wrong file name and it was actually supposed to be CosmeticXX.dat or SlotXX.dat but those don't deal with the actual Costume IDs.



Another thing, the code to fix the Classic Mode Stock Icons is the correct one right? I tried a few times in case I messed something up but either you accidentally posted the wrong code or it's just not being loaded for me. Originally I had it attached to the main 50CC but then tried it as a separate code and it still didn't load. I am using a Virtual SD Card to play the American copy of Brawl on the Dolphin Emulator. Since you didn't provide a separate code for it, it shouldn't matter that I'm using a PMEX Build but might as well mention it just in case.


Title: Re: [Intermediate] 50 Costume Code Implementation Guide
Post by: Lillith on March 02, 2019, 02:31:19 AM
I'm not so sure on everything yet, still need to test it properly, but I do know that you need to set all of those 'Has Costume' things to false, as the masquerade code implies that sets the 50 costume thing properly, the CSSSlot thing is to set how many costumes 'actually' get used. I'm not so sure on costumes 13/14 yet, although when I tried on Dolphin it did indeed seem to try to load the 'Fake' costume for 14


Title: Re: [Intermediate] 50 Costume Code Implementation Guide
Post by: KingJigglypuff on March 02, 2019, 07:19:06 AM
Looks like I forgot FighterXX.dat only goes up to the 11th costume. Additionally, I forgot to mention you're supposed to skip FitFighter12, as costume slot 12 will load FitFighterDark instead. No idea about FitFighterFake though, as I'm using FitFighter13 and FitFighter14 just fine.

Though for the FighterXX.dat configuration, in addition to your vanilla costume selection, you'll need to enable both Unknown Flags under your costume count.

Another thing, the code to fix the Classic Mode Stock Icons is the correct one right? I tried a few times in case I messed something up but either you accidentally posted the wrong code or it's just not being loaded for me. Originally I had it attached to the main 50CC but then tried it as a separate code and it still didn't load. I am using a Virtual SD Card to play the American copy of Brawl on the Dolphin Emulator. Since you didn't provide a separate code for it, it shouldn't matter that I'm using a PMEX Build but might as well mention it just in case.
Yes, the codes provided in the opening post are the correct ones. So it must be an issue on your side, but I wouldn't know how I could help you troubleshoot it. Would you happen to have a codeset for your build on hand? Additionally, you could send your build to me prior to attempting the 50 CC conversion? As that might be the best way to help you troubleshoot, as I would be experiencing your issues firsthand.


Title: Re: [Intermediate] 50 Costume Code Implementation Guide
Post by: StupidMarioFan1 on March 02, 2019, 11:06:34 PM
Yes, the codes provided in the opening post are the correct ones. So it must be an issue on your side, but I wouldn't know how I could help you troubleshoot it. Would you happen to have a codeset for your build on hand? Additionally, you could send your build to me prior to attempting the 50 CC conversion? As that might be the best way to help you troubleshoot, as I would be experiencing your issues firsthand.

I had a few characters added to my PMEX build but I've tested it on a clean PMEX v0.5 and still got the same problem. Besides the Costume 13 freeze everything else works as intended.
Here's the gct as well as the text file incase I simply used the wrong program (used GCTEdit v1.0) however I doubt that was the problem since the actual costume code works.
GCT
https://drive.google.com/file/d/1noWb8nI4WoYfPC7rjTkx7nMo9zp5zjru
TXT
https://drive.google.com/file/d/1A2C1R4Nb5Q-_2XajYdS3U3_jrrufGveQ


Title: Re: [Intermediate] 50 Costume Code Implementation Guide
Post by: KingJigglypuff on March 03, 2019, 07:52:25 AM
Since they're in the beginning of your codeset, maybe they're being overwritten by a later code, perhaps? Could you try putting the 50 CC codes at the bottom of your codeset, rather than the top?

For inserting codes, I just hex edit the GCT.


Title: Re: [Intermediate] 50 Costume Code Implementation Guide
Post by: Ebola16 on March 03, 2019, 10:55:45 AM
A question before I look into this: Is the 50 costume code compatible with BrawlEx Clone Engine v2.0.0.0 Extended Edition (RSBE.Ver)?


Title: Re: [Intermediate] 50 Costume Code Implementation Guide
Post by: KingJigglypuff on March 03, 2019, 01:03:36 PM
Now that's something I wouldn't know, as it's not something I'd use, but in theory, it should.


Title: Re: [Intermediate] 50 Costume Code Implementation Guide
Post by: Ebola16 on March 04, 2019, 08:24:36 AM
There seems to be some major differences between 50 CC and BrawlEx Clone Engine v2.0.0.0 Extended Edition (RSBE.Ver)'s bx_fighter.rel. Porting the changes of 50 CC to BrawlEx Clone Engine v2.0.0.0 Extended Edition (RSBE.Ver) seems like a lot of work.


Title: Re: [Intermediate] 50 Costume Code Implementation Guide
Post by: KingJigglypuff on March 04, 2019, 04:26:52 PM
Oh, the bx_fighter.rel is different? In that case, I have a miniature guide on how to expand costume slots by editing the bx_fighter.rel.
Open bx_fighter.rel in a Module Editor, go to Offset 0x580 in Section[8] and add an equal amount of bytes at the end of every section (there's a total of 0x80 sections in the vanilla bx_fighter.rel, each being 0x20 bytes).

Afterwards, go to Offset 0x3C8 in Section[4] and update 0x00200020 based on how many bytes were added to the costume section.

Example: If adding 0x10 bytes to the vanilla file, 0x00200020 would be updated to 0x00300030.
Though since you'd be doing this with over 200 slots, it's going to be a very long and tedious process, especially if you end up messing up somewhere and having to start over because of it.


Title: Re: [Intermediate] 50 Costume Code Implementation Guide
Post by: PDubs44 on March 15, 2019, 06:55:54 PM
After following this, my only issue that I've had is that the costumes past spot 15 don't load in game. I.E It reuses costumes even though the CSP, BP, STC, and RSP are the proper ones. Did I not extend the CSSSlot or Fighter Config properly?


Title: Re: [Intermediate] 50 Costume Code Implementation Guide
Post by: KingJigglypuff on March 16, 2019, 06:40:46 AM
I think I might know what the problem could be. Could you add this code to your GCT and relay what happens?

Quote
Three Team Costumes for Ganon + Costume ID Fix[PyotrLuzhin]
C284CFF8 00000003
2C17000D 4180000C
38600001 48000008
7C83B830 00000000
C284CF64 0000000D
2817000D 38800000
40820050 28170003
40820048 38800001
48000040 2817000B
40820038 38800001
48000030 2817000C
40820028 38800001
48000020 2817000D
40820018 38800001
48000010 2817001B
40820008 38800001
28040001 48000008
60000000 00000000
C26998DC 00000004
80A301B8 541CD97E
2C050014 40820010
2C00001F 40820008
3B800002 00000000
C2699C20 00000006
80A301B8 541CD97E
2C050014 4082001C
2C000020 40820008
3B800002 2C00001E
40820008 3B800001
60000000 00000000
046974f0 41820034
C26974EC 00000009
7F44D378 2C1F0014
4082003C 2C190002
40820034 2C040000
4082000C 3860000E
48000020 2C040001
4082000C 3860000C
48000010 2C040002
40820008 3860000D
2C190002 00000000
04684978 41820034
C2684974 0000000A
881801C4 809801C0
7FA3EB78 2C030014
4082003C 2C000002
40820034 2C040000
4082000C 3860000E
48000020 2C040001
4082000C 3860000C
48000010 2C040002
40820008 3860000D
2C000002 00000000


Title: Re: [Intermediate] 50 Costume Code Implementation Guide
Post by: PDubs44 on March 16, 2019, 11:07:18 AM
It didn't change anything that I can tell.

I added the code to the end of my codeset so unless it needs to replace something, it didn't fix it.

To clarify the situation, I added costumes to Mario so that he would have 17, however his 16th and 17th costumes reuse his default and his fire mario costumes when loading in game


Title: Re: [Intermediate] 50 Costume Code Implementation Guide
Post by: KingJigglypuff on March 17, 2019, 07:55:35 AM
Alright, did you edit your Fighter00.dat to enable the two unknown flags under the costume flags?
(https://i.imgur.com/HShIBMg.png)


Title: Re: [Intermediate] 50 Costume Code Implementation Guide
Post by: PDubs44 on March 17, 2019, 08:12:02 AM
Yes, I edited both the Fighter config file to have both flags set and the CSSSlot config file to have the needed amount of costumes set. Would it be easier to send you the files or something to take a look?

Has this ever happened before in your experience of testing/bug reports?


Title: Re: [Intermediate] 50 Costume Code Implementation Guide
Post by: KingJigglypuff on March 17, 2019, 08:40:01 AM
I only encountered the issue during the very old beta stages of 50 CC and was fixed with the things I mentioned.

If you're not using an extensively edited Project M build, I'd recommend you to take a look at the pre-made build (https://mega.nz/#!QhRnXQJb!WAUZs6sd5AMc-ldDUYwuW7XHcO6kYd7oe4-_lBojGbg) I made for ease of access to advanced features.


Title: Re: [Intermediate] 50 Costume Code Implementation Guide
Post by: PDubs44 on March 17, 2019, 08:42:47 AM
Ok that sounds like a good idea. Do you have a recommended program for converting the sd.raw file into folders for Wii?


Title: Re: [Intermediate] 50 Costume Code Implementation Guide
Post by: KingJigglypuff on March 17, 2019, 08:48:34 AM
If you have 7-Zip, you can open the sd.raw and extract the folders and files and put them onto your SD Card, given you have either Gecko OS (Homebrew) or the Stage Builder exploit file (Hackless) on your physical SD card.


Title: Re: [Intermediate] 50 Costume Code Implementation Guide
Post by: PDubs44 on March 17, 2019, 08:53:30 AM
Alright great. Thank you so much for your help KJP!

Post Merge: March 17, 2019, 12:47:55 PM
I found the issue! It has to do with the codeset in some way. I just have to narrow it down to what code exactly it is.


Title: Re: [Intermediate] 50 Costume Code Implementation Guide
Post by: Russell_SSB on March 26, 2019, 02:13:41 PM
I might need to try this on my version of Project M sometime.


Title: Re: [Intermediate] 50 Costume Code Implementation Guide
Post by: Falcondorf on April 04, 2019, 07:08:13 PM
Hey KJP love your work, I just wanted to confirm whether or not this would work with LegacyXP or XP Lite, as XP black screens upon boot when i add the masquerade code.


Title: Re: [Intermediate] 50 Costume Code Implementation Guide
Post by: KingJigglypuff on April 04, 2019, 08:04:43 PM
In theory, 50 CC should work with LXP-based builds. Just be mindful of file size.


Title: Re: [Intermediate] 50 Costume Code Implementation Guide
Post by: Falcondorf on April 05, 2019, 07:24:15 PM
Hmmm it doesn't go past the strap screen, and when I add the 3 lines of code it doesn't make it past the launcher... I'll just stick to regular PMEX I guess


Title: Re: [Intermediate] 50 Costume Code Implementation Guide
Post by: KingJigglypuff on April 05, 2019, 08:16:50 PM
It's likely because LXP's codeset is almost at its limit in terms of codespace. It's a very big GCT, sitting at over 100 KB.


Title: Re: [Intermediate] 50 Costume Code Implementation Guide
Post by: Falcondorf on April 06, 2019, 03:02:14 PM
It booted up with LXP Lite! Thanks KJP!


Title: Re: [Intermediate] 50 Costume Code Implementation Guide
Post by: Lillith on April 11, 2019, 02:49:53 AM
Oh, the bx_fighter.rel is different? In that case, I have a miniature guide on how to expand costume slots by editing the bx_fighter.rel.
Open bx_fighter.rel in a Module Editor, go to Offset 0x580 in Section[8] and add an equal amount of bytes at the end of every section (there's a total of 0x80 sections in the vanilla bx_fighter.rel, each being 0x20 bytes).

Afterwards, go to Offset 0x3C8 in Section[4] and update 0x00200020 based on how many bytes were added to the costume section.

Example: If adding 0x10 bytes to the vanilla file, 0x00200020 would be updated to 0x00300030.
Though since you'd be doing this with over 200 slots, it's going to be a very long and tedious process, especially if you end up messing up somewhere and having to start over because of it.

So, a small correction from what I've seen so far, the first bit, the address is actually 0xA80, not 0x580 ...uh... At least for this 242 character thing. Probably since it needs to account for the extras, still looking into it currently though, need to spot other differences still, haha.
I'll probably just upload a patched .rel if I actually get it.


Title: Re: [Intermediate] 50 Costume Code Implementation Guide
Post by: KingJigglypuff on April 11, 2019, 06:54:51 AM
Starting with 0xA80 would only expand costumes for Ex clones. Starting at 0x580 expands costumes for everyone, so I would assume 0xA80 is the starting offset for BrawlEx 242's bx_fighter.rel.


Title: Re: [Intermediate] 50 Costume Code Implementation Guide
Post by: Lillith on April 13, 2019, 08:04:06 PM
is it uh... is it appropriate to post this here since it's like... half related?
So I did stuff to the module, added the bytes to the bx_fighter.rel, I'm sure I've done it proper and all but it crashes upon booting, not the best on coding so it's entirely possible I just messed it up, but the Dolphin error log thing spits this out at me~
(https://i.imgur.com/xtYaqUW.jpg)

I would think it is a filesize issue, probably wrong though.
If anyone wants to have a look at the module
https://mega.nz/#!XR9iQYbZ!GyUnvNFY2qo8d96v0XMjwuX-WqOMc6P5nroRR1y6nds

It's been redone a few times with the exact same error, which is what leads to the filesize thought.


Title: Re: [Intermediate] 50 Costume Code Implementation Guide
Post by: KingJigglypuff on April 15, 2019, 09:42:49 AM
Numerous statements in your log definitely point to your issue being from file size.


Title: Re: [Intermediate] 50 Costume Code Implementation Guide
Post by: Lillith on April 15, 2019, 03:17:41 PM
Sooo... I need to figure out how memory allocation works then, huh.
Shoot.


Title: Re: [Intermediate] 50 Costume Code Implementation Guide
Post by: CallMeKaaze on May 05, 2019, 03:17:08 PM
Dang, I'm sure I imported everything correctly, my fps drops to 0 after the https://smashbroslegacy.com/ screen in LXP. I'm trying to add a FitKirby10 costume. I edited the Fighter and CSSSlot files.


Title: Re: [Intermediate] 50 Costume Code Implementation Guide
Post by: KingJigglypuff on May 06, 2019, 08:38:15 AM
I would recommend trying to implement 50 CC into LXP Lite, as LXP Full is almost at its limit in terms of codespace.


Title: Re: [Intermediate] 50 Costume Code Implementation Guide
Post by: CallMeKaaze on May 24, 2019, 04:26:30 PM
Oh, ok. I've heard some people implement it into LXP before...


Title: Re: [Intermediate] 50 Costume Code Implementation Guide
Post by: EnKaYea on July 18, 2019, 01:14:20 PM
I'm having issues with the CSSlot file. For some reason, the game won't load it and the costumes are in the default order. It's a weird issue because I've gotten the extra costumes and CSSlot to work for the first 3 characters I did but now it doesn't. I guess my question is whether 50 costumes are guaranteed once I replace my files with the ones in this thread or do I have to expand the bx_fighter.rel file each time I add more costumes?

I'm using the latest PM+EX build.


Title: Re: [Intermediate] 50 Costume Code Implementation Guide
Post by: KingJigglypuff on July 18, 2019, 08:21:37 PM
On an unrelated note, for those who approached me regarding 50CC with LXP Full, I might have been wrong in saying LXP Full's codeset is too big for 50CC, but rather the info.pac. I forgot to mention converting the info.pac to 50CC will increase the file size due to the increased bytes per texture name for the Stock Icons. If you experience crashing after the strap screen, then it's most certainly the file size of your info.pac being too high, in which I would recommend to look into either decreasing texture sizes and/or altering texture compression of the non stock icon textures.

I'm having issues with the CSSlot file. For some reason, the game won't load it and the costumes are in the default order. It's a weird issue because I've gotten the extra costumes and CSSlot to work for the first 3 characters I did but now it doesn't. I guess my question is whether 50 costumes are guaranteed once I replace my files with the ones in this thread or do I have to expand the bx_fighter.rel file each time I add more costumes?

I'm using the latest PM+EX build.
You do not need to edit the bx_fighter.rel.

Would you mind posting one of your test CSSSlotConfig files for me to look at?


Title: Re: [Intermediate] 50 Costume Code Implementation Guide
Post by: EnKaYea on July 18, 2019, 09:55:49 PM

Would you mind posting one of your test CSSSlotConfig files for me to look at?


This is link for Mario's, his works: http://www.mediafire.com/file/ypg4fxgjkeqj2rb/CSSSlot00.dat/file (http://www.mediafire.com/file/ypg4fxgjkeqj2rb/CSSSlot00.dat/file)

Captain Falcon on the Other hand, refuses to work:
http://www.mediafire.com/file/kjh9h52yqq9fq4i/CSSSlot0A.dat/file (http://www.mediafire.com/file/kjh9h52yqq9fq4i/CSSSlot0A.dat/file)


Title: Re: [Intermediate] 50 Costume Code Implementation Guide
Post by: KingJigglypuff on July 19, 2019, 08:27:12 AM
I see your problem. You didn't properly expand the CSSSlotConfig files.

Your Mario CSSSlotConfig was edited to allow 24 costumes, while your Captain Falcon CSSSlotConfig hasn't been edited, thus allowing up to 15 costumes.

You can use BrawlCrate to add costumes until you reach 50 total costumes. Open your respective CSSSlotConfig.dat in BrawlCrate, right click the "CSSSlotXX" entry, and click "Add New Entry". Also, don't forget that you also need to edit your FighterConfig.dat to allow these additional costumes.


Title: Re: [Intermediate] 50 Costume Code Implementation Guide
Post by: EnKaYea on July 19, 2019, 02:41:00 PM
Thank you.


Title: Re: [Intermediate] 50 Costume Code Implementation Guide
Post by: KingJigglypuff on August 14, 2019, 09:40:19 AM
Alright, so I have a minor correction to make

For those trying to get 50CC working in your build, but end up crashing after the strap screen, your problem might not be your codeset, but rather the file size of your info.pac (if using a PM-based build). The only solution to this would be to Color Smash the stock icons in your info.pac and/or adjust texture compression/size of the other textures inside the info.pac.