Wiki

effect · add_operation_token

Definition

  • Supported scope:COUNTRY
  • Supported target:THIS, ROOT, PREV, FROM, OWNER, CONTROLLER, OCCUPIED, CAPITAL

Description

Adds a specific token against against another country
add_operation_token = {
	tag = GER
	token = some_token_id
}

实战 · 配合 · 坑

实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。

实战用法

add_operation_token 常用于间谍/情报 mod 中,让一个国家针对另一个国家积累特定行动代币(token),从而解锁或推进后续情报事件链。例如在德国完成某间谍任务后给予标记,供后续 trigger 检测进度:

# 德国完成间谍渗透任务后
GER = {
    add_operation_token = {
        tag = SOV
        token = ger_infiltrated_soviet_industry
    }
}

配合关系

  • [has_country_flag](/wiki/trigger/has_country_flag):通常先用国家标志记录前置条件是否满足,再执行 add_operation_token,确保代币只在合适时机添加。
  • [add_intel](/wiki/effect/add_intel):情报行动场景中,与添加代币同步给予情报值,使情报收益与行动进度标记保持一致。
  • [country_event](/wiki/effect/country_event):添加代币后触发对应事件,由事件进一步检测代币数量或组合,推动情报剧情分支。
  • [add_timed_idea](/wiki/effect/add_timed_idea):配合限时 idea 使用,让代币所代表的行动效果有时限,到期后再通过 idea 移除或转化状态。

常见坑

  1. tag 填写目标国而非己方:新手常把 tag 误写成执行国自身的标签,但该字段表示"针对哪个国家"的对象国,写错会导致代币挂载到错误的双边关系上,后续检测完全无效。
  2. token 字符串大小写不一致token 的值是区分大小写的字符串 ID,若在添加时写 GER_Token 而在 trigger 检测时写 ger_token,游戏不会匹配,导致逻辑永远不会触发,调试时极难发现。

Hands-On Notes

Hands-on notes are AI-generated and checked against the vanilla command vocabulary — treat them as a starting point, not authoritative reference. The definition above is the game's own documentation.

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

  1. 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.
  2. 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.