Wiki

effect · injure_scientist_for_days

Definition

  • Supported scope:CHARACTER
  • Supported target:none

Description

Injure a scientist for x amount of days to a scientist character in scope.
	ex: my_character = {
	  injure_scientist_for_days = 12
	}

实战 · 配合 · 坑

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

实战用法

injure_scientist_for_days 常用于 mod 中模拟科学家在执行危险研究项目、实验室事故或间谍破坏事件后暂时失能的剧情效果,让玩家在一段时间内无法使用该科学家参与科研。例如在一个科技灾难事件中强制令某位科学家受伤:

country_event = {
    id = my_mod.42
    title = "实验室爆炸事故"
    
    option = {
        name = "安排救治"
        # 进入科学家角色 scope 后调用
        my_lead_scientist_character = {
            injure_scientist_for_days = 30
        }
    }
}

配合关系

  • [is_scientist_injured](/wiki/trigger/is_scientist_injured) — 在施加伤害前或事后检查该科学家是否已处于受伤状态,避免重复触发或叠加逻辑混乱。
  • [is_active_scientist](/wiki/trigger/is_active_scientist) — 确认角色当前正处于活跃科学家身份,防止对未激活的角色执行该指令导致无效调用。
  • [add_scientist_xp](/wiki/effect/add_scientist_xp) — 可在受伤恢复后作为补偿奖励经验值,构成"事故→康复→成长"的完整事件链叙事。
  • [operative_leader_event](/wiki/effect/operative_leader_event) — 若科学家身兼情报角色,可在受伤同时触发后续事件,推动剧情发展。

常见坑

  1. Scope 指向错误:该指令必须在 CHARACTER scope 内执行,新手容易在 COUNTRY scope 下直接调用而不先通过角色变量进入角色 scope,导致脚本报错或静默失效,务必确认已切换到正确的科学家角色 scope。
  2. 对非科学家角色使用:若目标角色并没有通过 add_scientist_role 分配科学家职能,对其执行此指令通常不会产生任何实际效果,建议在调用前先用 [is_active_scientist](/wiki/trigger/is_active_scientist) 做条件判断加以保护。

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

injure_scientist_for_days is commonly used in mods to simulate narrative effects where scientists become temporarily incapacitated after executing dangerous research projects, experiencing laboratory accidents, or suffering sabotage from operatives. This prevents the player from using that scientist in research for a set period. For example, forcing a scientist to be injured in a technology disaster event:

country_event = {
    id = my_mod.42
    title = "Laboratory Explosion Incident"
    
    option = {
        name = "Arrange Treatment"
        # Switch into scientist character scope before calling
        my_lead_scientist_character = {
            injure_scientist_for_days = 30
        }
    }
}

Synergy

  • [is_scientist_injured](/wiki/trigger/is_scientist_injured) — Check whether the scientist is already in an injured state before or after applying the effect, preventing duplicate triggers or conflicting stacking logic.
  • [is_active_scientist](/wiki/trigger/is_active_scientist) — Confirm the character currently holds active scientist status, preventing execution on unactivated characters that would result in invalid calls.
  • [add_scientist_xp](/wiki/effect/add_scientist_xp) — Can be used as a compensation reward granting experience after recovery, forming a complete narrative arc of "incident → recovery → growth".
  • [operative_leader_event](/wiki/effect/operative_leader_event) — If the scientist also serves in an intelligence role, can trigger subsequent events simultaneously with the injury to advance the story.

Common Pitfalls

  1. Incorrect scope targeting: This command must be executed within a CHARACTER scope. Beginners often call it directly under COUNTRY scope without first switching into the character scope via a character variable, causing script errors or silent failures. Always verify you have switched to the correct scientist character scope.
  2. Using on non-scientist characters: If the target character has not been assigned scientist functionality through add_scientist_role, executing this command typically produces no actual effect. It is recommended to protect the call with a condition check using [is_active_scientist](/wiki/trigger/is_active_scientist) beforehand.