Esx: Difference between revisions

From OpenMW Wiki
Jump to navigation Jump to search
(Starting page)
 
(ARMO, armor.)
 
(39 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{stub}}
{{stub|todo=This article is not complete yet, work in progress}}


== Format of Morrowind's ESM Plug-In File ==
== Format of Morrowind's ESM Plug-In File ==
Line 5: Line 5:
Basic Overall Format:
Basic Overall Format:


The ESM/ESP/ESS files are composed entirely of Records with this format.
The ESM/ESP/ESS files are composed entirely of Records with this format.<br>
The multi-bytes variables are in little-endian order. Strings are null-terminated.


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


==== Sub-Record ====
==== Sub-Record ====
The sub-record is the tail of the record and it contains data specific to the
The sub-record is the tail of the record and it contains data specific to the
record type.
record type.
    4 bytes: char Name[4]
4 bytes, char[4]. Name.
        4-byte sub-record name string (not null-terminated)
    -- 4-byte sub-record name string, all CAPS, not null-terminated
    4 bytes: long Size
4 bytes, long. Size of sub-record.
        Size of the sub-record not including the 8 bytes of header data.
    -- Size of the sub-record not including the 8 bytes of header data.
    ? bytes: Sub-Record data.
Size of sub-record bytes, various format. Sub-Record data.
        Format depends on the sub-record type.
    -- Format depends on the sub-record type.
 
=== Record types ===
Each page links to the sub-record list description and format. The sub-record order is meaningful.
 
[[ARMO]], Armor.
 
[[BODY]], Body part.
 
[[BSGN]], Birth Sign.
 
[[CELL]], Cell definition.
 
[[CLAS]], Character class definition.
 
[[CONT]], Container definition.
 
[[CREA]], Creature description.
 
[[DOOR]], Door definition.
 
[[ENCH]], Enchanting effects.
 
[[FACT]], Faction definition.
 
[[GLOB]], Global variable.
 
[[GMST]], Game setting.
 
[[LIGH]], Light definition.
 
[[MGEF]], Magic effect description.
 
[[MISC]], Misc item definition.
 
[[NPC_]], NPCs.
 
[[RACE]], Race definition.
 
[[REGN]], Region information. Sound, weather...
 
[[SCPT]], Script.
 
[[SKIL]], Skill increase pace definition.
 
[[SOUN]], Sound reference.
 
[[SPEL]], Spell description.
 
[[STAT]], Static.
 
[[TES3]], Main header.
 
[[WEAP]], Weapon definition.
 
== See also ==
[http://www.uesp.net/text.shtml?morrow/tech/mw_esm.txt Original ESx description] from Dave Humphrey.<br />
Older, but more readable [http://www.mwmythicmods.com/tutorials/MorrowindESPFormat.html version] from Jim Adam.

Latest revision as of 15:14, 12 March 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.
The multi-bytes variables are in little-endian order. Strings are null-terminated.

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.

Record types

Each page links to the sub-record list description and format. The sub-record order is meaningful.

ARMO, Armor.

BODY, Body part.

BSGN, Birth Sign.

CELL, Cell definition.

CLAS, Character class definition.

CONT, Container definition.

CREA, Creature description.

DOOR, Door definition.

ENCH, Enchanting effects.

FACT, Faction definition.

GLOB, Global variable.

GMST, Game setting.

LIGH, Light definition.

MGEF, Magic effect description.

MISC, Misc item definition.

NPC_, NPCs.

RACE, Race definition.

REGN, Region information. Sound, weather...

SCPT, Script.

SKIL, Skill increase pace definition.

SOUN, Sound reference.

SPEL, Spell description.

STAT, Static.

TES3, Main header.

WEAP, Weapon definition.

See also

Original ESx description from Dave Humphrey.
Older, but more readable version from Jim Adam.