Documentation
¶
Overview ¶
CELL records contain information about cells (both interior and exterior).
Code generated by generator/gen.go; DO NOT EDIT.
Index ¶
- Constants
- type AMBIField
- type ANAMField
- type BNAMField
- type CNAMField
- type CNDTField
- type CellRecord
- type DATAField
- type DATAFormReferenceField
- type DNAMField
- type DODTField
- type FLTVField
- type FRMRField
- type FormReference
- type INDXField
- type INTVField
- type KNAMField
- type MVRFField
- type MoveReference
- type NAM0Field
- type NAM5Field
- type NAM9Field
- type NAMEField
- type RGNNField
- type TNAMField
- type UNAMField
- type WHGTField
- type XCHGField
- type XSCLField
- type XSOLField
- type ZNAMField
Constants ¶
const AMBI esm.SubrecordTag = "AMBI"
AMBI is a 16 byte struct for Ambient light (ambient, sunlight, fog colors, and fog density).
const ANAM esm.SubrecordTag = "ANAM"
NPC ID, if applicable (NPC-only).
const BNAM esm.SubrecordTag = "BNAM"
Global variable name.
const CELL esm.RecordTag = "CELL"
Cell handles https://en.uesp.net/wiki/Morrowind_Mod:Mod_File_Format/CELL
const CNAM esm.SubrecordTag = "CNAM"
Name of the cell the reference was moved to (interior cells only) or Faction ID (not light, NPC, or static).
const CNDT esm.SubrecordTag = "CNDT"
Coordinates of the cell the reference was moved to (exterior cells only).
const DATA esm.SubrecordTag = "DATA"
DATA is a 12 byte struct containing flags and position.
const DATAFormReference esm.SubrecordTag = "DATA"
Reference position (Rotations are in radians).
const DNAM esm.SubrecordTag = "DNAM"
Cell name for previous DODT, if interior.
const DODT esm.SubrecordTag = "DODT"
Cell Travel Destination (Rotations are in radians).
const FLTV esm.SubrecordTag = "FLTV"
Lock difficulty (uint32).
const FRMR esm.SubrecordTag = "FRMR"
Reference ID for a Form Reference.
const INDX esm.SubrecordTag = "INDX"
Faction rank (uint32).
const INTV esm.SubrecordTag = "INTV"
Remaining usage. uint32 - health remaining (weapons and armor). uint32 - uses remaining (locks, probes, repair items). float32 - time remaining (lights).
const KNAM esm.SubrecordTag = "KNAM"
Key name.
const MVRF esm.SubrecordTag = "MVRF"
Reference ID (always the same as the attached FRMR value).
const NAM0 esm.SubrecordTag = "NAM0"
Count of Temporary Children.
const NAM5 esm.SubrecordTag = "NAM5"
Map color (exterior and like-exterior only).
const NAM9 esm.SubrecordTag = "NAM9"
Value (uint32).
const NAME esm.SubrecordTag = "NAME"
Cell Name. Unlike other NAME fields, this is the localized, human-readable name of the cell, not a language-agnostic ID string. Exterior regions are mostly empty strings; for these, the region name is used in the Construction Set.
const RGNN esm.SubrecordTag = "RGNN"
Region name (exterior and like-exterior only).
const TNAM esm.SubrecordTag = "TNAM"
Trap name.
const UNAM esm.SubrecordTag = "UNAM"
Reference blocked flag (always 0, present if Blocked is set in the header).
const WHGT esm.SubrecordTag = "WHGT"
Water height (interior only).
const XCHG esm.SubrecordTag = "XCHG"
Enchantment charge (charged items with non-zero charges), a float32.
const XSCL esm.SubrecordTag = "XSCL"
Reference's scale, if applicable and not 1.0.
const XSOL esm.SubrecordTag = "XSOL"
ID of soul in gem (soul gems only).
const ZNAM esm.SubrecordTag = "ZNAM"
Reference is disabled flag (always 0, present if the relevant flag is set in the header).
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AMBIField ¶
type AMBIField struct {
AmbientColor [3]uint8
Sunlight [3]uint8
FogColor [3]uint8
FogDensity float32
}
func (*AMBIField) Tag ¶
func (s *AMBIField) Tag() esm.SubrecordTag
type ANAMField ¶
type ANAMField struct{ Value string }
NPC ID, if applicable (NPC-only).
func (*ANAMField) Tag ¶
func (t *ANAMField) Tag() esm.SubrecordTag
type BNAMField ¶
type BNAMField struct{ Value string }
Global variable name.
func (*BNAMField) Tag ¶
func (t *BNAMField) Tag() esm.SubrecordTag
type CNAMField ¶
type CNAMField struct{ Value string }
Name of the cell the reference was moved to (interior cells only) or Faction ID (not light, NPC, or static).
func (*CNAMField) Tag ¶
func (t *CNAMField) Tag() esm.SubrecordTag
type CNDTField ¶
type CNDTField struct{ X, Y int32 }
Coordinates of the cell the reference was moved to (exterior cells only).
func (*CNDTField) Tag ¶
func (t *CNDTField) Tag() esm.SubrecordTag
type CellRecord ¶
type CellRecord struct {
NAME *NAMEField
DATA *DATAField
RGNN *RGNNField
NAM5 *NAM5Field
WHGT *WHGTField
AMBI *AMBIField
MovedReferences []*MoveReference
PersistentChildren []*FormReference
// Count of temporaray children
NAM0 *NAM0Field
TemporaryChildren []*FormReference
}
CellRecord represents a full CellRecord record composed of subrecords.
func ParseCELL ¶
func ParseCELL(rec *esm.Record) (*CellRecord, error)
ParseCELL builds a CELL record from a list of subrecords.
func (*CellRecord) OrderedRecords ¶
func (c *CellRecord) OrderedRecords() ([]*esm.Subrecord, error)
type DATAFormReferenceField ¶
type DATAFormReferenceField struct {
PosX float32
PosY float32
PosZ float32
RotX float32
RotY float32
RotZ float32
}
Reference position (Rotations are in radians).
func (*DATAFormReferenceField) Marshal ¶
func (s *DATAFormReferenceField) Marshal() (*esm.Subrecord, error)
func (*DATAFormReferenceField) Tag ¶
func (t *DATAFormReferenceField) Tag() esm.SubrecordTag
type DNAMField ¶
type DNAMField struct{ Value string }
Cell name for previous DODT, if interior.
func (*DNAMField) Tag ¶
func (t *DNAMField) Tag() esm.SubrecordTag
type DODTField ¶
type DODTField struct {
PosX float32
PosY float32
PosZ float32
RotX float32
RotY float32
RotZ float32
}
Cell Travel Destination (Rotations are in radians).
func (*DODTField) Tag ¶
func (t *DODTField) Tag() esm.SubrecordTag
type FLTVField ¶
type FLTVField struct{ Value uint32 }
Lock difficulty (uint32).
func (*FLTVField) Tag ¶
func (t *FLTVField) Tag() esm.SubrecordTag
type FRMRField ¶
type FRMRField struct{ Value uint32 }
Reference ID for a Form Reference.
func (*FRMRField) Tag ¶
func (t *FRMRField) Tag() esm.SubrecordTag
type FormReference ¶
type FormReference struct {
// Reference ID.
// Type: uint32
// Required.
FRMR *FRMRField
// Object ID or "PlayerSaveGame".
// zstring
// Required.
NAME *NAMEField
// Reference blocked (value is always 0; present if Blocked is set in the reference's record header, otherwise absent).
// uint8
// Optional.
UNAM *UNAMField
// Reference's scale, if applicable and not 1.0.
// float32
// Optional.
XSCL *XSCLField
// NPC ID, if applicable (NPC-only).
// zstring
// Optional, exclusive with BNAM.
ANAM *ANAMField
// Global variable name
// zstring
// Optional, exclusive with ANAM.
BNAM *BNAMField
// Faction ID (not light, NPC, or static)
// zstring
// Optional, if present then INDX must also exist.
CNAM *CNAMField
// Faction rank.
// uint32
// Optional, if present then CNAM must also exist.
INDX *INDXField
// ID of soul in gem (soul gems only)
// zstring
// Optional.
XSOL *XSOLField
// Enchantment charge (charged items with non-zero charges).
// float32
// Optional.
XCHG *XCHGField
// Depends on the object type.
// uint32 - health remaining (weapons and armor)
// uint32 - uses remaining (locks, probes, repair items)
// float32 - time remaining (lights)
// Optional.
INTV *INTVField
// Value (in gold)
// uint32
// Optional.
NAM9 *NAM9Field
// Cell Travel Destination (Rotations are in radians)
// float32 - Position X
// float32 - Position Y
// float32 - Position Z
// // float32 - Rotation X
// float32 - Rotation Y
// float32 - Rotation Z
// Optional.
DODT *DODTField // Cell name for previous DODT, if interior.
// zstring
// Optional, must accompany DODT if present.
DNAM *DNAMField
// Lock difficulty
// uint32
// Optional.
FLTV *FLTVField
// Key name
// zstring
// Optional.
KNAM *KNAMField
// Trap name
// zstring
// Optional.
TNAM *TNAMField
// Reference is disabled (always 0). Like UNAM, this will be emitted if the relevant flag is set in the reference's record header. This may only be possible via scripting. Also, even if present in the file, the field appears to be ignored on loading.
// uint8
// Optional.
ZNAM *ZNAMField
// Reference position (Rotations are in radians)
// float32 - Position X
// float32 - Position Y
// float32 - Position Z
// float32 - Rotation X
// float32 - Rotation Y
// float32 - Rotation Z
// Optional.
DATA *DATAFormReferenceField
}
References to objects in cells are listed as part of the cell data, each beginning with FRMR and NAME fields, followed by a list of fields specific to the object type.
func ParseFormRef ¶
func ParseFormRef(subs []*esm.Subrecord) (*FormReference, int, error)
returns formref + how many records it ate
func (*FormReference) OrderedRecords ¶
func (f *FormReference) OrderedRecords() ([]*esm.Subrecord, error)
type INDXField ¶
type INDXField struct{ Value uint32 }
Faction rank (uint32).
func (*INDXField) Tag ¶
func (t *INDXField) Tag() esm.SubrecordTag
type INTVField ¶
type INTVField struct{ Value uint32 }
Remaining usage. uint32 - health remaining (weapons and armor). uint32 - uses remaining (locks, probes, repair items). float32 - time remaining (lights).
func (*INTVField) Tag ¶
func (t *INTVField) Tag() esm.SubrecordTag
type KNAMField ¶
type KNAMField struct{ Value string }
Key name.
func (*KNAMField) Tag ¶
func (t *KNAMField) Tag() esm.SubrecordTag
type MVRFField ¶
type MVRFField struct{ Value uint32 }
Reference ID (always the same as the attached FRMR value).
func (*MVRFField) Tag ¶
func (t *MVRFField) Tag() esm.SubrecordTag
type MoveReference ¶
type MoveReference struct {
// Reference ID (always the same as the attached FRMR value).
// Required.
MVRF *MVRFField
// Name of the cell the reference was moved to (interior cells only)
// zstring
// Optional.
CNAM *CNAMField
// Coordinates of the cell the reference was moved to (exterior cells only)
// int32 - Grid X
// int32 - Grid Y
// Optional.
CNDT *CNDTField
// Reference to the form that was moved.
// Optional.
Moved *FormReference
}
These only appear in mod files when creatures or NPCs are moved from one cell to another; they commonly appear in saved game files as things move around.
func ParseMoveRef ¶
func ParseMoveRef(subs []*esm.Subrecord) (*MoveReference, int, error)
returns formref + how many records it ate
func (*MoveReference) OrderedRecords ¶
func (m *MoveReference) OrderedRecords() ([]*esm.Subrecord, error)
type NAM0Field ¶
type NAM0Field struct{ Value uint32 }
Count of Temporary Children.
func (*NAM0Field) Tag ¶
func (t *NAM0Field) Tag() esm.SubrecordTag
type NAM5Field ¶
Map color (exterior and like-exterior only).
func (*NAM5Field) Tag ¶
func (t *NAM5Field) Tag() esm.SubrecordTag
type NAM9Field ¶
type NAM9Field struct{ Value uint32 }
Value (uint32).
func (*NAM9Field) Tag ¶
func (t *NAM9Field) Tag() esm.SubrecordTag
type NAMEField ¶
type NAMEField struct{ Value string }
Cell Name. Unlike other NAME fields, this is the localized, human-readable name of the cell, not a language-agnostic ID string. Exterior regions are mostly empty strings; for these, the region name is used in the Construction Set.
func (*NAMEField) Tag ¶
func (t *NAMEField) Tag() esm.SubrecordTag
type RGNNField ¶
type RGNNField struct{ Value string }
Region name (exterior and like-exterior only).
func (*RGNNField) Tag ¶
func (t *RGNNField) Tag() esm.SubrecordTag
type TNAMField ¶
type TNAMField struct{ Value string }
Trap name.
func (*TNAMField) Tag ¶
func (t *TNAMField) Tag() esm.SubrecordTag
type UNAMField ¶
type UNAMField struct{ Value uint8 }
Reference blocked flag (always 0, present if Blocked is set in the header).
func (*UNAMField) Tag ¶
func (t *UNAMField) Tag() esm.SubrecordTag
type WHGTField ¶
type WHGTField struct{ Value float32 }
Water height (interior only).
func (*WHGTField) Tag ¶
func (t *WHGTField) Tag() esm.SubrecordTag
type XCHGField ¶
type XCHGField struct{ Value float32 }
Enchantment charge (charged items with non-zero charges), a float32.
func (*XCHGField) Tag ¶
func (t *XCHGField) Tag() esm.SubrecordTag
type XSCLField ¶
type XSCLField struct{ Value float32 }
Reference's scale, if applicable and not 1.0.
func (*XSCLField) Tag ¶
func (t *XSCLField) Tag() esm.SubrecordTag
type XSOLField ¶
type XSOLField struct{ Value string }
ID of soul in gem (soul gems only).
func (*XSOLField) Tag ¶
func (t *XSOLField) Tag() esm.SubrecordTag