Wiki

trigger · is_licensing_any_to

Definition

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

Description

Current country is licensing something to target country
Example: is_licensing_any_to = ENG

实战 · 配合 · 坑

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

实战用法

常用于检测当前国家是否正在向某个特定国家输出生产许可证,例如在外交事件或决策中判断"你是否已与某国建立了授权生产关系"再触发后续选项。典型场景是在军备出口 mod 里,当玩家向盟友授权坦克或飞机生产时,解锁特殊的外交奖励或关系加成。

# 在决策的 available 块中,检测本国是否正在向英国授权任何装备
available = {
    is_licensing_any_to = ENG
}

配合关系

  • [has_any_license](/wiki/trigger/has_any_license):互为镜像检测——has_any_license 从接收方角度判断"是否持有任何授权",而 is_licensing_any_to 从输出方角度判断,两者组合可在双边条件下同时约束事件触发。
  • [create_production_license](/wiki/effect/create_production_license):当条件不满足(尚未授权)时,可用该 effect 在事件选项中主动创建授权关系,与本 trigger 形成"检测 → 创建"的完整逻辑闭环。
  • [any_allied_country](/wiki/trigger/any_allied_country):常嵌套在其外层,用于遍历所有盟友并检测"是否对任意盟友存在授权",避免硬编码具体国家标签。

常见坑

  1. 方向混淆:新手容易把"授权方"和"接收方"搞反——is_licensing_any_to = ENG 的含义是当前 scope 国家正在向 ENG 输出授权,而不是从 ENG 获得授权;如果想检测"我方持有别人的授权",应使用 has_any_license
  2. scope 未切换:在 any_allied_countryany_neighbor_country 等遍历块内使用时,scope 已经切换到被遍历的国家,此时 is_licensing_any_to 检测的主体是那个遍历国而非玩家国,需确认 scope 指向正确的授权输出方。

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

Commonly used to detect whether the current nation is currently exporting production licenses to a specific nation, for example in diplomatic events or decisions to determine "whether you have already established an authorized production relationship with that nation" before triggering subsequent options. A typical scenario is in military export mods—when the player grants allies authorization to produce tanks or aircraft, it unlocks special diplomatic rewards or relationship bonuses.

# In the available block of a decision, check whether this nation is licensing any equipment to Britain
available = {
    is_licensing_any_to = ENG
}

Synergy

  • [has_any_license](/wiki/trigger/has_any_license):Mirror-image detection—has_any_license judges from the receiving end's perspective "whether any licenses are held," while is_licensing_any_to judges from the exporting end's perspective. Together they enable bilateral constraints on event triggers.
  • [create_production_license](/wiki/effect/create_production_license):When conditions are not met (no authorization yet), this effect can be used in event options to actively create the authorization relationship, forming a complete "detection → creation" logic loop with this trigger.
  • [any_allied_country](/wiki/trigger/any_allied_country):Often nested as an outer wrapper to iterate over all allies and check "whether any authorization exists toward any ally," avoiding hardcoded nation tags.

Common Pitfalls

  1. Direction confusion:Newcomers often mix up the "exporting nation" and "receiving nation"—is_licensing_any_to = ENG means the current scoped nation is exporting authorization to ENG, not receiving authorization from ENG. To check "whether I hold someone else's authorization," use has_any_license instead.
  2. Scope not switched:When used inside iteration blocks like any_allied_country or any_neighbor_country, the scope has already switched to the iterated nation. At that point, is_licensing_any_to checks the subject from that iterated nation's perspective, not the player's nation. Ensure the scope points to the correct license exporter.