Hex editing modl chunk problem

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
User avatar
hunting shadow
Private First Class
Posts: 79
Joined: Sun Jan 18, 2009 11:37 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Somewhere in the wilderness of Mandalore
Contact:

Hex editing modl chunk problem

Post by hunting shadow »

Ok, i've got a little problem with hex-editing moddel Chunks to a unit. I'm using the Airborn troop as base modddel and up to now I hex-edited jangos jetpack, deviss's holsters and deviss's cody visor to it. It worked all fine until I added the material for the visor. Now it doesn't show up ingame, more exactly, I get a CTD, and it also doesn't show up in MSH Viewer. I double checked the Material and also made a new version, but i can't get it to work. Oh, and I increased the MATL.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Hex editing modl chunk problem

Post by Maveritchell »

If you are getting crashes, what is most likely is that you didn't update the length variables to include the extra data you hexedited in when adding the new MATD chunk. Remember that not only should the HEDR and MSH2 variables be incremented, but your MATL also has a length variable. (You may also have left out changing the MATI chunk within the MODL chunk to match the position of your MATD chunk within the MATL chunk.)
User avatar
hunting shadow
Private First Class
Posts: 79
Joined: Sun Jan 18, 2009 11:37 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Somewhere in the wilderness of Mandalore
Contact:

Re: Hex editing modl chunk problem

Post by hunting shadow »

Ok, for adding the new MATD, i a) Added it and b) increased the lenght variable of the MATL. I didn't changed the MATI of the Moddelchunk, but it would still work, because when I tried it before i added the new MATD, it just used another texture.
And i think for adding a MATD I don't need to increase the lenght of the HEDR and MSH2, because i always get an error in MSH Viewer when i do that?
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Hex editing modl chunk problem

Post by Maveritchell »

hunting shadow wrote:And i think for adding a MATD I don't need to increase the lenght of the HEDR and MSH2, because i always get an error in MSH Viewer when i do that?
Anything you paste into your .msh file will require you to extend the HEDR and (in almost all cases) the MSH2. If you're getting an error in MSH viewer it is because you did your math wrong.
User avatar
hunting shadow
Private First Class
Posts: 79
Joined: Sun Jan 18, 2009 11:37 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Somewhere in the wilderness of Mandalore
Contact:

Re: Hex editing modl chunk problem

Post by hunting shadow »

Yeah, but i didn't need to edit the hedr or msh2 for all other matds i added before.. I'll work through it again tomorrow and I'll add the stuff again, check it double and perhaps i get it working.

Edit: My problem got worse: I made a new version, addded the jetpack and the holsters, increased hedr, msh2 not only for the chunks but also for the matds. I put it ingame and got no crash. But, my problem is now: The holsters don't appear ingame. The jetpack is fine, but the holsters aren't there, but in MSh Viewer they are. I had that problem time ago with another Modl chunk, wasn't abe o fix it. Any ideas?
Post Reply