Wiki

effect · add_days_mission_timeout

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

add days to 'mission_timeout' value of a mission
Example:
add_days_mission_timeout  = {
    mission = <some_mission>
    days = 30
}

实战 · 配合 · 坑

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

实战用法

当玩家在完成某个国策或事件后需要为进行中的任务争取更多执行窗口时,可用此 effect 动态延长任务的倒计时。例如在一个"战时紧急法案"事件中,允许玩家消耗政治点换取任务宽限期:

option = {
    name = war_emergency.1.a
    add_political_power = -50
    add_days_mission_timeout = {
        mission = my_critical_war_mission
        days = 30
    }
}

配合关系

  • [has_active_mission](/wiki/trigger/has_active_mission):在执行延期前先检测目标任务是否仍处于激活状态,避免对已结束的任务操作引发报错或逻辑混乱。
  • [activate_mission](/wiki/effect/activate_mission):通常成对出现——先激活任务,后续通过事件或决策动态调整其剩余天数,实现弹性任务时限设计。
  • [add_days_remove](/wiki/effect/add_days_remove):两者逻辑相似,后者用于延长定时 idea 的移除倒计时;在同一事件选项中组合使用可同步管理任务与 idea 的生命周期。
  • [country_event](/wiki/effect/country_event):常在任务即将超时时触发一个警告事件,并在事件选项中提供"花费资源换取延期"的选择,配合本 effect 实现完整的任务压力系统。

常见坑

  1. mission 字段填写的是任务的脚本 token(即 activate_mission 所用的 id),而非任务的本地化 key;将两者混淆会导致效果静默失败,任务倒计时不发生任何变化且不报错,极难排查。
  2. 在任务已超时或未被激活的情况下调用此 effect 不会产生任何效果,因此建议在执行前用 [has_active_mission](/wiki/trigger/has_active_mission) 进行保护性判断,否则整个逻辑链会在没有任何提示的情况下中断。

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

When players need to extend the execution window for an ongoing mission after completing a focus or event, this effect can be used to dynamically prolong the mission's countdown. For example, in a "Wartime Emergency Act" event, you might allow players to spend political power in exchange for additional time:

option = {
    name = war_emergency.1.a
    add_political_power = -50
    add_days_mission_timeout = {
        mission = my_critical_war_mission
        days = 30
    }
}

Synergy

  • [has_active_mission](/wiki/trigger/has_active_mission): Check whether the target mission is still active before extending it, preventing errors or logic conflicts when operating on already-completed missions.
  • [activate_mission](/wiki/effect/activate_mission): Typically used in pairs—activate the mission first, then dynamically adjust its remaining duration through events or decisions to implement flexible mission deadlines.
  • [add_days_remove](/wiki/effect/add_days_remove): Similar logic, but extends the removal countdown for timed ideas; combining both in the same event option allows synchronized lifecycle management of missions and ideas.
  • [country_event](/wiki/effect/country_event): Often triggered when a mission is about to expire, offering event options like "spend resources to extend deadline"; combined with this effect, it creates a complete mission pressure system.

Common Pitfalls

  1. The mission field requires the mission's script token (the id used in activate_mission), not the mission's localization key; confusing the two causes silent failure where the mission countdown doesn't change and no error is logged, making it extremely difficult to debug.
  2. Calling this effect on an already-expired or non-activated mission has no effect; it is strongly recommended to guard the call with [has_active_mission](/wiki/trigger/has_active_mission) beforehand, otherwise the entire logic chain will break silently with no warning.