• 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.
Code:
character_event = {
    id = event.16
    desc = "EVTDESCevent.16"
    picture = "GFX_evt_Marriage"
    is_triggered_only = yes
    trigger = {
         FROM = {
            spouse = { has_character_modifier = dummy }
        }
    }
    immediate = {
        FROM = {
            spouse = { character_event = { id = event.15 } }
        }
    }
#options and stuff ### add option(s) or make hidden
}
try without ROOT is ai. Once married, are you your spouses liege? Because, you're not ai
also the event might not be working due to the lack of options, so maybe use hide_window = yes
 
Code:
character_event = {
    id = event.16
    desc = "EVTDESCevent.16"
    picture = "GFX_evt_Marriage"
    is_triggered_only = yes
    trigger = {
         FROM = {
            spouse = { has_character_modifier = dummy }
        }
    }
    immediate = {
        FROM = {
            spouse = { character_event = { id = event.15 } }
        }
    }
#options and stuff ### add option(s) or make hidden
}
try without ROOT is ai. Once married, are you your spouses liege? Because, you're not ai
also the event might not be working due to the lack of options, so maybe use hide_window = yes
Hey man, thanks for the response. From what I've read the on_marriage events fire for both characters' lieges, with ROOT being the liege in question and FROM the spouse under ROOT. I do have options, but figured they were unnecessary since the event doesn't fire in the first place.
 
I've got a game that I want to convert to EU4. Unfortunately, a lot of the countries are converting with their weird dynasty names and generated ideas instead historical ones. I tried editing the save to change the game rules to dynasty names off, but it doesn't seem to change anything. I tried starting a new game with the rules set that I want and then loading the other, edited save from the main menu. Before I load my edited save, it warns me that it is from a different game version, but nothing changes after loading. Is there another part of the save or another file in which the game rules are saved that is overriding the changes that I made at the beginning of the file?

P.S. I also deleted the line that allowed interfaith marriages after the third weird patrilineal marriage between a major Christian monarch and a minor pagan chief. That's three historical dynasties extinguished and christian nations converted due to some dumb bimbo making poor marriage choices! ugh, Still interfaith marriages continue unabated.
 
Hey man, thanks for the response. From what I've read the on_marriage events fire for both characters' lieges, with ROOT being the liege in question and FROM the spouse under ROOT. I do have options, but figured they were unnecessary since the event doesn't fire in the first place.

Since it's on_marriage, the game may not consider them married yet when this event fires, so FROM will have no spouse and the trigger will always fail. You can use the new_character scope in on_marriage events to get the other spouse. I've definitely noticed that in on_death events, the character does not seem to be dead yet (they still have prestige and piety that can be referenced by the event).
 
Hey man, thanks for the response. From what I've read the on_marriage events fire for both characters' lieges, with ROOT being the liege in question and FROM the spouse under ROOT. I do have options, but figured they were unnecessary since the event doesn't fire in the first place.

ah, fair enough with regards to the lack of options.

just checked, don't use spouse! use new_character for the spouse. I'm pretty sure the event fires directly before the actual marriage, otherwise one of the party's liege would have changed potentially (basically unless they're already in the same court)
 
Since it's on_marriage, the game may not consider them married yet when this event fires, so FROM will have no spouse and the trigger will always fail. You can use the new_character scope in on_marriage events to get the other spouse. I've definitely noticed that in on_death events, the character does not seem to be dead yet (they still have prestige and piety that can be referenced by the event).
snuck right on in there...
 
Code:
character_event = {
    id = AllPa.2
    #title = MNKAlliance_NAME
    desc = MNKAlliance_DESC
    
    picture = GFX_evt_coronation_cm
    
    only_playable = yes
    
    trigger = {
        dynasty = 5062199 
        is_alternate_start = no
        is_landed = yes
        any_independent_ruler = {
            dynasty = 5062201 
            primary_title = { higher_tier_than = BARON }
            NOT = { is_allied_with = PREVPREV }
        }
    }
    
    mean_time_to_happen = {
        days = 1
    }
    
    option = {
        name = MNKAlliance_OPT
        any_independent_ruler = {
            limit = { dynasty = 5062201 } 
            save_event_target_as = alliance_target #for localisation files 
            opinion = { modifier = mnk_non_aggression_pact who = PREVPREV }
            reverse_opinion = { modifier = mnk_non_aggression_pact who = PREVPREV }
            add_alliance = {
                who = PREVPREV
                years = 1000 
            }
        }
    }
}
I got a problem. There is nothing wrong with alliance, but when event fire there is a localisation bug. Probably with event_target (alliance_target)...
Code:
MNKAlliance_DESC;An alliance between [From.GetBestName] and [alliance_target.GetBestName].;;;;;;;;;;;;;x
Event desc: An alliance between Kazimierz of Stezyca and Kazimierz of Stezyca.
 
