Jump to content

Length of a door object section in the ARE file?


Lauriel

Recommended Posts

I'm writing a macro that will change the name of a door object if it's named the same as its travel trigger region so I can close it from within a script.  I want to go through all the door objects in the ARE file and find the one whose name matches the one provided.  I can do this with regions because I know how big each region section is in the ARE file (0xC4...right?).  But the IESDP documentation doesn't state the size of a door object region.

Does anyone know this off-hand?  Or can figure it out?  This is outside my wheelhouse to be sure!

EDIT: Would it be 0xC8?

Edited by Lauriel
Link to comment

Yes, that's right.

If IESDP doesn't explicitly state the length of a structure, you can determine it from the last field in the structure.  Take the offset of that field (in this case, 0xc0) and add to it the length of the field (in this case, 8 bytes).

Note that the offset is listed in hex notation while the length of the field is listed in decimal notation, so you may have to convert them when adding.

For example, the actor structure in the ARE format has its last field listed as 'Unused' at offset 0x90 and it's 128 bytes long.  If you convert the length of the field to hex (128 = 0x80), you can add it to the offset (0x90) to get the length of the structure (0x80 + 0x90 = 0x110).

You can perform these conversions and additions quite easily with the Programmer mode on Windows' built-in Calculator program.

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...