14 lines
3.8 KiB
JSON
14 lines
3.8 KiB
JSON
{
|
||
"_comment": "FACTIONS — the three powers + neutral space. WORLDGEN LAYER (js/galaxy/Galaxy.js → the faction pass, at roster build): the jump tree's top-level BRANCHES (subtrees rooted at the home system's gate neighbors — home has ≤ maxGates gates, so ≤ 3 branches) each become ONE FACTION's territory. TERRITORY rule: a branch's systems at depth 2 … (maxDepth−1) (home = depth 0, its gate neighbors = depth 1) are ELIGIBLE — the ring right outside home and every branch's dead-end tips stay NEUTRAL WILD SPACE, and anything not in a territory is neutral. BALANCE (data/factions.json → balance, below) keeps the galaxy fair without making it equal: the CAP — each branch keeps only its min(eligible, quota) systems closest to the middle band (|d−0.5|), quota = the MEDIAN of the branches' eligible sizes, so the big branch's overflow stays neutral wild space and no faction dominates; and the FLOOR — balance.minTerritory, a faction whose own branch is too small is lifted out of the neutral wild space (first the branches' eligible overflow, nearest the recipient so the territory stays contiguous, then the richest faction's least-core systems; a faction with no branch is built entirely from borrowed space), so no faction starts with a one-system sliver (a tiny galaxy is best-effort) — exposed as g.factions.quota / .minTerritory / .factionTerritories (per-faction, the truth) / .territories (the branch view). CAPITALS: the NEUTRAL CAPITAL is a seeded pick of the home system's direct gate neighbors (ALWAYS); its system stays faction-neutral even though it roots a faction's branch (a neutral hub at the edge of that corridor). Each FACTION CAPITAL (apex / mindweave / zenith) is a seeded pick inside its branch's territory, preferred in the middle band (d in 0.37..0.63 — data/galaxy.json → distribution.zones' middle slice), on a non-barren system (it must host a planet); the branch↔faction assignment is a SEEDED SHUFFLE — new galaxy ⇒ new order/placement, same seed ⇒ identical (the determinism contract). Each capital's system grows its capital planet in content generation (js/galaxy/SystemGenerator.js: class capitalNeutral / capitalApex / capitalMindweave / capitalZenith>, planets.png frames 18..21 per data/planets.json → capitals, the 'capital' settlement per data/settlements.json — the faction ones owner:<faction>, the neutral one owner-less; that is the reputation faction seam, js/reputation/Reputation.js → factionStanding()). BRIDGES (data/gates.json → bridges) link the branches across the middle belt so the factions can reach — and fight — each other without routing through the trunk. REACHABILITY / COMBAT / TRADE off the territories is the NEXT layer (the reserved reputation standing + the map's territory-region pass): `color` = the faction's map/diplomacy color (the galaxy plate's star-ring layer, js/ui/GalaxyView.js); the capital planet's ART carries the same hue (frames 18..21).",
|
||
"balance": {
|
||
"_comment": "BALANCE (js/galaxy/Galaxy.js → _assignFactions) — fair, not equal. CAP: quota = the MEDIAN of the branches' eligible territory sizes (exposed as g.factions.quota) — the big branch's overflow stays neutral wild space, so no faction dominates. FLOOR: minTerritory — a faction whose own branch is too small to reach this is lifted out of the neutral wild space: first the branches' eligible OVERFLOW (the nearest systems, so the territory stays contiguous), then the richest faction's least-core systems (exposed as g.factions.minTerritory). A tiny galaxy with too few eligible systems is best-effort (a working territory beats an empty one).",
|
||
"minTerritory": 5
|
||
},
|
||
"factions": {
|
||
"neutral": { "label": "Neutral", "color": "#b9c4d6" },
|
||
"apex": { "label": "Apex", "color": "#ff4d4d" },
|
||
"mindweave": { "label": "MindWeave", "color": "#4d7dff" },
|
||
"zenith": { "label": "Zenith", "color": "#ffd24d" }
|
||
}
|
||
}
|