Hexedit Clonetrooper Cape (FAQ)

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

AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Hexedit Clonetrooper Cape (FAQ)

Post by AQT »

Alright, here's a tutorial for those who learn by example with none of the "technical" stuff, mostly all in layman's terms:

In this tutorial we will be hex editing the cape from rep_inf_clonecommander.msh to rep_inf_ep3trooper.msh.

Step 1: Get a hex editor (XVI32 will be used in this tutorial).

Step 2: Open up rep_inf_clonecommander.msh in the hex editor. Go to Search > Find... and type in MODL like so:
Hidden/Spoiler:
Image
And click OK.

Step 3: Keep searching for MODL by going to Search > Find Again Down until you have reached the right chunk for the cape. You will know this by its NAME.
Hidden/Spoiler:
Image
Step 4: Now place the cursor on M of MODL. Hold down the Shift key and then the Down Arrow key at the same time. And highlight...
Hidden/Spoiler:
Image
...until you have reach the character/letter/number right before the next MODL If there is no next MODL, then stop before CL1L.
Hidden/Spoiler:
Image
Step 5: Now hit Ctrl + C on your keyboard (after letting go of the Shift and Down Arrow key, of course). Then go to File > New and hit Ctrl + V on your keyboard. Scroll down to the last character/letter/number of the cape chunk you just pasted and get its Adr. dec number like so:
Hidden/Spoiler:
Image
Step 6: Open up rep_inf_ep3trooper.msh in the hex editor. Search for MODL again until you have reached the following chunk; it looks like a good place to insert the cape chunk before. So place your cursor on the M of the MODL chunk like so:
Hidden/Spoiler:
Image
Hit Ctrl + V on your keyboard and the cape chunk should be pasted/inserted in.
Hidden/Spoiler:
Image
Step 7: Now to resize the HEDR. Place your cursor here:
Hidden/Spoiler:
Image
Go to Tools > Data inspector and get the longint number.
Hidden/Spoiler:
Image
Go to Tools > Encode number... to encode the sum of: 170176 (longint) + 4435 (Adr. dec) + 1 = 174612
Make sure the window looks like this:
Hidden/Spoiler:
Image
Then click OK.

Step 8: Now to resize the MSH2. Place your cursor here:
Hidden/Spoiler:
Image
Go to Tools > Data inspector and get the longint number.
Hidden/Spoiler:
Image
Go to Tools > Encode number... to encode the sum of: 167124 (longint) + 4435 (Adr. dec) + 1 = 171560
Make sure the window looks like this:
Hidden/Spoiler:
Image
Then click OK.

Step 9: Go to File > Save.

Step 10: Create a cape ODF. It should have the same name as the NAME of the cape's MODL chunk. In this case, the cape ODF should be called rep_inf_clonecommander_cape.odf.

Step 11: The contents of rep_inf_clonecommander_cape.odf should look like:
Hidden/Spoiler:
[code][GameObjectClass]
ClassLabel = "cloth"

[Properties]
attachedmesh = "rep_inf_ep3trooper"[/code]
(Notice that the parameter attachedmesh uses the name of rep_inf_ep3trooper.msh, the model into which the cape was hex edited.)

Step 12: Finally, add the following line to your unit ODF under [Properties] that uses rep_inf_ep3trooper.msh as the GeometryName:

Code: Select all

ClothODF                = "rep_inf_clonecommander_cape"
Save your ODF file, and you are done. :)
Darth-Erik
First Lance Corporal
First Lance Corporal
Posts: 124
Joined: Tue Mar 16, 2010 11:31 am
Projects :: No Mod project currently.
Games I'm Playing :: Halo
xbox live or psn: Thr33E3
Location: Somewhere over the rainbow

Re: Hexedit Clonetrooper Cape

Post by Darth-Erik »

Thanks AQT, I think this will really help!
I´ll try it as soon as I got home from school.

Edit:
It worked! :D
Thanks again, just one more question, does this method also work for for example back packs or other things that can be addon meshes?
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Hexedit Clonetrooper Cape

Post by AQT »

No problem. Glad it worked out for you. :) And yes, this method does work for non-cape chunks (although it might be a bit tricky at times with chunks containing ENVL information). Most of the time for a MODL without a ENVL (envelope), it must be inserted at a specific location in order for it to work/show up, which depends on where (a bone) you want to attach it to on the player model. Non-cape chunks also require MATD information (material/texture) to be hex edited over as well, that is if it uses a different material and/or texture than ones that are already there. Most MODL chunks tend to have a MATI (or more), which determines what MATD to use. Hex editing over MATD's require resizing the GMATL*, as well as the HEDR and MSH2. Always resize the HEDR and MSH2 when adding new information to a MSH.

*Resizing the GMATL can be a bit confusing. Instead, what I do is: look for a player model with the number of MATD's that I need, remove all the MODL's from it, resize the HEDR and MSH2 since information is taken away, add in all the MODL's from the player model I'm hex editing chunks to, add in the those chunks, and finally resize the HEDR and MSH2 again accordingly.

