Firstly, at your //My Documents/Paradox Interactive/Crusader Kings II/mod/ folder, if you are using some sort of Windows system, create a folder for the mod.
Like dynasty_boost . Then you can start adding files into the mod's folder.
Create a folder called events in the mod's folder.
Create a .TXT file in //events/ , then add the following lines at the start of it:
Code:
# A namespace declares that all events sharing the same namespace belong together
# Multiple event files can have the same namespace and are treated as if they were all as one
namespace = dynboost
character_event = {
id = dynboost.1
# So no event pop-up is shown :
hide_window = yes
# It will only be triggered when specified :
is_triggered_only = yes
immediate = {
# If any member of this newborn's dynasty is in fact a Player, then do to this newborn character the following :
if = {
limit = {
any_dynasty_member = { ai = no }
}
# The modifier's duration is -1 so it lasts til the end of the character's life :
add_character_modifier = {
name = dynasty_fert_health
duration = -1
hidden = yes
}
}
}
}
Now create the folder called common in the mod's folder. In the new folder called common, create also the folders event_modifiers and on_actions .
Then add the specified event modifier at //common/event_modifiers/ .
Create a new text file and add the following :
Code:
dynasty_fert_health = {
# The icon is selected from a list, but here it is not important as the modifier was made invisible
# But there seemingly has to be an icon number set anyway
# If the modifier is visible, the icon will be what it looks like
icon = 1
fertility = 1.0 # 100% extra fertility
health = 10
}
You do not need to specify localization for it if you just keep it hidden.
Lastly you need to actually make the event happen.
Create a new .TXT file at //common/on_actions/ .
In that file the following lines should go :
Code:
on_birth = {
events = {
dynboost.1
}
}
Then so that the game actually knows to look for the mod's files you need a .MOD file.
Create a new .TXT file in the //My Documents/Crusader Kings II/mod/ folder and then input the following :
Code:
name="Dynasty Boost"
path="mod/dynasty_boost"
The name part doesn't matter to the game, since that's just how it will show up named in the launcher.
After that close the .TXT file. Rename it into using the same name as the mod. In this case dynasty_boost .
Then change the .TXT extension of the file into .MOD .
However as I was writing this up I also created it in the process, so you can download the mod file in my comment here.
Extract it in your //My Documents/Paradox Interactive/Crusader Kings II/mod/ folder if you are using some sort of Windows system.