Wiki

trigger · num_researched_technologies

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

Number of researched technologies

实战 · 配合 · 坑

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

实战用法

num_researched_technologies 常用于在 mod 中根据国家的科技研究进度解锁特殊决议、国策或顾问,例如只有当一个国家研究了足够多的科技时才允许触发特定事件或启用高端军事工业组织。它也可以用在 AI 权重逻辑中,让 AI 在科技积累达到门槛后才做出某些战略决策。

# 示例:只有研究了一定数量科技后才允许激活某决议
available = {
    num_researched_technologies > 20
}

配合关系

  • [can_research](/wiki/trigger/can_research):常一起判断当前可研究状态,双重保障科技条件的完整性。
  • [amount_research_slots](/wiki/trigger/amount_research_slots):与研究槽数量联用,区分"有能力快速研究"与"已经研究了多少"两个维度,使条件更精准。
  • [add_tech_bonus](/wiki/effect/add_tech_bonus):当科技数量触发条件满足后,用此 effect 给予额外科技加成作为奖励或推进逻辑。
  • [add_research_slot](/wiki/effect/add_research_slot):常作为奖励 effect 搭配使用,在国家完成一定科技积累后解锁额外研究槽,形成科技滚雪球设计。

常见坑

  1. 混淆比较运算符:新手常写成 num_researched_technologies = 20(表示恰好等于 20),而非 >= 20> 19,导致条件极难触发或行为不符合预期。应根据实际需求明确使用 >>=< 等比较符。
  2. 忽略科技树的跨类别统计:该 trigger 统计的是所有类别已研究科技的总数,而非某一特定科技树(如陆军或海军)的数量,新手若想限制特定领域的科技进度,应改用其他更具针对性的条件(如 has_doctrine)而非依赖此 trigger。

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

num_researched_technologies is commonly used in mods to unlock special decisions, national focuses, or advisors based on a country's technology research progress. For example, it can restrict specific events to trigger or enable advanced military industrial organizations only after a nation has researched sufficient technologies. It can also be integrated into AI weight logic, allowing the AI to make strategic decisions only after reaching a technology accumulation threshold.

# Example: Allow a decision to activate only after researching a certain number of technologies
available = {
    num_researched_technologies > 20
}

Synergy

  • [can_research](/wiki/trigger/can_research): Often used together to verify the current researchable state, providing dual validation of technology condition integrity.
  • [amount_research_slots](/wiki/trigger/amount_research_slots): Used in conjunction with research slot quantity to distinguish between two dimensions: "has capacity for rapid research" vs. "has already researched how much," making conditions more precise.
  • [add_tech_bonus](/wiki/effect/add_tech_bonus): When the technology count condition is met, use this effect to grant additional technology bonuses as rewards or to advance logic.
  • [add_research_slot](/wiki/effect/add_research_slot): Commonly paired as a reward effect to unlock additional research slots after a nation accumulates a certain amount of technology, creating a snowball effect in technology design.

Common Pitfalls

  1. Confusing comparison operators: Beginners often write num_researched_technologies = 20 (meaning exactly 20) instead of >= 20 or > 19, causing conditions to rarely trigger or behave unexpectedly. Always use comparison operators like >, >=, < based on actual requirements.
  2. Overlooking cross-category statistics in the technology tree: This trigger counts the total number of researched technologies across all categories, not the quantity in a specific technology tree (such as army or navy). If you want to restrict technology progress in a specific domain, use more targeted conditions (such as has_doctrine) rather than relying on this trigger.