Wiki

effect · add_extra_state_shared_building_slots

Definition

  • Supported scope:STATE
  • Supported target:none

Description

add extra shared building slot to state

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

add_extra_state_shared_building_slots is commonly used to reward players with additional shared building slots in a target state when they occupy a specific state or complete a focus/decision, thereby allowing more infrastructure or factories to be constructed. For example, in a "develop colony" type decision, each execution grants the target state additional unlocked slots:

# In the decision's complete_effect, the target scope is STATE
complete_effect = {
    526 = {  # target state's state_id
        add_extra_state_shared_building_slots = 1
        add_building_construction = {
            type = industrial_complex
            level = 1
            instant_build = yes
        }
    }
}

Synergy

  • [add_building_construction](/wiki/effect/add_building_construction): Schedule building construction immediately after adding slots to ensure new slots are utilized effectively, preventing players from receiving empty slots without follow-up guidance.
  • [free_building_slots](/wiki/trigger/free_building_slots): Use this trigger before execution to check the current remaining slot count; you can design conditional logic such as "only supplement additional slots when slots are insufficient," preventing excessive accumulation.
  • [set_state_category](/wiki/effect/set_state_category): Use in combination with state tier adjustments; when upgrading the overall state type, synchronously append extra slots so that both slot expansion methods create a stacking effect.
  • [has_state_flag](/wiki/trigger/has_state_flag): Use with state flags to record how many times a state has already received the bonus, preventing the same event chain from triggering repeatedly and causing slots to inflate without limit.

Common Pitfalls

  1. Incorrect scope hierarchy: This effect must execute under STATE scope; if written directly in country scope (such as at the top level of option in a country_event) without first switching to state scope via 526 = { } or capital_scope = { }, the script will silently fail without error reporting, making it extremely difficult to debug.
  2. Mistakenly assuming negative values can reduce slots: This effect can only "add" extra slots and cannot accept negative numbers to reclaim slots; if dynamic increment/decrement is needed, use [add_state_modifier](/wiki/effect/add_state_modifier) instead with modifier properties to achieve indirect control.