Skip to main content

Module writer

Module writer 

Source
Expand description

Writer of the WORLD record of a startpos.

The writer first plans the world (the order and runtime id of every object), then writes each record from its layout, filling the values the world generators compute. Runtime ids use one counter per kind of object, as the game looks them up in separate registries.

§Submodules

  • armies: the forces of each faction.
  • characters: the characters of each faction.
  • factions: the FACTION records.
  • forces: the plan of the characters and forces.
  • government: the plan of the government posts.
  • provinces: the provinces and the sea regions.
  • regions: the REGION records and their settlements.
  • sight: the vision of regions, settlements and forces, and the factions’ shroud.

Modules§

armies
Writer of the forces of a faction (FACTION/ARMY_ARRAY): their units and legacies.
characters
Writer of the characters of a faction (FACTION/CHARACTER_ARRAY).
factions
Writer of the FACTION records (WORLD/FACTION_ARRAY).
forces
Plan of the characters and forces of the world: their order, runtime ids and commanders.
government
Plan and writer of the government posts of the factions (FACTION/GOVERNMENT/CHARACTER_POSTS).
provinces
Writer of the provinces (WORLD/PROVINCE_MANAGER) and the sea regions (WORLD/SEA_REGION_MANAGER).
regions
Writer of the REGION records (WORLD/REGION_MANAGER/REGIONS_ARRAY), with their slots and settlements.
sight
Vision of the world: what regions, settlements and forces see (LINE_OF_SIGHT), and what each playable faction has seen (CAMPAIGN_SHROUD).
slaves
Writer of the world’s slaves (WORLD/SLAVES): the slave points of each region’s settlement (start_pos_settlements.startpos_slave_points), in region id order.
spying
Writer of the factions’ spying state (WORLD/SPYING_ARRAY): one entry per faction, in world order, with nothing spied yet.

Structs§

WorldInputs
What the world writer needs.
WorldPlan
Order and runtime ids of the objects of the world.

Constants§

REBEL_FACTION_ID
Runtime id of the rebel faction. Real factions are numbered from the next one, in startpos order.
WORLD_PATH
Path of the WORLD record.

Functions§

write_world
Writes the WORLD record of a campaign.
write_world_with_plan
Writes the WORLD record of a campaign with a given plan.