Skyrim Mod:Mod File Format/GLOB
The UESPWiki – Your source for The Elder Scrolls since 1995
GLOB records contain information on Global Variables
Remember:
- All globals, regardless of their type (short, long, float), are stored in the mod file as floats. This is fine for short globals but it creates potential issues with loss of precision when using long values.
- It happens exactly at 2E24 [= 16777216]. Values between 2E24 and 2E25 are stored in even numbers and have a precision of 0 or 1. All odd numbers are rounded to the next values divisible by 4. So numbers mod 2 but not mod 4 are precise while numbers mod 4 have 3 meanings [2E1-1 / 2E2+1].
- With 2E25, the problem increases. Just values mod 4 are stored, values not mod 4 are in/decreased by 1 to the next number mod 4 or the by 2 to the next number mod 8. So a value can have 3 or 5 meanings [2E2-1 / 2E2+1].
- With 2E26, we have 2E3+1 for mod 16 numbers and 2E3-1 for values just mod 8.
Examples:
- 123456780-123456788 will be stored as 123456784
- 123456789-123456795 will be stored as 123456792
The flag 0x40 in the record header flags denotes constant globals.
C | Field | Type/Size | Info | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
+ | EDID | zstring | Editor id | ||||||||||||
+ | FNAM | byte |
|
||||||||||||
+ | FLTV | float | Value | ||||||||||||
- | OBND | OBND | Object Bounds Probably vestigial. Checked for in code, but not seen in data. | ||||||||||||
- | VMAD | VMAD | Script Info Probably vestigial. Checked for in code, but not seen in data. |