Jump to content

How do you mask FormIDs?


chajapa

Recommended Posts

Posted

Because mods can have different positions in load order, I'd like to learn how to properly mask a FormID

 

If I have a follower in Nylea.esp and her FormID in my game (in this particular profile) is 22000d62, how would you mask that?

 

And what are the rules for masking a FormID? How do I figure out how to mask a form ID that's like... for an object from a different mod?

 

This is something I've never really understood or learned how to do and would appreciate if someone could explain the correct way to do it.

 

Thanks

 

Posted

The run time IDs of the objects are 32 bits. The first byte is the position of the mod (that changes when the load order is changed.)

The last three bytes are the actual object ID.

 

You can get the Mod position with the function:

int modID = Game.GetModByName("TheModName.esp")

 

So if your form has as internal ID 0xADCAFE (6 hexa letters), and the mod index is 171, then the full run time id will be 0xABADCAFE.

 

But never try to get a form directly in this way.

First check if the mod is there (GetModByName("...") != 255)

And then use the Game.GetFormFromFile(<short id of the form>, "NameOfTheMod.esp")

 

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...