Branch Tree System
The branch tree system lets players choose different strengthen routes at a configured star level, creating differentiated equipment growth.
Concepts
- Branch node: A fork point in the strengthen path.
- Branch path: The route chosen by the player and stored in item state.
- Route effect: Different branches can provide different attributes, skills, and presentation.
text
+1 → +2 → +3 → +4 → +5 ─┬─ [Sharp] +6 → +7 → +8
└─ [Lethal] +6 → +7 → +8Configuration
Branches are configured in strengthen recipes through branch_tree:
yaml
id: weapon_physical
branch_tree:
fork_at: 5
branches:
sharp:
display_name: "<yellow>Sharp Route"
description:
- "<gray>Increase physical attack and attack speed"
stages:
6:
stats:
physical_attack: "15 + star * 3"
attack_speed: 2
lethal:
display_name: "<red>Lethal Route"
description:
- "<gray>Increase critical chance and critical damage"
stages:
6:
stats:
physical_crit_rate: 5
physical_crit_damage: 15Fields
| Field | Description |
|---|---|
branch_tree.fork_at | Star level where the player chooses a branch. |
branch_tree.branches | Branch definition map keyed by branch id. |
branches.<id>.display_name | Branch display name. |
branches.<id>.description | Branch description lines. |
branches.<id>.stages | Stage config for this branch. |
Design notes
- The default resources include
recipes/example_branch_recipe.ymlas a reference. - Branch choices should be meaningful and easy to understand.
- Usually one or two fork points are easier to maintain than many nested branches.
- Test item refresh and attribute rollback carefully before opening transfer or branch reset gameplay.