I hope the following helps.The decision is this.
<snip>
When I didn't have the owned_by restriction, it works as intended, except in any province with an empty holding. What I'm trying to do now is get it to work only in player-owned provinces with an empty holding.
Code:
god_society_construction = {
is_in_society = yes
ai = no
from_potential = {
society_rank = {
society = god_society
rank = 1
}
}
potential = {
holder = FROM # Titles have holders, provinces have owners
location = { # Holdings are located in provinces, not titles
num_of_empty_holdings > 0
}
}
allow = {
FROM = {
show_scope_change = no
society_currency >= 100 #need 100 society currency, can be anything
trait = divine
}
}
effect = {
# ROOT is a county
location = {
save_event_target_as = construction_province
}
FROM = { # Decision-taker
show_scope_change = no
character_event = { id = D3.2017 }
change_society_currency = -100
}
}
ai_will_do = {
factor = 0
}
}
[/icode]