Wiki

effect · complete_prototype_reward_option

Definition

  • Supported scope:SPECIAL_PROJECT
  • Supported target:none

Description

Complete a prototype reward option for the project in scope 
The effect will respect the fire only once and allowed property of prototype rewards.
ex:
complete_prototype_reward_option = 
{
	prototype_reward = my_reward
	prototyp_reward_option = my_option # Optional, if multiple choice use default one if not set
	show_modifiers = yes # Yes if the effects of the prototype reward should be shown (default no)
}

实战 · 配合 · 坑

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

实战用法

在特殊项目(Special Project)的研究推进流程中,当某个原型奖励已满足解锁条件时,可通过此 effect 在脚本中程序化地完成该奖励选项,常用于自动化触发奖励或在事件选项中让玩家跳过手动选择。例如,在项目完成事件中直接兑现指定奖励:

# 在某个 SPECIAL_PROJECT scope 的事件 option 中
complete_prototype_reward_option = {
    prototype_reward = jet_engine_breakthrough
    prototyp_reward_option = high_thrust_variant
    show_modifiers = yes
}

配合关系

  • [has_project_flag](/wiki/trigger/has_project_flag):在执行奖励前先检查项目是否达到特定阶段标记,避免奖励在错误时机被触发。
  • [set_project_flag](/wiki/effect/set_project_flag):完成奖励后立即设置一个标记,用于防止后续逻辑重复执行同一奖励分支。
  • [add_project_progress_ratio](/wiki/effect/add_project_progress_ratio):常与奖励完成配合,在兑现原型奖励的同时额外推进项目进度,模拟研究突破带来的加速效果。
  • [add_dynamic_modifier](/wiki/effect/add_dynamic_modifier):奖励完成后附加动态修正值,进一步扩展奖励的实际游戏影响。

常见坑

  1. prototyp_reward_option 字段名本身存在拼写缺陷(少一个 e),这是官方定义的原始写法,新手若按正常英文拼写写成 prototype_reward_option 会导致字段无法识别,选项静默回退到默认值而不报错,难以察觉。
  2. 忽略 fire only once 约束:此 effect 会遵守原型奖励自身的"仅触发一次"属性,若脚本逻辑中多次调用同一奖励,后续调用会被静默忽略,而不是报错或覆盖,导致预期外的奖励缺失。建议配合 [set_project_flag](/wiki/effect/set_project_flag)[has_project_flag](/wiki/trigger/has_project_flag) 做显式的执行状态管理。

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

In the research progression workflow of Special Projects, when a prototype reward has satisfied its unlock conditions, you can use this effect to programmatically complete that reward option within your script. This is commonly used to automate reward triggers or allow players to skip manual selection in event options. For example, directly redeeming a specified reward in a project completion event:

# In an event option within SPECIAL_PROJECT scope
complete_prototype_reward_option = {
    prototype_reward = jet_engine_breakthrough
    prototyp_reward_option = high_thrust_variant
    show_modifiers = yes
}

Synergy

  • [has_project_flag](/wiki/trigger/has_project_flag): Check whether the project has reached a specific stage flag before executing the reward, preventing the reward from being triggered at the wrong time.
  • [set_project_flag](/wiki/effect/set_project_flag): Immediately set a flag after completing the reward to prevent subsequent logic from executing the same reward branch repeatedly.
  • [add_project_progress_ratio](/wiki/effect/add_project_progress_ratio): Commonly paired with reward completion to advance project progress further while redeeming the prototype reward, simulating the acceleration effect brought by research breakthroughs.
  • [add_dynamic_modifier](/wiki/effect/add_dynamic_modifier): Attach dynamic modifiers after reward completion to further extend the actual gameplay impact of the reward.

Common Pitfalls

  1. The prototyp_reward_option field name itself contains a spelling defect (missing an e). This is the original spelling as defined by the developers. New modders who spell it correctly as prototype_reward_option following standard English conventions will find the field unrecognized, causing the option to silently fall back to default values without throwing an error—making this difficult to detect.
  2. Overlooking the fire only once constraint: This effect respects the "fire only once" attribute of the prototype reward itself. If your script logic calls the same reward multiple times, subsequent calls will be silently ignored rather than throwing an error or overwriting the previous result, leading to unexpected missing rewards. It is recommended to pair this with [set_project_flag](/wiki/effect/set_project_flag) and [has_project_flag](/wiki/trigger/has_project_flag) for explicit execution state management.