Wiki

effect · set_research_slots

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

Sets the number of research slots

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

set_research_slots is commonly used after focus completion, event triggers, or when specific conditions are met to directly set a country's research slot count to a target value. For example, it can provide early-game bonuses to a weaker nation or simulate a period of technological surge in a scenario. Unlike commands that only increment a single slot, it is suited for situations requiring "precise total control"—such as fixing research slots to a specific number regardless of the current amount.

# Set research slots to 5 upon focus completion
focus = {
    id = SCI_research_boom
    ...
    completion_reward = {
        set_research_slots = 5
    }
}

Synergy

  • [add_research_slot](/wiki/effect/add_research_slot) — Complementary tools: set_research_slots provides exact total assignment, while add_research_slot increments based on the current value. Combined, they enable "reset then stack" workflows.
  • [amount_research_slots](/wiki/trigger/amount_research_slots) — Condition checking: Before executing set_research_slots, use this trigger to verify the current slot count and avoid unexpectedly reducing slots the player may have gained through other means.
  • [add_ideas](/wiki/effect/add_ideas) — Research slot changes are often paired with national spirits. Use add_ideas to simultaneously grant ideas that provide research bonuses, forming a complete research enhancement package.
  • [add_tech_bonus](/wiki/effect/add_tech_bonus) — Common companion in the same scenario: while setting slot count, grant research acceleration for specific technologies to simulate an overall boost to national research capability.

Common Pitfalls

  1. Confusing "set" with "add": Beginners sometimes intend to give a country "one more slot" but use set_research_slots = 4, resulting in no effect if the country already has 4 slots, or reducing slots if it already has 5. When incrementing, prioritize add_research_slot.
  2. Neglecting scope validation: This command only works in COUNTRY scope. If misused in state or character scopes, the script will not error but the command is silently ignored—a trap easy to miss during debugging.