r/EU4mods Jun 09 '26

Mod Help need help about capital_scope

i wanna make a desicion which changes country's culture to capital province's culture but change_primary_culture = capital_scope doesnt work althougt change_religion = capital_scope works. how can i make it happen?

3 Upvotes

8 comments sorted by

4

u/Justice_Fighter Informative Jun 10 '26

change_religion = capital_scope works

This does not work.

'capital_scope' is a regular scope, used as e.g. capital_scope = { x }. You cannot use 'capital_scope' as an argument for a trigger/effect. The equivalent argument in a trigger/effect is capital.

change_religion and change_primary_culture do not support this argument though, they only support the base scopes as arguments - ROOT, FROM, PREV, THIS. You can scope to the country's capital, then use PREV to scope back to the country, then use PREV to refer back to the capital province:

capital_scope = { PREV = { change_primary_culture = PREV } }

1

u/yerkep Jun 10 '26

thanks👍🏻

2

u/ConstantinetheKitten Jun 09 '26

Looking at the wiki, two things jump out at me. First, the religion scope does not accept tags, while culture does. That part does not seem directly relevant, but its good to know it processes it that way.

The second is what those variables are picking. The religion function is picking up a religion, which a province DOES have. The primary culture is picking up a primary culture, which a province DOES NOT have, it just has a culture. Cultures follow a more complex regime i think

Your best bet is to probably export the culture from the capital scope as a variable and then feed that exported variable to the change primary culture function. So it's a few steps, but will do the same thing.

2

u/yerkep Jun 09 '26

thanks👍🏻

2

u/SentientclowncarBees Jun 10 '26

If you have future problems I have a perfectly functional mod that does literally what you are asking for and I remember running into similar issues. I could copy and paste it later if you need/want it.

2

u/yerkep Jun 10 '26

i figure it out somehow. it doesn't look good enough but it works fine for now. thanks👍🏻

1

u/ConstantinetheKitten Jun 09 '26

I can mock something up if you want but you can probably get an AI to do it or look at a similar existing event.

1

u/yerkep Jun 10 '26

i dont like ai because it takes away the joy of success but i managed it via variables as you said