INFO ids Generation Algorithm

Post » Mon Dec 14, 2015 4:36 am

I'm writing a script which should duplicate certain INFO topics in an ESM file, and I need to generate INAMs for them. What is the way the CS generates them and what algorithm can I use for that?

User avatar
Blaine
 
Posts: 3456
Joined: Wed May 16, 2007 4:24 pm

Post » Mon Dec 14, 2015 8:12 am

To avoid possible duplicates, I would use something like MWEdit if you can
Spoiler
from mwedit/ReadMe
The INFO record IDs are generated slightly differently than in TESCS in a manner which virtually guarantees that the ID is unique. The ID is an up to 30 digit number such as 610641915360541333977 with the following format:

Bytes 0- 9: Current system time in seconds since midnight, January 1, 1970
Bytes 10-19: Drive c: serial number (or clock ticks if serial number is not available)
Bytes 20-29: Incremented counter per application session starting at 1

Thus, it is highly unlikely that two people will ever generate the same INFO ID.
User avatar
cosmo valerga
 
Posts: 3477
Joined: Sat Oct 13, 2007 10:21 am

Post » Mon Dec 14, 2015 6:09 am

Sort of unrelated, but does anyone know how the ingame crafted item IDs are generated? (e.g. enchants/potions)

User avatar
Rhi Edwards
 
Posts: 3453
Joined: Fri Jul 28, 2006 1:42 am


Return to III - Morrowind