pub fn write_factions( layout: &StartposLayout, plan: &CaiPlan, links: &[FactionLinks], ) -> Result<RecordNode>
Writes the factions list: every world faction, then the rebels.
layout
plan
links
Returns an error if the layout lacks the records.