Page 1 of 1
Hex edit issues
Posted: Mon Jun 20, 2011 10:15 am
by skelltor
Today I tried to add a darktrooper's jumppack to the mandalorian soldier and it ended up like this
I used Darth D.U.C.K.'s darktrooper addon pack and I used AQT's tut for reference and I encoded all the right numbers. Does anyone know what I did wrong? or can anyone help me out please?
EDIT I tried using the darktroopers pack from the dark troopers model and I got this
But how do I get the packs texture in my model? I looked at DEV's tut but am confused as I cant find the length of the strings he mentionions can someone please dumb it down for me lol?.
Re: Hex edit issues
Posted: Mon Jun 20, 2011 10:51 am
by DarthD.U.C.K.
did you make the addonpack a child of the ribcagebone?
Re: Hex edit issues
Posted: Mon Jun 20, 2011 2:34 pm
by skelltor
I don't know how to do that or what exactly it means. Can you explain? I also would still like the help with matl and such as I think it would be helpful to know.
Re: Hex edit issues
Posted: Mon Jun 20, 2011 2:46 pm
by AQT
For the jetpack's texture, you need to hex edit over the
MATD chunk: The chunk starts on the
M of the
MATD and ends on the character before the
M of the
MATD after the chunk you are trying to hex edit over. Unless the
MATD you are trying to hex edit over is the last MATD of the MSH it originally belonged to, the chunk starts on the
M of the
MATD and ends on the character before the
M of the
MODL after the chunk you are trying to hex edit over.
With this said, if you are still using my tutorial for reference, hex editing over
MATD chunks is
exactly like hex editing over
MODL chunks,
except for two things:
- Make sure you paste in the MATD chunk you are trying to hex edit over before the first MODL chunk of the MSH you are editing.
- In addition to resizing the MSH2 and HEDR, you also need to resize the MATL, but only when hex editing over MATD chunks. The resizing process for MSH2 and HEDR is exactly the same for the MATL.
Afterwards, go to the fifth place after
MATL. Now on the hexadecimal side of the hex editor, whatever face value it reads at this exact spot, raise it by a hexadecimal
01 for every
MATD you hex edit into your MSH.
Lastly, in order for your MODL chunk to read the right MATD and thus, read the right texture, after hex editing in all the
MATD chunks you need, do the following:
- Using the editor's search function, search for MATD. The first MATD that comes up is assigned the hexadecimal value of 00. The second would be 01. The third would be 02, and so on. (You should keep track of this some how.)
- Next, go to the MODL chunk that you hex edited over earlier. Using the editor's search function, search for MATI. This should take you to the MODL chunk's MATI.
- go to the fifth place after this MATI. Now on the hexadecimal side of the hex editor, whatever face value it reads at this exact spot will correspond to one of the hexadecimal values assigned to the MATD chunks you kept track of above. If this value does not use the MATD chunk you want it to, change it so that it actually uses the texture it is supposed to.
And that should be everything.
Re: Hex edit issues
Posted: Thu Jun 23, 2011 5:56 pm
by skelltor
Ok thanks a lot I will try this out.
EDIT ok so I finally got around to getting it ingame with a new texture and it looks fine in msh viewer ie
Then I put it ingame and it looks like this
Any ideas what I am doing/did wrong?
Re: Hex edit issues
Posted: Thu Jun 23, 2011 6:25 pm
by AQT
Select the entire jetpack chunk in your unit's MSH. Cut it out, and repaste/insert it in before the last MODL with PRNT called bone_ribcage. Hopefully this should fix the problem.
Re: Hex edit issues
Posted: Fri Jun 24, 2011 6:17 pm
by skelltor
@ AQT I tried what you said to do on xfire (move the chunk to right before the prnt name bone_ribcage) and that just rotated the jetpack a bit so then I renamed dummyroot to bone_ribcage (but there are no spaces between bone_ribcage of my chunk and TRAN and now the jetpack doesn't show up at all! Does anyone have any ideas as to what I did wrong?
Re: Hex edit issues
Posted: Fri Jun 24, 2011 7:30 pm
by AQT
skelltor wrote:(move the chunk to right before the prnt name bone_ribcage)
No, I did not say that... if you even do that, you would be inserting a
MODL inside of another
MODL, which is a
big no-no. I don't know how many times I have to explain this; I thought I was being very clear:
Okay, your
MODL chunk (starting at the
M and ending before the
M of the next
MODL) should go
before (not
inside!) the
last MODL (because there are more than one) having a
PRNT called
bone_ribcage. No, you
don't ever insert your
MODL chunk before any
PRNT; it will always go before another
MODL or
CL1L.
skelltor wrote:but there are no spaces between bone_ribcage of my chunk and TRAN
There
should be spaces (in other words, those boxes that are the equivalent of hexadecimal
00s). That's why I recommended that you use the stock Dark Trooper jetpack
MODL chunk so that you don't have to deal with this out-of-space problem. If you still on insisting on using whatever
MODL chunk you are using now, you will need to make the
PRNT name longer so that there is space for
bone_ribcage and extra spaces. Use the
Insert String... function under
Edit for this. For every character you insert, resize the
longint of this
PRNT,
your MODL, and the
HEDR and
MSH2 by one.
Re: Hex edit issues
Posted: Fri Jun 24, 2011 7:55 pm
by skelltor
About the first part I meant to type (move the chunk to right before the modl chunk with the prnt name bone_ribcage) I am really sorry about the typing error
About part two I am using the pack chunk from a kitbash Dev made with the darktrooper pack on a rebel model as when I used to stock chunk the jetpack stuck out as the darktrooper has back armour that sticks out.
I will try resizing theose (by resizing I assume you mean Encode the longint + 1 (+ 1for the extra space) and for resizing my modl I assume I do just like I did for the hedr on the character directly after the modl of the jetpack chunk?
Please let me know if I am on the right or wrong track for these

Re: Hex edit issues
Posted: Fri Jun 24, 2011 10:56 pm
by AQT
skelltor wrote:I will try resizing theose (by resizing I assume you mean Encode the longint + 1 (+ 1for the extra space) and for resizing my modl I assume I do just like I did for the hedr on the character directly after the modl of the jetpack chunk?
Yes, everything you will resize should be done exactly like when resizing the
HEDR and
MSH2. In addition to resizing your
MODL, don't forget to resize the
MODL's
PRNT after lengthening it. And
every one additional character you add to your MSH will be equal to
1 to add to the
longint's. And no, you don't add an extra +1 for no reason like you do when you're reading directly from the
Adr. dec; the only reason why you add an extra +1 there is because the
Adr. dec starts counting the characters from 0. The same applies to when lengthening a texture's name, but instead, you would resize the texture's
MATD, the
MATD's
TX0D, the
MATL, and then, of course, the
HEDR and
MSH2 as always.
Also, whenever you rename something in a MSH, always start where the original name starts; don't use the extra spaces before it.
skelltor wrote:I am using the pack chunk from a kitbash Dev made with the darktrooper pack on a rebel model
Does this
MODL chunk contain an
ENVL chunk?
Re: Hex edit issues
Posted: Sat Jun 25, 2011 8:28 am
by skelltor
Ok so I resized them all by 4 and got this
and it looks like that ingame too
EDIT Yes I just found envl at the very end of this model chunk and you said theose can really mess up hex editing are there any solutions to that? Like can I remove the last bit with envl and then resize stuff again? And what exactly do envl's do?
Re: Hex edit issues
Posted: Sat Jun 25, 2011 9:21 am
by DarthD.U.C.K.
envl contains the envelopinginformation for the chuck. it determinates with which bones the points move. if you dont copy it over, the chuck will float in the air and not move with the unit.
Re: Hex edit issues
Posted: Sat Jun 25, 2011 3:23 pm
by skelltor
Oh ok do you know of any ways to get it to work right?
Re: Hex edit issues
Posted: Sat Jun 25, 2011 4:16 pm
by AQT
If a MODL chunk has an ENVL chunk, then you don't attach it to a bone. By this, I mean do not rename the PRNT to bone_ribcage and do not move it before the last MODL chunk with bone_ribcage as its PRNT. Also, don't insert your MODL chunk between any two other MODL chunks with bone_ in either its NAME or PRNT. If you do all this, then the MODL chunk should appear in its correct position in MSH Viewer.
And no, do not remove the ENVL chunk. Keep it as is. In order for your MODL chunk to show up where it should be in-game, you will unfortunately have to guess and check, but don't worry; you have some hexadecimal values to go by. At the fifth spot after every ENVL on the hexadecimal side of the editor, there is a value, and continuing after this spot at every fourth spot afterwards, there are other values. As D.U.C.K. stated, these values determine what bones the MODL chunk will be enveloped to. Just search for the other ENVL (but not of the shadow volume chunk, if there is one) chunks in the MSH you are editing, and use the values following them to determine what value(s) your MODL's ENVL should have.
Re: Hex edit issues
Posted: Tue Jun 28, 2011 9:39 am
by skelltor
So I got the jumppack hexedited right finally thanks everyone

EDIT I am trying to kitbash a Dash Rendar and am putting the stormtrooper shoulder pads on a model they have an envl though and I got one pad on right but can't figure out what number/character to use. I tried using the same number (17) but that made it float by his head there are three places that need numbers (two now) and I don't think the first one does anything so I have tried almost every number from 17-1 (am I right in assuming the # refers to which bone?) as I have to right pad working and when I went through the bone list r_upperarm was before l_upperarm but idk exactly what the number counts wheither it counts bone_? as 1 and moves on, or if it counts prnt or where exactly to start. Anyhelp would be great

Re: Hex edit issues
Posted: Tue Jun 28, 2011 10:48 am
by DarthD.U.C.K.
im not sure bit i think theshoulderpads should be attached to the claviclebones.
Re: Hex edit issues
Posted: Tue Jun 28, 2011 2:50 pm
by AQT
skelltor wrote:(am I right in assuming the # refers to which bone?)
AQT wrote:As D.U.C.K. stated, these values determine what bones the MODL chunk will be enveloped to.
No need to assume.
The first value after
ENVL usually does nothing. And no, you can't use the same value twice in the same
ENVL. Also, keep in mind that the values should be increasing from left to right; they can't be out of order.
skelltor wrote:I went through the bone list r_upperarm was before l_upperarm but idk exactly what the number counts...
These
ENVL values do not correspond to the order of the "bone list" like you are suggesting.
ENVL value sets are different from player model to player model in most cases, hence why this step:
AQT wrote:Just search for the other ENVL (but not of the shadow volume chunk, if there is one) chunks in the MSH you are editing, and use the values following them to determine what value(s) your MODL's ENVL should have.
Trial and error is the only way to go, I'm afraid. But hey, at least you're getting the hang of it. Good job!
Re: Hex edit issues
Posted: Tue Jun 28, 2011 3:08 pm
by skelltor
The only things with envl in the model are sv_jettrooper, overridetexture and overridetexture2 and none of them sound good to use for reference.
Re: Hex edit issues
Posted: Tue Jun 28, 2011 3:23 pm
by AQT
AQT wrote:(but not of the shadow volume chunk, if there is one)
Okay, so toss out "sv_jettrooper." That would leave "overridetexture" and "overridetexture2" as your only options. These two
MODL's
ENVL chunks should be
chock full of values for references, which leads to
skelltor wrote:none of them sound good to use for reference.
me not understanding why is that so for you.
If the values with letters
A through
F are throwing you off, then they shouldn't; they are numbers, too. This is hexadecimal, not regular old decimal. Hope this helps, or am I missing something else?
Re: Hex edit issues
Posted: Tue Jun 28, 2011 5:29 pm
by skelltor
Ok I got it right now

I was confused as to how to use the envl as reference until I looked closer at their envls and found out the had many numbers and I made a list a found the right one I was originally thinking I had to find an envl chunk like other things for the shoulders general area on the model.