Repository entry point
_main.cfg declares the campaign metadata, difficulty options, first scenario, binary path, and the three primary source includes. The campaign uses the preprocessor symbol CAMPAIGN_THE_RISE_OF_WESNOTH.
_main.cfg
├── [campaign]
│ ├── id = The_Rise_of_Wesnoth
│ ├── first_scenario = 01_A_Summer_of_Storms
│ ├── EASY / NORMAL / HARD
│ └── campaign credits and metadata
└── #ifdef CAMPAIGN_THE_RISE_OF_WESNOTH
├── [binary_path] data/campaigns/The_Rise_Of_Wesnoth
├── {campaigns/The_Rise_Of_Wesnoth/utils}
├── [units] {campaigns/The_Rise_Of_Wesnoth/units} [/units]
└── {campaigns/The_Rise_Of_Wesnoth/scenarios}
Verified directory inventory
| Path | Count / contents | Responsibility |
|---|---|---|
ai/ | 1 Lua file | Custom no-suicide attack candidate action for Scenario 15. |
images/ | 5 subdirectories plus campaign_image.png | Maps, miscellaneous overlays, portraits, story panels, and campaign unit sprites. |
maps/ | 24 map files | Terrain maps; three later scenario files intentionally reuse earlier maps. |
scenarios/ | 27 configuration files | All battles, cutscenes, alternate routes, quest branches, and the epilogue. |
sounds/ | 1 campaign-local Ogg file | familiar-teeth.ogg; other audio references use shared core assets. |
units/ | 14 unit-type files | Haldric and Wesfolk advancement lines, named villains, cutscene wrappers, and special characters. |
utils/ | 6 WML files | Journey maps, abilities, AI helpers, common deaths, unit-construction macros, and narrative reminder events. |
| Root files | _main.cfg, achievements.cfg, ART_LICENSE.txt | Campaign declaration, achievement definitions, and art licensing. |
Source-loading boundary
| Layer | Loaded as | Developer consequence |
|---|---|---|
| Utilities | Directory preprocessor include | Campaign macros and top-level helper events are available before scenario files are parsed. |
| Unit types | Directory include inside [units] | All 14 campaign unit types are registered together. |
| Scenarios | Directory preprocessor include | Scenario IDs become available to the campaign transition graph. |
| Binary assets | [binary_path] | Image and sound paths can be written relative to the campaign’s binary directory. |
Custom-code footprint
1campaign Lua AI file
6utility WML files
14unit-type files
24unique terrain maps
27scenario configurations
1campaign-local sound file
Architecture takeaway. The campaign achieves enormous tactical variety with a comparatively small custom-code and custom-unit footprint. Most scenario identity is produced by map design, WML event composition, core-unit reuse, and state transitions.
Recommended reading order for developers
| Goal | Start here |
|---|---|
| Understand loading and source layout | This page, then Utility & macro catalogue |
| Understand the custom unit surface | Complete unit catalogue |
| Understand scenario geography and reuse | Map inventory & reuse |
| Understand the runtime flow | Campaign flow |
| Find a specific technique | Offline site search |
Campaign directory · Unit directory · Utility directory · Map directory · AI directory · Sound directory
Root-file maintenance references
Campaign Metadata expands the exact [campaign] declaration and credits. Achievements Surface documents the one-line placeholder file and its independent loading rules.