Expand description
Validation of the tables a startpos is built from, to report why a build would fail before running it.
When the game builds a startpos from broken data it either quits without a startpos, hangs forever, or silently drops rows, and logs nothing. This module finds those problems up front:
- Every reference of the
start_pos_*tables (as the schema defines them) must point to an existing row. Broken references inFATAL_REFERENCESmake the game quit or hang, so they’re errors; the rest make it drop the row or ignore the value, so they’re warnings. - The campaign must exist.
- Characters in the generals pool can’t also be placed on the map with an army.
- Progenitors can’t adopt children under
ADULT_AGE: the game gives the adopted child the progenitor’s family name through the child’s character, which children don’t have yet while the families are linked, and crashes. - Data the game drops: names whose
names.typeisn’t their column’s kind, technologies outside the faction’s technology tree, and the non-aggression pacts and military access of vassals with other factions.
The outcomes of broken references were measured on Attila, one broken reference at a time.
Structs§
- Startpos
Issue - A problem in the data a startpos is built from.
Enums§
- Severity
- How bad an issue is.
Constants§
- ADULT_
AGE - Age from which characters have a character while the game links their families.
- FATAL_
REFERENCES - Columns (table without the
_tablessuffix, column) whose broken references make the game quit or hang while building the startpos.Surname,clan_nameandother_nameare assumed to behave likeName.
Functions§
- referenced_
tables - Returns the tables the
start_pos_*tables of a schema reference, without the_tablessuffix. - validate
- Validates the tables a campaign’s startpos is built from.