If I have time later on, I'll go into even further detail.
Darth-Erik
First Lance Corporal
First Lance Corporal
Posts: 124
Joined: Tue Mar 16, 2010 11:31 am
Projects :: No Mod project currently.
Games I'm Playing :: Halo
xbox live or psn: Thr33E3
Location: Somewhere over the rainbow

Re: Hexedit Clonetrooper Cape

Post by Darth-Erik »

So is there a tutorial for hexediting other things then just capes onto models,
with all those other things you have to do that you mentioned?
User avatar
Jendo7
Sith
Sith
Posts: 1304
Joined: Wed Apr 01, 2009 6:37 pm
Location: Cambridge, England.
Contact:

Re: Hexedit Clonetrooper Cape

Post by Jendo7 »

Thanks AQT, I've just been able to hex edit rep_inf_ep3heavytrooper_cape on to my shocktrooper, rep_inf_shocktrooper.msh model.

Screenshot:
Hidden/Spoiler:
Image
Very easy to understand tutorial. :thumbs:
Darth_Spiderpig
Sith Master
Sith Master
Posts: 2631
Joined: Fri Mar 27, 2009 10:23 am
Projects :: Something cool...
Games I'm Playing :: BF2 CoDBO BFBC2
xbox live or psn: Has no xbox....Yup
Location: Does whatever a Spiderpig does
Contact:

Re: Hexedit Clonetrooper Cape

Post by Darth_Spiderpig »

Wow, don't know how I could have missed this, very nice tut AQT. :thumbs:
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Hexedit Clonetrooper Cape

Post by AQT »

Thanks! And no problem, Jendo, that's what I was hoping for. :)

@Darth-Erik: You can try THIS tutorial that Deviss wrote a while back.
Darth-Erik
First Lance Corporal
First Lance Corporal
Posts: 124
Joined: Tue Mar 16, 2010 11:31 am
Projects :: No Mod project currently.
Games I'm Playing :: Halo
xbox live or psn: Thr33E3
Location: Somewhere over the rainbow

Re: Hexedit Clonetrooper Cape

Post by Darth-Erik »

Okay Thanks :D
User avatar
Delta-1035
Sith Master
Sith Master
Posts: 2651
Joined: Mon Aug 04, 2008 10:32 am
Projects :: TOR GCWII GCW1035 BF1035
xbox live or psn: Johnny_Sciroppo
Location: Pizza Land

Re: Hexedit Clonetrooper Cape

Post by Delta-1035 »

Hey, I know this is a bump but I've a question.
This awesome tutorial that explains perfectly how to add a cape also works with addon msh right? I only have to attach the model chunk to the same bone is should be attached on the trooper right? Must I also edit the HEDR and MSH2? If I have, how? longint + addon Adr. dec + 1? Thanks in advance.
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Hexedit Clonetrooper Cape

Post by AQT »

The answer to all three questions is yes. Be sure to look over Deviss's tutorial as well. :)
DrDrSheldonLeeCooper
Chief Warrant Officer
Chief Warrant Officer
Posts: 353
Joined: Sat Apr 26, 2014 1:50 pm
Projects :: Times before Empire
Games I'm Playing :: SWBF2-BF-Skyrim
xbox live or psn: No gamertag set
Location: Coruscant City [Germany]

Re: Hexedit Clonetrooper Cape

Post by DrDrSheldonLeeCooper »

Can smb help me?when I´m clicking ctrl + c it doesnt copy
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Hexedit Clonetrooper Cape (FAQ)

Post by AQT »

You're not actually hitting the + key, right? It's just the Ctrl key followed by the C key, i.e. the basic keyboard command for copy.
DrDrSheldonLeeCooper
Chief Warrant Officer
Chief Warrant Officer
Posts: 353
Joined: Sat Apr 26, 2014 1:50 pm
Projects :: Times before Empire
Games I'm Playing :: SWBF2-BF-Skyrim
xbox live or psn: No gamertag set
Location: Coruscant City [Germany]

Re: Hexedit Clonetrooper Cape (FAQ)

Post by DrDrSheldonLeeCooper »

AQT wrote:You're not actually hitting the + key, right? It's just the Ctrl key followed by the C key, i.e. the basic keyboard command for copy.
thx :)

EDIT
I think you have to reupload the pics.When I click on it there is just "image"
SkinnyODST
Lieutenant Colonel
Lieutenant Colonel
Posts: 545
Joined: Mon Jul 04, 2016 10:56 pm
Location: My other account
Contact:

Re: Hexedit Clonetrooper Cape (FAQ)

Post by SkinnyODST »

Game crashes. Followed all the steps, the game starts but after a second of being in the game it just crashes.
BattlefrontStudios
Recruit Womprat Killer
Posts: 10
Joined: Sat May 06, 2017 8:51 pm
Projects :: No Mod project currently.
Games I'm Playing :: SWBF2
xbox live or psn: No gamertag set

Re: Hexedit Clonetrooper Cape (FAQ)

Post by BattlefrontStudios »

I cannot highlight, when i press shift and down arrow key it just moves down and only selects the line where it is, help
:cry:
Post Reply