# **Procedural Mission Specification: Side Ops** This document defines the logic for generating "Filler" missions (Side Ops). These missions provide infinite replayability, resource grinding, and recovery options for the player. ## **1. System Architecture** Class: MissionGenerator Responsibility: Factory that produces temporary Mission objects adhering to the Mission.ts interface. Triggers: - **Daily Reset:** When the campaign day advances. - **Mission Complete:** Replenish the board after a run. ## **2. Generation Logic** To generate a Side Op, the system inputs the **Campaign Tier** (1-5) and **Unlocked Regions**. ### **A. Naming Convention** Missions use a context-aware "Operation: [Adjective] [Noun] [Numeral]" format. Noun Selection (Context-Aware): The noun is selected based on the Mission Archetype to imply the goal. - **Skirmish (Combat):** _Thunder, Storm, Iron, Fury, Shield, Hammer, Wrath, Wall, Strike, Anvil._ - **Salvage (Loot):** _Cache, Vault, Echo, Spark, Core, Grip, Harvest, Trove, Fragment, Salvage._ - **Assassination (Kill):** _Viper, Dagger, Fang, Night, Shadow, End, Hunt, Razor, Ghost, Sting._ - **Recon (Explore):** _Eye, Watch, Path, Horizon, Whisper, Dawn, Light, Step, Vision, Scope._ **Adjective Selection (General Flavor):** - _Silent, Broken, Red, Crimson, Shattered, Frozen, Burning, Dark, Blind, Hidden, Lost, Ancient, Hollow, Swift._ Legacy Logic (Series Generation): The generator checks the player's MissionHistory. - If "Operation: Silent Viper" was completed previously, the new mission is named "Operation: Silent Viper **II**". - This creates the illusion of persistent, ongoing military campaigns. ### **B. Biome Selection** - Randomly select from **Unlocked Regions**. - _Weighting:_ 40% chance for the most recently unlocked region (to keep content relevant). ### **C. Mission Archetypes (Objectives)** The generator picks one of four templates and hydrates it with specific data. #### **1. Skirmish (Standard Combat)** - **Objective:** ELIMINATE_ALL. - **Description:** "Clear the sector of hostile forces." - **Config:** Standard room count, Medium density. - **Turn Limit:** None. #### **2. Salvage (Loot Run)** - **Objective:** INTERACT with 3-5 "Supply Crates". - **Description:** "Recover lost supplies before the enemy secures them." - **Config:** High density of obstacles/cover. - **Reward Bonus:** Higher chance for ITEMS or MATERIALS. #### **3. Assassination (Elite Hunt)** - **Objective:** ELIMINATE_UNIT (Specific Target ID). - **Description:** "A High-Value Target has been spotted. Eliminate them." - **Config:** Spawns a named Elite Unit (e.g., "Krag the Breaker") with +50% Stats. - **Reward Bonus:** High CURRENCY payout. #### **4. Recon (Scouting)** - **Objective:** REACH_ZONE (3 separate zones on the map). - **Description:** "Survey the designated coordinates." - **Config:** Large map size, Low enemy density (Mobility focus). - **Turn Limit:** Tight (Speed is key). ## **3. Scaling & Rewards** ### **Difficulty Tiers** The generator adjusts difficulty_tier in the config, which the GameLoop uses to scale enemy stats. | Tier | Name | Enemy Lvl | Reward Multiplier | | :--- | :------- | :-------- | :---------------- | | 1 | Recon | 1-2 | 1.0x | | 2 | Patrol | 3-4 | 1.5x | | 3 | Conflict | 5-6 | 2.5x | | 4 | War | 7-8 | 4.0x | | 5 | Suicide | 9-10 | 6.0x | ### **Reward Generation** Rewards are calculated dynamically: - **Currency:** Base (50) _ TierMultiplier _ Random(0.8, 1.2). - **Items:** 20% chance per Tier to drop a Chest Key or Item. - **Reputation:** +10 Reputation with the Region's owner (e.g., Missions in Rusting Wastes give +Cogwork Rep). ## **4. Example Generated JSON** ```json { "id": "SIDE_OP_170932", "type": "SIDE_QUEST", "config": { "title": "Operation: Crimson Viper II", "description": "The target escaped last time. Finish the job in the Crystal Spires.", "difficulty_tier": 2, "recommended_level": 3 }, "biome": { "type": "BIOME_CRYSTAL_SPIRES", "generator_config": { "seed_type": "RANDOM", "size": { "x": 20, "y": 12, "z": 20 }, "room_count": 6 } }, "deployment": { "squad_size_limit": 4 }, "objectives": { "primary": [ { "id": "OBJ_HUNT", "type": "ELIMINATE_UNIT", "target_def_id": "ENEMY_ELITE_ECHO", "description": "Eliminate the Aether Echo Prime." } ] }, "rewards": { "guaranteed": { "xp": 300, "currency": { "aether_shards": 120 } }, "faction_reputation": { "ARCANE_DOMINION": 15 } }, "expiresIn": 3 } ```