Esx: Difference between revisions

From OpenMW Wiki
Jump to navigation Jump to search
(SPEL, Spell description.)
(CREA, creatures.)
Line 68: Line 68:


[[SPEL]], Spell description.
[[SPEL]], Spell description.
[[CREA]], Creature description.


== See also ==
== See also ==
[http://www.uesp.net/text.shtml?morrow/tech/mw_esm.txt Original ESx description] from Dave Humphrey.
[http://www.uesp.net/text.shtml?morrow/tech/mw_esm.txt Original ESx description] from Dave Humphrey.

Revision as of 11:03, 24 February 2013

Wiki letter w.png

This article is not complete yet, work in progress


Format of Morrowind's ESM Plug-In File

Basic Overall Format:

The ESM/ESP/ESS files are composed entirely of Records with this format.

Record

4 bytes, char[4]. Name.
    -- 4-byte record name string. all CAPS, not null-terminated.
4 bytes, integer. Record size.
    -- Size of the record not including the 16 bytes of header data.
4 bytes, integer. Unknown.
    -- Unknown value, usually 0 (deleted/ignored flag?).
4 bytes, integer. Record flags.
    --   0x00002000 = Blocked
    --   0x00000400 = Persistant
Record size bytes, SubRecords[]. 
    -- All records are composed of a variable number of sub-records. There
    -- is no sub-record count, just use the record Size value to determine
    -- when to stop reading a record.

Sub-Record

The sub-record is the tail of the record and it contains data specific to the record type.

4 bytes, char[4]. Name.
    -- 4-byte sub-record name string, all CAPS, not null-terminated
4 bytes, long. Size of sub-record.
    -- Size of the sub-record not including the 8 bytes of header data.
Size of sub-record bytes, various format. Sub-Record data.
    -- Format depends on the sub-record type.

Sub-record types

TES3, Main header.

GMST, Game setting.

GLOB, Global variable.

CLAS, Character class definition.

FACT, Faction definition.

RACE, Race definition.

SOUN, Sound reference.

SKIL, Skill increase pace definition.

MGEF, Magic effect description.

SCPT, Script.

REGN, Region information. Sound, weather...

BSGN, Birth Sign.

STAT, Static.

DOOR, Door definition.

MISC, Misc item definition.

WEAP, Weapon definition.

CONT, Container definition.

SPEL, Spell description.

CREA, Creature description.

See also

Original ESx description from Dave Humphrey.