• 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.
Yep also got it to work for Baptisms as well which was probably more important than the Coronation thing. Here is the code I used as well for it in case anyone else needs it. Thanks You again Rydelfox for helping me. Would have still been at this for days trying to figure it out instead of working on the map repaint I'm working on.

Code:
effect = {
           c_###### = {
               ROOT = {
                   save_persistent_event_target= { name = baptizing_pope_per scope = PREV }
                   add_trait = baptized_by_pope
               }
           }
  }
I wonder if it could be simplified. I see numerous examples in the history files of 'effect={ROOT={add_consort=c_######}}'. Maybe your code could cut down to:
Code:
effect = {
    ROOT = {
        save_persistent_event_target= { name = baptizing_pope_per scope = c_###### }
        add_trait = baptized_by_pope
    }
  }
 
What happens in the game, if you change in the province history file the max amount settlements, say to 7, and you haven't put in names for all 7 potential? Or what happens if you have names for cities in the file, but you create castles or churches in the game? will the game produce a church with a city name?
 
say to 7, and you haven't put in names for all 7 potential?
The holding slot cant be clicked.

Or what happens if you have names for cities in the file,
You dont have names for cities in the files, you have a title with a name and the history then assigns a type on the date of its creation, if you start before the date its created in the history files then yes it will give it the name next in the landed titles regardless of type. You can also get the same name for different holding types if a holding is destroyed and rebuilt.
 
Hey, I'm very new to modding CK2 and I've been trying to add a new government form that is available to barons when the province they're based in is of a different culture group both to their direct & top liege. I've been doing this under the potential = { } section of the feudal_governments file, however I simply have no clue how to get the game to compare the liege culture group with the province's. I have sifted through the game files and wiki for possible clues but I can't find anything of a similar nature, and everything I've tried so far has only taken into account the baron's culture and not the province's.

Does anyone have have any ideas that might help? Cheers :)
 
Try this:
Code:
capital_scope = {
   location ={
      owner = {
         top_liege = {
            NOT = { culture_group = PREVPREV }
         }
      }
   }
}

Thank you so much for your help, this looks a lot nicer than what I was trying! Would there possibly be a way to make this also work in situations where the barony is an exclave in another realm (so it takes into account the baron's de facto liege instead of the province owner)? Since this probably will only occur at the game-start I suppose one option would be to set a title flag, though I would like to make it as dynamic as possible.
 
Thank you so much for your help, this looks a lot nicer than what I was trying! Would there possibly be a way to make this also work in situations where the barony is an exclave in another realm (so it takes into account the baron's de facto liege instead of the province owner)? Since this probably will only occur at the game-start I suppose one option would be to set a title flag, though I would like to make it as dynamic as possible.
I haven't tried it, but try adding dejure_liege_title between location and owner, then changing PREVPREV to PREVPREVPREV

how do I make variables whole numbers only??

the only thing I can think of is to use a while loop to subtract 1 until it's negative (creating a new var) and subtracting it from the original (thus rounding up)
Try this:
Code:
set_variable = { which = local_temp which = my_var }
modulo_variable = { which = local_temp value = 1 }
subtract_variable = { which = my_var which = local_temp }
If this works, it will copy your variable to a temporary one, divide that by 1 and store the remainder. This will leave you with the fractional amount in the temporary variable, which is then subtracted from the original variable.
 
I haven't tried it, but try adding dejure_liege_title between location and owner, then changing PREVPREV to PREVPREVPREV.

I've given that a go but unfortunately it seems to break it. For now I've decided to just specifically reference the exclave titles and relevant cultures, it's not particularly dynamic but it seems like the most realistic option given how messy it is trying to use province culture whilst completely bypassing the province owner. Thanks again for your help!
 
The holding slot cant be clicked.
So what exactly do I have to do in order to create more holdings for a said province?

I just tested with one province originally meant to have max 2 settlements. I set it to 7 and it got to have 7 clickable ones. The cities/churches that got build in it all have names that I know are real cities or towns in that province in the real world. But I don't understand where these names are stored in the gamefiles. It certainly isn't in the history files. Do you happen to know it?
 
Last edited:
In the history files? Look in the landed tiles folder for the county in question and copy one of the 7 b_whatever baronie tiles that is unused across to the history file and set the type like the ones already there.
I don't mean to build them in the history files so that the province starts with them, I mean to create potential names for baronies for the province so that I can build them ingame with names. I just don't know where the game stores names for the baronies that you can potentially build ingame.
 
On my map repaint I've reached the Steppes and need to work on Nomads and I can't for the life of me figure out how to add in clans? I've tried numerous different things, but non seem to work. No matter what the vassals are tribal when I want them to be nomadic clans. I've looked at the title and province files and nothing in there would inform me how clans are made. At this point I'm pretty sure it's something I don't know about and I just need someone to tell me where to look.
 
Last edited:
Never mind I figured out what I was doing wrong. I left another dynasty member in their own nomadic kingdom and it prevented the other character from forming his own clan. Just needed to do the planned history changes for those provinces first to make it work.
 
Hello, I wanted to mod this duke to be the vassal of the king to his east. It's shown correctly in the tab to the right, but he appears independent on the selection map. How can I fix this?
 

Attachments

  • 20190517002740_1.jpg
    20190517002740_1.jpg
    803,4 KB · Views: 6
Quick question, how do I write in history files that a title is independent?
Its history file show that it had a liege earlier in history, is it possible to do a new liege= but this time it's independence? Or do I have to delete its earlier historic liege?