Skip to content

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 → +8

Configuration

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: 15

Fields

FieldDescription
branch_tree.fork_atStar level where the player chooses a branch.
branch_tree.branchesBranch definition map keyed by branch id.
branches.<id>.display_nameBranch display name.
branches.<id>.descriptionBranch description lines.
branches.<id>.stagesStage config for this branch.

Design notes

  • The default resources include recipes/example_branch_recipe.yml as 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.