If you would please answer the above poll we would be eternally grateful for your input!
Hello,
So you want to learn how to mod CK2?
Well you might be in the right place, in this guide we’re going to, step by step, go through how you add an option to an in-game event. It is probably one of the more basic things you can do with modding and this should be considered a primer to see if you want to mod more things in your game.
This guide will not go over more advanced topics, but for those interested in moving forward with their modding feel free to look over the resource available to you in the user modification forum (https://forum.paradoxplaza.com/forum/index.php?forums/crusader-kings-ii-user-modifications.682/) or the CK2 Wiki (http://www.ckiiwiki.com/Modding). We assume that you are using Windows throughout this guide, but only a few things should change for macOS or Linux.
What we want to do is change this (Image of Comet Event) to something more. We’ll do this by finding the event itself among the game files and then edit it. Let’s get started:
1) Create Your Mod
We’re going to start by creating a new mod that you can turn on/off in the launcher. A mod simply consists of a text file containing some basic information about the mod (like the name) and a folder full of content files. You can download the template mod at the end of this post.
Now, go to your “My Documents” directory and go into the folder “Paradox Interactive” and then “Crusader Kings II”. You might need to make a “mod” folder here if you don’t already have one and then you can unzip the template mod above into this directory. At the end of the process, you should have the following;
A file called: “My Documents/Paradox Interactive/Crusader Kings II/mod/getting_started.mod”
A folder called: “My Documents/Paradox Interactive/Crusader Kings II/mod/getting_started/”
2) Find your Mod in the Launcher
You have now created a very basic mod! It doesn’t do anything yet, but if you fire up the Crusader Kings 2 launcher, you should be able to click on the “Mod” tab and see “My Awesome Comet Event” in the list of mods. You can turn it on/off with the check box.
3) Find your install directory
First, a quick primer on how mods work: Whenever CK2 tries to load a file, it will always load it from a loaded mod first (if it can) before loading the file that comes bundled with the game. This means that you can copy any file from the game into your mod, change it - and you can easily change how the game looks / works or plays.
So, in order to copy a file from the game into our mod so that we can change it - we need to find the game files. The easiest way to do this is to open Steam, find CK2 in your games library, right click on the name and select properties in the menu. Choose the local files tab and then press browse local files.
4) Copy health_event.txt into your mod
We want to modify the “health_event.txt” file, which contains information about a whole bunch of events in the game - including the Comet Sighted event. While you can just edit the files directly in the game folder, this is generally a bad idea, because it will get reverted whenever you click “Verify Files” in Steam or update the game and you will lose your precious mod files.
So, for this step, you should copy the file from this folder:
“Crusader Kings II/events/health_events.txt”
To the same folder in your mod:
“My Documents/Paradox Interactive/Crusader Kings II/mod/getting_started/events/health_events.txt”
You can copy nearly any file from the base game into your mod folder and edit it to change how the game works! An awful lot of Crusader Kings II is just made up from text files - from buildings to character names and you can edit it all.
5) Open health_event.txt
Now you need to open the file that you just copied. Make sure you open the file in your mod directory and not in the game directory. We suggest using Notepad++, which is a great free text editor for Windows.
6) Locate the Comet Sighted event
If you look through the health_event.txt file you will see there are a whole bunch of events that can happen based around character’s health - from contracting leprosy to becoming a lunatic. If you search the text file for “6203” you should find the following character event...
This text describes the “Comet Sighted” event. It looks fairly complicated, but it can be broken down into 3 parts. The top part (id, desc, picture, border) describes how the event should look for the player. The middle part describes when the event should happen - so it only happens to player characters and only when your character is over 16 years old for instance. The triggers can get quite complicated, but we don’t need to worry about that now. The last part is a list of “options” which represent the buttons the user can click on.
7) Create a New Event Option
Copy the seven lines of text that makes up the “option” portion of the event text and paste it again below, make sure to include all the brackets. Your event should now look something like this…
8) Customize your New Event Option
We’re not going to do anything with the actual mechanics behind the event, so we’re leaving the “character modifier” part alone. We will just change the name of the option, so that we change the text that will be displayed on the second button. So for now just change the name from EVTOPTA6203 to ThisIsANewAddition.
Your file should now look like this - don’t forget to save it!
9) Open the Localization File
As our games support multiple languages, we cannot simply put the text that you want to appear on the button straight in the event file. Instead, we give each event a unique name and then have another text file which tells us which text to show for a button with that name depending on the user’s language.
If you downloaded the “getting_started” mod above, we have already created an empty localization file for you to put your new text in. For this step, just open the file “My Documents/Paradox Interactive/Crusader Kings II/mod/getting_started/localisation/getting_started.csv”.
10) Add Your Event Text
We’re only going to add text for English at the moment, but if you also happen to speak French, German or Spanish - feel free to add your own text there too.
Add the following text to the file:
ThisIsANewAddition;This does not seem that bad!;;;;;;;;;;;;;x
Psst. If you open this in a spreadsheet program you’ll probably get a nicer text display, but this is a quick and dirty mod, so we’re keeping it simple.
11) Save getting_started.csv
12) Open CK2 and wait for the Comet event to trigger.
This could take a long time however, so you could also be lazy and open up the dev console. To do this press the ‘§’ key on Swedish keyboards, or the button to the left of the 1 on most other keyboards. Then type…
event 6203
Now you can enjoy your handiwork!
.
13) Bonus step - Upload your mod to Steam!
Now you’ve made your awesome event mod, you might want to upload it to Steam to share with your friends. Uploading your mod to Steam simply requires launching the game and clicking a few buttons…
What Next?
If you’ve enjoyed modifying the comet sighted event throughout this guide then you’ve just scratched the surface of what you can accomplish. There are a lot of guides on the internet about modding Paradox games, and here are just some of the places where you might want to get started.
If you’re eager to take event modding to the next step, check out this event modding guide:
http://www.ckiiwiki.com/Event_modding
The CK2 Wiki has a whole section on modding in fact...
http://www.ckiiwiki.com/Modding
The forums are also a great place to get help if you run into problems, so feel free to check out the modding community on the Paradox Plaza forums.
https://forum.paradoxplaza.com/forum/index.php?forums/crusader-kings-ii-user-modifications.682/
Hello,
So you want to learn how to mod CK2?
Well you might be in the right place, in this guide we’re going to, step by step, go through how you add an option to an in-game event. It is probably one of the more basic things you can do with modding and this should be considered a primer to see if you want to mod more things in your game.
This guide will not go over more advanced topics, but for those interested in moving forward with their modding feel free to look over the resource available to you in the user modification forum (https://forum.paradoxplaza.com/forum/index.php?forums/crusader-kings-ii-user-modifications.682/) or the CK2 Wiki (http://www.ckiiwiki.com/Modding). We assume that you are using Windows throughout this guide, but only a few things should change for macOS or Linux.
What we want to do is change this (Image of Comet Event) to something more. We’ll do this by finding the event itself among the game files and then edit it. Let’s get started:
1) Create Your Mod
We’re going to start by creating a new mod that you can turn on/off in the launcher. A mod simply consists of a text file containing some basic information about the mod (like the name) and a folder full of content files. You can download the template mod at the end of this post.
Now, go to your “My Documents” directory and go into the folder “Paradox Interactive” and then “Crusader Kings II”. You might need to make a “mod” folder here if you don’t already have one and then you can unzip the template mod above into this directory. At the end of the process, you should have the following;
A file called: “My Documents/Paradox Interactive/Crusader Kings II/mod/getting_started.mod”
A folder called: “My Documents/Paradox Interactive/Crusader Kings II/mod/getting_started/”
2) Find your Mod in the Launcher
You have now created a very basic mod! It doesn’t do anything yet, but if you fire up the Crusader Kings 2 launcher, you should be able to click on the “Mod” tab and see “My Awesome Comet Event” in the list of mods. You can turn it on/off with the check box.
3) Find your install directory
First, a quick primer on how mods work: Whenever CK2 tries to load a file, it will always load it from a loaded mod first (if it can) before loading the file that comes bundled with the game. This means that you can copy any file from the game into your mod, change it - and you can easily change how the game looks / works or plays.
So, in order to copy a file from the game into our mod so that we can change it - we need to find the game files. The easiest way to do this is to open Steam, find CK2 in your games library, right click on the name and select properties in the menu. Choose the local files tab and then press browse local files.
4) Copy health_event.txt into your mod
We want to modify the “health_event.txt” file, which contains information about a whole bunch of events in the game - including the Comet Sighted event. While you can just edit the files directly in the game folder, this is generally a bad idea, because it will get reverted whenever you click “Verify Files” in Steam or update the game and you will lose your precious mod files.
So, for this step, you should copy the file from this folder:
“Crusader Kings II/events/health_events.txt”
To the same folder in your mod:
“My Documents/Paradox Interactive/Crusader Kings II/mod/getting_started/events/health_events.txt”
You can copy nearly any file from the base game into your mod folder and edit it to change how the game works! An awful lot of Crusader Kings II is just made up from text files - from buildings to character names and you can edit it all.
5) Open health_event.txt
Now you need to open the file that you just copied. Make sure you open the file in your mod directory and not in the game directory. We suggest using Notepad++, which is a great free text editor for Windows.
6) Locate the Comet Sighted event
If you look through the health_event.txt file you will see there are a whole bunch of events that can happen based around character’s health - from contracting leprosy to becoming a lunatic. If you search the text file for “6203” you should find the following character event...
This text describes the “Comet Sighted” event. It looks fairly complicated, but it can be broken down into 3 parts. The top part (id, desc, picture, border) describes how the event should look for the player. The middle part describes when the event should happen - so it only happens to player characters and only when your character is over 16 years old for instance. The triggers can get quite complicated, but we don’t need to worry about that now. The last part is a list of “options” which represent the buttons the user can click on.
7) Create a New Event Option
Copy the seven lines of text that makes up the “option” portion of the event text and paste it again below, make sure to include all the brackets. Your event should now look something like this…
Code:
mean_time_to_happen = {
months = 120
}
option = {
name = EVTOPTA6203
add_character_modifier = {
name = holy_comet
duration = -1
}
}
option = {
name = EVTOPTA6203
add_character_modifier = {
name = holy_comet
duration = -1
}
}
8) Customize your New Event Option
We’re not going to do anything with the actual mechanics behind the event, so we’re leaving the “character modifier” part alone. We will just change the name of the option, so that we change the text that will be displayed on the second button. So for now just change the name from EVTOPTA6203 to ThisIsANewAddition.
Your file should now look like this - don’t forget to save it!
9) Open the Localization File
As our games support multiple languages, we cannot simply put the text that you want to appear on the button straight in the event file. Instead, we give each event a unique name and then have another text file which tells us which text to show for a button with that name depending on the user’s language.
If you downloaded the “getting_started” mod above, we have already created an empty localization file for you to put your new text in. For this step, just open the file “My Documents/Paradox Interactive/Crusader Kings II/mod/getting_started/localisation/getting_started.csv”.
10) Add Your Event Text
We’re only going to add text for English at the moment, but if you also happen to speak French, German or Spanish - feel free to add your own text there too.
Add the following text to the file:
ThisIsANewAddition;This does not seem that bad!;;;;;;;;;;;;;x
Psst. If you open this in a spreadsheet program you’ll probably get a nicer text display, but this is a quick and dirty mod, so we’re keeping it simple.
11) Save getting_started.csv
12) Open CK2 and wait for the Comet event to trigger.
This could take a long time however, so you could also be lazy and open up the dev console. To do this press the ‘§’ key on Swedish keyboards, or the button to the left of the 1 on most other keyboards. Then type…
event 6203
Now you can enjoy your handiwork!
.
13) Bonus step - Upload your mod to Steam!
Now you’ve made your awesome event mod, you might want to upload it to Steam to share with your friends. Uploading your mod to Steam simply requires launching the game and clicking a few buttons…
- On the title screen of the game, click ‘Content’.
- Now click on the ‘MOD’ tab.
- Next to your mod, you should be able to click on a button named ‘Manage’.
- Enter a description for your mod in the text box.
- Click ‘Publish’!
What Next?
If you’ve enjoyed modifying the comet sighted event throughout this guide then you’ve just scratched the surface of what you can accomplish. There are a lot of guides on the internet about modding Paradox games, and here are just some of the places where you might want to get started.
If you’re eager to take event modding to the next step, check out this event modding guide:
http://www.ckiiwiki.com/Event_modding
The CK2 Wiki has a whole section on modding in fact...
http://www.ckiiwiki.com/Modding
The forums are also a great place to get help if you run into problems, so feel free to check out the modding community on the Paradox Plaza forums.
https://forum.paradoxplaza.com/forum/index.php?forums/crusader-kings-ii-user-modifications.682/
Attachments
Last edited:
- 6