A tech tree where some techs need all parents, some need any, and research can be switched
Research screens look simple, but the rules behind them are not: what counts as unlocked, what happens to half-finished work when the player picks something else, and what to do with points left over when a tech completes. Here is one set of rules that holds together.
Why this works
Work done should never be thrown away by a change of mind. Keeping progress with each topic and working out what is open from what is finished lets the player explore freely, and keeps the screen honest after every choice.
When not to use it
Skip it if research should be a hard commitment, where switching must hurt to make the choice weighty, or if the game has a fixed story path with no choice. A simple list of steps in order is clearer for players then.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 4 common mistakes and the fix
- A diagram of every state
- 39 lines of example code with 3 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "A tech tree where some techs need all parents, some need any, and research can be switched" (read_entry research-prerequisites-and-or-switching) in my game. Build it step by step, and show me how you checked that it works.Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP