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

alfian

Major
13 Badges
Feb 17, 2013
503
72
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV
  • Mount & Blade: Warband
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Horse Lords
it does not work for dead ruler, but sometime it work, but for all ruler. I want to make only one graphic gfx, anyone help me!

Code:
modifier = {
     factor = 100
     location = {
          OR = {
               region = world_india
               region = custom_sindh
          }
     }
     OR = {
          location = {
               OR = {
                    region = world_india
                    region = custom_sindh
               }
          }
          AND = {
               is_alive = no
               is_ruler = yes
          }
     }
     is_female = no
}

EDIT : So here I adding new special crown.. but don't know how to make it for only one character.
 
Last edited:

Silversweeeper

Ichi no Hito
58 Badges
Aug 24, 2012
3.948
2.848
  • Stellaris - Path to Destruction bundle
  • 500k Club
  • Europa Universalis IV: El Dorado
  • Magicka: Wizard Wars Founder Wizard
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris: Distant Stars
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Imperator: Rome Sign Up
  • Imperator: Rome Deluxe Edition
  • Crusader Kings II: Holy Fury
  • Stellaris: Megacorp
  • Europa Universalis IV
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Europa Universalis IV: Cradle of Civilization
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: Charlemagne
  • Stellaris Sign-up
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Res Publica
  • Crusader Kings II
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis III Complete
  • Magicka
it does not work for dead ruler, but sometime it work, but for all ruler. I want to make only one graphic gfx, anyone help me!

Code:
modifier = {
     factor = 100
     location = {
          OR = {
               region = world_india
               region = custom_sindh
          }
     }
     OR = {
          location = {
               OR = {
                    region = world_india
                    region = custom_sindh
               }
          }
          AND = {
               is_alive = no
               is_ruler = yes
          }
     }
     is_female = no
}

EDIT : So here I adding new special crown.. but don't know how to make it for only one character.

I don't think dead characters have a location, and I'm unsure if dead characters can pass is_ruler = yes. It'd probably be better to use hidden traits to assign special crowns to dead people, similar to how vanilla does it.
 

swampy111

Second Lieutenant
10 Badges
Apr 3, 2019
146
13
  • Cities: Skylines
  • Magicka 2
  • Cities: Skylines - Parklife
  • Shadowrun Returns
  • Prison Architect
  • Crusader Kings III
  • Crusader Kings II
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Sons of Abraham
  • Magicka
I'm confused about chaining scopes, PREV, and how event targets (and persistent event targets) affect that.

I have a limit block that's along these lines:
Code:
any_courtier = { #it's a condition, so no need for limit
    ROOT = {
        persistent_event_target:godfather = {
            #------------------- scripted trigger ------------------
            PREVPREV = {
                persistent_event_target:godfather = { character = PREVPREV }
            }
            #------------------- scripted trigger ------------------
        }
    }
}

Here, I want to check if there are any courtiers that share the same godfather as ROOT, but I'm basically debugging a scripted trigger (one that's used a lot, and with many different scopes too), so I can't really use anything but the persistent event target (godfather) and PREVs.

As far as I understand, PREV just jumps back one level in a scope chain; so using why is the last PREVPREV not working? I did some testing (through traits, lol), and as far as I understand, PREVPREV doesn't exist in line 6 (in the code above).
 

alfian

Major
13 Badges
Feb 17, 2013
503
72
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV
  • Mount & Blade: Warband
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Horse Lords
I don't think dead characters have a location, and I'm unsure if dead characters can pass is_ruler = yes. It'd probably be better to use hidden traits to assign special crowns to dead people, similar to how vanilla does it.

Oh yes, you're right "is_ruler = yes" does not work in this case. So here I adding some Events to get the hidden Traits, correct me please.. this doesn't work at all..

Code:
character_event = {
    id = alfian.1
    hide_window = yes

    is_triggered_only = yes

    trigger = {
        capital_scope = {
            OR = {
                region = world_india
                region = custom_sindh
            }
        }
    }
 
    immediate = {
        if =  {
            limit =  {
                capital_scope = {
                    OR = {
                        region = world_india
                        region = custom_sindh
                    }
                }
            }
            add_trait = dead_indian
        }
    }
}
 

Silversweeeper

