Progression Tree Builder

v1.1.2

Usage Guide

Advanced patterns, Latest Mode setup, and best practices for creating progression systems.

Introduction

This guide covers advanced usage patterns and best practices for Progression Tree Builder. Learn how to implement roguelike progression, create complex skill dependencies, and optimize your trees.

Traditional Skill Trees

Creating a Character Class Tree

Example: Warrior skill tree with three branches (Offense, Defense, Utility)

Step 1: Structure Your Tree

Warrior Skills
├── Offense Branch
│   ├── Basic Strike (root)
│   ├── Power Strike (requires: Basic Strike)
│   └── Execute (requires: Power Strike)
│
├── Defense Branch
│   ├── Block (root)
│   ├── Parry (requires: Block)
│   └── Fortress (requires: Parry)
│
└── Utility Branch
    ├── Dash (root)
    └── Sprint (requires: Dash)

Step 2: Configure Costs

SkillCostMax RankEffect
Basic Strike11+5 Attack Damage
Power Strike23+8 Attack Damage per rank
Execute31Special ability (active)

Best Practice: Root skills (tier 1) should cost 1 point and have single ranks. Higher tiers can have multiple ranks for more depth.

Latest Mode (Roguelike Progression)

What is Latest Mode? A specialized layout that shows only N randomly selected skills from the pool of currently available "deepest" skills per path. Perfect for roguelike/roguelite games like Hades, Vampire Survivors, or Risk of Rain 2.

Setup Latest Mode

  1. Assign Selection Weights

    For each skill in your tree, set the Selection Weight field:

    RarityWeightFrequency
    Common70-100Very Frequent
    Uncommon40-70Frequent
    Rare20-40Occasional
    Epic10-20Rare
    Legendary1-10Very Rare
  2. Configure UI Controller

    Select your ProgressionTreeUIController in the scene:

    • • Set Layout Mode = Latest
    • • Set Latest Node Count = 3 (or 2-6)
    • • Enable Auto Refresh On All Maxed
    • • Set Column Width = 0 (auto-fit) or fixed value
  3. Setup Latest Mode Controller

    Create a child GameObject under your UI with:

    • • Add LatestModeLayoutController component
    • • Create child GameObject "DetailsContainer" with RectTransform
    • • Assign your ProgressionDetailsUI prefab
    • • Reference controller in ProgressionTreeUIController
  4. Test & Iterate

    Press Play and award points to see random skills appear. Adjust weights as needed.

Example: Survivors-Style Game

Complete example for a level-up based progression system:

Tree Structure

Combat Skills (15 total)
├── Pistol Path (5 skills)
│   ├── Basic Pistol (Weight: 80, Rank: 1)
│   ├── Rapid Fire (Weight: 60, Rank: 2)
│   ├── Armor Pierce (Weight: 40, Rank: 3)
│   ├── Explosive Rounds (Weight: 25, Rank: 3)
│   └── Infinite Ammo (Weight: 10, Rank: 1)
│
├── Shotgun Path (5 skills)
│   └── ... (similar structure)
│
└── Rifle Path (5 skills)
    └── ... (similar structure)

Game Creator Flow

Trigger: On Character Level Up
├── Instruction: Award Progression Points
│   ├── Tree: [Combat Skills]
│   └── Amount: 1
│
├── Instruction: Refresh Latest Pool
│   ├── Tree: [Combat Skills]
│   ├── Node Count: 3
│   └── Only If All Maxed: false
│
└── Instruction: Open Progression Tree UI
    └── Tree: [Combat Skills]

Design Tip: For Latest mode, create 15-25 skills total with 3-5 skills per path. This ensures variety while maintaining manageable pool sizes.

Custom Layout Strategies

Create custom positioning logic for skill nodes by implementing the ILayoutStrategy interface. This allows you to create unique tree visualizations beyond the built-in Grid, Graph, and List modes.

When to Use Custom Layouts

Custom layout strategies are perfect for:

  • Wider or narrower grid columns than default
  • Custom spacing between nodes
  • Game-specific visual requirements
  • Adapting to different screen sizes or aspect ratios

