Skip to content

Campaign Mode

Campaign mode offers multi-level scenarios, each with specific victory conditions and a story backdrop.


Built-in Campaigns

The game includes a built-in Tutorial Campaign (5 levels) that guides new players through the various game mechanics.


Victory Conditions

Each campaign level can have one of the following victory conditions:

Condition Description
Free Play No specific victory condition; play freely
Destroy All Strongholds Eliminate all Enemy Strongholds on the map
Survive for a Set Time Keep the Castle alive beyond a specified number of ticks
Accumulate Gold Reach a target amount of gold in your treasury
Destroy Specific Stronghold Destroy a specific type of Enemy Stronghold
Defend the Castle Prevent the Castle from being destroyed within a set time
Collect All Chests Open every treasure chest on the map

Campaign Structure

Campaigns are stored as folders in the campaigns/ directory:

campaigns/
└── tutorial/
    ├── campaign.json     # Campaign metadata and level list
    ├── level1.json       # Level 1 map
    ├── level2.json       # Level 2 map
    └── ...

campaign.json Format

{
  "name": "Tutorial Campaign",
  "description": "Learn the basic game mechanics",
  "levels": [
    {
      "map": "level1.json",
      "title": "A New Beginning",
      "intro": "Welcome to Wayward Crown...",
      "outro": "Congratulations on clearing this level!",
      "starting_gold": 500,
      "victory": "destroy_enemy_buildings",
      "victory_value": 0
    }
  ]
}

Level Settings

Field Description
map Map file path (relative to the campaign folder)
title Level title
intro Opening text
outro Completion text
starting_gold Starting gold
victory Victory condition type
victory_value Victory condition value (e.g., survival tick count, target gold amount, etc.)
unlocked_buildings Available buildings whitelist (restricts the player's building options)

Localization Support

Campaign text can use i18n:KEY tags, which will automatically display the corresponding translation based on the player's language.