Hands-On Usage
add_operation_token is commonly used in espionage/intelligence mods to accumulate operation tokens for one country targeting another, thereby unlocking or advancing subsequent intelligence event chains. For example, after Germany completes a spy mission, a marker is given for later trigger detection to track progress:
# After Germany completes spy infiltration mission
GER = {
add_operation_token = {
tag = SOV
token = ger_infiltrated_soviet_industry
}
}
Synergy
[has_country_flag](/wiki/trigger/has_country_flag): Typically use country flags first to record whether prerequisite conditions are met, then execute add_operation_token, ensuring tokens are only added at appropriate moments.
[add_intel](/wiki/effect/add_intel): In intelligence operation scenarios, grant intelligence points simultaneously with adding tokens to keep intelligence gains consistent with operation progress markers.
[country_event](/wiki/effect/country_event): After adding tokens, trigger corresponding events that further detect token quantity or combinations to advance intelligence story branches.
[add_timed_idea](/wiki/effect/add_timed_idea): Use together with timed ideas to give the action effects represented by tokens a time limit; after expiration, remove or transform state through idea removal.
Common Pitfalls
- Writing the target country in tag instead of your own: Beginners often mistakenly write
tag as the executing country's own tag, but this field represents the target country "against which" the action is directed. Writing it incorrectly causes the token to be attached to the wrong bilateral relationship, making subsequent detection completely ineffective.
- Inconsistent case in token string: The
token value is a case-sensitive string ID. If you write GER_Token when adding but ger_token when detecting in triggers, the game will not match them, causing logic to never trigger—extremely difficult to debug.