the mothership should now give access to a skill tree #4

Closed
opened 2026-08-10 20:13:01 +00:00 by metaheavens · 1 comment
Owner

in this skill tree, different path would unlock building types, and also definitive amelioration. make fit each existing building in the tree. resources are needed to unlock steps in the tree. add a definitive improvement that let you increase the max fleet size (several times, each upgrade being a different cost)

in this skill tree, different path would unlock building types, and also definitive amelioration. make fit each existing building in the tree. resources are needed to unlock steps in the tree. add a definitive improvement that let you increase the max fleet size (several times, each upgrade being a different cost)
Author
Owner

Done.

How it works: flying the fleet onto the mothership now opens a Research menu. Previously the mothership had no action at all (the code explicitly suppressed it), so this is the action slot it was missing.

The tree is drawn in the game's own neon style - hexagon nodes joined by links, laid out from normalised coordinates that live next to the upgrade data itself, so the tree's shape is data rather than duplicated layout code. Tap a node to select it; the panel below shows what it does, its price, and why you cannot buy it yet if you cannot. Node states are colour-coded: green researched, violet reachable, dim locked, gold selection ring.

The tree:

  • Shipyards (15) - root, unlocks the Ship Crafter
  • Logistics (25, needs Shipyards) - unlocks the Extractor
  • Coordination (20, needs Shipyards) - unlocks the Command Center
  • Wing Doctrine (30, needs Coordination) - permanent +1 fleet size
  • Squadron Doctrine (70, needs Wing) - permanent +1 fleet size
  • Armada Doctrine (150, needs Squadron) - permanent +1 fleet size

So every existing building sits in the tree, and the escalating-cost fleet-size upgrades are the requested permanent improvements.

Deliberate choice: the mothership itself is NOT in the tree. It is the thing you research at, so gating it would be a deadlock - lose your mothership with nothing researched and you could never get another. It stays buildable always.

Gating: locked structures still appear in the build menu, greyed. Pressing one explains which research opens it rather than silently failing, matching how the extractor already explained itself when no planet was in reach. The lock is re-checked at confirm time too, so it cannot be bypassed.

Fleet size: the formation now defines 8 slots but only max_fleet_size() of them are usable, so the wedge keeps a deliberate shape as it grows instead of having positions invented at unlock time. Everything that used formation.size() as the cap (Fleet, BuildController, FormationEditor) now goes through max_fleet_size(). Buying a capacity upgrade re-seats the fleet that is already flying, not just ones rebuilt later.

Files: GameState.gd (SKILL_TREE data + unlock/prereq/capacity API), new SkillTreeView.gd, Main.tscn (Research menu), BuildController.gd (mothership action, gating, menu wiring), Fleet.gd / FormationEditor.gd (capacity).

Verified: new tests/test_skill_tree.gd covers the fresh-start lock state, that a locked build cannot be forced through, that research charges rocks and unlocks its building, that the mothership action opens the tree, that prerequisites are enforced, and that a capacity upgrade both raises the cap and lets the extra vessel actually be crafted. Rendered the menu and fixed a real contrast bug found that way: locked nodes were coming out the brightest thing on screen, because NeonDraw tops every shape with a near-white core stroke that overwhelmed the dim locked colour. Full suite 37/37.

Done. **How it works:** flying the fleet onto the mothership now opens a Research menu. Previously the mothership had no action at all (the code explicitly suppressed it), so this is the action slot it was missing. The tree is drawn in the game's own neon style - hexagon nodes joined by links, laid out from normalised coordinates that live next to the upgrade data itself, so the tree's shape is data rather than duplicated layout code. Tap a node to select it; the panel below shows what it does, its price, and why you cannot buy it yet if you cannot. Node states are colour-coded: green researched, violet reachable, dim locked, gold selection ring. **The tree:** - `Shipyards` (15) - root, unlocks the Ship Crafter - `Logistics` (25, needs Shipyards) - unlocks the Extractor - `Coordination` (20, needs Shipyards) - unlocks the Command Center - `Wing Doctrine` (30, needs Coordination) - permanent +1 fleet size - `Squadron Doctrine` (70, needs Wing) - permanent +1 fleet size - `Armada Doctrine` (150, needs Squadron) - permanent +1 fleet size So every existing building sits in the tree, and the escalating-cost fleet-size upgrades are the requested permanent improvements. **Deliberate choice:** the mothership itself is NOT in the tree. It is the thing you research *at*, so gating it would be a deadlock - lose your mothership with nothing researched and you could never get another. It stays buildable always. **Gating:** locked structures still appear in the build menu, greyed. Pressing one explains which research opens it rather than silently failing, matching how the extractor already explained itself when no planet was in reach. The lock is re-checked at confirm time too, so it cannot be bypassed. **Fleet size:** the formation now defines 8 slots but only `max_fleet_size()` of them are usable, so the wedge keeps a deliberate shape as it grows instead of having positions invented at unlock time. Everything that used `formation.size()` as the cap (Fleet, BuildController, FormationEditor) now goes through `max_fleet_size()`. Buying a capacity upgrade re-seats the fleet that is already flying, not just ones rebuilt later. **Files:** `GameState.gd` (SKILL_TREE data + unlock/prereq/capacity API), new `SkillTreeView.gd`, `Main.tscn` (Research menu), `BuildController.gd` (mothership action, gating, menu wiring), `Fleet.gd` / `FormationEditor.gd` (capacity). **Verified:** new `tests/test_skill_tree.gd` covers the fresh-start lock state, that a locked build cannot be forced through, that research charges rocks and unlocks its building, that the mothership action opens the tree, that prerequisites are enforced, and that a capacity upgrade both raises the cap and lets the extra vessel actually be crafted. Rendered the menu and fixed a real contrast bug found that way: locked nodes were coming out the *brightest* thing on screen, because NeonDraw tops every shape with a near-white core stroke that overwhelmed the dim locked colour. Full suite 37/37.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
metaheavens/spaceship#4
No description provided.