I got a problem. There is nothing wrong with alliance, but when event fire there is a localisation bug. Probably with event_target (alliance_target)...
Options arent actually executed until clicked so you have no event target saved when the event appears. I would say move everything to an immediate block and just have the option as an ok button.
 
Anyone got any idea why this event isn't firing - it works perfectly fine when I trigger it but it never triggers by itself even when two characters with the appropriate flags are in the same province?

Code:
#Find Baratheon Bastard
character_event  = {
    id = more_bloodlines.800
    desc = "EVTDESCmore_bloodlines.800"
    
    has_character_flag = secret_baratheon_bastard
    
    trigger = {
        NOR = {
            dynasty = 317
            dynasty = 1074
            dynasty = 1075
            dynasty = 1076
            dynasty = 1077
            dynasty = 1078
            dynasty = 1079
            dynasty = 1080
            dynasty = 1081
            dynasty = 1082
            dynasty = 1083
            dynasty = 1084
            dynasty = 1085
            dynasty = 1086
            dynasty = 1087
            dynasty = 1088
        }
        any_character = {
            OR = {
                dynasty = 317
                has_character_flag = flag_knew_robert
            }
            at_location = ROOT
        }
    }
    
    mean_time_to_happen = { days = 25 }
    
    immediate = {
        clr_character_flag = secret_baratheon_bastard
        set_character_flag = known_baratheon_bastard
    }
    
    option = {
        name = "EVTOPTAmore_bloodlines.800" #Yay!
        c_317 = { ROOT = { set_father = PREV } } #Robert
        c_317 = {
            any_owned_bloodline = {
                ROOT = {
                    add_to_bloodline = PREV
                    any_dynasty_member_even_if_dead = {
                        limit = {
                            NOT = { is_bloodline_member_of = PREVPREV }
                        }
                        add_to_bloodline = PREVPREV
                    }
                }
            }
        }
        recalc_succession = yes
        if = {
            limit = { c_4316 = { character = PREV } } #Mya
            dynasty = 1074
        }
        if = {
            limit = { c_150316 = { character = PREV } } #Barra
            dynasty = 1077
        }
        if = {
            limit = { c_151316 = { character = PREV } } #Bella
            dynasty = 1075
        }
        if = {
            limit = { c_5316 = { character = PREV } } #Gendry
            dynasty = 1076
        }
        if = {
            limit = { c_1648008 = { character = PREV } } #Seastag
            dynasty = 1080
        }
        if = {
            limit = { c_1648009 = { character = PREV } } #Stormhaven
            dynasty = 1081
        }
        if = {
            limit = { c_1648002 = { character = PREV } } #Hartford
            dynasty = 1082
        }
        if = {
            limit = { c_1648006 = { character = PREV } } #Coldhart
            dynasty = 1083
        }
        if = {
            limit = { c_1648001 = { character = PREV } } #Redfawn
            dynasty = 1084
        }
        if = {
            limit = { c_1648004 = { character = PREV } } #Baarthreen
            dynasty = 1085
        }
        if = {
            limit = { c_1648007 = { character = PREV } } #Stagsby
            dynasty = 1086
        }
        if = {
            limit = { c_1648005 = { character = PREV } } #Darkhart
            dynasty = 1087
        }
        if = {
            limit = { c_1648003 = { character = PREV } } #Warfield
            dynasty = 1088
        }

        
        e_iron_throne = {
            if = {
                limit = { has_holder = yes }
                add_weak_claim = ROOT
            }
        }
        e_stormlands = {
            if = {
                limit = { has_holder = yes }
                add_weak_claim = ROOT
            }
        }
        k_stormlands = {
            if = {
                limit = {
                    OR = {
                        has_holder = yes
                        e_stormlands = { has_holder = no }
                    }   
                }
                add_weak_claim = ROOT
            }
        }   
        d_shipbreaker = { add_weak_claim = ROOT }
        c_storms_end = { add_weak_claim = ROOT }

        recalc_succession = yes   
        any_playable_ruler = {
            limit = {
                OR = {   
                    character = ROOT
                    dynasty = ROOT
                    is_liege_or_above = ROOT
                    capital_scope = { region = world_westeros }
                }
            }
            character_event = { id = more_bloodlines.801 }
        }
        any_character = {
            limit = {
                OR = {
                    dynasty = 317
                    has_character_flag = flag_knew_robert
                }
                at_location = ROOT
            }
            at_location = ROOT
            if = {
                limit = { is_ruler = no }
                liege = {
                    ROOT = { move_character = PREV }
                    character_event = { id = more_bloodlines.802 }
                }
            }
            else_if = {
                limit = { is_ruler = yes }
                ROOT = { move_character = PREV }
                character_event = { id = more_bloodlines.802 }
            }
        }
        recalc_succession = yes
    }
}
 