Ichi no Hito
58 Badges
Aug 24, 2012
3.948
2.848
  • Stellaris - Path to Destruction bundle
  • 500k Club
  • Europa Universalis IV: El Dorado
  • Magicka: Wizard Wars Founder Wizard
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris: Distant Stars
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Imperator: Rome Sign Up
  • Imperator: Rome Deluxe Edition
  • Crusader Kings II: Holy Fury
  • Stellaris: Megacorp
  • Europa Universalis IV
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Europa Universalis IV: Cradle of Civilization
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: Charlemagne
  • Stellaris Sign-up
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Res Publica
  • Crusader Kings II
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis III Complete
  • Magicka
Oh yes, you're right "is_ruler = yes" does not work in this case. So here I adding some Events to get the hidden Traits, correct me please.. this doesn't work at all..

Code:
character_event = {
    id = alfian.1
    hide_window = yes

    is_triggered_only = yes

    trigger = {
        capital_scope = {
            OR = {
                region = world_india
                region = custom_sindh
            }
        }
    }

    immediate = {
        if =  {
            limit =  {
                capital_scope = {
                    OR = {
                        region = world_india
                        region = custom_sindh
                    }
                }
            }
            add_trait = dead_indian
        }
    }
}

There's no need to have the add_trait in an if block, since ROOT always will pass the limit due to passing the identical trigger and you thus waste performance running an identical check. Regardless of whether that is there or not, the event should give ROOT the dead_indian trait, so if that doesn't happen I suspect one or more of the following is causing problems:

- The event is never called. is_triggered_only events need to be explicitly called from somewhere.

- The event fires for the wrong character or in a non-character scope (e.g. a province).

- One or both regions is not defined properly, or ROOT's capital isn't in either region.

- dead_indian is not defined, and thus it cannot be added.

- ROOT does not live up to the potential block for dead_indian.
 

alfian

Major
13 Badges
Feb 17, 2013
503
72
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV
  • Mount & Blade: Warband
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Horse Lords
There's no need to have the add_trait in an if block, since ROOT always will pass the limit due to passing the identical trigger and you thus waste performance running an identical check. Regardless of whether that is there or not, the event should give ROOT the dead_indian trait, so if that doesn't happen I suspect one or more of the following is causing problems:

- The event is never called. is_triggered_only events need to be explicitly called from somewhere.

- The event fires for the wrong character or in a non-character scope (e.g. a province).

- One or both regions is not defined properly, or ROOT's capital isn't in either region.

- dead_indian is not defined, and thus it cannot be added.

- ROOT does not live up to the potential block for dead_indian.

To be honest I don't really understand about Coding in the CK2.. but here actually I also add new Traits.

Code:
dead_indian = {
    hidden = yes
    random = no
    customizer = no
}

Code:
namespace=alfian

character_event = {
    id = alfian.1
    hide_window = yes

    is_triggered_only = yes
   
    only_rulers = yes

    trigger = {
        location = {
            OR = {
                region = world_india
                region = custom_sind
            }
        }
    }
   
    immediate = {
        add_trait = dead_turko_indian
    }
}

Code:
portrait_propesties.txt

