This is the event. The aim of the event is to get a modifier in all the provinces that produce grain. Everywhere. All of them.
Can somebody help me spot the error? Im struggling with I:R since I only learn to code events in EU4.
Thanks
Code:
namespace = trade_goods_value
trade_goods_value.1 = { #grain
type = country_event
title = "trade_goods_value.1.t"
desc = "trade_goods_value.1.desc"
picture = hellenic_marketplace
hidden = yes
left_portrait = root.current_ruler
right_portrait = scope:city_1_target.governor
trigger = {
any_owned_province = {
controller = root
trade_goods = grain
}
}
immediate = {
set_variable = {
name = grain_toggle
}
every_owned_province = {
limit = {
controller = root
trade_goods = grain
}
set_variable = {
name = grain_toggle
}
}
}
option = {
name = "trade_goods_value.1.a"
if = {
num_goods_produced = 1
}
add_permanent_province_modifier = grain_commerce_value_1
}
}
Can somebody help me spot the error? Im struggling with I:R since I only learn to code events in EU4.
Thanks