Wiki

effect · add_project_progress_ratio

Definition

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

Description

Add progress to the project's prototype phase.
The input value is a ratio of the total needed progress to complete the special project, i.e. a decimal number between -1 and 1.
ex:
sp:my_project = {
  add_project_progress_ratio = 0.1
  add_project_progress_ratio = var:my_var
}

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 special project-focused mods, you can use this effect to reward players with a proportional boost to prototype stage progress upon completing prerequisite tasks or events, accelerating research timelines. For example, within an option block of a research event, you can directly advance an associated special project by 10%:

option = {
    name = my_event.1.a
    sp:my_secret_weapon = {
        add_project_progress_ratio = 0.1
    }
}

You can also dynamically control the advancement amount through variables, making progress gains scale with game state (such as research investment increasing progress speed).

Synergy

  • [has_project_flag](/wiki/trigger/has_project_flag): Check whether the special project is in a specific stage or state before advancing progress, preventing reward triggers at inappropriate moments.
  • [set_project_flag](/wiki/effect/set_project_flag): Mark the project immediately after advancing progress to prevent the same event chain from triggering duplicate progress gains, implementing "one-time reward" logic.
  • [complete_prototype_reward_option](/wiki/effect/complete_prototype_reward_option): When progress reaches full value, pair this effect to trigger the prototype stage's reward options, forming a complete research completion workflow.
  • [add_dynamic_modifier](/wiki/effect/add_dynamic_modifier): Stack dynamic modifiers alongside progress increases to simulate how "accelerated research states" impact subsequent stages.

Common Pitfalls

  1. Silent failure from incorrect scope: This effect must execute within a SPECIAL_PROJECT scope. Writing it directly in a country scope (e.g., owner = { add_project_progress_ratio = 0.1 }) produces no error but is completely ineffective—always enter the correct scope first using sp:project_key = { }.
  2. Assuming values can accumulate beyond 1: The input value is a ratio relative to the total progress required for completion. Passing values greater than 1 is logically meaningless and produces unpredictable behavior. For "instant completion," pair with [complete_prototype_reward_option](/wiki/effect/complete_prototype_reward_option) rather than stacking excess ratio values.