Faction field — dead config

What this is

ShipDef.faction is a typed field on every ship entry in src/starship-survivors/data/ships.ts. It exists on the ShipDef interface, has its own union type Faction, and is written to every one of the 300 generated ship entries (60 hull classes × 5 stars in code; 37 hulls present in the rarity table at this commit). Despite being typed and populated, the value is never branched on, never read by gameplay, and does not describe the ship’s actual faction.

The Faction union is declared as:

Type member
angel_corp
crystal_casino
solaris
wrongsiders

The actual grouping

Real faction grouping comes from the hull-key prefix in SHIPS_V4_RARITY (defined in src/starship-survivors/data/ships-v4-rarity.ts). Each hull key is Faction_Name with the faction prefix preserved verbatim. The wiki, UI, and displayHullName() (which strips everything before the first underscore) all key off this prefix.

Six real factions are present at this commit:

Faction prefixHull count
Solaris_9
Industria_8
Junkrats_8
Prism_6
Backwater_4
Ancients_2
Total37

None of these prefix names appear in the Faction union type. The union still references angel_corp, crystal_casino, and wrongsiders — none of which are present as hull prefixes.

Where the false faction shows up

The generator loop assigns the baseline value to every ship regardless of hull:

LocationValue written
BASELINE_STATS.faction'solaris'
Generator loop faction: BASELINE_STATS.faction'solaris' (every entry)
Per-hull overridenone

Result: every ShipDef.faction field in the roster reads 'solaris'. A Backwater_Lizard reports faction: 'solaris'. An Ancients_Rune reports faction: 'solaris'. A Junkrats_Pierre reports faction: 'solaris'.

Why this is dead

PropertyState
Field declared on ShipDefyes
Field written for all shipsyes, always 'solaris'
Per-hull overridenone
Read by gameplayno
Read by UIno
Used for matchmaking, spawn pools, missions, art selectionno
Source of truth for actual factionhull-key prefix (hull_class.split('_')[0])
Faction union matches real factionsno — three of four members never appear; six real prefixes are missing

The field is dead config. Two clean migrations:

OptionAction
RemoveDelete faction from ShipDef, BASELINE_STATS, the generator loop, and the Faction type union.
Populate correctlyReplace the union with the six real prefix names, derive each ship’s faction from its hull_class prefix in the generator loop, and remove the baseline default.