diff --git a/docs/requirements.md b/docs/requirements.md index 4c43d54..4e452e4 100644 --- a/docs/requirements.md +++ b/docs/requirements.md @@ -4,10 +4,10 @@ The following config files drive game parameters: -- **world.config** — world dimensions, region widths, expansion amounts, building refund percentage, wave timing. +- **world.config** — world dimensions, region widths, expansion amounts, building refund percentage, wave timing, enemy ship level formula. - **buildings.config** — building block cost per building type. - **recipes.config** — crafting recipes: inputs, outputs, quantities, durations, and reprocessing plant probabilities. -- **ships.config** — ship stats (HP, speed, damage, attack range, attack rate), required materials per blueprint, and whether each blueprint is available from the start or unlocked via loot. +- **ships.config** — ship stats (HP, speed, damage, attack range, attack rate) as formulas of ship level, required materials per blueprint, threat cost formula, and whether each blueprint is available from the start or unlocked via loot. - **stations.config** — HP, damage, range, and fire rate for player and enemy defence stations. ## Game World @@ -50,7 +50,7 @@ The following config files drive game parameters: - REQ-BLD-SMELTER: **Smelter** (2×2): Converts ore or scrap into basic materials. No recipe selection required. Inputs, outputs, and rates are defined in recipes.config. - REQ-BLD-ASSEMBLER: **Assembler** (3×3): The player selects a recipe from the config-defined crafting tree. Produces the selected output item at the rate defined in recipes.config. - REQ-BLD-REPROCESSING: **Reprocessing Plant** (3×3): Consumes scrap per cycle (quantity from recipes.config) and produces higher-level intermediate products. Each product type has a fixed drop probability per cycle, defined in recipes.config. -- REQ-BLD-SHIPYARD: **Shipyard** (4×2): The player selects a blueprint. Automatically produces one ship of that type whenever all required materials are present in its input buffer. Ship material requirements are defined in ships.config. +- REQ-BLD-SHIPYARD: **Shipyard** (4×2): The player selects a blueprint. Automatically produces one ship of that type at a fixed level (defined in ships.config, default: 5) whenever all required materials are present in its input buffer. Ship material requirements are defined in ships.config. - REQ-BLD-SALVAGE-BAY: **Salvage Bay** (3×2): A dedicated drop-off point for salvage ships. Scrap delivered here is placed onto connected output belts. - REQ-BLD-BELT: **Belt** (1×1): Transports items. Available in straight and curved variants. - REQ-BLD-SPLITTER: **Splitter** (1×1): Distributes incoming items between two output directions. Each output can optionally have a filter (a list of item types), configurable via the selected building panel. Routing rules: @@ -80,7 +80,7 @@ The following config files drive game parameters: ## Ships - REQ-SHP-AUTONOMOUS: Ships are produced by shipyards and are fully autonomous once produced. -- REQ-SHP-STATS: All ship stats (HP, speed, damage, attack range, attack rate) and required build materials are defined in ships.config. ships.config also specifies whether each blueprint is available from game start or must be unlocked. +- REQ-SHP-STATS: All ship stats (HP, speed, damage, attack range, attack rate) are defined as formulas of ship level in ships.config. Required build materials and whether each blueprint is available from game start or must be unlocked are also defined there. - REQ-SHP-NO-COLLISION: Ships move independently with no collision between them. - REQ-SHP-COMBAT: **Combat ships** — move right through space and engage enemy ships. The player can configure the following per shipyard (applied to all ships produced by that shipyard): - Stance: aggressive (advance toward enemies) / defensive (hold position near asteroid). @@ -105,9 +105,10 @@ The following config files drive game parameters: - REQ-WAV-THREAT-RATE: A global **threat level** accumulates continuously over time. The rate of increase per second is determined by a formula read from world.config where the input is elapsed game time in seconds. Example: `1*t - 30` gives 0 threat/s at t=30s and increases linearly after that. - REQ-WAV-GAP: At game start and immediately after each wave is triggered, a random inter-wave gap is drawn uniformly from a configurable [min, max] range (world.config, in seconds). - REQ-WAV-TRIGGER: When the gap expires, a wave is triggered. Ships are spawned using the accumulated threat level. Any threat not spent on ships carries over to the next wave. A longer gap results in a larger wave. -- REQ-WAV-THREAT-COST: Ships are spawned until the accumulated threat is exhausted. Each ship type has a threat cost defined as a formula in ships.config (where x is elapsed game time), so threat cost per ship can increase over time. +- REQ-WAV-SHIP-LEVEL: Each wave's enemy ships are assigned a level determined by a formula of elapsed game time in seconds (t), read from world.config. This is the sole mechanism by which enemy waves grow stronger over time. +- REQ-WAV-THREAT-COST: Ships are spawned until the accumulated threat is exhausted. Each ship type has a threat cost defined as a formula of ship level in ships.config. Because enemy ship level increases with time, threat cost per ship rises naturally over the course of the game. - REQ-WAV-SPAWN-DURATION: Ships in a wave are spawned one at a time over the spawn duration. Spawning duration is read from world.config. -- REQ-WAV-SHIP-STATS: Per-ship stats (damage, attack rate, range, speed) and threat cost are each defined as formulas in ships.config. The formulas take two variables: elapsed game time in seconds (t) and the threat level consumed to spawn the wave (c). +- REQ-WAV-SHIP-STATS: Per-ship stats (damage, attack rate, range, speed) and threat cost are each defined as formulas of ship level in ships.config. - REQ-WAV-GRACE-PERIOD: The grace period before the first wave is implicit: threat accumulates from t=0 but the first wave does not trigger until the initial gap (drawn at game start) has elapsed. ## Push Scaling