• 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.
I beg your pardon, it's actually called government_table.csv. It's in the main eu4_converter folder
I looked at it, and didn't understand it at all. How exactly would I change what's required to make it so it's based off of centralization?
 
I looked at it, and didn't understand it at all. How exactly would I change what's required to make it so it's based off of centralization?
It takes government_flavors which you need to set up with regular CKII modding and converts them to EU4 governments with a given number of vassals. Making it key off centralisation doesn't have anything to do with government_table.csv, you need to set that up beforehand in government_flavor. This is in the folder of the same name in common. Mostly the vanilla entries key off council authority but the same "has_law" tests can be used to key off centralisation. It's also possible to key it off religion, traits, culture, and probably a great many other things. It's a very versatile tool for the converter, the only problem is that it apparently requires Conclave.
 
It takes government_flavors which you need to set up with regular CKII modding and converts them to EU4 governments with a given number of vassals. Making it key off centralisation doesn't have anything to do with government_table.csv, you need to set that up beforehand in government_flavor. This is in the folder of the same name in common. Mostly the vanilla entries key off council authority but the same "has_law" tests can be used to key off centralisation. It's also possible to key it off religion, traits, culture, and probably a great many other things. It's a very versatile tool for the converter, the only problem is that it apparently requires Conclave.
Would it be possible in the government flavor file to make a type that applies to the HRE if they are are decentralized and elective, and if not then to Francia for example?
 
Would it be possible in the government flavor file to make a type that applies to the HRE if they are are decentralized and elective, and if not then to Francia for example?
Of course it would, but that won't help you change the HRE mechanics because as we discussed earlier that's not how that part of the converter works.
 
Of course it would, but that won't help you change the HRE mechanics because as we discussed earlier that's not how that part of the converter works.
Well couldn't I basically make my list of nations, and go through it and the first to make my requirements have the variable be named after. Then (still in the non converter mod) give that natjon the government flavor and use that flavor to determine which natjon is HRE'd?
 
Well couldn't I basically make my list of nations, and go through it and the first to make my requirements have the variable be named after. Then (still in the non converter mod) give that natjon the government flavor and use that flavor to determine which natjon is HRE'd?
No, because government_table.csv doesn't decide which title is HRE'd. I thought you were already familiar with how that worked. It's the title specified in defines.lua, unless you're changing that dynamically somehow you can't make it dynamic.
 
No, because government_table.csv doesn't decide which title is HRE'd. I thought you were already familiar with how that worked. It's the title specified in defines.lua, unless you're changing that dynamically somehow you can't make it dynamic.
I'm aware of that, but does it literally have to be a title? So you can't say whichever natjon has this government flavor?
 
I think local_build_cost_modifier does work but only when used in a province modifier, not a building. So, you could make an event to add a province modifier upon completion of a certain building. However, that would affect all holdings in the province, so not exactly what you are asking for.
Yeah, that's the problem unfortunately :/ I only want it to apply to one holding to stop the Ruler being able to build 'normal' buildings there . Thanks for replying, though :)

