Wiki

effect · add_nationality

Definition

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

Description

Add the specified nationalty to the scoped-in operative. Examples:
add_nationality = ROOT
add_nationality = FRA

实战 · 配合 · 坑

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

实战用法

add_nationality 常用于情报/特工 mod 中,让某个 operative(特工)获得额外国籍,使其在特定国家执行任务时不易暴露,或在事件中模拟变节/叛逃情节。例如,当一名苏联特工被策反为法国服务时,可在事件 option 中写:

# 在一个 CHARACTER scope 的事件 option 中
add_nationality = FRA

也可通过 ROOTFROM 等动态目标引用当前触发国,实现更通用的脚本逻辑。

配合关系

  • [has_nationality](/wiki/trigger/has_nationality):在执行 add_nationality 前先检查该特工是否已拥有目标国籍,避免重复添加造成逻辑混乱。
  • [set_nationality](/wiki/effect/set_nationality)set_nationality替换主国籍,而 add_nationality追加,两者配合可精确控制特工的主从国籍关系。
  • [is_operative](/wiki/trigger/is_operative):用作前置条件守卫,确保当前 scope 确实是一名特工而非普通将领,防止 effect 作用于错误角色类型。
  • [turn_operative](/wiki/effect/turn_operative):策反场景的核心配套指令,先用 turn_operative 改变特工归属,再用 add_nationality 为其补充新阵营国籍,逻辑上完整还原叛逃流程。

常见坑

  1. Scope 用错add_nationality 只能在 CHARACTER scope 下执行,若直接写在国家 scope(如 any_country 块外层)而忘记切入角色 scope,游戏会静默报错且效果不生效,务必确认已通过 any_operative_leader 或具体角色引用进入 CHARACTER scope。
  2. set_nationality 混淆:新手常误以为两者等价,实则 add_nationality 是叠加额外国籍(特工身份证明层面),不会改变角色的主归属国;若目的是让角色"换主",应使用 set_nationality,否则角色仍在原国家的编制下运作。

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_nationality is commonly used in intelligence/operative mods to grant an operative additional nationality, making them less likely to be exposed when executing missions in specific countries, or to simulate defection/turncoat scenarios in events. For example, when a Soviet operative is turned to serve France, you can write in an event option within a CHARACTER scope:

# In an event option within a CHARACTER scope
add_nationality = FRA

You can also use dynamic target references like ROOT and FROM to reference the triggering nation, enabling more generic and reusable script logic.

Synergy

  • [has_nationality](/wiki/trigger/has_nationality): Check whether the operative already possesses the target nationality before executing add_nationality to avoid duplicate additions that could cause logic confusion.
  • [set_nationality](/wiki/effect/set_nationality): set_nationality replaces the primary nationality, whereas add_nationality appends an additional one. Using both together allows precise control over an operative's primary and secondary nationality relationships.
  • [is_operative](/wiki/trigger/is_operative): Use as a precondition guard to ensure the current scope is actually an operative and not a regular general, preventing the effect from being applied to the wrong character type.
  • [turn_operative](/wiki/effect/turn_operative): The core companion command for defection scenarios. First use turn_operative to change the operative's allegiance, then use add_nationality to add their new faction's nationality, logically completing the turncoat sequence.

Common Pitfalls

  1. Wrong Scope: add_nationality can only be executed within a CHARACTER scope. If you write it directly in a country scope (such as outside an any_country block) and forget to enter a CHARACTER scope, the game will silently error and the effect won't trigger. Always verify you've entered a CHARACTER scope via any_operative_leader or a direct character reference.
  2. Confusion with set_nationality: Beginners often mistake the two as equivalent, but add_nationality stacks an additional nationality (at the operative credentials level) and does not change the character's primary allegiance. If your goal is to make a character "switch sides," use set_nationality instead; otherwise, the character will continue operating under their original nation's organization.