Hex editing modl chunk problem
Moderator: Moderators
- hunting shadow
- Private First Class
- Posts: 79
- Joined: Sun Jan 18, 2009 11:37 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Somewhere in the wilderness of Mandalore
- Contact:
Hex editing modl chunk problem
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.
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: Hex editing modl chunk problem
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.)
- hunting shadow
- Private First Class
- Posts: 79
- Joined: Sun Jan 18, 2009 11:37 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Somewhere in the wilderness of Mandalore
- Contact:
Re: Hex editing modl chunk problem
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?
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?
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: Hex editing modl chunk problem
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.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?
- hunting shadow
- Private First Class
- Posts: 79
- Joined: Sun Jan 18, 2009 11:37 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Somewhere in the wilderness of Mandalore
- Contact:
Re: Hex editing modl chunk problem
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?
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?
