rearrange skill tree view #7
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
the first skill to unlock should be bottom, the more dependency a skill has, the higher it should be on the tree
Done. The tree now grows upwards: the first thing you can research sits at the bottom, and every further prerequisite climbs a row.
Rather than hardcoding new positions, the vertical position is now derived from how many prerequisites deep a node is, so "the more dependency a skill has, the higher it is" is enforced by construction rather than by me remembering to move things. The data now only carries a horizontal position; height comes from
skill_depth(), which walks therequireschain (with a guard so a cycle in the data cannot hang it).That matters for the Ship Lab in #5: adding nodes cannot put the layout out of step with the dependencies, because there is no stored layout to get out of step.
Current shape, bottom to top:
Shipyards->Logistics/Coordination->Wing Doctrine->Squadron Doctrine->Armada Doctrine.While rendering it I also fixed a contrast bug that made the tree read backwards: locked nodes were coming out the brightest things on screen. NeonDraw tops every shape with a near-white core stroke, which at this size completely overwhelmed the dim locked colour, so unreachable nodes looked like highlighted ones. Locked nodes now get a dark core and a reduced glow, so the ordering reads correctly: green researched, violet reachable, dim locked, gold selection ring.
Files:
GameState.gd(skill_depth,max_skill_depth, dropped stored y),SkillTreeView.gd(depth-driven layout, locked contrast).Verified: rendered the menu and checked the ordering by eye. Full suite 38/38.