Creating a Custom Strategy

  1. Create Strategy ScriptableObject

    Create a new C# script that inherits from ScriptableObject and implements ILayoutStrategy:

    using UnityEngine;
    using ProgressionTreeBuilder.Runtime.Core;
    using ProgressionTreeBuilder.Runtime.UI.Controllers;
    using ProgressionTreeBuilder.Runtime.UI.Layout;
    using System.Collections.Generic;
    
    [CreateAssetMenu(fileName = "MyLayout", 
        menuName = "Progression Tree Builder/Custom Layout")]
    public class MyLayoutStrategy : ScriptableObject, ILayoutStrategy
    {
        [Header("Grid Configuration")]
        [Range(1, 10)]
        public int columns = 2;  // Fewer columns = wider
        
        public Vector2 cellSize = new Vector2(400f, 200f);
        public Vector2 cellSpacing = new Vector2(20f, 20f);
        public RectOffset padding = new RectOffset(10, 10, 10, 10);
        
        public void Prepare(ProgressionTreeUIController controller)
        {
            // Modify layoutSettings BEFORE layout components are created
            controller.layoutSettings.gridColumns = columns;
            controller.layoutSettings.gridCellSize = cellSize;
            controller.layoutSettings.gridCellSpacing = cellSpacing;
            controller.layoutSettings.gridPadding = padding;
        }
        
        public Dictionary<ProgressionSkill, Vector2> CalculatePositions(
            ProgressionTree tree,
            LayoutSettings settings)
        {
            // For Grid/List modes, return empty dictionary
            // Unity's LayoutGroup handles positioning automatically
            return new Dictionary<ProgressionSkill, Vector2>();
        }
        
        public string GetLayoutName()
        {
            return "My Custom Layout";
        }
    }
  2. Create Strategy Asset

    Right-click in Project window → Create → Progression Tree Builder → Custom Layout

    Configure your desired column count, cell size, and spacing in the Inspector.

  3. Assign to UI Controller

    Select your UI Controller GameObject and assign the strategy asset to theCustom Layout Strategy Object field.

Critical: The Prepare() method is called before the layout components are set up. This is when you modifylayoutSettings. For Grid/List modes, Unity's GridLayoutGroup or VerticalLayoutGroup uses these settings automatically.

Example: Wide Column Grid

The Examples package includes a GridLayoutStrategy that demonstrates creating a wider 2-column grid layout:

// GridLayoutStrategy Configuration
[Range(1, 10)]
public int columns = 2;  // Only 2 columns

public Vector2 cellSize = new Vector2(1111f, 180f);  // Much wider cells
public Vector2 cellSpacing = new Vector2(15f, 15f);
public RectOffset padding = new RectOffset(10, 10, 10, 10);

public void Prepare(ProgressionTreeUIController controller)
{
    // Apply custom settings
    controller.layoutSettings.gridColumns = columns;
    controller.layoutSettings.gridCellSize = cellSize;
    controller.layoutSettings.gridCellSpacing = cellSpacing;
    controller.layoutSettings.gridPadding = padding;
    
    Debug.Log($"[GridLayoutStrategy] Applied {columns} columns");
}

This configuration creates a cleaner, wider layout perfect for games with detailed skill descriptions or large skill icons.

Advanced: Custom Position Calculation

For Graph mode or custom positioning needs, implementCalculatePositions() to return a dictionary mapping skills to their exact positions:

public Dictionary<ProgressionSkill, Vector2> CalculatePositions(
    ProgressionTree tree,
    LayoutSettings settings)
{
    var positions = new Dictionary<ProgressionSkill, Vector2>();
    
    // Example: Diagonal layout
    for (int i = 0; i < tree.skills.Count; i++)
    {
        var skill = tree.skills[i];
        float x = i * settings.horizontalSpacing;
        float y = i * -settings.verticalSpacing;  // Descending diagonal
        
        positions[skill] = new Vector2(x, y);
    }
    
    return positions;
}

Note: For Grid and List modes,CalculatePositions() is not used. Unity's LayoutGroup components handle positioning automatically based on the settings you provide in Prepare().

Best Practices

Test with Different Tree Sizes

Test your layout with trees containing 5, 20, and 50+ skills to ensure it scales well.

Use Range Attributes

Add [Range(min, max)] attributes to numeric fields for easier configuration in the Inspector.

Keep It Simple

For most cases, modifying grid columns and cell size inPrepare() is sufficient. Only implement custom CalculatePositions()if you need truly unique positioning logic.

Debug Output

Add debug logs in Prepare() to verify your strategy is being called and settings are applied correctly.

Choice Groups

