Page 1 of 1

Hex editing modl chunk problem

Posted: Sun Oct 11, 2009 12:55 pm
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.

Re: Hex editing modl chunk problem

Posted: Sun Oct 11, 2009 1:09 pm
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.)

Re: Hex editing modl chunk problem

Posted: Sun Oct 11, 2009 1:16 pm
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?

Re: Hex editing modl chunk problem

Posted: Sun Oct 11, 2009 1:48 pm
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.

Re: Hex editing modl chunk problem

Posted: Sun Oct 11, 2009 3:36 pm
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?