Spielerando

Skill Tree

A skill tree lets players spend points on skills, and each skill can need others first. Every choice opens up later ones. What usually goes wrong is taking points back: only allow it if every skill that stays still has what it needs. Have your AI check the tree for loops and missing skills.

Also called: Talent tree, Ability tree, Progression tree, Perk tree.

A kneeling apprentice in a violet robe touches a glowing node on a huge stained-glass tree, whose lower nodes blaze amber while the upper ones stay dark.
The Glasswright's Bough, an invented stained-glass role-playing game. Invented game, image generated with AI.

Paste this to your AI

Copy it into Claude, Cursor or ChatGPT. It already has good values and the usual mistakes in it.

Add "Skill Tree" to my game.

What it should do: A skill tree lets players decide what their character becomes, and each choice opens up later ones. That gives them something to plan for.

Build it exactly as this state machine. First check that it fits my game, then build it like this:

```mermaid
stateDiagram-v2
  [*] --> locked
  locked: Locked
  open: Can be bought
  owned: Bought
  locked --> open: needs are met
  open --> locked: a need is taken back
  open --> owned: first rank bought
  owned --> owned: buy or refund a rank
  owned --> open: last rank back, or reset
  owned --> locked: whole tree reset
```

Use these starting values:
- pointsPerLevel: 1

Watch out for these common mistakes:
- A refund takes away something another skill needs: Tell your AI to refuse a refund if any skill the player keeps would lose what it needs.
- A spare rank cannot be refunded: Tell your AI to check requirements against the rank after the refund, not just whether another skill depends on this one.
- Two skills need each other: Tell your AI to look for loops in the requirements when the tree loads.
- A requirement nobody can meet: Tell your AI to compare each required rank with that skill's maximum when the tree loads.

Do not change anything else in the game. Do not claim anything without proof: model what it takes, and show me what your solution rests on and how I can see that it works. If you cannot show something, say you do not know. When you are done, tell me in plain words how to try it.

Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP

What it does

A skill tree lets players decide what their character becomes, and each choice opens up later ones. That gives them something to plan for.

How it runs, as a diagram

Everything it can be in, and what moves it on. Your AI builds from exactly this.

needs are meta need is taken backfirst rank boughtbuy or refund a ranklast rank back, or resetwhole tree resetLockedCan be boughtBought
How it runs, as a diagram
  • Locked → Can be bought: needs are met
  • Can be bought → Locked: a need is taken back
  • Can be bought → Bought: first rank bought
  • Bought → Bought: buy or refund a rank
  • Bought → Can be bought: last rank back, or reset
  • Bought → Locked: whole tree reset

Good starting values

ValueStart withWhat it changes
pointsPerLevel1How many points each level gives. More points fill the tree faster; fewer make each choice matter more.

What usually goes wrong

A refund takes away something another skill needs

A player gives back a skill that another skill they keep still needs. They now hold something they could never have bought that way.

Fix: Tell your AI to refuse a refund if any skill the player keeps would lose what it needs.

A spare rank cannot be refunded

A simple check refuses every refund as soon as another skill depends on this one, even a third rank when the others need only two.

Fix: Tell your AI to check requirements against the rank after the refund, not just whether another skill depends on this one.

Two skills need each other

Neither can ever be bought, and the tree looks fine until a player reaches them.

Fix: Tell your AI to look for loops in the requirements when the tree loads.

A requirement nobody can meet

A skill asks for rank 3 of a skill that stops at rank 2. Everything behind it stays closed, and nothing tells you why.

Fix: Tell your AI to compare each required rank with that skill's maximum when the tree loads.

How to check it works

Common questions

how do you make a skill tree

Keep every skill in a list, with its cost, its highest rank and what it needs. One buying rule then works for every skill.

what do i tell my ai to add a skill tree

Paste this: Add a skill tree where each skill has a cost, a highest rank and a list of what it needs, with one buying rule that checks the points, the rank and the requirements.

how do i handle refunds in a skill tree

Work out the ranks as they would be after the refund, then check that every skill the player holds still has what it needs. If one does not, refuse the refund.

how do i find problems in a skill tree before release

Have your AI check it when it loads: every required skill exists, every required rank can be reached, and there are no loops. A tree that passes can then be bought in full.

Where it comes from

