capes

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
Zocker2

capes

Post by Zocker2 »

hi , i've got a new question: how add capes to self made characters? the jedi exaple stuff doesn't really help me with this.
thx
RepSharpshooter
Gametoast Staff
Gametoast Staff
Posts: 1351
Joined: Tue Jul 10, 2007 4:10 pm

Re: capes

Post by RepSharpshooter »

This really sucks because the Everything you need thread is gone, it had multiple tutorials concerning capes. You have two options:
-Use a BF1 cape (will not flutter, because it's not animated)
-Use a BF2 cape (will flutter and move, but will require a lot of hex editing)

I looked for my BF2 cape tutorial, but the first post is gone there as well, luckily I saved a backup:
Hidden/Spoiler:
How to add BF2 Capes

Synopsis: You extract the MODL chunk from one msh file, and insert it into another one, while changing the variables that determine the size of the file.

Note: I'm using Hex Editor XVI32 I suggest you use it too

OTHER NOTES:
-There are more than one MODL chunks, don't get confused.
-When reading long ints with the data inspector, put the cursor on the first byte of the 4 byte long int, the number should appear in the data inspector after "long int"
-The msh format is broken up into chunks, which can be inside each other. Go here for a complete description and a visual: http://personal.riley-man.com/swbf/edit ... f-msh.html
-MODL chunks are where MODELS are in. To find where they are located in a msh file, go to the msh reference above or search for them within the msh file.


Getting the cape

1. Find cape you want (which .msh, I'll use rep_inf_ep3sniper)
2. Open it up in hex editor
3. Search > find and search for: MODL
Note remember to start at begining. After MODL in the msh file, they'll be a MTYP MNDX and the NAME hedr. Make sure afer the NAME header is rep_inf_ep3siper_cape, or whatever the cape is called.
4. Go to tools > data inspector you'll need it
5. Put the cursor afer the MODL header that includes the cape (not on the 'L' on the byte after it)
6. read the long int number on the Data Inspector, this is how many bytes are afer it. There will be a 4-byte long- int after each header telling how many bytes come after it.
7. Put cursor on last byte of the long int.
8. Go to address > go to. Select relative down, and type in the long int you read before (press ok for those who are literal)
9. This will put you at the end of the cape's MODL chunk. Make sure you are indeed at the end and not selecting another header.
10. Hold SHIFT and press the up arrow till you return to the begining of the cape's MODL chunk (the data should turn red)
11. Copy (CTRL + C) it and make a new file. Paste it and save this file as "sniper_cape" so you can use it over and over again. Make sure you got all of the cape, and only the cape MODL chunk.

Putting in the cape

1. Open up the model to be given a cape.
2. If you're cape is still on the clipboard, you're ok, otherwise go copy it again
3. Use the search to find the beginings of MODL chunks. The first MODL chunk may be a dummy root (Afer NAME is "dummy_root") skip this modl chunk and find the next one preferably.
4. When your cursor is at the begining of the MODL chunk (M is where the cursor is on) Press the INSERT key and then PASTE the cape MODL chunk into it. The cape should be in it without splitting the other MODL chunk into: M...(CAPE STUFF)...ODL <-- should not be like that should be --> (CAPE STUFF)...MODL (the other model's stuff)

Changing the size long ints in the HEDR and MSH2 headers

You increased the size of the msh file, now you need to change certain long ints that tell how many bytes are in the file. The cape is only under the HEDR and the MSH2 headers, so only these need to be changed.

HEDR

1. At the way beginning is the HEDR header. After this is a 4-byte long int that tells how long the file is after HEDR and the 4-byte long int. Use the data inspector to read it.Read it and compare with teh
2. Go back to your cape MODL chunk you saved to a different file.
3. Put your cursor at the way end and read the address on the bottom left. Put this in a calculator.
4. Place the cursor on the first byte of the long int directly after HEDR (address is 4, remember, counting starts at 0).
5. Read the long int number in the data-inspector. Add this to the number in the calculator, and add 1 to the sum (cause reading the cape started at 0, now we want to count starting at 1)
6. Got to tools > encode number and type the result of step 5 and check the long int box (press ok).
7. The number should be encoded in binary format now.

MSH2

1. Read the long int after the MSH2 header (I assume you know how to do this by now)
2. Add the long int + cape size + 1
3. Encode the sum from step 2 after MSH2.

You're done. Save it (don't overwrite original) and put it in-game.
I did add more to it, but it was lost.

There's a far more simpler BF1 cape tutorial that darth_z made, but keep in mind, it'll be static, it won't flutter or ripple. Which unit are you adding a cape to? I've already added a kama to ep2 and ep3 clone troopers, and I have done many others already.
MandeRek
Sith Master
Sith Master
Posts: 2766
Joined: Tue Oct 02, 2007 10:51 am
Projects :: Battlefront Zer0
Games I'm Playing :: SWTOR
xbox live or psn: No gamertag set
Location: Ghosting around GT
Contact:

Re: capes

Post by MandeRek »

There are 'bf1' capes which flutter. The best you can make one yourself; it's an animated addon like the wookieetentacles, it can be easily added to ANY unit, and flutters like a cape..
RepSharpshooter
Gametoast Staff
Gametoast Staff
Posts: 1351
Joined: Tue Jul 10, 2007 4:10 pm

Re: capes

Post by RepSharpshooter »

But not like what the BF2 capes do, where they actually have cloth physics, that's what I meant. Two different rendering systems.
Zocker2

Re: capes

Post by Zocker2 »

well actually i ment hoods, like e.g. darth sidious' hood. i just used the wrong word....well ..same question for this :D .
thx
woner11
Sith
Sith
Posts: 1361
Joined: Tue Sep 18, 2007 10:17 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: The lost world of pickels
Contact:

Re: capes

Post by woner11 »

Darth sideous's hood is part of the msh. However, you could add Anikan, one, but you would have to do the whole cape tutorial, as it is still part of the cape.
Zocker2

Re: capes

Post by Zocker2 »

ok...well where can i find the cape tut?
woner11
Sith
Sith
Posts: 1361
Joined: Tue Sep 18, 2007 10:17 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: The lost world of pickels
Contact:

Re: capes

Post by woner11 »

RepSharpshooter wrote:I looked for my BF2 cape tutorial, but the first post is gone there as well, luckily I saved a backup:

Hidden/Spoiler:
How to add BF2 Capes

Synopsis: You extract the MODL chunk from one msh file, and insert it into another one, while changing the variables that determine the size of the file.

Note: I'm using Hex Editor XVI32 I suggest you use it too

OTHER NOTES:
-There are more than one MODL chunks, don't get confused.
-When reading long ints with the data inspector, put the cursor on the first byte of the 4 byte long int, the number should appear in the data inspector after "long int"
-The msh format is broken up into chunks, which can be inside each other. Go here for a complete description and a visual: http://personal.riley-man.com/swbf/edit ... f-msh.html
-MODL chunks are where MODELS are in. To find where they are located in a msh file, go to the msh reference above or search for them within the msh file.


Getting the cape

1. Find cape you want (which .msh, I'll use rep_inf_ep3sniper)
2. Open it up in hex editor
3. Search > find and search for: MODL
Note remember to start at begining. After MODL in the msh file, they'll be a MTYP MNDX and the NAME hedr. Make sure afer the NAME header is rep_inf_ep3siper_cape, or whatever the cape is called.
4. Go to tools > data inspector you'll need it
5. Put the cursor afer the MODL header that includes the cape (not on the 'L' on the byte after it)
6. read the long int number on the Data Inspector, this is how many bytes are afer it. There will be a 4-byte long- int after each header telling how many bytes come after it.
7. Put cursor on last byte of the long int.
8. Go to address > go to. Select relative down, and type in the long int you read before (press ok for those who are literal)
9. This will put you at the end of the cape's MODL chunk. Make sure you are indeed at the end and not selecting another header.
10. Hold SHIFT and press the up arrow till you return to the begining of the cape's MODL chunk (the data should turn red)
11. Copy (CTRL + C) it and make a new file. Paste it and save this file as "sniper_cape" so you can use it over and over again. Make sure you got all of the cape, and only the cape MODL chunk.

Putting in the cape

1. Open up the model to be given a cape.
2. If you're cape is still on the clipboard, you're ok, otherwise go copy it again
3. Use the search to find the beginings of MODL chunks. The first MODL chunk may be a dummy root (Afer NAME is "dummy_root") skip this modl chunk and find the next one preferably.
4. When your cursor is at the begining of the MODL chunk (M is where the cursor is on) Press the INSERT key and then PASTE the cape MODL chunk into it. The cape should be in it without splitting the other MODL chunk into: M...(CAPE STUFF)...ODL <-- should not be like that should be --> (CAPE STUFF)...MODL (the other model's stuff)

Changing the size long ints in the HEDR and MSH2 headers

You increased the size of the msh file, now you need to change certain long ints that tell how many bytes are in the file. The cape is only under the HEDR and the MSH2 headers, so only these need to be changed.

HEDR

1. At the way beginning is the HEDR header. After this is a 4-byte long int that tells how long the file is after HEDR and the 4-byte long int. Use the data inspector to read it.Read it and compare with teh
2. Go back to your cape MODL chunk you saved to a different file.
3. Put your cursor at the way end and read the address on the bottom left. Put this in a calculator.
4. Place the cursor on the first byte of the long int directly after HEDR (address is 4, remember, counting starts at 0).
5. Read the long int number in the data-inspector. Add this to the number in the calculator, and add 1 to the sum (cause reading the cape started at 0, now we want to count starting at 1)
6. Got to tools > encode number and type the result of step 5 and check the long int box (press ok).
7. The number should be encoded in binary format now.

MSH2

1. Read the long int after the MSH2 header (I assume you know how to do this by now)
2. Add the long int + cape size + 1
3. Encode the sum from step 2 after MSH2.

You're done. Save it (don't overwrite original) and put it in-game.
Post Reply