trigger · is_spymaster
Definition
- Supported scope:
COUNTRY - Supported target:
THIS,ROOT,PREV,FROM,OWNER,CONTROLLER,OCCUPIED,CAPITAL
Description
check if country is Spy Master
is_spymasterCOUNTRYTHIS, ROOT, PREV, FROM, OWNER, CONTROLLER, OCCUPIED, CAPITALcheck if country is Spy Master
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
is_spymaster 常用于情报机构相关 mod 中,判断某国是否担任当前谍报联盟的盟主,从而为其解锁专属决议、特殊事件或额外奖励。例如在多国情报合作 mod 里,只有盟主国才能触发协调行动事件:
# 在事件的 trigger 块中,限制只对谍报盟主国触发
country_event = {
id = spy_alliance.1
trigger = {
is_spymaster = yes
has_active_mission = yes
}
}
[has_done_agency_upgrade](/wiki/trigger/has_done_agency_upgrade):盟主国通常需要达到一定的情报机构升级等级才有资格或才有能力行使盟主特权,两者常组合用于 available 条件。[agency_upgrade_number](/wiki/trigger/agency_upgrade_number):进一步量化情报机构的发展程度,与 is_spymaster 配合可设置"升级数量门槛"才能触发高阶盟主事件。[create_intelligence_agency](/wiki/effect/create_intelligence_agency):在 effect 块中用于确保目标国拥有情报机构,常在 is_spymaster = no 的反向判断后作为补救 effect 出现。[any_allied_country](/wiki/trigger/any_allied_country):盟主身份往往需要联合盟友一起检查,用于确认联盟中是否存在满足条件的成员国。is_spymaster 只能在 COUNTRY scope 下使用,若在 STATE 或 CHARACTER scope 内直接调用会导致脚本报错或静默失效,务必用 OWNER / ROOT 等先切换到国家 scope。is_spymaster 判断的是"谍报联盟盟主"地位,而非"是否建立了情报机构";若只想检查是否建立机构,应改用 [agency_upgrade_number](/wiki/trigger/agency_upgrade_number) 或相关标志,直接用 is_spymaster = yes 检查未加入任何谍报联盟的国家会始终返回 false。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.
is_spymaster is commonly used in intelligence agency-related mods to determine whether a nation serves as the leader of the current intelligence alliance, thereby unlocking exclusive decisions, special events, or additional bonuses. For example, in a multi-nation intelligence cooperation mod, only the leader nation can trigger coordinated action events:
# In the event's trigger block, restrict triggering only for the intelligence alliance leader
country_event = {
id = spy_alliance.1
trigger = {
is_spymaster = yes
has_active_mission = yes
}
}
[has_done_agency_upgrade](/wiki/trigger/has_done_agency_upgrade): The leader nation typically needs to achieve a certain intelligence agency upgrade level to qualify for or possess the capability to exercise leader privileges; the two are often combined in available conditions.[agency_upgrade_number](/wiki/trigger/agency_upgrade_number): Further quantifies the development level of the intelligence agency; combined with is_spymaster, it can establish "upgrade count thresholds" required to trigger advanced leader events.[create_intelligence_agency](/wiki/effect/create_intelligence_agency): Used in effect blocks to ensure the target nation possesses an intelligence agency; often appears as a remedial effect following reverse judgments of is_spymaster = no.[any_allied_country](/wiki/trigger/any_allied_country): Leader status typically requires checking allied nations together; used to confirm whether qualified member nations exist within the alliance.is_spymaster can only be used within COUNTRY scope; calling it directly within STATE or CHARACTER scope will cause script errors or silent failures. Always switch to country scope first using OWNER / ROOT or similar.is_spymaster determines "intelligence alliance leader" status, not "whether an intelligence agency has been established"; if you only want to check whether an agency exists, use [agency_upgrade_number](/wiki/trigger/agency_upgrade_number) or related flags instead. Using is_spymaster = yes directly to check nations that have not joined any intelligence alliance will always return false.