Offset Problem
- DeadHamster
- Posts: 2289
- Joined: Thu Feb 15, 2007 9:38 pm
Offset Problem
I'm making plugins in the HMT style because I already have the basics down for how to do them. Im testing them with HHT because it has the ability to handle some things that HMT cannot, and that eschaton takes too long for me to go through. My only issue is finding the offsets for something that can change depending on which tag it is.
I'm looking to get the offsets for the nodes of a coll tag, however it varies by model.
I have it set up as a <type>reflexive</type>, however I don't know what offset for it to look in. I don't really understand reflexives all that great, and Phenomena's tutorial didn't explain them at all.
I can locate the offsets for the names, and convert that offset to the PC offset by subtracting 40 in hex, however I can't seem to get the right offset for the node drop-down box itself.
I noticed that the file is bigger depending on how many of these are added, duh. Does this make it impossible to create a plugin since the offset would change per coll tag? If so, would it still be possible to create a plugin that would allow for one particular coll tag to be edited.
Anyone that can help me out with this would be super-awesome.
I'm looking to get the offsets for the nodes of a coll tag, however it varies by model.
I have it set up as a <type>reflexive</type>, however I don't know what offset for it to look in. I don't really understand reflexives all that great, and Phenomena's tutorial didn't explain them at all.
I can locate the offsets for the names, and convert that offset to the PC offset by subtracting 40 in hex, however I can't seem to get the right offset for the node drop-down box itself.
I noticed that the file is bigger depending on how many of these are added, duh. Does this make it impossible to create a plugin since the offset would change per coll tag? If so, would it still be possible to create a plugin that would allow for one particular coll tag to be edited.
Anyone that can help me out with this would be super-awesome.
File size changes are no issue. That's the use of reflexives. Reflexives point to the first chunk of data, and then you the researcher need to figure out the chunk size. Chunks are identically structured sets of data that might need to be repeated like say the seats of a vehicle. The reflexive information stores the chunk count (how many of these pieces of data there are) and the offset to the first chunk. Since each chunk starts immediately after the previous one, the offset for any given chunk is a function of offsetToFirst + (desiredChunk-1)*chunkSize. That help at all?
- DeadHamster
- Posts: 2289
- Joined: Thu Feb 15, 2007 9:38 pm
that helps tremendously, Thank you Alt.
May I take a guess that chunk size=number of bytes between one set of data and another relating to the same thing?
IE, name of object one--->name of object 2?
I did a search and found nothing, so I'm assuming it's something relating mostly to Halo. Although I'm sure I'm wrong on that.
May I take a guess that chunk size=number of bytes between one set of data and another relating to the same thing?
IE, name of object one--->name of object 2?
I did a search and found nothing, so I'm assuming it's something relating mostly to Halo. Although I'm sure I'm wrong on that.
Chunk size is the the number of bytes from where the reflexives data is to the next reflexives data(or the end of the meta, whichever is next) divided by the chunk count.
So:
So:
Code: Select all
// reflexive2's data comes after reflexive one in the meta
ChunkSize = (reflexive2.translation - reflexive1.translation) / reflexive1.chunkCount
- DeadHamster
- Posts: 2289
- Joined: Thu Feb 15, 2007 9:38 pm
I'm going a slightly different way with this, same concept as before however.
Ok, I kind of understood what you said, but don't know how to do that. I'm kind of brand new to hex and all this advanced stuff, the first time I touched a hex editor besides to rename things was yesterday.
Im sorry to continue bugging you guys, but here's what I have and I can't get it to work right. Any idea why?
Ok, I kind of understood what you said, but don't know how to do that. I'm kind of brand new to hex and all this advanced stuff, the first time I touched a hex editor besides to rename things was yesterday.
Im sorry to continue bugging you guys, but here's what I have and I can't get it to work right. Any idea why?
Code: Select all
<value>
<type>reflexive</type>
<offset>0x6e4</offset>
<name>Coordinate Editor</name>
</value>
<struct>
<name>Coordinate Editor</name>
<size></size>
<value>
<type>float</type>
<offset>0x0</offset>
<name>X Coordinate</name>
</value>
<value>
<type>float</type>
<offset>0x4</offset>
<name>Y Coordinate</name>
</value>
<value>
<type>float</type>
<offset>0x8</offset>
<name>Z Coordinate</name>
</value>
<value>
<type>float</type>
<offset>0xc</offset>
<name>First Edge</name>
</value>
</struct>
For determining size, there are two methods. One is just having the ability to recognize repeated sets of data. In some cases chunks have padding of zeros at the end which make it easier. After looking at tags for awhile you begin to see where certain combinations of data repeat. Or there's the easier way of using the HEK to create a tag with 1 chunk, and then another one with 2 chunks and so forth and work from that. Like the birdy said, you need a size otherwise you'll run into all kinds of trouble.
- DeadHamster
- Posts: 2289
- Joined: Thu Feb 15, 2007 9:38 pm
Thanks Alt, I'll try messing around with HEK to get that
So is there any program that I could get to work with this? Does eschaton support that?conure wrote:Your missing the size part.
Also HMT/HHT arnt nearly advanced enough to work with collision editing, they dont support recursive reflexives is the problem.
- DeadHamster
- Posts: 2289
- Joined: Thu Feb 15, 2007 9:38 pm
Ok, theres just too much stuff for me to figure out. For right now I'm gonna make "custom" collision in the form of 24 different values, the XYZ coords for each of the 8 verts that make up the log collision.
I can't get the reflexive thing to work, and I really just want to get something that works. I have the X coordinate of vert 1 showing up as the right number, and I'm gonna go with that.
If anyone else wants to continue what I didn't do here, please feel free to do so.
I can't get the reflexive thing to work, and I really just want to get something that works. I have the X coordinate of vert 1 showing up as the right number, and I'm gonna go with that.
If anyone else wants to continue what I didn't do here, please feel free to do so.