...and in the way I want them to work?
This event:
I...
- am a ruler
- am a muslim
- am either a king or my capital is not in the middle east (or north africa)
- do not have either of those two inheritance laws
- and I'm an AI.
IF all of that, THEN change my inheritance laws.
And this event:
I...
- am a ruler
- am a muslim
- am a vassal
- do not have my capital in the middle east (or north africa)
- and I'm an AI.
IF all of that, THEN declare independence.
I think that's the way it will work, but...eh. Those nested conditions make my brain hurt and I'm not sure if they are all applicable to characters or not.
Code:
character_event = {
id = 15001
picture = "event_default"
trigger = {
condition = { type = ruler }
condition = { type = religion value = muslim }
condition = { type = or
condition = { type = kingdom }
condition = { type = capital
condition = { type = and
condition = { type = not value = { type = region value = Middle_East } }
condition = { type = not value = { type = region value = North_Africa } }
}
}
}
condition = { type = not value = { type = has_law value = { semisalic_gavelkind_law = yes } } }
condition = { type = not value = { type = has_law value = { salic_gavelkind_law = yes } } }
condition = { type = ai }
}
mean_time_to_happen = { months = 300 }
action_a = {
effect = { type = set_law value = semisalic_gavelkind_law }
}
}
I...
- am a ruler
- am a muslim
- am either a king or my capital is not in the middle east (or north africa)
- do not have either of those two inheritance laws
- and I'm an AI.
IF all of that, THEN change my inheritance laws.
Code:
character_event = {
id = 15002
picture = "event_default"
trigger = {
condition = { type = ruler }
condition = { type = religion value = muslim }
condition = { type = not value = { type = is_independent } }
condition = { type = capital
condition = { type = and
condition = { type = not value = { type = region value = Middle_East } }
condition = { type = not value = { type = region value = North_Africa } }
}
}
condition = { type = ai }
}
mean_time_to_happen = { months = 300 }
action_a = {
effect = { type = independence }
effect = { type = loyalty value = 1.0 }
}
}
I...
- am a ruler
- am a muslim
- am a vassal
- do not have my capital in the middle east (or north africa)
- and I'm an AI.
IF all of that, THEN declare independence.
I think that's the way it will work, but...eh. Those nested conditions make my brain hurt and I'm not sure if they are all applicable to characters or not.