Choice Groups force players to choose between mutually exclusive options. Perfect for class specializations.

Example: Class Selection

Root Skill: "Choose Your Path"
├── Choice Group: "Combat Style"
│   ├── Warrior Path (melee focus)
│   ├── Ranger Path (ranged focus)
│   └── Mage Path (magic focus)
│
→ Player can only choose ONE of these three paths

Setup in Graph Editor

  1. Create 3 skills: Warrior, Ranger, Mage
  2. In the tree settings, add a new Choice Group
  3. Set Group ID (e.g., "combat_style")
  4. Add description: "Choose your combat style"
  5. Add all three skills to this group

Important: Once a player chooses one skill from a Choice Group, all other skills in that group become permanently locked (unless the tree is respec'd).

Game Creator Instructions

Skills support two types of instruction execution for maximum flexibility: Asset-Based (in ScriptableObject) and Scene-Based (via SkillInstructions Component).

Asset-Based Instructions

Configured in the ProgressionSkill asset

  • • Works across all scenes
  • • Stat modifications
  • • Achievements, messages
  • • No GameObject references

Scene-Based Instructions

Via SkillInstructions Component

  • • Scene-specific behavior
  • • GameObject Drag & Drop ✓
  • • UI panels, scene objects
  • • Per-scene customization

Asset-Based Instructions

Configure directly in your ProgressionSkill node in the Graph Editor. Available events: On Skill Unlocked, On Skill Activated, On Skill Upgrade

Example: Power Strike Skill (Asset-Based)

On Skill Unlocked:
├── Change Stat: +10 Attack Damage
├── Play Audio: unlock_sound.wav
└── Show Message: "Power Strike Learned!"

On Skill Activated:
├── Play Animation: power_strike_cast
├── Wait: 0.3 seconds
└── Spawn Prefab: strike_effect (from Resources)

On Skill Upgrade:
└── Play Audio: rank_up.wav

Scene-Based Instructions

For scene-specific behavior with GameObject references, use the SkillInstructions component.

Setup Steps:

  1. Create empty GameObject: "PowerStrike_Instructions"
  2. Add Component: Skill Instructions
  3. Select Skill from dropdown (PowerStrike)
  4. Enable checkboxes: ☑ On Unlocked, ☑ On Activated, ☑ On Upgrade
  5. Add Instructions with GameObject Drag & Drop support
Example: UI Feedback (Scene-Based)

GameObject: "PowerStrike_Instructions"
└── SkillInstructions Component
    ├── Skill: [Power Strike]
    │
    ├── ☑ On Unlocked
    │   └── Instructions:
    │       ├── Set Active: UIPanel "SkillUnlockedPanel" → True
    │       ├── Change Text: TextMeshPro "SkillNameText" → "Power Strike"
    │       ├── Wait: 2 seconds
    │       └── Set Active: UIPanel "SkillUnlockedPanel" → False
    │
    ├── ☑ On Activated
    │   └── Instructions:
    │       ├── Instantiate Prefab: StrikeVFX at Transform "CastPoint"
    │       ├── Camera Shake: MainCamera (intensity 0.5)
    │       └── Set Active: GameObject "ImpactEffect" → True
    │
    └── ☐ On Upgrade (disabled)

Quick Navigation Feature

When editing a skill in the Graph Editor, click the "→ Find Scene Instructions" button in the Inspector to instantly navigate to any SkillInstructions GameObjects configured for that skill.

Execution Order

When a skill event fires: Asset instructions execute first, then Scene instructions. Both can be used together for maximum flexibility.

When to Use Which Approach

Use Asset-Based for:

  • • Stat changes and character modifications
  • • Achievement unlocks and global events
  • • Logic that works the same across all scenes
  • • Sound effects and messages

Use Scene-Based for:

  • • Show/hide UI panels in specific scenes
  • • Activate/deactivate specific GameObjects
  • • Spawn effects at specific Transform locations
  • • Change text on TextMeshPro components
  • • Any instruction requiring a scene GameObject reference

Game Creator 2 Stats Integration

Skills can automatically modify character stats when unlocked or upgraded.

Adding Stat Modifiers

  1. Select a ProgressionSkill asset
  2. In Inspector, find "Stat Modifiers" section
  3. Click "Add Stat Modifier"
  4. Select Target Stat (from your GC2 Stats)
  5. Set Value and Modifier Type
Modifier TypeExampleResult
Flat+10 Max HealthCharacter gains 10 HP
Percentage+15% Attack Damage15% bonus to base damage
Per Rank+5 per rankScales with skill rank (Rank 3 = +15)

Example: Health Skill

Skill: "Vitality"
├── Type: Passive
├── Max Rank: 5
├── Cost: 1 per rank
└── Stat Modifiers:
    └── Target Stat: Max Health
        ├── Type: Per Rank
        └── Value: +10

Result:
Rank 1 → +10 Health
Rank 2 → +20 Health
Rank 3 → +30 Health
...
Rank 5 → +50 Health

Setup: Skill Instruction Manager

Important: The SkillInstructionManager component is required to use scene-based instructions. It automatically discovers and executes all SkillInstructions components in your scene.

One-Time Setup

  1. Locate your ProgressionTreeManager GameObject

    This is the GameObject that has the ProgressionTreeManager component attached

  2. Add SkillInstructionManager component

    Add Component → Progression Tree Builder → Skill Instruction Manager

  3. Configure Auto-Discovery (Optional)

    By default, the manager searches the entire scene on Awake. You can limit it to children only or disable auto-find.

Manager Properties

PropertyDescriptionDefault
Auto Find On AwakeAutomatically find all SkillInstructions in scene on starttrue
Search Children OnlyLimit search to children (false = search entire scene)false
Debug ModeLog when instructions are executed for debuggingfalse

Workflow: Creating Scene Instructions

  1. Open Graph Editor & Select Skill

    Open your ProgressionTree Graph Editor and click on a skill node to select it

  2. Click "Find Scene Instructions" Button

    In the Inspector, you'll see a green button if instructions exist, or a gray button to create new ones

  3. Create Instructions (if needed)

    If no instructions exist, the button offers to create a new SkillInstructions GameObject automatically

  4. Configure Instructions

    Enable the event checkboxes (On Unlocked, On Activated, On Upgrade) and add your Game Creator Instructions

Auto-Discovery Behavior

The SkillInstructionManager automatically finds all SkillInstructions components in the scene. This means you can organize your instructions however you like:

  • • As children of the manager (recommended for organization)
  • • Anywhere in the scene hierarchy (if "Search Children Only" is disabled)
  • • In disabled GameObjects (they're still discovered and registered)
  • • Multiple SkillInstructions for the same skill across different GameObjects

Pro Tip: Graph Editor Integration

When you select a skill node in the Graph Editor, the Inspector shows a "Find Scene Instructions" button that instantly navigates to all SkillInstructions GameObjects for that skill. If multiple exist, you'll see a menu to choose which one to inspect. This makes it easy to manage scene-specific behavior directly from the Graph Editor!

Events & Custom Actions

React to skill events with Game Creator instructions for visual effects, sounds, and gameplay logic.

Available Events

On Skill Unlocked

Fires when a skill is unlocked for the first time (Rank 1)

Use for: Unlock rewards, achievements, tutorials

On Skill Activated

Fires when an Active skill is used

Use for: Spell effects, ability cooldowns, animations

On Skill Upgraded

Fires when skill rank increases

Use for: Visual feedback, rank-up effects

Example: Fireball Skill

Skill: "Fireball"
├── Type: Active
├── On Skill Unlocked:
│   ├── Show Message: "Fireball Learned!"
│   └── Play Audio: magic_learn.wav
│
└── On Skill Activated:
    ├── Play Animation: cast_spell
    ├── Wait: 0.3 seconds
    ├── Spawn Prefab: fireball_projectile
    ├── Wait: 0.5 seconds
    └── Condition: If target hit
        └── Reduce Health: 50 damage

Best Practices

Tree Size

Keep trees under 50-100 skills for optimal performance and player comprehension. Use multiple trees for different systems (combat, crafting, social).

Skill Costs

Balance costs with game progression. Early skills should cost 1-2 points, mid-tier 2-4 points, and ultimate abilities 5-10 points.

Point Economy

Award points regularly (1 per level is common). Players should unlock 2-4 skills per character level in early game, slowing to 1-2 in late game.

Latest Mode Pool Size

For roguelike games, show 3-4 skills at once. Ensure you have at least 10-15 total skills to maintain variety across runs.

Testing

Enable Debug Mode on ProgressionTreeManager during development for detailed console logs. Test with varied point amounts to ensure balanced progression.