Noobs guide to model swapping and glitch fixing :Update 7-28: Re-write for BB.67

Started by Snoopy, June 07, 2010, 01:31:42 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

well, last update i'll probably have to do, but i really don't know.  model swapping popularity has obviously dropped, but the info can still be helpful.  the new guide is completely re-written to fully utilize BrawlBox .67, but expect a lot of copy paste action.  it may be a re-write, but not everything is different.  i'll keep the old guide as a separate file you can download, all 21 pages of it, if you really need it, not sure why you would though.

dang, i really cut a lot of it out... probably only 15 pages instead of 21 now   :af:



As a note, if you're using BrawlBox to edit the FitCharacter.pac file, make sure you use a version between .67 and .68b, later versions have removed being able to edit anything to do with the Moveset data, including bone indices.


Sections:
-1 Stuff to know before everything else
0 Step by Step guide
1 Basic Model Swapping
2 Important Bones
3 Glitch Fixing
4 Bone Index Moving
5 FAQ's
6 Lists


-1 Stuff to know before everything else
Sorry but you are not allowed to view spoiler contents.



0 Step by Step guide
Sorry but you are not allowed to view spoiler contents.



1 Basic Model Swapping

Sorry but you are not allowed to view spoiler contents.



2 Important Bones

Sorry but you are not allowed to view spoiler contents.



3 glitch fixes

Sorry but you are not allowed to view spoiler contents.


3g. Hurtboxes, or 'why does my character get hit from across the stage?' glitch.  i'd like to say that this still works, but you can use BB instead of Tabuu.  i really don't feel like re-writing this to work with BB, and i don't have anything that needs to have this applied, so i'm eaving this alone for now...