19 = {
    0 = {
        hide_layers = { 5 = { } }
        hide_layers = { 31 = { } } #Prevent hedge-incompatibilities with Ducal French Overlayers.
        hide_layers = { 32 = { } } #Prevent hedge-incompatibilities with Ducal French Overlayers.
        factor = 100
        modifier = {
            factor = 0
            NOT = {
                trait = dead_turko_indian
            }
        }
        modifier = {
            factor = 0
            NOT = {
                has_portrait_property = { layer = 5 index = 0 }
            }
        }
    }
 

Rockphed

Uncultured Barbarian
19 Badges
Jan 31, 2017
1.085
93
  • Crusader Kings II
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Holy Fury
  • Shadowrun Returns
  • Surviving Mars: Digital Deluxe Edition
  • Crusader Kings II: Jade Dragon
  • Surviving Mars
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Charlemagne
I am trying to select people who can be made vassals of a merchant republic. Right now I have

Code:
limit = {
      OR = {
            is_ruler = no
            AND = {
                  is_republic = yes
                  is_patrician = no
                  lower_tier_than = ROOT
            }
      }
}

where the base scope is a patrician, but I don't think it will work right if it triggers off a patrician who isn't the doge. I want it to be flexible enough to grab mayors from baron to king tier (depending on the rank of the merchant republic).
 

swampy111

Second Lieutenant
10 Badges
Apr 3, 2019
146
13
  • Cities: Skylines
  • Magicka 2
  • Cities: Skylines - Parklife
  • Shadowrun Returns
  • Prison Architect
  • Crusader Kings III
  • Crusader Kings II
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Sons of Abraham
  • Magicka
Really dumb question here, but i didn't find anything on the wikia. Does putting stuff inside a tooltip = { } (tooltip, not custom_tooltip) block ensure that its content is not executed, but instead, only a tooltip is generated?
 

Whizzer

CKPlus Triumvirate
77 Badges
Jun 17, 2014
1.623
796
  • Semper Fi
  • Hearts of Iron III Collection
  • Heir to the Throne
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Leviathan: Warships
  • The Kings Crusade
  • Magicka
  • Victoria: Revolutions
  • Rome Gold
  • Cities in Motion
  • Sengoku
  • Sword of the Stars
  • Sword of the Stars II
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Warlock: Master of the Arcane
  • Europa Universalis IV: Mare Nostrum
  • Hearts of Iron III
  • A Game of Dwarves
  • Cities in Motion 2
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Dungeonland
  • Crusader Kings II: Sunset Invasion
  • Europa Universalis III
  • Divine Wind
  • Hearts of Iron III: Their Finest Hour
  • For the Motherland
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Conclave
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Magicka: Wizard Wars Founder Wizard
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • War of the Roses
  • Crusader Kings III
  • Europa Universalis IV
Really dumb question here, but i didn't find anything on the wikia. Does putting stuff inside a tooltip = { } (tooltip, not custom_tooltip) block ensure that its content is not executed, but instead, only a tooltip is generated?

Correct. You can use it to communicate information to more than one character, but only execute it once.
 
  • 1Like
Reactions:

Rockphed

Uncultured Barbarian
19 Badges
Jan 31, 2017
1.085
93
  • Crusader Kings II
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Holy Fury
  • Shadowrun Returns
  • Surviving Mars: Digital Deluxe Edition
  • Crusader Kings II: Jade Dragon
  • Surviving Mars
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Charlemagne
Can anyone see what is wrong with this event?

Code:
character_event = {#If a patrician dies without an heir, make a city holder the replacement instead of generating a random patrician
    id = PC.1
    hide_window = yes
    
    is_triggered_only = yes
    is_patrician = yes
    
    
    trigger = {
        player_heir = {
            NOT = {dynasty = ROOT}
        }

    }
    
    immediate = {
        liege = {
            limit = {is_patrician = yes}
            save_event_target_as = target_liege
        }
        liege = {
            limit = {NOT = {is_patrician = yes}}
            ROOT = {save_event_target_as = target_liege}
        }
        any_vassal = {
            limit = {
                is_republic = yes
                is_patrician = no
                NOT = {
                        any_dynasty_member = {is_patrician = yes}
                }
            }
            set_character_flag = patrician_usurper_of_@ROOT
        }
        liege = {
            limit = {
                is_patrician = yes
            }
            any_vassal = {
                limit = {
                    is_republic = yes
                    is_patrician = no
                    NOT = {
                        any_dynasty_member = {is_patrician = yes}
                    }
                }
                set_character_flag = patrician_usurper_of_@ROOT
            }
        }
        any_dynasty_member = {
            limit = {
                is_female = yes
                is_married_matrilineally = no
            }
            spouse = {
                limit = {
                    OR = {
                        is_ruler = no
                        AND = {
                            is_republic = yes
                            is_patrician = no
                            lower_tier_than = event_target:target_liege
                            
                            
                        }
                    }
                    NOT = {
                        any_dynasty_member = {is_patrician = yes}
                    }
                }
                set_character_flag = patrician_usurper_of_@ROOT
            }
        }
        random_character = {
            limit = {
                has_character_flag = patrician_usurper_of_@ROOT
            }
            set_defacto_liege = event_target:target_liege
            create_family_palace = yes
        }
        any_character = {
            limit = {
                has_character_flag = patrician_usurper_of_@ROOT
            }
            clr_character_flag = patrician_usurper_of_@ROOT
        }
    }
    
}
 

CFH1985

Second Lieutenant
26 Badges
Mar 6, 2018
113
7
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Res Publica
  • Crusader Kings II
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Charlemagne
what is the best way to set as a variable to max levies of a realm? It needs to include only feudal rulers and not include mercenaries, retinues, vassals etc

I've tried
Code:
        any_realm_lord = {
            limit = {
                higher_real_tier = baron
                is_feudal = yes
            }
            any_demesne_title = {
                limit = {
                    holding_type = castle
                }
                export_to_variable = { which = local_levy_var value = holding_raisable_levy }
                change_variable = { which = local_holding_levy_count_var which = local_levy_var }
            }
        }
        any_demesne_title = {
            limit = {
                holding_type = castle
            }
            export_to_variable = { which = local_levy_var value = holding_raisable_levy }
            change_variable = { which = local_holding_levy_count_var which = local_levy_var }
        }
        set_variable = { which = test_holding_levy_var which = local_holding_levy_count_var }
        any_demesne_title = {
            limit = {
                holding_type = castle
            }
            export_to_variable = { which = local_own_levy_var value = holding_raisable_levy }
            change_variable = { which = local_own_holding_levy_count_var which = local_own_levy_var }
        }
        set_variable = { which = test_own_holding_levy_var which = local_own_holding_levy_count_var }

but it's returning the same value for test_own_holding_levy_var and test_holding_levy_var which is obviously wrong
Also, test_own_holding_levy_var doesn't match up with the military screen, seems more like levy+garrison

*edit* corrected higher_real_tier to higher_real_tier_than - the values are now different from each other, as they should be, but it still seems more like it's returning levy+garrison
 
Last edited:

Whizzer

CKPlus Triumvirate
77 Badges
Jun 17, 2014
1.623
796
  • Semper Fi
  • Hearts of Iron III Collection
  • Heir to the Throne
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Leviathan: Warships
  • The Kings Crusade
  • Magicka
  • Victoria: Revolutions
  • Rome Gold
  • Cities in Motion
  • Sengoku
  • Sword of the Stars
  • Sword of the Stars II
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Warlock: Master of the Arcane
  • Europa Universalis IV: Mare Nostrum
  • Hearts of Iron III
  • A Game of Dwarves
  • Cities in Motion 2
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Dungeonland
  • Crusader Kings II: Sunset Invasion
  • Europa Universalis III
  • Divine Wind
  • Hearts of Iron III: Their Finest Hour
  • For the Motherland
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Conclave
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Magicka: Wizard Wars Founder Wizard
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • War of the Roses
  • Crusader Kings III
  • Europa Universalis IV
what is the best way to set as a variable to max levies of a realm? It needs to include only feudal rulers and not include mercenaries, retinues, vassals etc

(snip)

but it's returning the same value for test_own_holding_levy_var and test_holding_levy_var which is obviously wrong
Also, test_own_holding_levy_var doesn't match up with the military screen, seems more like levy+garrison

*edit* corrected higher_real_tier to higher_real_tier_than - the values are now different from each other, as they should be, but it still seems more like it's returning levy+garrison

This calculation won't account for various modifiers that reduce a vassal's provided levy, so it will be higher than the actual max levies of a realm.
 

CFH1985

Second Lieutenant
26 Badges
Mar 6, 2018
113
7
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Res Publica
  • Crusader Kings II
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Charlemagne
This calculation won't account for various modifiers that reduce a vassal's provided levy, so it will be higher than the actual max levies of a realm.
would those be modifiers applied to the holdings or characters?

I want to add all the feudal levies together (in the entire realm) which will then be used to calculate the size of my "legions" (mercenaries available to any king+ in realm) .
The size and number of the mercenaries will be adjusted on an ongoing basis (never decreased though) with modifiers applied/removed to/from the holdings to reduce the total feudal realm levies inline with the total size of the legions.
 

Rockphed

Uncultured Barbarian
19 Badges
Jan 31, 2017
1.085
93
  • Crusader Kings II
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Holy Fury
  • Shadowrun Returns
  • Surviving Mars: Digital Deluxe Edition
  • Crusader Kings II: Jade Dragon
  • Surviving Mars
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Charlemagne
You can't use limit inside a singular scope like liege. Use if instead.
Thank you. Now that the event works I just need to get it to do everything I want. Muwahahahaha!

I'm interested in this modding idea and actually I've done one. Would you wanna give it a try?

I have the event working thanks to Whizzer. I just have some peripheral stuff to clean up (like making sure that the new Patrician has a dynasty). Once I have those taken care of I'll post a thread for the mod. It only really will have 2 events in 2 files (an on_death to call the event you quoted and the event). I might make a third event to generate a family for the new patrician (since generating a family in the game rule events is incredibly verbose).
 
Last edited:

SRTX_999

Corporal
11 Badges
Sep 12, 2020
41
2
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: The Old Gods
  • Europa Universalis IV
  • Victoria 2
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Crusader Kings II: Holy Fury
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
For some reason I get this error.

Code:
[persistent.cpp:40]: Error: "Unexpected token: cahudran, near line: 13" in file: "common/religions/baron.txt"

Also, for some reason, the "playable" is not working. I only get this error for this religion group.

Code:
[persistent.cpp:40]: Error: "Unexpected token: playable, near line: 5" in file: "common/religions/baron.txt"

This the religion group. The other religion is probably fine, because there is no error of it.


Code:
baron = {
    
    graphical_cultures = muslimgfx
    
    playable = yes
    
    color = { 0 0 0 }
    
    ai_convert_same_group = 2
        
    ai_convert_other_group = 0
    
    cahudran = {
        
        icon = 5
        
        color = { 0.1 0 0.15 }
        
        scripture_name = GRIMOIRES_OF_MENDEZ
        
        god_names = { CAHUD CAHUDA }
        
        high_god_name = CAHUD
        
        evil_god_names = { CHUBU }
        
        priest_title = CEHUM
        
        can_excommunicate = yes
        
        can_grant_divorce = yes
        
        can_grant_claim = yes
        
        can_have_antipopes = yes
        
        can_retire_to_monastery = yes
        
        priests_can_marry = yes
        
        priests_can_inherit = no
        
        feminist = yes
        
        max_wives = 1
        
        female_temple_holders = yes
        
        max_consorts = 1
        
        aggression = 1
        
        men_can_take_consorts = yes
        
        women_can_take_consorts = yes
        
        hard_to_convert = yes
        
        castes = yes
        
        caste_opinions = yes
        
        rel_head_defense = yes
        
        interface_skin = zun_interface
        }

    stellarism = {
        
        icon = 49
        
        color = { 1 0.84 0 }
        
        scripture_name = GRIMOIRES_OF_PROXIMA
        
        god_names = { THE_SUN THE_MOON THE_STARS }
        
        high_god_name = THE_SUN
        
        evil_god_names = { THE_DARKNESS THE_CHAOS }
        
        priest_title = STELL
        
        can_excommunicate = yes
        
        can_grant_divorce = yes
        
        can_grant_claim = yes
        
        can_have_antipopes = yes
        
        can_retire_to_monastery = yes
        
        priests_can_marry = yes
        
        priests_can_inherit = no
        
        max_wives = 1
        
        max_consorts = 1
        
        aggression = 1
        
        men_can_take_consorts = yes
        
        hard_to_convert = yes
        
        castes = yes
        
        caste_opinions = yes
        
        rel_head_defense = yes
        
        interface_skin = taoist_interface
        }

    sertoxyanism = {
        
        icon = 43
        
        color = { 0 0 0 }
        
        scripture_name = LEGEND_OF_THE_FOUR
        
        god_names = { ABYSSAL QLIPPOTH TRIHEXA }
        
        high_god_name = ABYSSAL
        
        evil_god_names = { THE_TWO }
        
        can_excommunicate = no
        
        can_grant_divorce = yes
        
        priests_can_marry = yes
        
        priests_can_inherit = yes
        
        priest_title = PRIEST
        
        priest_title_female = PRIESTESS
        
        feminist = yes
        
        female_temple_holders = yes
        
        aggression = 1.9
        
        max_consorts = 1
        
        men_can_take_consorts = yes
        
        women_can_take_consorts = yes
        
        hard_to_convert = yes
        
        interface_skin = taoist_interface
        
        parent = cahudran
        }
}