Guide for finding and modifying factions, political systems, civilizations, and galaxy simulation in The Years Between the Stars. Use this skill whenever the user wants to add or rename a faction, change faction colors, modify political types, change how civilizations evolve over time, adjust faction control of systems, or change how the galaxy simulation works. Trigger on "faction", "political", "civilization", "empire", "Korathi", "Veleron", "Ashundi", "Draimar", "Solossa", "Nyxenth", "democracy", "theocracy", "dictatorship", "galaxy simulation", "era".
Current factions (defined in src/game/data/factions.ts):
Each has an id, display name, and color.
src/game/data/factions.ts — the 6 named factions with colors and IDs. Edit here to:
engine/src/factions.rs — faction generation and control state:
SystemFactionState — which faction controls a system and how stronglyengine/src/simulation.rs — galaxy-level simulation run each time the player jumps:
engine/src/civilization.rs — political type derivation per era:
PoliticalTypeengine/src/types.rs — data enums:
PoliticalType — Democracy, Theocracy, MilitaryDictatorship, Technocracy, etc.EconomyType — economy categories per systemGalaxyState / SystemSimState — simulation state shapessrc/ui/ClusterMap/ClusterMap.tsx — faction control visualization on the galaxy map. Edit here to change how faction territory is shown (colors, borders, contested indicators).
src/ui/HUD/HUD.tsx — shows current system's faction name and color. Edit here for HUD-level faction display changes.
Rename a faction or change its color:
src/game/data/factions.tsAdd a new faction:
src/game/data/factions.ts — add entryengine/src/factions.rs — include in generation logicnpm run wasm:build (or cd engine && wasm-pack build --target web --out-dir pkg)Add a new political type:
engine/src/types.rs — add to PoliticalTypeengine/src/civilization.rs — add derivation logic and trade effectsChange how galaxy simulation evolves:
engine/src/simulation.rsChange faction display on the cluster map:
src/ui/ClusterMap/ClusterMap.tsx