• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

Hertog Jan

First Lieutenant
62 Badges
Jul 6, 2006
264
60
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Holy Knight (pre-order)
  • Europa Universalis III: Collection
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Cities: Skylines Deluxe Edition
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV Sign-up
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Cities: Skylines - Mass Transit
  • Europa Universalis 4: Emperor
  • Europa Universalis IV: Wealth of Nations
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Europa Universalis III
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Cities in Motion 2
  • Europa Universalis IV: Call to arms event
  • Hearts of Iron III
  • Europa Universalis IV: Res Publica
  • Europa Universalis: Rome
  • Rome Gold
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • 500k Club
I would like ask a question about properly scoping a state event to target one specific state.

The code below will not make this state event fire for the state of West Galicia. Is there any experienced modder who could tell me how to properly scope to particular states in a trigger? Any help would be much appreciated.

Code:
namespace = test_events

migration_test_events.1 = {
    type = state_event    type = state_event
    placement = ROOT

    icon = "gfx/interface/icons/event_icons/event_newspaper.dds"

    title = "Test"
    desc = "Test"
    flavor = test_events.1.f

    trigger = {
        this = s:STATE_WEST_GALICIA.region_state:AUS
    }

    immediate = {
    }

    option = {
        name = "Test"
        default_option = yes
        random_scope_pop = {
            limit = {
                is_pop_type = peasants
            }   
            set_pop_wealth = {
                wealth_distribution = {
                    value = 8
                }
            }
        }
    }
}


I have already tried
Code:
ROOT = s:STATE_WEST_GALICIA.region_state:AUS
 
you have two times type=state, dont know if causes issues.
I think you need to have real localisations. At least thats how it worked on some other paradox games.

Im new to V3 too... so dont know better
 
The event fires well with manually firing it from debug console "event migration_test_events.1". (even with duplicate type)

So either the trigger s:STATE_WEST_GALICIA.region_state is not owned by AUS, or there are no events or on_actions to fire this event. (check 00_code_on_actions.txt )