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

Jamie550

'
57 Badges
Jan 29, 2007
4.251
213
  • Hearts of Iron IV Sign-up
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Leviathans Story Pack
  • Victoria 2
  • 200k Club
  • 500k Club
  • Europa Universalis IV: Pre-order
  • Victoria 2 Beta
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Stellaris: Necroids
  • Stellaris: Nemesis
  • Crusader Kings II
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Sons of Abraham
  • Deus Vult
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Call to arms event
  • Arsenal of Democracy
  • For the Motherland
  • Galactic Assault
  • Hearts of Iron III
  • Heir to the Throne
  • Europa Universalis III Complete
  • Knights of Pen and Paper +1 Edition
  • Magicka
  • March of the Eagles
  • Europa Universalis III Complete
  • Victoria: Revolutions
  • Europa Universalis: Rome
  • Semper Fi
I'm curious about many things in CK2 modding, and have some random questions. More will pop up and I'll keep this post updated as time goes on.

* In events, there seem to be letter_event, narrative_event, and diploresponse_event, in addition to the normal character_event and province_event ones. Do those three (letter, narrative, diploresponse) also have character as a root? i.e. you could just use trigger = { age = 16 } inside one of them? Also, do they behave exactly the same as a character_event, except for the way to call them (i.e. use letter_event = { id=blah days=blah } instead of character_event = { id=blah days=blah })?

* In character history, how do "properties", "dna", "piety", "wealth", "raise_levies" work? In general, what things are allowed in the file?

* For modifiers, are there two distinct classes of modifiers (province modifiers and character modifiers)? If so does anyone have a list of which modifiers are character modifiers and which modifiers are province modifiers?

* Are unit types (e.g. knights) fixed or defined somewhere in text files?

* Can a modifier have 2 different icons? I think not but want to make sure.

* In traits.txt, there are "ai_*" and "*_opinion" entries. Are these also usable as modifiers? I think "*_opinion" is as I saw it in event_modifiers, but not sure about "ai_*".
 
Last edited:
* In dynasties.txt, do dynasties have to have the "culture" field or is it optional?

Yes, it is optional. Dynasties without a culture won't appear as dynastic names for random characters.

* In title history, are [holder = 0] and [holder = "-"] equivalent?

Yes, it is the same
 
How does the mod folder work now?
From Victoria II forum:

Mods are put in the "mod" folder where you installed your game. Each mod needs a description file named "<modname>.mod" and some files.

Format example for mod/coolmod.mod:
Code:
name = "My Cool Test Mod" # name of your mod, shown in launcher
path = "mod/coolmod" # location of your mod files 
archive = "mod/coolmod.zip" # you can also put your mod directly in a zip file for easier distribution (you need this or path specfied)
replace_path = "technologies"  # optional. if you want to repalce a path instead of just extend the files already in the base game (liek if you want to have completely new technologies)
user_dir = "coolmod" # optional. creates a sub directory where settings/map cache/savegames etc can be safely written for your mod and not get mixed up 
dependencies = { "someothermod" } # if you depend on another mod or dlc you can specify that here and it will get loaded first if the order is important

I tested it and works very well, better than the old way. The only problem I had is that apparently "replace_path" doesn't work yet, or maybe they changed the keyword to something different ("replace" doesn't work either). I tried to replace the whole "history" folder and it doesn't work, the vanilla files are still being used.
 
Thank you. It works and it even works with "replace"

eg. replace = "common"
Are you sure? The game certainly runs if you add that, but does it do what it should, that is, ignore any files from the same vanilla folder instead of extending it with any files you might have put in your own? It most certainly didn't do that when I tried replacing history; the characters from vanilla would still show up, and the province info would get mixed up.
 
Are you sure? The game certainly runs if you add that, but does it do what it should, that is, ignore any files from the same vanilla folder instead of extending it with any files you might have put in your own? It most certainly didn't do that when I tried replacing history; the characters from vanilla would still show up, and the province info would get mixed up.

Yes, it does. For test I created a mod in which I removed from history/titles e_byznantium all byzantine emperors with exception ot the last one. Then I created .mod file in mod folder with line: replace = "history". After I launched the game with mod and looked at history of byzantine emperors there was only the last one, so it really does work... at least for me.
 
So... a question here: does anyone have tips on how to go about adding traits?
I've been studying the files to mod and it seems the events file and the localisation file are the first ones to be tinkered with. Anything else someone would like to add?

I'd appreciate any advice!
 
So how to extend without using the extend command? I feel like is no working properly.
You don't need to use "extend" anymore; the game will auto-extend by default any folders it finds in the mod's folder without you needing to explicitly tell. In fact, extend is the only thing you can do before the patch, as Tegus just confirmed in the other thread: http://forum.paradoxplaza.com/forum/showthread.php?585442-How-to-sett-upp-a-mod-in-the-mod-directory

Yes, it does. For test I created a mod in which I removed from history/titles e_byznantium all byzantine emperors with exception ot the last one. Then I created .mod file in mod folder with line: replace = "history". After I launched the game with mod and looked at history of byzantine emperors there was only the last one, so it really does work... at least for me.
Sorry but you are mistaken, the "replace" command doesn't do what you think it does. It doesn't replace individual files, it replaces the whole folder. If it had worked, what should have happened is that everybody in Europe would have disappeared, except for the one byzantine guy you left in e_byzantium.txt.

When using replace, the game should completely ignore all contents in the replaced folder, and only use what's in your mod's folder. When using extend, it will just switch the old files with any new files in your mod's folder that share the name and add any new files it can find, but keep the ones from the vanilla folder. You just described the "extend" behavior.
 
Last edited:
Of course, now I get it. While I was all the time talking about replacing whole folder you were talking about single file. The example was based on the same assumption- I wanted to show you how "replace" really replaces whole folder and how one changed file really shows in game. :D
 
Has anyone found a way to mod the max number of duchies you can hold as King without getting a relationship penalty with your vassals? I find that default 2 are simply too restrictive to be fun.
Modding the value of the penalty would be useful too, something less than the current -10 per duchy can be dealt with.
 
So... a question here: does anyone have tips on how to go about adding traits?
I've been studying the files to mod and it seems the events file and the localisation file are the first ones to be tinkered with. Anything else someone would like to add?

I'd appreciate any advice!
You're probably going to want to modify common/traits.txt, to actually add the traits in question.

Has anyone tried altering common/defines.lua? It doesn't appear that the modified version gets used - i.e., even when you put a modified version of defines.lua in your mod common folder, the game still uses the default values. Which is a pity, as there's some important stuff in there.
 
This is what I came up with when I experimented yesterday
Code:
replace_path = "history" # doesn't replace anything. supposedly skips sub-folders?
replace_path = "history/characters" # replaces characters
 
I'm having trouble renaming a province/county.

I changed the name of the province in map/definitions.csv, I copied the history/provinces/ file from vanilla to my mod folder, renamed it, changed "title =" to the correct title that I modified in common/landed_titles.txt and then I added all the necessary localisations in a custom .csv file. Somehow, none of this did any change.

Specifically, I want to rename Yatvyagi to Luks. So I replaced every instance of yatviagi to luks.

Vanilla doesn't c_luks, right? So I don't understand why my c_luks which I added is still called the country of Yatviagi :confused:

Edit: Of course, once I post my problem, I find the solution. I didn't realize there was a localisation string for province ("PROVXXX") and that the county was named after the province.
 
Last edited: