Ondo
Smash Apprentice
- Joined
- Jun 20, 2007
- Messages
- 160
This is an altered version of sc_selcharacter.pac (from common5.pac) that looks and behaves exactly the same as the default Project M 3.02 version (except for never showing the flashing new over characters). However, it's significantly smaller, hopefully making it easier for modifications to be made without running in to space issues, and it simplifies some things by removing support for unlocking characters. For example, to change the position of characters you can just change the position of the bones of the MenSelchrPos_TopN model, instead of altering frame 43 of its animation.
If you're not interested in creating your own CSS, this probably isn't of any interest. If you are, the technical details that follow still might not be of interest to you, but I'd be happy if you wanted to use this pac as the base you modify. If you want to alter an existing CSS to reduce its size, these details should help.
I'll cover things I did primarily to reduce the size first (roughly in order of how much space they save), then things done primarily to simplify editing a bit (though they also saved space).
Changes done to save space:
Changes done to simplify things:
Here's the download link. Let me know if you have any questions.
If you're not interested in creating your own CSS, this probably isn't of any interest. If you are, the technical details that follow still might not be of interest to you, but I'd be happy if you wanted to use this pac as the base you modify. If you want to alter an existing CSS to reduce its size, these details should help.
I'll cover things I did primarily to reduce the size first (roughly in order of how much space they save), then things done primarily to simplify editing a bit (though they also saved space).
Changes done to save space:
First, and easiest - MiscData[30] contains MenSelchrFaceA through MenSelchrFaceI; they are the models for the nine different sizes that faces can be, shrinking as you unlock more characters. For Project M, with 42 characters always available, only MenSelchrFaceI is needed - the others can be deleted (from 3DModels, AnmChr, AnmClr, and AnmTexPat).
Another thing that saves a chuck of space is going through and switching the compression of everything in char_bust_tex_lz77 from LZ77 to ExtendedLZ77. Not sure if this will help avoid space issues, since these are loaded and uncompressed when needed, I think. It may make space issues worse, since I think the extended algorithm requires a little more memory to do the decompression. So try switching it back if you have issues.
I also switched the compression of the entire sc_selcharacter.pac to ExtendedLZ77. Which I would expect to have no effect on space issues, due to everything being decompressed before use. It does makes it smaller, though, and could help fit more on a 2GB card, at least.
The MenSelchrFaceB.001 texture, in MiscData[30], is a copy of Mario's first CSP. It needs to exist (and have a palette) but is not shown. I replaced it with a 4x4 black square in CI4 format.
The various MenMainBack textures can be deleted. They are from the old background that was replaced in Project M.
The model for "New!" can be removed, if you don't want it showing up. (I don't think it makes any sense for Project M.) To do so, look for MenSelchrNew in the different sections of MiscData[30] - for the model (in 3DModels), remove everything except one bone. Delete the texture. For the animations (in AnmChr, AnmVis, and AnmClr), remove all the children of the animation but do not delete the animation itself. (If the model or animations are completely deleted, the game will freeze when going to the selection screen.)
MenSelchrCoin has 4 different animations, MenSelchrCoin_TopN__0 though MenSelchrCoin_TopN__3. For AnmClr, these are the colors for the four different players. In AnmChr, AnmVis, and AnmTexPat, only the first one is used, and __1 though __3 can be deleted.
There are a number of blank name images for character slots that aren't used - specifically, MenSelchrChrNm.201, 351, 381, 411, 421, 441, and 471. These textures can be deleted, and the references to them in AnmTexPat > MenSelchrCname4 > Card010 and Card011 > Texture0 can all be removed.
For the AnmChr of MenSelchrFaceI, you can find every bone in the animation that has only one frame, make sure the values in that frame match the values for that bone in the model, and then remove that bone from the animation. This could be done for every animation, I think, but I only did it for this one. It doesn't save much space (around 1,500 bytes for this one, before compression), but it does make it so you can edit the bone on the model and not have it overridden by the animation (at least for the ones where the animation was removed; you still will want to check that first).
In char_bust_tex_lz77, there's a MiscData[41] with only blank images. That can be removed.
Another thing that saves a chuck of space is going through and switching the compression of everything in char_bust_tex_lz77 from LZ77 to ExtendedLZ77. Not sure if this will help avoid space issues, since these are loaded and uncompressed when needed, I think. It may make space issues worse, since I think the extended algorithm requires a little more memory to do the decompression. So try switching it back if you have issues.
I also switched the compression of the entire sc_selcharacter.pac to ExtendedLZ77. Which I would expect to have no effect on space issues, due to everything being decompressed before use. It does makes it smaller, though, and could help fit more on a 2GB card, at least.
The MenSelchrFaceB.001 texture, in MiscData[30], is a copy of Mario's first CSP. It needs to exist (and have a palette) but is not shown. I replaced it with a 4x4 black square in CI4 format.
The various MenMainBack textures can be deleted. They are from the old background that was replaced in Project M.
The model for "New!" can be removed, if you don't want it showing up. (I don't think it makes any sense for Project M.) To do so, look for MenSelchrNew in the different sections of MiscData[30] - for the model (in 3DModels), remove everything except one bone. Delete the texture. For the animations (in AnmChr, AnmVis, and AnmClr), remove all the children of the animation but do not delete the animation itself. (If the model or animations are completely deleted, the game will freeze when going to the selection screen.)
MenSelchrCoin has 4 different animations, MenSelchrCoin_TopN__0 though MenSelchrCoin_TopN__3. For AnmClr, these are the colors for the four different players. In AnmChr, AnmVis, and AnmTexPat, only the first one is used, and __1 though __3 can be deleted.
There are a number of blank name images for character slots that aren't used - specifically, MenSelchrChrNm.201, 351, 381, 411, 421, 441, and 471. These textures can be deleted, and the references to them in AnmTexPat > MenSelchrCname4 > Card010 and Card011 > Texture0 can all be removed.
For the AnmChr of MenSelchrFaceI, you can find every bone in the animation that has only one frame, make sure the values in that frame match the values for that bone in the model, and then remove that bone from the animation. This could be done for every animation, I think, but I only did it for this one. It doesn't save much space (around 1,500 bytes for this one, before compression), but it does make it so you can edit the bone on the model and not have it overridden by the animation (at least for the ones where the animation was removed; you still will want to check that first).
In char_bust_tex_lz77, there's a MiscData[41] with only blank images. That can be removed.
Changes done to simplify things:
The basic method is taking the models with animations based either on the number of characters in the CSS or the size of the face models, and removing that animation since we now always have 42 characters and are using FaceI.
MenSelchrPos covers the positions of the faces, the main icons for selecting characters, and has a separate animation for every number of characters from 0 to 50. To simplify, copy the translation data from frame 43 of the AnmChr to the bones of the 3DModel, then removing the children of the AnmChr (but not deleting it entirely, because the game looks for it). Do the same to the AnmVis. Also, I like reordering the bones of the 3DModel to put them in numerical order (instead of having 2 after 19, for example), and deleting the bones for pos43 through pos50.
IMPORTANT WARNING - editing the MenSelchrPos model, which has bones but no polygons, will not work in BrawlBox 0.71 (and earlier, I think). Use BrawlBox 0.73b, available here.
MenSelchrCoin is the circle object that you drop on a character to mark who you pick - it gets smaller as the faces get smaller. To simplify, copy the data from frame 9 of the AnmChr to the bones of the 3DModel, and remove the children of the AnmChr except for scaleN (if scaleN is removed you can't use A to pick up the coin again after placing it on a character - no idea why). For scaleN, reduce it to just 1 frame with the data from what was frame 9.
MenSelchrCursorB is the flashing box around the face you're coin is on or over. To simplify, copy the data from frame 9 of the AnmChr to the bones of the 3DModel, and remove the children of the AnmChr. Do the same for MenSelchrShadow (the shadow cast by the face, plainly visible in the vanilla Brawl CSS but less noticeable in Project M), except use frame 10 instead.
MenSelchrPos covers the positions of the faces, the main icons for selecting characters, and has a separate animation for every number of characters from 0 to 50. To simplify, copy the translation data from frame 43 of the AnmChr to the bones of the 3DModel, then removing the children of the AnmChr (but not deleting it entirely, because the game looks for it). Do the same to the AnmVis. Also, I like reordering the bones of the 3DModel to put them in numerical order (instead of having 2 after 19, for example), and deleting the bones for pos43 through pos50.
IMPORTANT WARNING - editing the MenSelchrPos model, which has bones but no polygons, will not work in BrawlBox 0.71 (and earlier, I think). Use BrawlBox 0.73b, available here.
MenSelchrCoin is the circle object that you drop on a character to mark who you pick - it gets smaller as the faces get smaller. To simplify, copy the data from frame 9 of the AnmChr to the bones of the 3DModel, and remove the children of the AnmChr except for scaleN (if scaleN is removed you can't use A to pick up the coin again after placing it on a character - no idea why). For scaleN, reduce it to just 1 frame with the data from what was frame 9.
MenSelchrCursorB is the flashing box around the face you're coin is on or over. To simplify, copy the data from frame 9 of the AnmChr to the bones of the 3DModel, and remove the children of the AnmChr. Do the same for MenSelchrShadow (the shadow cast by the face, plainly visible in the vanilla Brawl CSS but less noticeable in Project M), except use frame 10 instead.
Here's the download link. Let me know if you have any questions.
Last edited: