Oblivion Mod:File Format Conventions

The UESPWiki – Your source for The Elder Scrolls since 1995
Jump to: navigation, search

Listed here are conventions used in describing Oblivion mod and save file formats. Many of these conventions are standard c-type conventions, others (e.g., iref) are specific to this subject.

C (Count)[edit]

This is used for mod subrecords.

Count Usage
? Unknown
+ Required
- Optional
* Repeating
  • Repeat count may be zero.
  • If subrecords are repeated in a group (e.g., MAST and DATA in TES4), then the following subrecords are indented under the leading subrecord.

Names/Comments[edit]

Text Usage
num Count of something. E.g. number of records.
size Size in bytes of some data object.
?Huh? Question or speculation.
[indent] Substructure.

Data Types[edit]

Type Size Description
byte 1 Byte, signed.
ubyte 1 Byte, unsigned.
  • Also used for unknown and/or complex data structures.
char 1 Character, signed.
  • Used for text.
short 2 Short integer, signed.
ushort 2 Short integer, unsigned.
long 4 Long integer, signed.
ulong 4 Long integer, unsigned.
  • Also used to represent a set of binary flags.
float 4 Floating point number
formid 4 A ulong used to identify a data object. May refer to a data object from a mod or new object created in-game.
iref 4 A ulong. Use as an index into the FormIDs Array to get the formId.
int64 8 Long 64-bit integer, signed.
uint64 8 Long 64-bit integer, unsigned.
hash 8 A hash of a string. See BSA File Format: Hash Calculation.
systemtime 16 SYSTEMTIME structure.
type[num] num*sizeof(type) Array of num types.
bstring 1+?? A string prefixed with a byte length. NOT zero terminated.
  • This and other string types use Windows-1252 encoding.
  • However, not all fields allow the full range -- e.g., editor ids are limited to [a-zA-Z0-9].
bzstring 1+?? A string prefixed with a byte length and terminated with a zero (\x00).
zstring  ?? Zero terminated string.
  • Size is size of string text + 1 for string terminator.
string  ?? String which is not terminated
  • Size is the exact number of characters in the string.
struct  ?? Collection of other data types.
  • Used to group items that logically belong together. E.g., pc cell data.
  • Size is sum of item sizes.
list[len]  ?? List of items of variable length, and possibly different types.
  • Size is sum of item sizes.