ContentsIndex
Data.TES4
Contents
Game Specific Data Types
TES4 File Objects
Subrecords
Records
Group Headers
File Nodes
Synopsis
newtype Tag = Tag String
data ZString
mkZ :: String -> ZString
unZ :: ZString -> String
data PString
mkP :: String -> PString
unP :: PString -> String
data FormID
modIndex :: FormID -> Word8
objectIndex :: FormID -> Int
data Subrecord
data Record = Record {
recordTag :: Tag
flags1 :: Word32
formid :: FormID
flags2 :: Word32
subrecords :: [Subrecord]
}
data GroupHeader = GroupHeader {
label :: Word32
groupType :: Word32
stamp :: Word32
}
data FileNode
= GroupNode GroupHeader
| RecordNode Record
Game Specific Data Types
newtype Tag
The game uses 4 char tags to give everything in the file a type. Most documentation on the file format refers to these items as simply types, but we use the term tags to differentiate them from types in the haskell sense of the term.
Constructors
Tag String
show/hide Instances
Eq Tag
Ord Tag
Show Tag
Binary Tag
data ZString
The game uses Zero terminated strings extensively throughout its files. The ZString wrapper allows us to easily read and write these strings.
show/hide Instances
mkZ :: String -> ZString
Wrap a string into a ZString.
unZ :: ZString -> String
Unwrap a string from it's ZString wrapper.
data PString
In some (rare) places the game uses Pascal style strings prefixed with a byte containing their length and no zero terminator. The PString wrapper lets us read and write these items of data.
show/hide Instances
mkP :: String -> PString
Wrap a string into a pascal style string.
unP :: PString -> String
Unwrap a pascal style string.
data FormID
Form IDs are used to uniquely refer to records in the file. The object index is used to identify the object, while the modindex is used to indentify the mod it comes from for a more thorough explanation, see: http://www.uesp.net/wiki/Tes4Mod:Formid
show/hide Instances
modIndex :: FormID -> Word8
Get a FormID's mod index.
objectIndex :: FormID -> Int
Get a FormID's object index.
TES4 File Objects
Subrecords
data Subrecord
See http://www.uesp.net/wiki/Tes4Mod:Mod_File_Format#Subrecords.
show/hide Instances
Records
data Record
See http://www.uesp.net/wiki/Tes4Mod:Mod_File_Format#Records.
Constructors
Record
recordTag :: Tag
flags1 :: Word32
formid :: FormID
flags2 :: Word32
subrecords :: [Subrecord]
show/hide Instances
Group Headers
data GroupHeader
See http://www.uesp.net/wiki/Tes4Mod:Mod_File_Format#Groups
Constructors
GroupHeader
label :: Word32
groupType :: Word32
stamp :: Word32
show/hide Instances
File Nodes
data FileNode
An esp (or esm) file consists of a forest of FileNodes. Each FileNode can either contain a group header or a record.
Constructors
GroupNode GroupHeader
RecordNode Record
Produced by Haddock version 2.3.0