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

Magtaius

Recruit
49 Badges
Feb 18, 2017
8
0
  • War of the Vikings
  • Stellaris: Synthetic Dawn
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Horse Lords
  • Magicka 2 - Signup Campaign
  • Europa Universalis IV: Res Publica
  • Magicka
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Jade Dragon
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • BATTLETECH - Digital Deluxe Edition
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • BATTLETECH: Heavy Metal
  • Imperator: Rome Deluxe Edition
  • Imperator: Rome Sign Up
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Crusader Kings III
  • Stellaris
  • Europa Universalis IV
  • War of the Roses
  • Magicka: Wizard Wars Founder Wizard
  • Crusader Kings II: Way of Life
  • Magicka 2
  • Crusader Kings II: Conclave
  • BATTLETECH
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • BATTLETECH: Flashpoint
  • Imperator: Rome
  • BATTLETECH: Season pass
Hi everyone,

I was wondering if anyone would be kind enough to help an inexperienced player create simple mod to set the health to 10 and fertility to 100% for all dynasty members on birth?

It would not have to be dynamic, if I can specify the dynasty reference in the mod itself it would be brilliant.

Background; I like to edit the save file of my games and grant my family members additional health and fertility to see what I can achieve with a longer life without being immortal.

If there is a way of creating and running a script for this then it would suffice as well. :)
 

YTnuBF

Captain
65 Badges
Apr 5, 2014
354
181
  • Victoria 2: A House Divided
  • Heir to the Throne
  • Magicka
  • Majesty 2
  • March of the Eagles
  • Cities in Motion 2
  • Victoria: Revolutions
  • Semper Fi
  • Sengoku
  • Sword of the Stars II
  • Europa Universalis IV: Res Publica
  • Victoria 2: Heart of Darkness
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Cossacks
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Knights of Honor
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Hearts of Iron III: Their Finest Hour
  • Crusader Kings II: Sword of Islam
  • Darkest Hour
  • Europa Universalis IV: Art of War
  • Hearts of Iron III
  • For the Motherland
  • For The Glory
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Divine Wind
  • Europa Universalis III
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings III
  • Victoria 2
  • Europa Universalis IV
  • Crusader Kings II: Conclave
  • Europa Universalis III: Collection
  • Cities: Skylines
  • Crusader Kings II: Reapers Due
  • Stellaris: Digital Anniversary Edition
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.
 

Attachments

  • dynasty_boost.zip
    1,7 KB · Views: 8
Last edited:

Alvis14

Sergeant
37 Badges
Feb 17, 2013
91
27
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings Complete
  • Crusader Kings III
  • Surviving Mars
  • Age of Wonders III
  • Crusader Kings II: Jade Dragon
  • Surviving Mars: Digital Deluxe Edition
  • Crusader Kings II: Holy Fury
  • Imperator: Rome Sign Up
  • Age of Wonders: Planetfall
  • Age of Wonders: Planetfall Deluxe edition
  • Age of Wonders: Planetfall Premium edition
  • Age of Wonders: Planetfall Season pass
  • Stellaris: Lithoids
  • Age of Wonders: Planetfall - Revelations
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II: Monks and Mystics
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Reapers Due
  • Stellaris Sign-up
  • Stellaris
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • 500k Club
  • Victoria 2
  • Europa Universalis IV
  • Crusader Kings II: Sunset Invasion
Hey, I'm using this thread to try to get ananswer to my eternal question. Does health really influence lifespan? Do you know how it works exactly ? Like, for instance, +7 health on a population guarantee you an average lifespan of 100 years for the population?