• 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.

Gebhard Blucher

Random Conquistador
69 Badges
Oct 2, 2002
853
1
  • Europa Universalis III
  • Europa Universalis IV
  • Surviving Mars
  • Surviving Mars: Digital Deluxe Edition
  • Surviving Mars: First Colony Edition
  • Surviving Mars: First Colony Edition
  • Deus Vult
  • Victoria: Revolutions
  • 500k Club
...and in the way I want them to work?

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 }
        }
    }
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.

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 }
        }
    }
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.
 
15 views an no one knows...

In case anyone is wondering, the events apparently do work. Not sure if they work exactly as I want them to, but they seem to have the desired effect.
 
looks right to me, but I am no expert
 
You can try it yourself in game.
-Start a game and select a character which you think meets the conditions (open his stats window).
-Open console (F12)
-Type charevent 15001
-If the trigger is not valid, it will say so in the console.

Note: the effects will take place even if the conditions are not met when you use charevent 'cheat'.