Current source status
1line in
achievements.cfg0achievement groups
0current achievements
The current file contains only:
#textdomain wesnoth-trow
No scenario currently calls [set_achievement], [progress_achievement], or [set_sub_achievement]. The file is therefore a prepared extension surface rather than an active feature.
Independent loading rules
Achievement definitions are loaded independently of the campaign’s normal WML. They cannot assume that _main.cfg has established the campaign binary path or loaded utility macros.
| Consequence | Safe practice |
|---|---|
| No campaign utility macros | Define any achievement-only helper in achievements.cfg itself. |
| No active campaign binary path | Use full data paths for achievement icons and completion sounds. |
| Separate identity namespace | Use a stable content_for value and unique achievement IDs. |
Minimal extension template
Illustrative only. The following is a maintainable template, not content currently present in the campaign.
#textdomain wesnoth-trow
[achievement_group]
content_for=The_Rise_of_Wesnoth
display_name= _ "The Rise of Wesnoth"
[achievement]
id=example_clearwater
name= _ "Hold the Harbor"
description= _ "Complete Clearwater Port with the heroic outcome."
icon="data/campaigns/The_Rise_Of_Wesnoth/images/portraits/aethyr-first.webp"
[/achievement]
[/achievement_group]
A scenario would complete it with:
[set_achievement]
content_for=The_Rise_of_Wesnoth
id=example_clearwater
[/set_achievement]
Good achievement boundaries for this campaign
| Candidate type | Reliable trigger | Why it is robust |
|---|---|---|
| Outcome achievement | Existing heroic branch or bonus-victory event | No new combat-state tracking is required. |
| Route achievement | End of 04a or 04b | The route is already explicit in scenario identity. |
| Quest-set achievement | Ka’lian final visit when num_done=4 | Completion is already centralized. |
| Optional-boss achievement | Midnight Queen death or Dragon full clear | Existing boss events provide unambiguous hooks. |
| Campaign completion | Scenario 23 start or final endlevel | The epilogue is reached only after successful final deception. |
Compatibility rules
- Never rename a published achievement ID after release.
- Keep achievement actions outside branches that can fire repeatedly unless completion is intentionally idempotent.
- Use
progress_achievementonly where a stable maximum and replay behavior are clearly defined. - Do not gate campaign progression on local achievement state; achievement completion can differ between installations.