Is there a way to force a create_character to also be a heir/heiress of the player's faction?
To expand on this, I'm thinking of doing like dynasty=ROOT, culture=ROOT, religion=ROOT
You can definitely add them to the Player's/another character's Dynasty using PREV (Never tried Root, but I'd assume that works too). From what I've seen, the game only checks if they are the same Dynasty, not any bloodline's/family tree, so that should work -- but as per the discussion on the previous change, they'll still be subject to the normal Succession rules, rather than being the absolute-definite heir.

(In fact, isn't there a... Wolf Child Event, where you adopt a baby? You could double check that, and see how it was done officially)
 
How do you use the console to remove tyranny? I looked it up and the methods don't work

As far as I know there is no console command to remove opinion modifiers. However, you could create an event that only is triggered from the console (or from a decision that only the player can use, to avoid the AI pressing it to see what the button does) that takes care of it.

Code:
character_event = {
   id = tyrant.1
   hide_window = yes
   is_triggered_only = yes
   
   immediate = {
       any_opinion_modifier_target = {
           limit = {
               has_opinion_modifier = {
                   who = ROOT
                   modifier = opinion_tyrant
               }
           }
           remove_opinion = {
               who = ROOT
               modifier = opinion_tyrant
           }
       }
   }
}

I haven't tested the above code, but it should work if it is placed in a file in the events folder and you add "namespace = tyrant" at the top of the file.

Is there a way to force a create_character to also be a heir/heiress of the player's faction?

To expand on this, I'm thinking of doing like dynasty=ROOT, culture=ROOT, religion=ROOT

You can use an on_death event that checks if the dying character has some opinion modifier of any character (ideally narrowed down to characters in their court as any_character is a very demanding scope) and abdicate to that character.
 
Hello, is there a way to enable hordes to have 'vassal' clans belonging to different cultures? So for example make it possible for a pecheneg clan to join the Magyars (even if with using modding and/or console commands) ? As it happened in history?
 
Hello, is there a way to enable hordes to have 'vassal' clans belonging to different cultures? So for example make it possible for a pecheneg clan to join the Magyars (even if with using modding and/or console commands) ? As it happened in history?

I have found a way to do it through war (which probably would be possible to adapt to make it work using a decision). Below is a heavily modified nomad_subjugation CB that you can reuse or modify to suit your needs. Several of the changes are unnecessary to handle the subjugation, as I took it out of my mod without removing the superfluous bits, so you might want to tweak the can_use and ai_will_do blocks if you are going to use it as a CB.

Code:
# 61: Nomads can subjugate other Nomads
nomad_subjugation = {
   name = CB_NAME_PAGAN_SUBJUGATION
   war_name = WAR_NAME_PAGAN_SUBJUGATION
   sprite = 8
   truce_days = 365
   is_holy_war = yes
   is_permanent = yes
   check_all_titles = yes
   can_ask_to_join_war = yes
   allowed_to_target_tributaries = no
   allowed_to_target_suzerains = no

   can_use = {
       ROOT = {
           NOT = {
               has_opinion_modifier = {
                   who = FROM
                   modifier = forbidden_raid_target # Danegeld
               }
           }
       }
       ROOT = {
           NOT = {
               has_opinion_modifier = {
                   who = FROM
                   modifier = opinion_my_ally_new
               }
           }
       }
       ROOT = {
           prestige = 1000
           is_nomadic = yes
           independent = yes
           NOT = {
               same_realm = FROM
           }
           mercenary = no
           NOR = {
               pays_tribute_to = FROM
               FROM = {
                   pays_tribute_to = ROOT
               }
           }
           NOT = {
               has_character_modifier = launched_subjugation
           }
           NOT = {
               has_character_modifier = lost_independence_war
           }
       }
   }

   can_use_title = {
       tier = king
       has_holder = yes
       holder_scope = {
           OR = {
               character = FROM
               is_liege_or_above = FROM
           }
           is_nomadic = yes
           any_realm_province = {
               any_neighbor_province = {
                   has_owner = yes
                   owner = {
                       OR = {
                           character = ROOT
                           is_liege_or_above = ROOT
                       }
                   }
               }
           }
       }
   }

   on_add = {
       if = {
           limit = {
               FROM = {
                   has_opinion_modifier = {
                       who = ROOT
                       modifier = forbidden_raid_target # Danegeld
                   }
               }
           }
           FROM = {
               opinion = {
                   who = ROOT
                   modifier = opinion_attacked_danegeld
                   months = 1200 # For life
               }
               any_realm_lord = {
                   opinion = {
                       who = ROOT
                       modifier = opinion_attacked_danegeld
                       months = 1200 # For life
                   }
               }
           }
       }
       ROOT = {
           add_character_modifier = {
               name = launched_subjugation
               months = 120
               hidden = yes
           }
       }
       prestige = -500
       ROOT = {
           clr_character_flag = vassal_cta_offensive
       }
       FROM = {
           clr_character_flag = vassal_cta_defensive
       }
   }

   is_valid = {
       ROOT = {
           NOR = {
               pays_tribute_to = FROM
               any_liege = {
                   OR = {
                       pays_tribute_to = FROM
                       FROM = {
                           pays_tribute_to = PREV
                       }
                   }
               }
           }
           is_nomadic = yes
           NOT = {
               same_realm = FROM
           }
#           NOT = {
#               has_character_modifier = lost_independence_war
#           }
       }
   }

   on_success = {
       ROOT = {
           prestige = 1000
       }
       any_attacker = {
           limit = {
               character = ROOT
           }
           participation_scaled_prestige = 100
       }
       any_attacker = {
           limit = {
               NOT = {
                   character = ROOT
               }
           }
           participation_scaled_prestige = 100
       }
       
       FROM = {
           opinion = {
               who = ROOT
               modifier = opinion_subjugated
               months = 120
           }
       }
   }
   
   on_success_title = {
       holder_scope = {
           top_liege = {
               any_vassal = {
                   limit = {
                       NOT = {
                           tier = baron
                       }
                   }
                   
                   opinion = {
                       who = ROOT
                       modifier = to_be_subjugated
                       months = 1
                   }
                   set_defacto_liege = THIS
                   any_demesne_title = {
                       limit = {
                           tier = emperor
                           is_titular = yes
                           is_primary_holder_title = no
                       }
                       unsafe_destroy_landed_title = this
                   }
                   character_event = {
                       id = nomad.2
                   }
               }
       #           set_defacto_liege = THIS
               
               any_demesne_title = {
                   limit = {
                       tier = emperor
                       is_titular = yes
                       is_primary_holder_title = no
                   }
                   unsafe_destroy_landed_title = this
               }
               any_demesne_title = {
                   limit = {
                       OR = {
                           higher_tier_than = ROOT
                           tier = emperor
                       }
                   }
                   ROOT = {
                       grant_title = { target = PREV type = invasion }
                   }
                   add_pressed_claim = FROM
                   FROM = {
                       set_character_flag = had_higher_titles
                   }
               }

               any_demesne_title = {
                   limit = {
                       tier = ROOT
                   }
                   ROOT = { grant_title = { target = PREV type = invasion } }
                   add_pressed_claim = PREV
               }
               if = {
                   limit = {
                       has_character_flag = had_higher_titles
                   }
                   set_defacto_liege = ROOT
                   clr_character_flag = had_higher_titles
                   break = yes
               }
               
               set_defacto_liege = ROOT
               
               opinion = {
                   who = ROOT
                   modifier = opinion_subjugated
                   months = 120
               }
           }
       }
       any_independent_ruler = {
           limit = {
               has_opinion_modifier = {
                   who = ROOT
                   modifier = to_be_subjugated
               }
           }
           
           any_demesne_title = {
               limit = {
                   tier = emperor
                   is_titular = yes
                   is_primary_holder_title = no
               }
               unsafe_destroy_landed_title = this
           }
           set_character_flag = to_be_subjugated
           any_demesne_title = {
               limit = {
                   OR = {
                       higher_tier_than = ROOT
                       tier = emperor
                   }
               }
               ROOT = {
                   grant_title = { target = PREV type = invasion }
               }
               add_pressed_claim = FROM
               FROM = {
                   set_character_flag = had_higher_titles
               }
           }
           any_demesne_title = {
               limit = {
                   tier = ROOT
               }
               ROOT = { grant_title = { target = PREV type = invasion } }
               add_pressed_claim = PREV
           }

           if = {
               limit = {
                   has_character_flag = had_higher_titles
               }
               set_defacto_liege = ROOT
               clr_character_flag = had_higher_titles
               break = yes
           }
           
           set_defacto_liege = ROOT
           opinion = {
               who = ROOT
               modifier = opinion_subjugated
               months = 120
           }
           remove_opinion = {
               who = ROOT
               modifier = to_be_subjugated
           }
       }
   }
 
    on_success_posttitle = {
       any_independent_ruler = {
           limit = {
               has_opinion_modifier = {
                   who = ROOT
                   modifier = to_be_subjugated
               }
           }
           any_demesne_title = {
               limit = {
                   tier = emperor
                   is_titular = yes
                   is_primary_holder_title = no
               }
               unsafe_destroy_landed_title = this
           }
           set_character_flag = to_be_subjugated
           any_demesne_title = {
               limit = {
                   OR = {
                       higher_tier_than = ROOT
                       tier = emperor
                   }
               }
               ROOT = {
                   grant_title = { target = PREV type = invasion }
               }
               add_pressed_claim = FROM
               FROM = {
                   set_character_flag = had_higher_titles
               }
           }
           any_demesne_title = {
               limit = {
                   tier = ROOT
               }
               ROOT = { grant_title = { target = PREV type = invasion } }
               add_pressed_claim = PREV
           }

           if = {
               limit = {
                   has_character_flag = had_higher_titles
               }
               set_defacto_liege = ROOT
               clr_character_flag = had_higher_titles
               break = yes
           }
           
           set_defacto_liege = ROOT
           opinion = {
               who = ROOT
               modifier = opinion_subjugated
               months = 120
           }
           remove_opinion = {
               who = ROOT
               modifier = to_be_subjugated
           }
       }
       ROOT = {
           any_demesne_title = {
               limit = {
                   tier = emperor
                   is_titular = yes
                   is_primary_holder_title = no
               }
               unsafe_destroy_landed_title = this
           }
           character_event = {
               id = nomad.1
           }
       }
   }
   
   on_fail = {
       FROM = {
           prestige = 500
       }
       any_defender = {
           limit = { character = FROM }
           participation_scaled_prestige = 50
       }
       any_defender = {
           limit = { NOT = { character = FROM } }
           hidden_tooltip = { participation_scaled_prestige = 50 }
       }
       ROOT = {
           prestige = -500
       }
   }

   on_reverse_demand = {
       ROOT = {
           # A failed nomadic subjugator might lose more than the war...
           any_vassal = {
               limit = {
                   higher_tier_than = baron
               }
               character_event = { id = breakoff.1}
           }
       }
       ROOT = {
           prestige = -2000
           transfer_scaled_wealth = {
               to = FROM
               value = 2.0
           }
       }
       FROM = {
           prestige = 1000
       }
       FROM = {
           if = {
               limit = {
                   has_dlc = "Legacy of Rome"
                   OR = {
                       has_landed_title = e_eastern_roman_empire
                       has_landed_title = e_roman_empire
                   }
               }
               hidden_tooltip = { character_event = { id = LoR.30 days = 12 } }
           }
       }
       any_defender = {
           limit = { character = FROM }
           participation_scaled_prestige = 100
       }
       any_defender = {
           limit = { NOT = { character = FROM } }
           hidden_tooltip = { participation_scaled_prestige = 100 }
       }
   }

   attacker_ai_victory_worth = {
       factor = 200
   }
   
   attacker_ai_defeat_worth = {
       factor = 100
   }

   defender_ai_victory_worth = {
       factor = -1 # always accept
   }
   
   defender_ai_defeat_worth = {
       factor = 100
   }
   
   ai_will_do = {
       factor = 1000
       modifier = {
           factor = 0.1
           FROM = {
               OR = {
                   has_opinion_modifier = {
                       who = ROOT
                       modifier = forbidden_raid_target # Danegeld
                   }
                   any_realm_lord = {
                       has_opinion_modifier = {
                           who = ROOT
                           modifier = forbidden_raid_target # Danegeld
                       }
                   }
               }
           }
       }
       modifier = {
           factor = 0.01
           FROM = {
               NOR = {
                   religion = ROOT
                   culture = ROOT
               }
               is_tribal = yes
           }
       }
       modifier = {
           factor = 0
           FROM = {
               NOR = {
                   religion_group = ROOT
                   culture_group = ROOT
               }
               is_tribal = yes
           }
       }
   }
}

You also need a couple of events as below to make it work.

Code:
namespace = nomad

# Destroy extra empires for nomads
character_event = {
   id = nomad.1
   hide_window = yes
   only_playable = yes
   only_independent = yes
   is_triggered_only = yes
   
   immediate = {
       any_demesne_title = {
           limit = {
               tier = emperor
               is_titular = yes
               is_primary_holder_title = no
           }
           unsafe_destroy_landed_title = this
       }
   }
}

# Force subjugate nomads
character_event = {
   id = nomad.2
   hide_window = yes
   only_playable = yes
   only_independent = yes
   is_triggered_only = yes
   
   immediate = {
       any_demesne_title = {
           limit = {
               tier = emperor
               is_titular = yes
               is_primary_holder_title = no
           }
           unsafe_destroy_landed_title = this
       }
       any_demesne_title = {
           limit = {
               OR = {
                   higher_tier_than = FROM
                   tier = emperor
               }
           }
           FROM = {
               grant_title = { target = PREV type = invasion }
           }
           add_pressed_claim = ROOT
       }
       set_defacto_liege = FROM
       FROM = {
           character_event = { id = nomad.1 }
       }
   }
}
 
Okay, so I had this problem where this new culture I createds dynasties would just appear as blank for courtiers, but then I found out that it happens for all the cultures courtiers randomly. So I normally had been using mods to summon courtiers but yesterday when I tried using the vanilla spawn courtier, I got courtiers of my new culture with dynasties named after baronies. So I thought the problem was sort of fixed, and gave these courtiers some land in Egypt. Well now, when I loaded up my game today, they now randomly have no culture, are all part of this huge unnamed dynasty of 250+ members, and inside that dynasty are counts and dukes from all over the game from Spain to Mongolia. Please help me!
 
Is there a fairly simple way to ensure that if a character goes heretic they convert to a specific heresy based on a pre-existing trait?
 
Is there a fairly simple way to ensure that if a character goes heretic they convert to a specific heresy based on a pre-existing trait?

Create an on_character_convert_religion event, e.g.

Code:
namespace = misc

character_event = {
   id = misc.1
   is_triggered_only = yes
   hide_window = yes
   
   trigger = {
       FROM = {
           religion = catholic # The character was a Catholic
       }
       is_heretic = yes # The character is now a heretic
       trait = go_cathar
   }
   
   immediate = {
       religion = cathar
   }
}
 
  • 1
Reactions:
Is there a way to build Trade Post buildings via event?

I tried using an "add_building" command inside an "any_trade_post" scope, but it didn't work.
 
I've got a question on variables. I'd like to be able to set a variable on a character based on the same variable for that character's parent. The wiki says that a variable can be set like so:

A scope (in the form of ROOT/FROM/PREV/THIS) which contains a variable with the same name: (set|change|subtract|multiply|divide)_variable = { which = <variable_name> which = <scope> }

Are those the only scopes possible? I tried doing "set_variable = { which = my_var which = father_even_if_dead }", but that didn't work.
 
I've got a question on variables. I'd like to be able to set a variable on a character based on the same variable for that character's parent. The wiki says that a variable can be set like so:

A scope (in the form of ROOT/FROM/PREV/THIS) which contains a variable with the same name: (set|change|subtract|multiply|divide)_variable = { which = <variable_name> which = <scope> }

Are those the only scopes possible? I tried doing "set_variable = { which = my_var which = father_even_if_dead }", but that didn't work.
I believe only ROOT/FROM/PREV/THIS work as the right hand side for a which argument. What you would want to do is something like father = { ROOT = { set_variable = { which = my_var which = PREV } } }
 
  • 1
  • 1
Reactions: