Getting Started
This guide walks you through creating your first tactical battle with Wayfinder. We’ll create a simple 2v2 battle: two knights fighting two mages.
Prerequisites
Complete the Installation guide before starting.
Step 1: Create the Grid
Paint Tiles
- Select the Tilemap GameObject in Hierarchy
- Window > 2D > Tile Palette
- Create tiles in your tile palette (or use provided tiles)
- Paint a 10x10 battle grid
- Add height variation by painting on different Z-levels
Example Grid Layout
. . . . . . . . . .
. . . . . . . . . .
. . K . . . . M . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . M . . . . K . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
K = Knight (Ally)
M = Mage (Enemy)Step 2: Create Units
Create Unit GameObjects
- Create empty GameObject named
Knight_01 - Add Unit component
- Add UnitStateManager component
- Position at tile (2, 2, 0) in world space
Repeat for Knight_02, Mage_01, Mage_02.
Configure Knight_01
In the Unit component:
Unit Name: "Ser Aric"
Unit Class: Knight
Sex: Male
Affiliation: Ally
Control Type: Player
=== Stats ===
Level: 5
Max HP: 120
Current HP: 120
Max MP: 20
Current MP: 20
Strength: 16
Vitality: 14
Dexterity: 10
Agility: 10
Intelligence: 6
Resistance: 8
Avoidance: 8
Mind: 6
=== Movement ===
Move: 3
Jump Up: 2
Jump Down: 3
Base Recovery Time: 50
=== Starting Position ===
X: 2
Y: 2Configure Mage_01
Unit Name: "Dark Wizard"
Unit Class: Mage
Affiliation: Enemy
Control Type: AI
=== Stats ===
Max HP: 80
Current HP: 80
Max MP: 60
Current MP: 60
Strength: 6
Intelligence: 18
Resistance: 10
Move: 3
Base Recovery Time: 55Important: Add AIBrain component to AI-controlled units!
Configure the other units similarly.
Step 3: Add Units to Battle Manager
- Select Battle Manager in Hierarchy
- Find BattleStateManager component
- In the Units list, set Size to
4 - Drag
Knight_01,Knight_02,Mage_01,Mage_02into the list
Step 4: Create Abilities
Create Attack Ability
Right-click in Project > Create > Wayfinder > Abilities > Universal > Universal Attack
Name it BasicAttack.asset
Configure:
Name: "Attack"
Is Basic Attack: ✓ (checked)
Ability Type: Melee
Min Range: 1
Max Range: 1
Max Vertical Range: 2
MP Cost: 0
Classes: (leave empty - universal ability)Create Fire Spell
Right-click in Project > Create > Wayfinder > Abilities > Mage > Attack Spell
Name it Fire.asset
Configure:
Name: "Fire"
Ability Type: Attack Magic
Min Range: 1
Max Range: 4
Max Vertical Range: 3
MP Cost: 8
Classes: MageAssign Abilities to Units
For Knights:
- Add
BasicAttackto their Abilities list
For Mages:
- Add
BasicAttackto their Abilities list - Add
Fireto their Abilities list
Step 5: Test the Battle
Press Play!
What Should Happen
- Battle intro state
- Turn order calculated based on Recovery Time
- First unit’s turn begins
- If player-controlled: blue tiles show movement range
- If AI-controlled: AI analyzes and acts automatically
- Player selects movement, then actions
- Turns alternate between units
- Battle ends when one side is defeated
Controls (Player Units)
- Arrow Keys / WASD: Move cursor
- Enter / Space: Confirm selection
- Escape: Cancel / Undo
- Q: End turn
Step 6: Add a Healing Ability
Let’s make the battle more interesting by adding healing.
Create Cure Spell
Right-click > Create > Wayfinder > Abilities > Priest > Healing Spell
Name it Cure.asset
Name: "Cure"
Ability Type: Healing Magic
Min Range: 0 (can target self)
Max Range: 3
MP Cost: 10
Classes: Priest, Mage (mages can heal too!)Add Cure to one of your Mage’s abilities list.
Now the AI will evaluate whether to attack or heal allies!
Common Issues
Units Won’t Move
Problem: Clicking tiles does nothing.
Solutions:
- Check that BattleStateManager has Units assigned
- Verify TileManager is properly configured
- Check that Tiles layer is set correctly
AI Doesn’t Act
Problem: AI turn hangs.
Solutions:
- Verify AIBrain component is attached
- Check AIManager has AIConfiguration assigned
- Look for errors in Console
No Tiles Visible
Problem: Grid doesn’t appear in Scene or Game view.
Solutions:
- Verify Tilemap has tiles painted
- Check TilemapRenderer is enabled
- Ensure Camera can see the tilemap Z-level
Next Steps
You’ve built your first tactical battle! Now explore: