• 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.
You should just be able to remove the viceroyalty checks from the other succession laws that prevent them being available for viceroyalties. The game will automatically assign succession laws based on this:



If the succession law you want to be default isn't on that list, you will have to make an on_startup event that assigns it to people who should have it, similar to the Eldership event.

Although, I am not convinced that succ_appointment is used for viceroyalties, since it requires any_liege = { holy_order = yes }.

This is what I am doing. My custom succession law does not exclude viceroyalties, and the startup event applies it to all appropriate titles, except those that have "vice_royalty = yes" set in title history. Those still revert to the liege...


The reason why I am asking all this is that I am looking for a way to have independent elective successions for secondary duchies.
Is there any way to achieve this?
(I hoped since viceroyalties always have their own succession law that they could be modded to behave like this)
 
Last edited:
If you're excluding viceroyalties, the event isn't going to fire for viceroyalties, obviously.

Secondary duchies can already have their own succession laws in the game, you don't have to mod that to make it happen. It's just that those succession laws are suppressed when the duchy is not primary. You can observe this happening by changing your succession law, switching your primary duchy, and then changing it again, etc. If you have three duchies set to three different laws you can change your succession law at will just by switching out your primary title. It's a major point in favor of staying a multi-duke vassal all game long. However, I'm pretty sure that the behavior of the succession law being suppressed when the title isn't primary is hardcoded.

This has nothing to do with viceroyalties at all, though. I imagine the reason secondary duchies held by a viceroy default to primogeniture is basically the same reason that secondary titles held by someone who is losing an election default to primogeniture.
 
If you're excluding viceroyalties, the event isn't going to fire for viceroyalties, obviously.

The point is I'm NOT excluding them and it's not applying the succession law.

Secondary duchies can already have their own succession laws in the game, you don't have to mod that to make it happen. It's just that those succession laws are suppressed when the duchy is not primary. You can observe this happening by changing your succession law, switching your primary duchy, and then changing it again, etc. If you have three duchies set to three different laws you can change your succession law at will just by switching out your primary title. It's a major point in favor of staying a multi-duke vassal all game long. However, I'm pretty sure that the behavior of the succession law being suppressed when the title isn't primary is hardcoded.

Ah, ok that's good to know...I need to find a workaround then.

I imagine the reason secondary duchies held by a viceroy default to primogeniture is basically the same reason that secondary titles held by someone who is losing an election default to primogeniture.

Defaulting to primo is hardcoded too?
 
Patch 3.0 added these election related scopes:
  • Added any/random_eldership_title scopes
  • Added any/random_elector_character scopes
  • Added any/random_pretender scopes
Any way you can use these to scope to/check the character another character is voting for? Let's say I wanted to apply an opinion modifier to a characters chosen candidate, how would I do this?
 
The code below works perfectly for imprisonment. I would like to convert it to use for murder attempt instead of imprison. Does anyone know if this is possible?



Code:
    mc_imprison = {

        filter = all

     

        from_potential = {

            has_character_flag = cheats_enabled

            has_character_flag = mind_control_enabled

            ai = no

        }

        potential = {

            ai = yes

            prisoner = no

        }

        allow = {

            any_character = {

                has_character_flag = mind_controlled

                is_ruler = yes

            }

        }

        effect = {

            any_character = {

                limit = {

                    has_character_flag = mind_controlled

                }

                ROOT = {

                    IMPRISON = PREV

                }

            }

        }

        ai_will_do = {

            factor = 0

        }

    }


Using the above code (but replacing IMPRISON with MURDER) I get the following in the error.log


Code:
[effect.cpp:1144]: Unknown effect-type: "MURDER" at  file: decisions/macs_cheats_menu.txt line: 2025
 
Thanks faiuwle and Rydelfox.

The death command does work, though the killers seem to do so with impunity. Any way for the death command to sometimes also trigger a reason for imprisonment against the murderer?
 
unable to get holding or province event modifiers to be attached
for the holding it's done though a decision
Code:
cfh_buildings_district_citizen_rich_decision = {
       
        only_playable = yes
        is_high_prio = yes
       
        filter = owned
        ai_target_filter = owned
        ai_check_interval = 12

        from_potential = {
            clan = no
        }

        potential = {
            OR = {
                has_holding_modifier = cfh_buildings_district_capital_modifier
                location = { is_variable_equal = { which = cfh_buildings_num_dist_types_var value = 0 } }
            }
            location = { 
                NOT = { check_variable = { which = cfh_buildings_pop_var value = 15 } }
                has_province_flag = cfh_buildings_pop_expand_flag
                NOT = { has_province_flag = cfh_buildings_district_citizen_rich_2_flag }
                OR = {
                    NOT = { check_variable = { which = cfh_buildings_num_dist_types_var value = 5 } }
                    AND = {
                        check_variable = { which = cfh_buildings_num_dist_types_var value = 5 }
                        OR = {
                            has_province_flag = cfh_buildings_district_citizen_rich_0_flag
                            has_province_flag = cfh_buildings_district_citizen_rich_1_flag
                        }
                   
                    }
                }
            }
            OR = {
                holding_type = castle
                holding_type = city
                holding_type = temple
                holding_type = tribal
            }
            is_capital = yes
        }

        allow = {
            FROM = { wealth >= 100 }
        }
       
        ai_will_do = {
            factor = 1
            modifier = {
                factor = 0.1
                always = yes
            }
        }

        effect = {
            FROM = { wealth = -100 }
            ROOT = {
                add_holding_modifier = { 
                    modifier = cfh_buildings_district_capital_modifier
                    duration = -1
                }
                if = {
                    limit = { holding_type = castle }
                    if = {
                        limit = { NOT = { has_building = cfh_ca_buildings_district_citizen_rich_0 } }
                        add_building = cfh_ca_buildings_district_citizen_rich_0
                        location = { 
                            change_variable = { which = cfh_buildings_num_dist_types_var value = 1 } 
                            set_province_flag = cfh_buildings_district_citizen_rich_0_flag
                        }
                    }
                    else_if ={
                        limit = { NOT = { has_building = cfh_ca_buildings_district_citizen_rich_1 } }
                        add_building = cfh_ca_buildings_district_citizen_rich_1
                        location = { set_province_flag = cfh_buildings_district_citizen_rich_1_flag }
                    }
                    else_if ={
                        limit = { NOT = { has_building = cfh_ca_buildings_district_citizen_rich_2 } }
                        add_building = cfh_ca_buildings_district_citizen_rich_2
                        location = { set_province_flag = cfh_buildings_district_citizen_rich_2_flag }
                    }
                }
                else_if = {
                    limit = { holding_type = city }
                    if = {
                        limit = { NOT = { has_building = cfh_ct_buildings_district_citizen_rich_0 } }
                        add_building = cfh_ct_buildings_district_citizen_rich_0
                        location = { 
                            change_variable = { which = cfh_buildings_num_dist_types_var value = 1 } 
                            set_province_flag = cfh_buildings_district_citizen_rich_0_flag
                        }
                    }
                    else_if ={
                        limit = { NOT = { has_building = cfh_ct_buildings_district_citizen_rich_1 } }
                        add_building = cfh_ct_buildings_district_citizen_rich_1
                        location = { set_province_flag = cfh_buildings_district_citizen_rich_1_flag }
                    }
                    else_if ={
                        limit = { NOT = { has_building = cfh_ct_buildings_district_citizen_rich_2 } }
                        add_building = cfh_ct_buildings_district_citizen_rich_2
                        location = { set_province_flag = cfh_buildings_district_citizen_rich_2_flag }
                    }
                }
                else_if = {
                    limit = { holding_type = temple }
                    if = {
                        limit = { NOT = { has_building = cfh_tp_buildings_district_citizen_rich_0 } }
                        add_building = cfh_tp_buildings_district_citizen_rich_0
                        location = { 
                            change_variable = { which = cfh_buildings_num_dist_types_var value = 1 } 
                            set_province_flag = cfh_buildings_district_citizen_rich_0_flag
                        }
                    }
                    else_if ={
                        limit = { NOT = { has_building = cfh_tp_buildings_district_citizen_rich_1 } }
                        add_building = cfh_tp_buildings_district_citizen_rich_1
                        location = { set_province_flag = cfh_buildings_district_citizen_rich_1_flag }
                    }
                    else_if ={
                        limit = { NOT = { has_building = cfh_tp_buildings_district_citizen_rich_2 } }
                        add_building = cfh_tp_buildings_district_citizen_rich_2
                        location = { set_province_flag = cfh_buildings_district_citizen_rich_2_flag }
                    }
                }
                else_if = {
                    limit = { holding_type = tribal }
                    if = {
                        limit = { NOT = { has_building = cfh_tb_buildings_district_citizen_rich_0 } }
                        add_building = cfh_tb_buildings_district_citizen_rich_0
                        location = { 
                            change_variable = { which = cfh_buildings_num_dist_types_var value = 1 } 
                            set_province_flag = cfh_buildings_district_citizen_rich_0_flag
                        }
                    }
                    else_if ={
                        limit = { NOT = { has_building = cfh_tb_buildings_district_citizen_rich_1 } }
                        add_building = cfh_tb_buildings_district_citizen_rich_1
                        location = { set_province_flag = cfh_buildings_district_citizen_rich_1_flag }
                    }
                    else_if ={
                        limit = { NOT = { has_building = cfh_tb_buildings_district_citizen_rich_2 } }
                        add_building = cfh_tb_buildings_district_citizen_rich_2
                        location = { set_province_flag = cfh_buildings_district_citizen_rich_2_flag }
                    }
                }
                location = { 
                    clr_province_flag = cfh_buildings_pop_expand_flag
                    change_variable = { which = cfh_buildings_pop_var value = 1 }
                    province_event = { id = cfhbuildings.0006 days = 10 }
                }
            }
        }
    }

