Module ifo

Module ifo 

Source
Expand description

Typed IFO (.ifo) model and conversion helpers. IFO (.ifo) typed generic wrapper.

IFO resources are GFF-backed module info files that define a module’s identity, entry point, time settings, scripts, and area list.

§Scope

  • Typed access for all root fields from the Ghidra audit.
  • Save-game-only fields (calendar state, ID counters, player list, tokens).
  • Typed area list (Mod_Area_list) with per-entry area name and object ID.
  • Typed script hooks (15 module-level event scripts).
  • Typed expansion, cutscene, player, and token lists.

§Field Layout (simplified)

IFO root struct
+-- Mod_IsSaveGame / Mod_IsNWMFile / Mod_NWMResName
+-- Mod_ID / Mod_Creator_ID / Mod_Version
+-- Mod_Tag / Mod_Name / Mod_Description
+-- Mod_Entry_Area / Mod_Entry_X / Mod_Entry_Y / Mod_Entry_Z
+-- Mod_Entry_Dir_X / Mod_Entry_Dir_Y / Mod_StartMovie
+-- Mod_MinPerHour / Mod_DawnHour / Mod_DuskHour / Mod_XPScale
+-- Mod_On* (15 script hooks)
+-- Mod_Area_list[]
|   +-- Area_Name / ObjectId (save-only)
+-- Mod_Expan_List[] / Mod_CutSceneList[]
+-- Mod_PlayerList[] (save-only) / Mod_Tokens[] (save-only)
+-- Save-game calendar state / ID counters / Mod_Hak

Structs§

Ifo
Typed IFO model built from/to Gff data.
IfoArea
Typed IFO area list entry (Mod_Area_list).
IfoCutScene
Typed IFO cutscene list entry (Mod_CutSceneList).
IfoExpansion
Typed IFO expansion list entry (Mod_Expan_List).
IfoPlayer
Typed IFO player list entry (Mod_PlayerList, save-only).
IfoToken
Typed IFO token entry (Mod_Tokens).

Enums§

IfoError
Errors produced while reading or writing typed IFO data.

Functions§

read_ifo
Reads typed IFO data from a reader at the current stream position.
read_ifo_from_bytes
Reads typed IFO data directly from bytes.
write_ifo
Writes typed IFO data to an output writer.
write_ifo_to_vec
Serializes typed IFO data into a byte vector.