trigger · is_lend_leasing
Definition
- Supported scope:
COUNTRY - Supported target:
THIS,ROOT,PREV,FROM,OWNER,CONTROLLER,OCCUPIED,CAPITAL
Description
is lend-leasing country
is_lend_leasingCOUNTRYTHIS, ROOT, PREV, FROM, OWNER, CONTROLLER, OCCUPIED, CAPITALis lend-leasing country
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
is_lend_leasing 常用于租借援助相关的事件、决策或国策中,判断本国当前是否正在向某个特定国家提供租借,从而触发不同的外交或经济分支。例如,在一个模拟美国援助系统的 mod 里,可以用它限制某些决策只在已对目标国实施租借时才可用:
# 决策的 available 块:仅当本国正在对 SOV 进行租借时可用
available = {
is_lend_leasing = SOV
}
[has_country_flag](/wiki/trigger/has_country_flag):通常在同一个 trigger 块中搭配使用,先检查某个标记是否被设置(例如玩家手动开启过援助政策),再叠加 is_lend_leasing 做双重条件校验,避免误触发。[any_allied_country](/wiki/trigger/any_allied_country):在 any_allied_country 的子作用域内调用 is_lend_leasing,可以遍历所有盟友,检查是否存在至少一个盟友正在接受本国租借,适合编写集体安全相关逻辑。[has_collaboration](/wiki/trigger/has_collaboration):在同一外交/经济状态检查链中并列使用,两者都属于"对他国关系状态"类 trigger,组合后可区分租借与协作度是否同时满足。[create_import](/wiki/effect/create_import):当 is_lend_leasing 返回真时,往往在对应 effect 块中用 create_import 追加额外资源进口,模拟租借物资带来的资源补充效果。THIS),实际上应填写被援助国的国家标签(如 USA、SOV),填错会导致条件永远不满足且不报错,难以排查。is_lend_leasing 的主语是"提供租借方"(即当前 COUNTRY scope),检查的是"我在给谁提供租借",而非"谁在给我提供租借";若想检查本国是否在接受租借,需切换到对方 scope 再调用,否则逻辑完全相反。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_lend_leasing is commonly used in events, decisions, or focuses related to lend-lease mechanics to determine whether the current country is actively providing lend-lease aid to a specific nation, thereby triggering different diplomatic or economic branches. For example, in a mod simulating an American aid system, you can use it to restrict certain decisions so they are only available when lend-lease has been implemented toward the target country:
# available block in a decision: only usable when the current country is lend-leasing to SOV
available = {
is_lend_leasing = SOV
}
[has_country_flag](/wiki/trigger/has_country_flag): Typically paired within the same trigger block—first check whether a flag is set (e.g., player manually enabled an aid policy), then layer is_lend_leasing for dual-condition validation to prevent accidental triggers.[any_allied_country](/wiki/trigger/any_allied_country): Calling is_lend_leasing within the subscope of any_allied_country allows you to iterate through all allies and check whether at least one ally is receiving lend-lease from your country, ideal for implementing collective security logic.[has_collaboration](/wiki/trigger/has_collaboration): Use in parallel within the same diplomatic/economic status check chain; both belong to the "relation state toward other nations" trigger category, and combining them lets you distinguish whether lend-lease and collaboration level are simultaneously satisfied.[create_import](/wiki/effect/create_import): When is_lend_leasing returns true, you often follow it with create_import in the corresponding effect block to add supplementary resource imports, simulating the resource benefits that lend-lease supplies bring.THIS), but it should actually be the country tag of the recipient nation (such as USA or SOV). Incorrect syntax causes the condition to always fail silently with no error message, making it difficult to debug.is_lend_leasing is the "lend-lease provider" (the current COUNTRY scope), checking "whom am I providing lend-lease to," not "who is providing lend-lease to me." If you want to check whether your country is receiving lend-lease, you must switch to the other nation's scope before calling it, otherwise the logic is completely inverted.