Achievements: named milestones unlocked by counters crossing a target - monsters
slain, gold collected, floors descended, runs won.
The shape every badge/achievement list shares: a definition names a counter and the
value that earns it, the game increments counters as things happen, and unlocking is
derived (a counter at or past its target), never stored separately - so a counter
can only ever move one way and an unlocked achievement can never disagree with the
count behind it. Descriptions are display text mwg never reads; persistence is the
usual definitions-fresh, progress-saved split (QuestLog's own convention).
An achievement can also name several criteria instead of one - Wesnoth's own
"sub-achievements" shape, such as "recruit one of every unit type" being six counters
that must each reach 1 - and it unlocks only once every one of them has. A single
counter/target is shorthand for a one-criterion achievement; both forms share the
same unlock, progress and save code, since a one-element criteria list behaves
identically to the shorthand.
Achievements: named milestones unlocked by counters crossing a target - monsters slain, gold collected, floors descended, runs won.
The shape every badge/achievement list shares: a definition names a counter and the value that earns it, the game increments counters as things happen, and unlocking is derived (a counter at or past its target), never stored separately - so a counter can only ever move one way and an unlocked achievement can never disagree with the count behind it. Descriptions are display text
mwgnever reads; persistence is the usual definitions-fresh, progress-saved split (QuestLog's own convention).An achievement can also name several criteria instead of one - Wesnoth's own "sub-achievements" shape, such as "recruit one of every unit type" being six counters that must each reach 1 - and it unlocks only once every one of them has. A single
counter/targetis shorthand for a one-criterion achievement; both forms share the same unlock, progress and save code, since a one-element criteria list behaves identically to the shorthand.Example