Is there anything "unexpected" that affects Governments?

I have a Mod that adds a new Ruler to a vanilla province; it does not touch the governments, and only touches the title file for that province in terms of edits made to vanilla files; however when it runs, I am getting unrelated Provinces in different regions changing their culture on starting the game. For example, an Iqta will suddenly become a Feudal, a Feudal becomes a Theocracy, etc. If I remove the Mod, they remain what they should be in vanilla. I cannot see how my changes would be affecting the Governments of these Provinces, though.
 
Is this in loading a saved game or starting a new game? A lot of stuff is identified by the order they are loaded, so if you added something in a new file, but it's loaded between different existing files, that can mess up save games.
 
Is this in loading a saved game or starting a new game? A lot of stuff is identified by the order they are loaded, so if you added something in a new file, but it's loaded between different existing files, that can mess up save games.
Thanks for the reply. It was new-game, but I found the problem : I had an event that wasn't doing what I'd intended, and was somehow breaking things; resolved now :)
 
I'm struggling to understand opinion modifiers. I have a scripted trigger which checks for large number of traits. I have two things I want to do with it:

1) Certain laws should be more or less popular with people who match the trigger.
2) Certain laws, once passed, should make people who match the trigger subject to justified arrest and punishment.

How can these aims be achieved, please?

Thanks,

nd
 
How can these aims be achieved, please?
Put an event on one of the yearly on actions and check if the person has the law.

1) Certain laws should be more or less popular with people who match the trigger.
Use the any_vassal scope and use if statements to check if they like the law or not then add a opinion modifier to the liege.

2) Certain laws, once passed, should make people who match the trigger subject to justified arrest and punishment.
Give the liege an opinion of them that allows those thing so define an opnion like this
Code:
opinion_can_be_jailed= {
  opinion = -100
  months = 1200
  prison_reason = yes
  revoke_reason = yes
  execute_reason = yes
  banish_reason = yes
}

Very rough code but this should give you an idea of what to do in the event

Code:
any_vassal = {
if = { limit = { like_my_law = yes }
opinion = {
  modifier = opinion_likes_law
  who = ROOT
  years = 10 }
}
if = { limit = { like_my_law = no }
opinion = {
  modifier = opinion_dislikes_law
  who = ROOT
  years = 10 }
}
if = { limit = { can_be_imprisoned_by_law= yes }
reverse_opinion = {
  modifier = opinion_can_be_jailed
  who = ROOT
  years = 10 }
}
}
 
Am I right in the assumption that the succession of viceroyalties ist hardcoded and cannot be modified in any way?
Or are there some (potentially hacky) ways of assigning them a different succession law that I might have missed when testing this?
 
Last edited:
Am I right in the assumption that the succession of viceroyalties ist hardcoded and cannot be modified in any way?
Or are there some (potentially hacky) ways of assigning them a different succession law that I might have missed when testing this?

The default "Appointment" succession law is hardcoded except for the stuff that can be modded in the succession law file. However, it might be possible to force a different succession law (possibly including a homemade elective one) through a on_new_holder event or other means, though I've not tried it.
 
The default "Appointment" succession law is hardcoded except for the stuff that can be modded in the succession law file. However, it might be possible to force a different succession law (possibly including a homemade elective one) through a on_new_holder event or other means, though I've not tried it.

Modifying the effect block of the appointment succession law does nothing but change the succession law tooltip of the title to the new succession. Titles still go to the liege on death.
Running a test decision with a succession = {} command in it has the same effect.
If you use a custom elective succession/feudal elective in any of the above, the elector and candidate tabs appear, but selecting a candidate seems to do nothing.
I didn't try on_new_holder though, but it would have little application in my mod.

Would have been awesome though as viceroyalties are the only titles that are not hardcoded to follow your primary title's sucession law if they duke tier or lower...