this is quite the annoying glitch to fix, but we now have a way to fix it!  Again, this will only apply to full character replacements, because it requires PSA editing, so one slot replacements can't be fixed this way (if they have it, then they're out of luck, no way to fix it).  So to fix it, go here [url=http://www.smashboards.com/showthread.php?t=284044]http://www.smashboards.com/showthread.php?t=284044[/URL] and download Tabuu.  Then, get a clean FitCharacter.pac, it has to be an unedited one for now (unedited ones always open, edited ones might not).  Open it in Tabuu, then go to FitCharacter/MiscData[0] -> Sections -> Data -> Misc.  the hurtboxes are labeled as Hurtboxes. Under the Hurtboxes section, it will bring up all the hurtboxes that the replaced character has and what bones they're attached to.  You can change the size and location of them, but we want to re-link them to bones you're new model has.  Click the hurtbox you want to change, change the BoneIndex to where you want (it helps to have the new model open in BrawlBox to see which bones you want), then right click the hurtbox you just edited (in the left window), click 'Open Hex View', then at the bottom of the window in the box labeled 'As Int' put the same index number you just put in, then close the window.  And that's how you fix the hurtboxes!  Just a warning, it will fix the problem for one player, but the hurtboxes may still be weird if there's more than one of the new models fighting, it happened a few times to me.  After you're done editing, go back up to the top, right click FitCharacter/MiscData[0], and hit save file.  A message will pop up saying that it will replace the file, so just hit yes.  About a minute later, an error message will pop up saying that Tabuu had some problem and must close.  Don't worry, though, it did save.  Tabuu is still in development, so that will be fixed soon.  

But sometimes even this isn't enough.  If you still get random hurtbox problems, then this is what you'll have to do.

First, open the FitCharacter.pac in Tabuu, then go to FitCharacter/MiscData[0] -> Sections -> Data -> Misc.  the section we want is called UnknownT, just under the Hurtbox tab.  Open it, and click on the first UnknownType1.  What we care about is the Flags.  The Flags contain data that points to bone indexes, and at least one of them is pointing to an ExtraBone, which is why the hurtbox problem is still there.  And about the Flags, if you just look at it in the right hand window, they aren't displayed correctly.  From what I've seen, they show '1234', when it should be '3412'.  If you're unsure, just right click the UnknownType1, click 'Open Hex View', and the Flags is the last set of bytes shown.

Now that you have the Flags, you need to convert them into binary.  Use this list (Toomai made the list)

+----------------+-----------+-------------+
|Number (decimal)|Digit (hex)|String (bits)|
+----------------+-----------+-------------+
|        0       |     0     |     0000    |
|        1       |     1     |     0001    |
|        2       |     2     |     0010    |
|        3       |     3     |     0011    |
|        4       |     4     |     0100    |
|        5       |     5     |     0101    |
|        6       |     6     |     0110    |
|        7       |     7     |     0111    |
|        8       |     8     |     1000    |
|        9       |     9     |     1001    |
|       10       |     A     |     1010    |
|       11       |     B     |     1011    |
|       12       |     C     |     1100    |
|       13       |     D     |     1101    |
|       14       |     E     |     1110    |
|       15       |     F     |     1111    |
+----------------+-----------+-------------+
The rest of the explanation is from Eternal Yoshi (because I can't really explain it much clearer.  It's just one of those things that it's easy once you do it).


Example Flag: 24E10000

To Binary:

0010 0100 1110 0001 0000 0000 0000 0000

Then you take the first 9 bits(colored lime for you) and interpet them as a number.

You do this by copying the bits highlighted in green, opening this:

http://acc6.its.brooklyn.cuny.edu/~gurwitz/core5/nav2tool.html

and Pasting it in the lower section in the slot: Binary number to convert.

BE SURE TO REMOVE THE SPACES, VERY IMPORTANT.

Click Convert to decimal and that's the bone it's attached to(in decimal not hex).

If you want a new bone to attach it to, look at the top of that window, and type the bone index you want in decimal number to convert.

Let's say I want bone index 20, the program gives me 10100

Then copy the number and paste it so that the last bit is the 9th one.

1010 0110 0001 0000 0000 0000 0000

Now fill the rest to the left with zeroes.

0000 1010 0110 0001 0000 0000 0000 0000

Now we convert this to hex.

0A610000

(back to my explanation) Once you get the flag back, right click the UnknownType1, and edit the Flags bytes accordingly (the last set of bytes out of the 8 sets).  Once you change the Flags you need, go back to the top tab (the FitCharacter/MiscData[0]),right click it and save it.  The random hurtboxes should no longer be a problem.  And remember, you only need to change the Flags that have a higher bone index reference than the new model has for original bones.  So if only 1 Flags is over the new model's original bone count, then you only need to change that one.  If 5 of them are over, then only those 5.

If you have any questions, just ask.



4 Bone Index Moving
Sorry but you are not allowed to view spoiler contents.



5 FAQ

Sorry but you are not allowed to view spoiler contents.


6 lists

Sorry but you are not allowed to view spoiler contents.


TransN
Sorry but you are not allowed to view spoiler contents.


EyeYellowM
Sorry but you are not allowed to view spoiler contents.


HipN – just add 3 to the TransN number.

ThrowN – almost always the last bone.

HaveN
Sorry but you are not allowed to view spoiler contents.


Mario Bros have been fixed. For awhile. PSA just isn't finished.

okay, but it was just for an example, otherwise i would have gotten on a while ago and said i know how to fix it.  i picked those three because i just got done helping people with Lyn and Tails, and i had the Mario Bros on hand.

I'm working on porting the red alloy to captain falcon. :P I added enough bones for it to work over him. His crotch stays in the center of the stage in most animations except for a frames in others. I tried fixing it by reindexing the HipN bone to 3 (the TransN index) but it made Captain Alloy in the center of the stage and his crotch the playable person. xD It crashed as soon as I pressed B. ;-; Could you help me with this?

interesting idea, but i tried seeing if i could do it.  i got the same initial result, so i started messing around with it.  long story short, i have no idea why it's doing it.  that particular part of the model isn't connected to a bone by itself, and i wouldn't think that it's a bone issue, seeing that the Red Alloy's bone structure is almost identical to Captain Falcon.  i then thought it might be an animation issue.  it might be, but i haven't found anything that might be the cause.  from what i saw, they use the exact same animations.  so basically, i'm not sure why it does that.  and for the freezing when you push B, it probably has something to do with the Falcon Punch, it being an article, and the Alloys are incapable of using them/they don't have any.

I actually think that it froze because it tried to apply a hitbox to a bone index that didn't exist. But thank you so much for looking into this. I really hope that this can be accomplished. In the end, even if captain alloy can't grab items, I'm fine with that.


I have a question. In brawlbox, I exported the model, opened it in hex and was having a hard time finding the bone index #. So I exported his bone( the bodyM, as it was over the eyeyellow bone) and copied the data for a search. I did find it, but it was in a weird position, it wasn't the data that ended the row that was his index, it was in the middle of nowhere. Anyways, I changed 1 to 2 and saved it.
after that I opened up brawlbox and looked at the model. It looked fine in the data, the index of the bone was 2 instead of 1 and everything looked right, until I preveiwed it. It gave me an error, which Ignored, an I saw that instead of the model there was a big red X. I don't know why, but I'm guessing that this wont work ingame.
I probably should tell you that I am using the assist trophy to put isaac over gannon. Also, I have used the automatic polygon deleter on this file. Also, I am using the same hex editor as you.
Did I make any mistakes, can you use assist trophys?
Alucard
An ancient hero awakes from his long slumber.
Sorry but you are not allowed to view spoiler contents.

you dont have to export the bone itself, thats probably where the error came from.  you can find where the bone begins in BrawlBox, just go to the model, click the plus sing next to it to expand it, expand the folder called 'Bones', then look for the bone you want to edit, click it, and in the right hand window will be a bunch of info for the chosen bone.  the fourth row down is called 'MDL0Offset' and this is where the chosen bone is located in the .MDL0 file, but it shows in decimal, so convert it to hex, and thats where the chosen bone starts, and then you can edit the index. 

and yes, you can use assist trophys, in my example pic, i have Lyn, which is an assist trophy.  if you still have trouble finding it, i can take a pic for you to show what i explained if you want.

OK, i think you missunderstood what I said. I couldnt find the codes for my bone,  so I copied the bone info and searched for it in the model, and when I found it it was in a weird spot. I didn't edit the bone, I edited the model. I changed the index #, and I know it was right because 13 rows down from that there was a # that ended in 03, and 13 below that, 04. Also, it showed the bone index as changed too, so I think I took the right steps. Considereing you have lyn, you have the assist trophy files. Do you think you could maybe look at Isaac(named asfrobin) and see if you can get it to work. If so, can you give me a download?

EDIT:
I figured it out, I forgot to say the MDLO offset is negative when I converted it. works like a charm.
Alucard
An ancient hero awakes from his long slumber.
Sorry but you are not allowed to view spoiler contents.

ok the bone hierarchy changer is just too god damn confusing ._.
can anyone explain to me how to work this confusing thing? I want to use it to fix my silver hack >_>
Quote from: Miacis on December 10, 2013, 04:48:45 PM
Never underestimate the power of the ass.


yeah, i haven't really been able to make it work right either, but in that thread Eldiran kind of explains the concept of it.  but you need help with getting Silver over Olimar, right?  if so, the easiest way to do it would be to index bones 1, 2, 3, and 4 to all be 1, and then reindex the rest accordingly, as in 5 would be 2, 6 would be 3, and so on.  the Green Hill Zone Silver has Model bones for the 2nd, 3rd and 4th bones, the 3 between TopN and TransN.  fortunately Model bones can be moved without worry of messing up the rest of the model.  shifting the rest of the bones up might cause a problem, but i'm 97.5% sure that if you try what i explained that it should work right.  and if you want, i can do the hexing for you, it would only take a few minutes.

Quote from: snoopy on June 22, 2010, 03:58:45 AM
i can do the hexing for you, it would only take a few minutes.
please do.
I have been trying to fix silver for about 2 months now
Quote from: Miacis on December 10, 2013, 04:48:45 PM
Never underestimate the power of the ass.


http://www.mediafire.com/?yjynfy0qxiy

Silver hexed to have a TransN of 1.  sorry it's just the .MDL0 file, my brawlbox is having problems saving things.  all you have to do is insert this model into the one you already have of Silver on Olimar, and it should work.  i can't test it, but if it doesn't work, tell me and i can try something else.