Wiki

effect · raid_reduce_project_progress_ratio

Definition

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

Description

Reduce progress to the special project in state. Root scope is raid instance scope.
The input value is a ratio of the total needed progress to complete the special project, i.e. a decimal number between 0 and 1.
ex:
# Root scope is raid
state = {
  raid_reduce_project_progress_ratio = 0.1 # Reduces the project progress by 10%
}

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

This effect is primarily used to create sabotage or disruption events or decisions, allowing players or AI to interrupt enemy special projects (such as nuclear weapons, rocket research, etc.) through specific actions. A typical scenario is in a sabotage event chain, where the extent of project progress damage to the target state varies based on the quality of the sabotage outcome, combined with random rolls or conditional branches to implement multi-tier destruction effects.

# Successful sabotage event option: heavily damage enemy special projects
country_event = {
    id = my_raid.5
    # Root scope = raid instance
    option = {
        name = my_raid.5.a
        # Inflict 30% project progress loss on target state
        state = {
            raid_reduce_project_progress_ratio = 0.3
        }
    }
    option = {
        name = my_raid.5.b
        # Small-scale damage, only 10% loss
        state = {
            raid_reduce_project_progress_ratio = 0.1
        }
    }
}

Synergy

  • [has_state_flag](/wiki/trigger/has_state_flag): Check whether the target state has a specific flag (such as "special project in progress") before executing the sabotage, preventing the effect from triggering on unrelated states.
  • [set_state_flag](/wiki/effect/set_state_flag): Immediately apply a "sabotaged" flag to the state after reducing project progress, useful for cooldown logic or triggering conditions in subsequent events.
  • [add_resistance](/wiki/effect/add_resistance): Sabotage operations are often accompanied by a surge in local resistance activity; you can simultaneously increase the target state's resistance value to reflect the political impact of the event.
  • [state_event](/wiki/effect/state_event): After sabotage is complete, send a follow-up event to the country controlling the target state, notifying them of project damage and triggering response option chains.

Common Pitfalls

  1. Scope misuse: This effect must be called within STATE scope, while Root is the sabotage instance scope; beginners often write the command directly in country scope or at the event's top level, causing script errors or ineffectiveness. You must explicitly wrap it in a state = { ... } block to correctly switch to STATE scope.
  2. Misunderstanding value ranges: The input value represents a ratio of the project's total required progress (0~1), not a percentage of the current remaining progress; entering 1.0 clears all progress entirely, not "reduce the current remaining by 100%". If the target project is already largely complete, using a smaller value may not produce the expected effect, so you need to plan your values in conjunction with the total project amount.