Earliest example we could find: Diablo II (Blizzard North) (2000). Earliest character skill tree we could document. Each class learns skills by spending points along branching trees, with later skills gated by character level and by earlier skills. David Brevik recalls the idea as letting classes choose a path through a tree, borrowed from the research tree of the strategy game Master of Orion.

  1. 1980 Civilization (board game, Francis Tresham, Hartland Trefoil): Precursor, not a skill tree: a technology tree in which advances require earlier advances. It belongs to a civilization, not a character. It is listed because Craddock traces the research tree of Master of Orion back to this game, and Brevik's skill tree idea came from that research tree. [Civilization (1980 board game), Wikipedia][How StarCraft and Shower Epiphanies Influenced Diablo 2's Design (David Craddock, Game Developer, 2018; excerpt from Stay Awhile and Listen: Book II)][How Assassin's Creed Valhalla made a 40-year-old mechanic controversial again (Danny Paez, Inverse, 2020)]
  2. 2000 Diablo II (Blizzard North): Earliest character skill tree we could document. Each class learns skills by spending points along branching trees, with later skills gated by character level and by earlier skills. David Brevik recalls the idea as letting classes choose a path through a tree, borrowed from the research tree of the strategy game Master of Orion. [How StarCraft and Shower Epiphanies Influenced Diablo 2's Design (David Craddock, Game Developer, 2018; excerpt from Stay Awhile and Listen: Book II)][Branching out: How limiting skill choices made Diablo 2 more fun (GamesBeat, 2018; excerpt from Stay Awhile and Listen: Book II)]
  3. 2001 Final Fantasy X (Square): The Sphere Grid replaces fixed level gains with movement across a fixed board of connected nodes holding stats and abilities. It is a network rather than a strict tree. Sourced from Wikipedia only. [Final Fantasy X, Wikipedia]
  4. 2004 World of Warcraft (Blizzard Entertainment): Talent trees brought the point-spending tree to an MMO. Early beta talents were closer to spell upgrades; the trees that replaced them were modeled on Diablo II, which Blizzard itself confirms. [WoW Archivist: Strange choices behind WoW's earliest talent trees (Scott Andrews, Engadget, 2012)][Diablo II continues to inspire Blizzard 20 years later (Blizzard News, undated, about 2020)][Skill Tree (Digital Games Mechanics Wiki, WPI)]
  5. 2011 Tom Chilton's GDC talk on World of Warcraft: Cataclysm: A developer's public account of a skill tree's failure mode: trees grew bloated, many talents were filler, players followed standard builds, and newcomers found the trees intimidating. Blizzard cut them down to viable choices. Reported by Engadget, which paraphrases the talk. [GDC 2011: Tom Chilton discusses Cataclysm design, talent and zone revamps (Mathew McCurley, Engadget, 2011)]
  6. 2013 Path of Exile (Grinding Gear Games): A single large passive tree shared by all classes, each starting from its own point. Grinding Gear Games says a passive tree was already in its late-2008 design document and changed through many iterations before the release. [Stories from Development: What came from the Original Design? (Bex_GGG, Path of Exile forum, 2018)][Path of Exile, Wikipedia]

Strength of the sources: Diablo II is well documented through Craddock's interviews with the developers, and World of Warcraft through a Blizzard statement. Final Fantasy X rests on Wikipedia only. The timeline opens with a 1980 precursor that comes before the earliest documented point, on purpose: a technology tree is not a character skill tree, and calling it one would stretch the evidence. Source claims of being first: Wikipedia says the Civilization board game 'is also first in incorporating a technology tree', citing Tuur Ghys in Game Studies, a paper that could not be opened. Inverse says it 'is credited as the first board game to introduce the concept of a tech tree'. Craddock separates the two Civilizations: the board game introduced the mechanic, and Sid Meier's Civilization, with which it shares no design relation, popularized it on computers. Inverse also says Blizzard merged Tresham's concept with the RPG genre for Diablo II. Giant Bomb's concept page says only that the Diablo series helped popularize the idea. Other precursors named in sources: Gradius and Mega-Lo-Mania (Inverse; Wikipedia's sentence on Gradius is marked citation needed). Could not document any character skill tree before 2000. Forum claims about Diablo (1996), SaGa and Xanadu appeared only in a search snippet of an RPG Codex thread that returned 403. Prerequisite talents in The Fantasy Trip (1980) appeared only in search snippets, and Wikipedia's page on In the Labyrinth does not cover them, so they are not used. A claim that Rogue or Ultima IV had skill trees came from an unsourced SEO page and is rejected. The strong academic sources could not be opened: Ghys (2012, gamestudies.org refuses HTTPS), Heinimäki's dissertation (2015, Trepo blocks bots, CORE returned 403) and Orava's thesis (2019, Theseus returned 403). Also could not document why Mists of Pandaria replaced the trees. Skill and tree counts are left out on purpose.

Games are named only as references. Names and marks belong to their owners, and nothing here is endorsed by them.

What was checked

This is what separates the blueprint from a catalogue entry: the values on this page come from code that runs.

Your AI gets the code

Tested example code comes through the Spielerando connection, so your AI can use it right away. How to connect it