Lauriel Posted February 10, 2020 Share Posted February 10, 2020 (edited) 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 February 10, 2020 by Lauriel Quote Link to comment
Mike1072 Posted February 11, 2020 Share Posted February 11, 2020 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. Quote Link to comment
Lauriel Posted February 11, 2020 Author Share Posted February 11, 2020 1 minute ago, Mike1072 said: You can perform these conversions and additions quite easily with the Programmer mode on Windows' built-in Calculator program. AWESOME! I had NO idea that was in there. What a time saver! Thank you. Quote Link to comment
Recommended Posts
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.