everything else in the decision works as it should.
the event containing the add_province_modifier commands doesn't seem to be working either
Code:
province_event = {
    id = cfhbuildings.0007 # district modifiers
    hide_window = yes
    is_triggered_only = yes
   
    trigger = {
        always = yes
    }
   
    immediate = {
        if = {
            limit = { has_province_flag = cfh_buildings_pop_100_flag }
            if = {
                limit = { has_province_flag = cfh_buildings_district_military_2_flag }
                add_province_modifier = { name = cfh_buildings_district_military_modifier_15 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_military_1_flag }
                add_province_modifier = { name = cfh_buildings_district_military_modifier_10 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_military_0_flag }
                add_province_modifier = { name = cfh_buildings_district_military_modifier_5 duration = -1 }
            }
            if = {
                limit = { has_province_flag = cfh_buildings_district_industry_2_flag }
                add_province_modifier = { name = cfh_buildings_district_industry_modifier_15 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_industry_1_flag }
                add_province_modifier = { name = cfh_buildings_district_industry_modifier_10 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_industry_0_flag }
                add_province_modifier = { name = cfh_buildings_district_industry_modifier_5 duration = -1 }
            }
            if = {
                limit = { has_province_flag = cfh_buildings_district_religion_2_flag }
                add_province_modifier = { name = cfh_buildings_district_religion_modifier_15 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_religion_1_flag }
                add_province_modifier = { name = cfh_buildings_district_religion_modifier_10 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_religion_0_flag }
                add_province_modifier = { name = cfh_buildings_district_religion_modifier_5 duration = -1 }
            }
            if = {
                limit = { has_province_flag = cfh_buildings_district_trade_2_flag }
                add_province_modifier = { name = cfh_buildings_district_trade_modifier_15 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_trade_1_flag }
                add_province_modifier = { name = cfh_buildings_district_trade_modifier_10 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_trade_0_flag }
                add_province_modifier = { name = cfh_buildings_district_trade_modifier_5 duration = -1 }
            }
            if = {
                limit = { has_province_flag = cfh_buildings_district_monument_2_flag }
                add_province_modifier = { name = cfh_buildings_district_monument_modifier_15 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_monument_1_flag }
                add_province_modifier = { name = cfh_buildings_district_monument_modifier_10 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_monument_0_flag }
                add_province_modifier = { name = cfh_buildings_district_monument_modifier_5 duration = -1 }
            }
            if = {
                limit = { has_province_flag = cfh_buildings_district_citizen_poor_2_flag }
                add_province_modifier = { name = cfh_buildings_district_citizen_poor_modifier_15 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_citizen_poor_1_flag }
                add_province_modifier = { name = cfh_buildings_district_citizen_poor_modifier_10 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_citizen_poor_0_flag }
                add_province_modifier = { name = cfh_buildings_district_citizen_poor_modifier_5 duration = -1 }
            }
            if = {
                limit = { has_province_flag = cfh_buildings_district_citizen_rich_2_flag }
                add_province_modifier = { name = cfh_buildings_district_citizen_rich_modifier_15 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_citizen_rich_1_flag }
                add_province_modifier = { name = cfh_buildings_district_citizen_rich_modifier_10 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_citizen_rich_0_flag }
                add_province_modifier = { name = cfh_buildings_district_citizen_rich_modifier_5 duration = -1 }
            }
        }
        else_if = {
            limit = { has_province_flag = cfh_buildings_pop_90_flag }
            if = {
                limit = { has_province_flag = cfh_buildings_district_military_2_flag }
                add_province_modifier = { name = cfh_buildings_district_military_modifier_12 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_military_1_flag }
                add_province_modifier = { name = cfh_buildings_district_military_modifier_8 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_military_0_flag }
                add_province_modifier = { name = cfh_buildings_district_military_modifier_4 duration = -1 }
            }
            if = {
                limit = { has_province_flag = cfh_buildings_district_industry_2_flag }
                add_province_modifier = { name = cfh_buildings_district_industry_modifier_12 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_industry_1_flag }
                add_province_modifier = { name = cfh_buildings_district_industry_modifier_8 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_industry_0_flag }
                add_province_modifier = { name = cfh_buildings_district_industry_modifier_4 duration = -1 }
            }
            if = {
                limit = { has_province_flag = cfh_buildings_district_religion_2_flag }
                add_province_modifier = { name = cfh_buildings_district_religion_modifier_12 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_religion_1_flag }
                add_province_modifier = { name = cfh_buildings_district_religion_modifier_8 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_religion_0_flag }
                add_province_modifier = { name = cfh_buildings_district_religion_modifier_4 duration = -1 }
            }
            if = {
                limit = { has_province_flag = cfh_buildings_district_trade_2_flag }
                add_province_modifier = { name = cfh_buildings_district_trade_modifier_12 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_trade_1_flag }
                add_province_modifier = { name = cfh_buildings_district_trade_modifier_8 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_trade_0_flag }
                add_province_modifier = { name = cfh_buildings_district_trade_modifier_4 duration = -1 }
            }
            if = {
                limit = { has_province_flag = cfh_buildings_district_monument_2_flag }
                add_province_modifier = { name = cfh_buildings_district_monument_modifier_12 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_monument_1_flag }
                add_province_modifier = { name = cfh_buildings_district_monument_modifier_8 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_monument_0_flag }
                add_province_modifier = { name = cfh_buildings_district_monument_modifier_4 duration = -1 }
            }
            if = {
                limit = { has_province_flag = cfh_buildings_district_citizen_poor_2_flag }
                add_province_modifier = { name = cfh_buildings_district_citizen_poor_modifier_12 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_citizen_poor_1_flag }
                add_province_modifier = { name = cfh_buildings_district_citizen_poor_modifier_8 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_citizen_poor_0_flag }
                add_province_modifier = { name = cfh_buildings_district_citizen_poor_modifier_4 duration = -1 }
            }
            if = {
                limit = { has_province_flag = cfh_buildings_district_citizen_rich_2_flag }
                add_province_modifier = { name = cfh_buildings_district_citizen_rich_modifier_12 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_citizen_rich_1_flag }
                add_province_modifier = { name = cfh_buildings_district_citizen_rich_modifier_8 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_citizen_rich_0_flag }
                add_province_modifier = { name = cfh_buildings_district_citizen_rich_modifier_4 duration = -1 }
            }
        }
        else_if = {
            limit = { has_province_flag = cfh_buildings_pop_80_flag }
            if = {
                limit = { has_province_flag = cfh_buildings_district_military_2_flag }
                add_province_modifier = { name = cfh_buildings_district_military_modifier_9 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_military_1_flag }
                add_province_modifier = { name = cfh_buildings_district_military_modifier_6 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_military_0_flag }
                add_province_modifier = { name = cfh_buildings_district_military_modifier_3 duration = -1 }
            }
            if = {
                limit = { has_province_flag = cfh_buildings_district_industry_2_flag }
                add_province_modifier = { name = cfh_buildings_district_industry_modifier_9 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_industry_1_flag }
                add_province_modifier = { name = cfh_buildings_district_industry_modifier_6 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_industry_0_flag }
                add_province_modifier = { name = cfh_buildings_district_industry_modifier_3 duration = -1 }
            }
            if = {
                limit = { has_province_flag = cfh_buildings_district_religion_2_flag }
                add_province_modifier = { name = cfh_buildings_district_religion_modifier_9 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_religion_1_flag }
                add_province_modifier = { name = cfh_buildings_district_religion_modifier_6 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_religion_0_flag }
                add_province_modifier = { name = cfh_buildings_district_religion_modifier_3 duration = -1 }
            }
            if = {
                limit = { has_province_flag = cfh_buildings_district_trade_2_flag }
                add_province_modifier = { name = cfh_buildings_district_trade_modifier_9 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_trade_1_flag }
                add_province_modifier = { name = cfh_buildings_district_trade_modifier_6 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_trade_0_flag }
                add_province_modifier = { name = cfh_buildings_district_trade_modifier_3 duration = -1 }
            }
            if = {
                limit = { has_province_flag = cfh_buildings_district_monument_2_flag }
                add_province_modifier = { name = cfh_buildings_district_monument_modifier_9 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_monument_1_flag }
                add_province_modifier = { name = cfh_buildings_district_monument_modifier_6 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_monument_0_flag }
                add_province_modifier = { name = cfh_buildings_district_monument_modifier_3 duration = -1 }
            }
            if = {
                limit = { has_province_flag = cfh_buildings_district_citizen_poor_2_flag }
                add_province_modifier = { name = cfh_buildings_district_citizen_poor_modifier_9 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_citizen_poor_1_flag }
                add_province_modifier = { name = cfh_buildings_district_citizen_poor_modifier_6 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_citizen_poor_0_flag }
                add_province_modifier = { name = cfh_buildings_district_citizen_poor_modifier_3 duration = -1 }
            }
            if = {
                limit = { has_province_flag = cfh_buildings_district_citizen_rich_2_flag }
                add_province_modifier = { name = cfh_buildings_district_citizen_rich_modifier_9 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_citizen_rich_1_flag }
                add_province_modifier = { name = cfh_buildings_district_citizen_rich_modifier_6 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_citizen_rich_0_flag }
                add_province_modifier = { name = cfh_buildings_district_citizen_rich_modifier_3 duration = -1 }
            }
        }
        else_if = {
            limit = { has_province_flag = cfh_buildings_pop_70_flag }
            if = {
                limit = { has_province_flag = cfh_buildings_district_military_2_flag }
                add_province_modifier = { name = cfh_buildings_district_military_modifier_6 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_military_1_flag }
                add_province_modifier = { name = cfh_buildings_district_military_modifier_4 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_military_0_flag }
                add_province_modifier = { name = cfh_buildings_district_military_modifier_2 duration = -1 }
            }
            if = {
                limit = { has_province_flag = cfh_buildings_district_industry_2_flag }
                add_province_modifier = { name = cfh_buildings_district_industry_modifier_6 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_industry_1_flag }
                add_province_modifier = { name = cfh_buildings_district_industry_modifier_4 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_industry_0_flag }
                add_province_modifier = { name = cfh_buildings_district_industry_modifier_2 duration = -1 }
            }
            if = {
                limit = { has_province_flag = cfh_buildings_district_religion_2_flag }
                add_province_modifier = { name = cfh_buildings_district_religion_modifier_6 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_religion_1_flag }
                add_province_modifier = { name = cfh_buildings_district_religion_modifier_4 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_religion_0_flag }
                add_province_modifier = { name = cfh_buildings_district_religion_modifier_2 duration = -1 }
            }
            if = {
                limit = { has_province_flag = cfh_buildings_district_trade_2_flag }
                add_province_modifier = { name = cfh_buildings_district_trade_modifier_6 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_trade_1_flag }
                add_province_modifier = { name = cfh_buildings_district_trade_modifier_4 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_trade_0_flag }
                add_province_modifier = { name = cfh_buildings_district_trade_modifier_2 duration = -1 }
            }
            if = {
                limit = { has_province_flag = cfh_buildings_district_monument_2_flag }
                add_province_modifier = { name = cfh_buildings_district_monument_modifier_6 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_monument_1_flag }
                add_province_modifier = { name = cfh_buildings_district_monument_modifier_4 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_monument_0_flag }
                add_province_modifier = { name = cfh_buildings_district_monument_modifier_2 duration = -1 }
            }
            if = {
                limit = { has_province_flag = cfh_buildings_district_citizen_poor_2_flag }
                add_province_modifier = { name = cfh_buildings_district_citizen_poor_modifier_6 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_citizen_poor_1_flag }
                add_province_modifier = { name = cfh_buildings_district_citizen_poor_modifier_4 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_citizen_poor_0_flag }
                add_province_modifier = { name = cfh_buildings_district_citizen_poor_modifier_2 duration = -1 }
            }
            if = {
                limit = { has_province_flag = cfh_buildings_district_citizen_rich_2_flag }
                add_province_modifier = { name = cfh_buildings_district_citizen_rich_modifier_6 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_citizen_rich_1_flag }
                add_province_modifier = { name = cfh_buildings_district_citizen_rich_modifier_4 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_citizen_rich_0_flag }
                add_province_modifier = { name = cfh_buildings_district_citizen_rich_modifier_2 duration = -1 }
            }
        }
        else_if = {
            limit = { has_province_flag = cfh_buildings_pop_60_flag }
            if = {
                limit = { has_province_flag = cfh_buildings_district_military_2_flag }
                add_province_modifier = { name = cfh_buildings_district_military_modifier_3 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_military_1_flag }
                add_province_modifier = { name = cfh_buildings_district_military_modifier_2 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_military_0_flag }
                add_province_modifier = { name = cfh_buildings_district_military_modifier_1 duration = -1 }
            }
            if = {
                limit = { has_province_flag = cfh_buildings_district_industry_2_flag }
                add_province_modifier = { name = cfh_buildings_district_industry_modifier_3 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_industry_1_flag }
                add_province_modifier = { name = cfh_buildings_district_industry_modifier_2 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_industry_0_flag }
                add_province_modifier = { name = cfh_buildings_district_industry_modifier_1 duration = -1 }
            }
            if = {
                limit = { has_province_flag = cfh_buildings_district_religion_2_flag }
                add_province_modifier = { name = cfh_buildings_district_religion_modifier_3 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_religion_1_flag }
                add_province_modifier = { name = cfh_buildings_district_religion_modifier_2 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_religion_0_flag }
                add_province_modifier = { name = cfh_buildings_district_religion_modifier_1 duration = -1 }
            }
            if = {
                limit = { has_province_flag = cfh_buildings_district_trade_2_flag }
                add_province_modifier = { name = cfh_buildings_district_trade_modifier_3 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_trade_1_flag }
                add_province_modifier = { name = cfh_buildings_district_trade_modifier_2 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_trade_0_flag }
                add_province_modifier = { name = cfh_buildings_district_trade_modifier_1 duration = -1 }
            }
            if = {
                limit = { has_province_flag = cfh_buildings_district_monument_2_flag }
                add_province_modifier = { name = cfh_buildings_district_monument_modifier_3 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_monument_1_flag }
                add_province_modifier = { name = cfh_buildings_district_monument_modifier_2 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_monument_0_flag }
                add_province_modifier = { name = cfh_buildings_district_monument_modifier_1 duration = -1 }
            }
            if = {
                limit = { has_province_flag = cfh_buildings_district_citizen_poor_2_flag }
                add_province_modifier = { name = cfh_buildings_district_citizen_poor_modifier_3 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_citizen_poor_1_flag }
                add_province_modifier = { name = cfh_buildings_district_citizen_poor_modifier_2 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_citizen_poor_0_flag }
                add_province_modifier = { name = cfh_buildings_district_citizen_poor_modifier_1 duration = -1 }
            }
            if = {
                limit = { has_province_flag = cfh_buildings_district_citizen_rich_2_flag }
                add_province_modifier = { name = cfh_buildings_district_citizen_rich_modifier_3 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_citizen_rich_1_flag }
                add_province_modifier = { name = cfh_buildings_district_citizen_rich_modifier_2 duration = -1 }
            }
            else_if = {
                limit = { has_province_flag = cfh_buildings_district_citizen_rich_0_flag }
                add_province_modifier = { name = cfh_buildings_district_citizen_rich_modifier_1 duration = -1 }
            }
        }
    }
}

