Guide for finding and modifying combat systems in The Years Between the Stars — fleet battles, weapons, projectiles, explosions, combat AI behavior, and battle triggers. Use this skill whenever the user wants to change how fleet battles work, adjust weapon damage or range, change ship combat AI, modify projectile or explosion visuals, tune battle difficulty, or change when/where battles trigger. Trigger on "combat", "fleet battle", "weapons", "damage", "projectile", "explosion", "battle", "enemy ships", "attack", "strafe".
Combat in this game is primarily fleet-vs-fleet battles happening in the background between NPC factions — the player flies through ongoing battles. There's no player-vs-ship dogfighting system currently.
src/game/mechanics/FleetBattleSystem.ts — the entire fleet battle simulation:
FleetShip / FleetShipRuntime typesapproach → strafe → retreatsrc/game/constants.ts — combat tuning constants:
BATTLE_WEAPONS_RANGE — how close before ships open fireBATTLE_DANGER_RANGE — how close before the player is in dangersrc/game/rendering/effects.ts — battle visual effects:
createBattleProjectiles() — spawns projectile meshescreateBattleExplosions() — explosion particle burstssrc/game/rendering/SceneRenderer.ts — battle scene management:
FleetBattleSystem state into the THREE.js scenesrc/game/Game.ts — where battles are detected and triggered:
BATTLE_DANGER_RANGEFleetBattleSystem to start battlessrc/game/rendering/meshFactory.ts — makeFleetShipMesh():
Change weapon range or damage:
src/game/mechanics/FleetBattleSystem.ts — find damage/range valuessrc/game/constants.ts — check BATTLE_WEAPONS_RANGEChange combat AI behavior (how ships move and attack):
src/game/mechanics/FleetBattleSystem.ts — find the behavior state machineChange projectile or explosion appearance:
src/game/rendering/effects.ts — createBattleProjectiles() / createBattleExplosions()Change combat ship visuals:
src/game/rendering/meshFactory.ts — makeFleetShipMesh()Change when/where battles trigger:
src/game/Game.ts — find proximity/trigger checkssrc/game/constants.ts — BATTLE_DANGER_RANGE