Genesis Devices¶
The only mechanism for creating new planets in the universe. Three tiers, each with its own cost, formation time, and outcome distribution.
Tier matrix¶
Source: services/gameserver/src/services/genesis_service.py:GENESIS_TIERS.
| Tier | Cost (cr) | Sacrifices ship? | Habitability range | Resource richness | Size range |
|---|---|---|---|---|---|
| basic | 25,000 | No | 40–60 | 0.5–1.0 | 3–6 |
| enhanced | 75,000 | No | 55–75 | 0.8–1.5 | 4–7 |
| advanced | 250,000 | Yes — Colony Ship | 70–90 | 1.2–2.0 | 5–9 |
Pricing is tier-based per device. The advanced tier consumes the Colony Ship.
Planet-type weights¶
Each tier rolls a planet type from a weighted distribution:
basic: | Type | Weight | |------|-------:| | TERRAN | 50 | | OCEANIC | 20 | | DESERT | 15 | | ICE | 10 | | VOLCANIC | 5 |
enhanced: Terran 60, Oceanic 20, Desert 10, Ice 5, Volcanic 5.
advanced: Terran 80, Oceanic 10, Desert 5, Ice 3, Volcanic 2.
Higher tiers bias heavily toward Terran (best planet) and away from hostile types.
Ship capacity¶
GENESIS_CAPACITY_BY_SHIP:
| Ship | Genesis capacity |
|---|---|
| Light Freighter | 1 |
| Cargo Hauler | 2 |
| Colony Ship | 3 |
| Defender | 3 |
| Carrier | 5 |
| Warp Jumper | 1 |
The Advanced Genesis path (which sacrifices the Colony Ship) only needs 1 advanced device.
Ships with active Genesis devices suffer: - ~50 cargo units consumed per device for containment. - −20% max travel speed (safety protocols). - −50% drone capacity. - −100 max hull and shields each.
Formation process¶
Standard tier (basic / enhanced)¶
- Acquire devices at a Class 9 Research Station (1–3 in stock, 7-day refresh) or Class 7+ Technology Port. Federation reputation level ≥ 8 (design).
- Travel to an empty, non-protected sector (>= 5 jumps from Federation Space; ≥ 2 sectors from any other planet — design).
- Initiate the Genesis sequence:
- basic: 1 device.
- enhanced: 3 devices.
- The 48-hour formation timer (
GENESIS_FORMATION_HOURS = 48) runs server-side. The player is free to leave the sector — the forming planet is invulnerable on its own (see Formation-window protection). - During the sequence, the player has a reduced turn cap (50/day) — design.
- On completion, devices are consumed and a planet is generated using the weighted distribution.
- Ownership auto-assigned to the deploying player.
Aborting the sequence loses all devices.
Formation-window protection¶
While a Genesis-created planet has formation_status == "forming" (the 48h window for basic/enhanced; effectively zero seconds for advanced, which sets formation_status = "complete" on creation), the planet is invulnerable:
- Cannot be landed on — the landing endpoint rejects with "this planet is still forming" (
services/gameserver/src/api/routes/planets.py— landing handler checksplanet.formation_status == "forming"). - Cannot be attacked — the
attack_planetpath must reject ship-vs-planet combat against a forming target (services/gameserver/src/services/combat_service.py:attack_planet). - Genesis device cannot be reclaimed — devices are consumed at deployment and the forming planet has no salvage path.
- The deploying player can leave the sector freely without aborting the sequence; formation completes purely on the server-side timer in
GenesisService.check_formation_status(services/gameserver/src/services/genesis_service.py). The lock-to-sector requirement only applies to Genesis Teams (see below), where any member leaving collapses the sequence.
Once formation_status flips to "complete", the planet enters the normal lifecycle and is defenseless until the Outpost citadel finishes its initial drone deployment.
🐛 Bug — formation_status == "forming" is enforced on the landing path but not on combat_service.attack_planet, so a forming planet is currently attackable even though the spec calls for full invulnerability. Add the same formation_status guard to attack_planet before turn deduction.
Advanced tier (Colony Ship sacrifice)¶
- Pilot a Colony Ship with at least 1 advanced device.
- Initiate the sacrifice sequence in a valid empty sector.
- Colony Ship is consumed immediately + devices consumed.
- Player auto-transferred to escape pod.
- Planet generates immediately (no 48-hour wait).
- Starts at Settlement phase (citadel level 2), 5,000 colonists, +10% production bonus, 4 automated turrets, basic shield generator.
This bypasses the standard Outpost phase entirely — it's the express lane to a viable colony at the cost of a 100k+ ship.
Restrictions¶
- Sector must be empty — no other planets, stations, anomalies.
- Cannot deploy in protected sectors (e.g. sectors 1–7 reserved zones, faction capital areas).
- Cannot deploy within 5 jumps of Federation Space (design).
- Cannot deploy within 2 sectors of an existing planet (minimum spacing — design).
- Anti-monopoly: single player capped at ~25% of planets in any region (design).
- Rate limit: max 3 device purchases per real week per account (design).
- Sequence participation: max 1 every 14 days per player (design).
🚧 Partial — most of the rate-limit and anti-monopoly logic exists as design constants; code currently enforces basic empty-sector and ownership rules.
Genesis teams¶
Multiple players can pool devices for a shared planet: - All members must be in the sector throughout the 48h sequence. - At least one ship must be Genesis-capable. - If any team member leaves the sector, the sequence fails and devices are lost. - Ownership shares record contribution percentages. - Colony Ship sacrifice variant: sacrificing player gets 50%, remainder split per agreement.
🚧 Partial / Planned — multi-player Genesis is documented in design; code path supports single-player creation.
Anti-cheat / safety¶
- All Genesis transactions are atomic with rollback on failure.
- 48h sequence runs server-side with heartbeat verification.
- Planet type rolled with cryptographically secure RNG (server-side).
- Genesis device serial numbers tracked to prevent duplication.
Player-facing affordances¶
- Genesis purchase UI at Research Stations with rarity warnings, ship-capacity preview, refresh countdown.
- Genesis sequence UI showing 48-hour progress with progressive planet-formation visuals.
- Three-mode selector (Basic / Enhanced / Advanced).
- Emergency abort button (with clear "all devices lost" warning).
- Genesis Team coordination panel for shared planet creation.
- Mobile push notifications for sequence milestones.
Source map¶
| Topic | Path |
|---|---|
| Genesis service | services/gameserver/src/services/genesis_service.py |
| Genesis device model | services/gameserver/src/models/genesis_device.py |
| Planet model + types | services/gameserver/src/models/planet.py |
| Genesis API routes | services/gameserver/src/api/routes/genesis.py |
| Ship Genesis-capacity column | services/gameserver/src/models/ship.py (max_genesis_devices) |
| Related: terraforming | planets/terraforming.md |
| Related: colonization | planets/colonization.md |
Status: 🐛 Bug — the deploy validator in
services/gameserver/src/api/routes/planets.py(/planets/genesis/deploy) currently rejects 7 of the 12 validPlanet.typevalues, so most rolled planet types fail to commit. Validator should accept allPlanetTypeenum members.