is there something simple I'm missing? I've ran it through the validator and I'm get 0 errors
 
the holding modifier is now working, unsure as to why/how.
The province modifiers aren't working though.
If I change it to the same modifier as the holding it works, so the event is firing properly.
I've tried creating new modifiers to use, even with the same details as the holding modifier. No use

I have not a single clue as to what the problem is
 
hey my decision wont work could anyone point out my mistake (its decision from the menu not target)
Code:
    lover = {
        potential = {
            ai = no
        }
        allow = {
        }
        effect = {
            character_event = { id = WoL.530 }   
        }
        revoke_allowed = {
            always = no
        }
        ai_will_do = {
            factor = 0
        }
    }
 
Does anyone know if the "featured Ruler" event which pops up in the frontend is moddable in any way? (aside from removing it via interface modding) so theoretically in a mod you could have random characters of interest pop-up based on timers or certain factors to give players interesting scenarios to try out?
 
Okay. I got the decision working for the most part. The only I can't get to work, is the murder never seems to result in a righteous imprisonment justification. Decision code below. I would really like it to work similar to the console command "murder" if at all possible. Anyone have any ideas?

Code:
    macs_mc_murder = {
        filter = all
        
        from_potential = {
            has_character_flag = macs_cheats_enabled
            has_character_flag = macs_mind_control_enabled
            ai = no
        }
        potential = {
            ai = yes
            prisoner = no
        }
        allow = {
            any_character = {
                has_character_flag = macs_mind_controlled
                #is_ruler = yes
            }
        }
        effect = {
            any_character = {
                limit = {
                    has_character_flag = macs_mind_controlled
                }
                
                    add_character_modifier = {
                        name = known_murderer
                        months = 48
                        hidden = no
                    }
                    
                ROOT = {
                    death = { death_reason = death_murder killer = PREV }
                }   
            }
        }
        ai_will_do = {
            factor = 0
        }
    }
 
The righteous imprisonment is part of an opinion - you would need to have it add an opinion to appropriate characters that includes prison_reason.
The easiest way is to just save the victim as an event target named target_victim, then run character_event = { id = 10 } for the killer. This is the vanilla event that automatically gives out know_murder, opinions, and kinslayer after a murderer is caught.