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

Silversweeeper

Ichi no Hito
58 Badges
Aug 24, 2012
3.943
2.840
  • Stellaris - Path to Destruction bundle
  • 500k Club
  • Europa Universalis IV: El Dorado
  • Magicka: Wizard Wars Founder Wizard
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris: Distant Stars
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Imperator: Rome Sign Up
  • Imperator: Rome Deluxe Edition
  • Crusader Kings II: Holy Fury
  • Stellaris: Megacorp
  • Europa Universalis IV
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Europa Universalis IV: Cradle of Civilization
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: Charlemagne
  • Stellaris Sign-up
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Res Publica
  • Crusader Kings II
  • 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: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis III Complete
  • Magicka
Hi, what exactly would I need to do for making triplets apart of the game? I’ve already created the traits for it, but I’m not exactly sure what I need to do for the event part.

I don't think that the game normally allows for more than twins, but I think that you can use unsafe_impregnate/_cuckoo = yes to make someone that's pregnant pregnant with additional children.

However, there are a few things you probably want to check before you use it:

- It's possible weird things happen (e.g. births months apart) if you use it at a later date than the date at which the initial pregnancy starts, and as on_pregnancy is two months after the start of the pregnancy any strange behaviour would mean you only can use it alongside impregnate/_cuckoo = yes, and thus only in event-started pregnancies (pregnancies between spouses/consorts are usually not event-started).

- Unless I'm wrong, impregnate/_cuckoo = yes innately has a (small) chance to make someone pregnant with twins, so if someone already is expecting twins you might get quadruplets rather than triplets. I also don't think there's any way to check how many children someone is expecting (outside of checking with the console/in the save), so an approach like "Check if a single child, then maybe add 1-2" is unlikely to be an option.
 
  • 1
Reactions:

jursamaj

General
125 Badges
Aug 20, 2012
2.360
216
  • Victoria 2: Heart of Darkness
  • Hearts of Iron III
  • Heir to the Throne
  • Knights of Pen and Paper +1 Edition
  • Cities in Motion
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Stellaris: Galaxy Edition
  • Stellaris - Path to Destruction bundle
  • Victoria 2: A House Divided
  • Leviathan: Warships
  • Rome: Vae Victis
  • Stellaris
  • Europa Universalis IV: Pre-order
  • Magicka 2 - Signup Campaign
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Cossacks
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Call to arms event
  • 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
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis III
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis III Complete
  • Europa Universalis IV: Conquest of Paradise
  • Divine Wind
  • Europa Universalis IV: Art of War
  • Europa Universalis III: Chronicles
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Conclave
  • Europa Universalis III Complete
  • Europa Universalis IV: Common Sense
  • Europa Universalis III Complete
  • Pillars of Eternity
  • Europa Universalis IV
  • Europa Universalis IV: El Dorado
  • 500k Club
  • Stellaris Sign-up
  • Hearts of Iron IV Sign-up
  • Hearts of Iron IV: No Step Back
Hi, what exactly would I need to do for making triplets apart of the game? I’ve already created the traits for it, but I’m not exactly sure what I need to do for the event part.
It's funny, I was asking questions like this in summer of 2013, which is why the thread I posted here showed up when I googled for info on this.

Anyway, it seems that nothing in the save file distinguishes a regular pregnancy from a twin pregnancy, so twinning happens at birth. That part is hard-coded. But apparently there used to be a mod that created triplets (altho I've only heard of it, not seen it). It still calls them all 'twins'. I don't have any more detail than that.

With scripting commands that have been added since then, it seems it would be even easier to do. The best way would seem to be to catch the on_birth event, detect a new twin, and randomly decide if there will be a triplet. If so, re-impregnate the mother (with the same father, possibly as cuckoo), use the give_birth command, and give the new baby the twin trait. Using the give_birth command this way will do all the normal stuff a new baby gets, whereas just creating a baby wouldn't.
 

jursamaj

General
125 Badges
Aug 20, 2012
2.360
216
  • Victoria 2: Heart of Darkness
  • Hearts of Iron III
  • Heir to the Throne
  • Knights of Pen and Paper +1 Edition
  • Cities in Motion
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Stellaris: Galaxy Edition
  • Stellaris - Path to Destruction bundle
  • Victoria 2: A House Divided
  • Leviathan: Warships
  • Rome: Vae Victis
  • Stellaris
  • Europa Universalis IV: Pre-order
  • Magicka 2 - Signup Campaign
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Cossacks
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Call to arms event
  • 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
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis III
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis III Complete
  • Europa Universalis IV: Conquest of Paradise
  • Divine Wind
  • Europa Universalis IV: Art of War
  • Europa Universalis III: Chronicles
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Conclave
  • Europa Universalis III Complete
  • Europa Universalis IV: Common Sense
  • Europa Universalis III Complete
  • Pillars of Eternity
  • Europa Universalis IV
  • Europa Universalis IV: El Dorado
  • 500k Club
  • Stellaris Sign-up
  • Hearts of Iron IV Sign-up
  • Hearts of Iron IV: No Step Back
I don't think that the game normally allows for more than twins, but I think that you can use unsafe_impregnate/_cuckoo = yes to make someone that's pregnant pregnant with additional children.

However, there are a few things you probably want to check before you use it:

- It's possible weird things happen (e.g. births months apart) if you use it at a later date than the date at which the initial pregnancy starts, and as on_pregnancy is two months after the start of the pregnancy any strange behaviour would mean you only can use it alongside impregnate/_cuckoo = yes, and thus only in event-started pregnancies (pregnancies between spouses/consorts are usually not event-started).

- Unless I'm wrong, impregnate/_cuckoo = yes innately has a (small) chance to make someone pregnant with twins, so if someone already is expecting twins you might get quadruplets rather than triplets. I also don't think there's any way to check how many children someone is expecting (outside of checking with the console/in the save), so an approach like "Check if a single child, then maybe add 1-2" is unlikely to be an option.
I did research on this years ago, and using impregnate on a pregnant woman created 2 separate pregnancies. They didn't get the twin trait on birth.
 

GodModder

First Lieutenant
39 Badges
May 10, 2021
281
41
  • Shadowrun Returns
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Age of Wonders III
  • Crusader Kings II: Jade Dragon
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Digital Anniversary Edition
  • Shadowrun: Hong Kong
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Crusader Kings III
  • Stellaris: Necroids
  • Stellaris: Nemesis
  • Crusader Kings II: Way of Life
  • 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: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Majesty 2 Collection
  • Crusader Kings II
  • Pillars of Eternity
  • Magicka 2
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Reapers Due
I'm no expert, but as far as I can tell, the only thing that makes someone twins is the following:
1) Twin trait
2) same parents
3) same birthdate
4) twins opinion modifier towards each other

So you could maybe use the create_character command with on_birth to simulate adding a twin (or triplet). If you don't want triplets just labeled as three twins, then you'd need to create a new trait and opinion modifier, and use commands to remove the Twins traits and opinion modifiers (replacing them with Triplet versions) whenever you have a triplet spawn.
 

HistoryFanBoy

Private
47 Badges
Jan 31, 2022
16
1
  • Hearts of Iron IV: Expansion Pass
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Mare Nostrum
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Together for Victory
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • Hearts of Iron IV: Death or Dishonor
  • Europa Universalis IV: Cradle of Civilization
  • Crusader Kings II: Jade Dragon
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Dharma
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Golden Century
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: La Resistance
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
  • Battle for Bosporus
  • Europa Universalis 4: Emperor
  • Hearts of Iron IV: No Step Back
  • Europa Universalis IV: Wealth of Nations
  • 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: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Res Publica
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
I wanted to ask. When you are creating a character via an event aka create_character = { blabla, how do you make it so that the character is born in a certain year and doesnt have a pre-given age? I have done it this way and am not sure if it works. It is a submod for Elder Kings btw. What am I supposed to write there in order for the character to be born in year 247? I want to have this date of birth set as the age will depend on when he spawns.

namespace = dagoth_ur

character_event = {
id = dagoth_ur.001
hide_window = yes

trigger = {
year = 700
NOT = { year = 4243 }
}

mean_time_to_happen = {
years = 1000

modifier = {
factor = 0.1
OR = {
has_global_flag = oblivion_invasion_azura
has_global_flag = oblivion_invasion_boethiah
has_global_flag = oblivion_invasion_clavicus
has_global_flag = oblivion_invasion_hermaeus
has_global_flag = oblivion_invasion_hircine
has_global_flag = oblivion_invasion_malacath
has_global_flag = oblivion_invasion_mehrunes
has_global_flag = oblivion_invasion_mephala
has_global_flag = oblivion_invasion_meridia
has_global_flag = oblivion_invasion_molag
has_global_flag = oblivion_invasion_namira
has_global_flag = oblivion_invasion_nocturnal
has_global_flag = oblivion_invasion_peryite
has_global_flag = oblivion_invasion_sanguine
has_global_flag = oblivion_invasion_sheogorath
has_global_flag = oblivion_invasion_vaermina
}
}

modifier = {
factor = 0.5
NOT = {
event_target:current_dragonborn = {
is_alive = yes
}
}
}
}
immediate = {
create_character = {
random_traits = no
name = "Voryn"
father =
dynasty = 160777
religion = sixth_house
culture = dunmer
trait = dunmer
trait = house_dagoth
trait = mage_4
trait = warrior_5
trait = savant_3
trait = nightblade_3
trait = genius
trait = zealous
trait = proud
trait = ambitious
trait = gregarious
trait = immortal
trait = dagothur
attributes = {
diplomacy = 20
martial = 20
stewardship = 20
intrigue = 20
learning = 20
}
}
new_character = {
set_father = 138007
set_birth = 247.1.1
health = 50
#assign_birthsign = yes
}
}
}
 
Last edited:

Whizzer

CKPlus Triumvirate
77 Badges
Jun 17, 2014
1.620
793
  • Semper Fi
  • Hearts of Iron III Collection
  • Heir to the Throne
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Leviathan: Warships
  • The Kings Crusade
  • Magicka
  • Victoria: Revolutions
  • Rome Gold
  • Cities in Motion
  • Sengoku
  • Sword of the Stars
  • Sword of the Stars II
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Warlock: Master of the Arcane
  • Europa Universalis IV: Mare Nostrum
  • Hearts of Iron III
  • A Game of Dwarves
  • Cities in Motion 2
  • 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
  • Crusader Kings II: Sword of Islam
  • Dungeonland
  • Crusader Kings II: Sunset Invasion
  • Europa Universalis III
  • Divine Wind
  • Hearts of Iron III: Their Finest Hour
  • For the Motherland
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Conclave
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Magicka: Wizard Wars Founder Wizard
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • War of the Roses
  • Crusader Kings III
  • Europa Universalis IV
I wanted to ask. When you are creating a character via an event aka create_character = { blabla, how do you make it so that the character is born in a certain year and doesnt have a pre-given age? I have done it this way and am not sure if it works. It is a submod for Elder Kings btw. What am I supposed to write there in order for the character to be born in year 247? I want to have this date of birth set as the age will depend on when he spawns.

namespace = dagoth_ur

character_event = {
id = dagoth_ur.001
hide_window = yes

trigger = {
year = 700
NOT = { year = 4243 }
}

mean_time_to_happen = {
years = 1000

modifier = {
factor = 0.1
OR = {
has_global_flag = oblivion_invasion_azura
has_global_flag = oblivion_invasion_boethiah
has_global_flag = oblivion_invasion_clavicus
has_global_flag = oblivion_invasion_hermaeus
has_global_flag = oblivion_invasion_hircine
has_global_flag = oblivion_invasion_malacath
has_global_flag = oblivion_invasion_mehrunes
has_global_flag = oblivion_invasion_mephala
has_global_flag = oblivion_invasion_meridia
has_global_flag = oblivion_invasion_molag
has_global_flag = oblivion_invasion_namira
has_global_flag = oblivion_invasion_nocturnal
has_global_flag = oblivion_invasion_peryite
has_global_flag = oblivion_invasion_sanguine
has_global_flag = oblivion_invasion_sheogorath
has_global_flag = oblivion_invasion_vaermina
}
}

modifier = {
factor = 0.5
NOT = {
event_target:current_dragonborn = {
is_alive = yes
}
}
}
}
immediate = {
create_character = {
random_traits = no
name = "Voryn"
father =
dynasty = 160777
religion = sixth_house
culture = dunmer
trait = dunmer
trait = house_dagoth
trait = mage_4
trait = warrior_5
trait = savant_3
trait = nightblade_3
trait = genius
trait = zealous
trait = proud
trait = ambitious
trait = gregarious
trait = immortal
trait = dagothur
attributes = {
diplomacy = 20
martial = 20
stewardship = 20
intrigue = 20
learning = 20
}
}
new_character = {
set_father = 138007
set_birth = 247.1.1
health = 50
#assign_birthsign = yes
}
}
}

add_age adjusts a character's age by changing their birth date, so if you change that to make the character as old as he should be when the event occurs, the birth date will correspond to that. That's only accurate to the year, however, so if the month and day are also important, you'll have to fire a second event from the one above, calculated to occur on the correct day and month.
 
Last edited:

HistoryFanBoy

Private
47 Badges
Jan 31, 2022
16
1
  • Hearts of Iron IV: Expansion Pass
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Mare Nostrum
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Together for Victory
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • Hearts of Iron IV: Death or Dishonor
  • Europa Universalis IV: Cradle of Civilization
  • Crusader Kings II: Jade Dragon
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Dharma
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Golden Century
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: La Resistance
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
  • Battle for Bosporus
  • Europa Universalis 4: Emperor
  • Hearts of Iron IV: No Step Back
  • Europa Universalis IV: Wealth of Nations
  • 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: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Res Publica
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
add_age adjusts a character's age by changing their birth date, so if you change that to make the character as old as he should be when the event occurs, the birth date will correspond to that. That's only accurate to the year, however, so if the month and day are also important, you'll have to fire a second event from the one above, calculated to occur on the correct day and month.
Thx for the answer but could you show me this in practice please? Just write a few lines of the code so that I see it because Im not sure about what you mean by that exactly but still thank you very much for answering!
 

Whizzer

CKPlus Triumvirate
77 Badges
Jun 17, 2014
1.620
793
  • Semper Fi
  • Hearts of Iron III Collection
  • Heir to the Throne
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Leviathan: Warships
  • The Kings Crusade
  • Magicka
  • Victoria: Revolutions
  • Rome Gold
  • Cities in Motion
  • Sengoku
  • Sword of the Stars
  • Sword of the Stars II
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Warlock: Master of the Arcane
  • Europa Universalis IV: Mare Nostrum
  • Hearts of Iron III
  • A Game of Dwarves
  • Cities in Motion 2
  • 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
  • Crusader Kings II: Sword of Islam
  • Dungeonland
  • Crusader Kings II: Sunset Invasion
  • Europa Universalis III
  • Divine Wind
  • Hearts of Iron III: Their Finest Hour
  • For the Motherland
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Conclave
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Magicka: Wizard Wars Founder Wizard
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • War of the Roses
  • Crusader Kings III
  • Europa Universalis IV
Thx for the answer but could you show me this in practice please? Just write a few lines of the code so that I see it because Im not sure about what you mean by that exactly but still thank you very much for answering!

You'll probably have to use variables, which isn't a big problem. Here's a rough version.

Code:
create_character = {
	age = 0 # Will be changed later anyway, so let's keep things simple
	<snip>
}

new_character = {
	# Export the current year to a variable, so we can do nice things
	export_to_variable = {
		which = local_target_age
		value = year
	}
	
	# Set another variable with the desired birth year
	set_variable = {
		which = local_desired_birth_year
		value = 247
	}
	
	# Calculate the difference, which should be the desired current age
	subtract_variable = {
		which = local_target_age			# current year
		which = local_desired_birth_year	# minus desired birth year
	}
	
	# Change age along with the variable, which gradually decreases to zero
	while = {
		limit = {
			check_variable = {
				which = local_target_age
				value > 0
			}
		}
		
		add_age = 1
		
		change_variable = {
			which = local_target_age
			value = -1
		}
	}
}
 

HistoryFanBoy

Private
47 Badges
Jan 31, 2022
16
1
  • Hearts of Iron IV: Expansion Pass
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Mare Nostrum
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Together for Victory
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • Hearts of Iron IV: Death or Dishonor
  • Europa Universalis IV: Cradle of Civilization
  • Crusader Kings II: Jade Dragon
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Dharma
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Golden Century
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: La Resistance
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
  • Battle for Bosporus
  • Europa Universalis 4: Emperor
  • Hearts of Iron IV: No Step Back
  • Europa Universalis IV: Wealth of Nations
  • 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: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Res Publica
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
You'll probably have to use variables, which isn't a big problem. Here's a rough version.

Code:
create_character = {
    age = 0 # Will be changed later anyway, so let's keep things simple
    <snip>
}

new_character = {
    # Export the current year to a variable, so we can do nice things
    export_to_variable = {
        which = local_target_age
        value = year
    }
   
    # Set another variable with the desired birth year
    set_variable = {
        which = local_desired_birth_year
        value = 247
    }
   
    # Calculate the difference, which should be the desired current age
    subtract_variable = {
        which = local_target_age            # current year
        which = local_desired_birth_year    # minus desired birth year
    }
   
    # Change age along with the variable, which gradually decreases to zero
    while = {
        limit = {
            check_variable = {
                which = local_target_age
                value > 0
            }
        }
       
        add_age = 1
       
        change_variable = {
            which = local_target_age
            value = -1
        }
    }
}
Ok thx hopefuly it will work
 

kiannameiou

Second Lieutenant
1 Badges
Apr 27, 2021
157
18
  • Crusader Kings II
Code:
realm_culture_convert = {
        ai = no
        only_playable = yes
        is_high_prio = yes
       
        potential = {
            is_playable = yes
           
            has_dlc = "Holy Fury"
           
        }
        allow = {
           
            any_realm_province = {
                NOT = { culture = ROOT }
               
               
            }
            war = no
        }
        effect = {
           
           
            hidden_tooltip = {
                any_courtier_or_vassal = {
                    limit = { lower_tier_than = COUNT }
                    culture = ROOT
                }
            }
            capital_scope = { culture = ROOT }
            custom_tooltip = {
               
                hidden_tooltip = {
                    any_realm_province = {
                        if = {
                            limit = { any_neighbor_province = { province = 333 } }
                            culture = ROOT
                        }
                        if = {
                            limit = {
                                NOT = { culture = ROOT }
                                NOT = { distance = { where = 333 distance = 100 } }
                            }
                            random = {
                                chance = 40
                                culture = ROOT
                            }
                        }
                        if = {
                            limit = {
                                NOT = { culture = ROOT }
                                NOT = { distance = { where = 333 distance = 200 } }
                            }
                            random = {
                                chance = 20
                                culture = ROOT
                            }
                        }
                        if = {
                            limit = {
                                NOT = { culture = ROOT }
                                NOT = { distance = { where = 333 distance = 400 } }
                            }
                            random = {
                                chance = 5
                                culture = ROOT
                            }
                        }
                    }
                }
            }
            hidden_tooltip = {
                if = { #Hellenic Emperor gets chance to spread Hellenism a bit alongside the culture.
                   
                    any_realm_province = {
                        if = {
                            limit = { any_neighbor_province = { province = 333 } }
                            religion = ROOT
                        }
                        if = {
                            limit = {
                                culture = roman
                                NOT = { distance = { where = 333 distance = 100 } }
                            }
                            random = {
                                chance = 10
                                religion = ROOT
                            }
                        }
                        if = {
                            limit = {
                                culture = roman
                                NOT = { distance = { where = 333 distance = 200 } }
                            }
                            random = {
                                chance = 5
                                religion = ROOT
                            }
                        }
                    }
                }
            }
           
        }
        revoke_allowed = {
            always = no
        }
        ai_will_do = {
            factor = 0
        }
    }

How to mod this decision further so that the starting point of the culture change is the current capital. This is ripped from the roman renaissance decision but I want to make it more flexible/dynamic instead of just the new culture originating from rome province. 333 is rome.

========

Got it, just replace 333 with ROOT
 
Last edited:

Floppydonk312

Private
17 Badges
Feb 3, 2022
13
0
  • Crusader Kings II: Sword of Islam
  • Crusader Kings III
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Way of Life
  • Crusader Kings II
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Charlemagne
Hi, so I’m not sure if this is the right place to post, since I’m modding primarily with Agot in mind,but I was wondering if I could get help with creating personal sigils. Not COA but like a personal sigil where a character has to meet a specific need.
 

Floppydonk312

Private
17 Badges
Feb 3, 2022
13
0
  • Crusader Kings II: Sword of Islam
  • Crusader Kings III
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Way of Life
  • Crusader Kings II
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Charlemagne
Hi, so I’m not sure if this is the right place to post, since I’m modding primarily with Agot in mind,but I was wondering if I could get help with creating personal sigils. Not COA but like a personal sigil where a character has to meet a specific need.
Also I’m is there a way to change the automatic education age from 16 to something younger? I’m trying to age stuff down, but on start ups a anyone born between the time doesn’t get an automatic education now.
 

Whizzer

CKPlus Triumvirate
77 Badges
Jun 17, 2014
1.620
793
  • Semper Fi
  • Hearts of Iron III Collection
  • Heir to the Throne
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Leviathan: Warships
  • The Kings Crusade
  • Magicka
  • Victoria: Revolutions
  • Rome Gold
  • Cities in Motion
  • Sengoku
  • Sword of the Stars
  • Sword of the Stars II
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Warlock: Master of the Arcane
  • Europa Universalis IV: Mare Nostrum
  • Hearts of Iron III
  • A Game of Dwarves
  • Cities in Motion 2
  • 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
  • Crusader Kings II: Sword of Islam
  • Dungeonland
  • Crusader Kings II: Sunset Invasion
  • Europa Universalis III
  • Divine Wind
  • Hearts of Iron III: Their Finest Hour
  • For the Motherland
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Conclave
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Magicka: Wizard Wars Founder Wizard
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • War of the Roses
  • Crusader Kings III
  • Europa Universalis IV
Also I’m is there a way to change the automatic education age from 16 to something younger? I’m trying to age stuff down, but on start ups a anyone born between the time doesn’t get an automatic education now.

It's likely tied to the define that governs the age of adulthood.
 

Whizzer

CKPlus Triumvirate
77 Badges
Jun 17, 2014
1.620
793
  • Semper Fi
  • Hearts of Iron III Collection
  • Heir to the Throne
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Leviathan: Warships
  • The Kings Crusade
  • Magicka
  • Victoria: Revolutions
  • Rome Gold
  • Cities in Motion
  • Sengoku
  • Sword of the Stars
  • Sword of the Stars II
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Warlock: Master of the Arcane
  • Europa Universalis IV: Mare Nostrum
  • Hearts of Iron III
  • A Game of Dwarves
  • Cities in Motion 2
  • 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
  • Crusader Kings II: Sword of Islam
  • Dungeonland
  • Crusader Kings II: Sunset Invasion
  • Europa Universalis III
  • Divine Wind
  • Hearts of Iron III: Their Finest Hour
  • For the Motherland
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Conclave
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Magicka: Wizard Wars Founder Wizard
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • War of the Roses
  • Crusader Kings III
  • Europa Universalis IV
It is that’s where I changed the adult hood age and marriage age, but I can’t find anything about the spawning education traits to people of age on start ups.

With the following defines, all characters age 14 and over have an education trait on new game start. Appears to be hardcoded, likely applies to newly created characters too.
Code:
AGE_OF_ADULTHOOD_MALE = 14,	
AGE_OF_ADULTHOOD_FEMALE = 14,
Is that not what you want?
 

Floppydonk312

Private
17 Badges
Feb 3, 2022
13
0
  • Crusader Kings II: Sword of Islam
  • Crusader Kings III
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Way of Life
  • Crusader Kings II
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Charlemagne
With the following defines, all characters age 14 and over have an education trait on new game start. Appears to be hardcoded, likely applies to newly created characters too.
Code:
AGE_OF_ADULTHOOD_MALE = 14,   
AGE_OF_ADULTHOOD_FEMALE = 14,
Is that not what you want?
Nope I’ve messed with that. So when you start a game anyone passed 14 is f-Ed because they’re technically passed adulthood but the game doesn’t give you an automatic trait unless they were older, or 16. So basically the pocket between what I set my adulthood and to 16 they get nothing on start ups.
 

Whizzer

CKPlus Triumvirate
77 Badges
Jun 17, 2014
1.620
793
  • Semper Fi
  • Hearts of Iron III Collection
  • Heir to the Throne
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Leviathan: Warships
  • The Kings Crusade
  • Magicka
  • Victoria: Revolutions
  • Rome Gold
  • Cities in Motion
  • Sengoku
  • Sword of the Stars
  • Sword of the Stars II
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Warlock: Master of the Arcane
  • Europa Universalis IV: Mare Nostrum
  • Hearts of Iron III
  • A Game of Dwarves
  • Cities in Motion 2
  • 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
  • Crusader Kings II: Sword of Islam
  • Dungeonland
  • Crusader Kings II: Sunset Invasion
  • Europa Universalis III
  • Divine Wind
  • Hearts of Iron III: Their Finest Hour
  • For the Motherland
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Conclave
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Magicka: Wizard Wars Founder Wizard
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • War of the Roses
  • Crusader Kings III
  • Europa Universalis IV
Nope I’ve messed with that. So when you start a game anyone passed 14 is f-Ed because they’re technically passed adulthood but the game doesn’t give you an automatic trait unless they were older, or 16. So basically the pocket between what I set my adulthood and to 16 they get nothing on start ups.

That's a nice bug you found. Too bad this game was entirely abandoned over two years ago. You can work around it with a startup event that catches adults without education traits and then aa on_host_change event with NOT = { FROM = { always = yes } }, to catch all characters created through any means.
 

Floppydonk312

Private
17 Badges
Feb 3, 2022
13
0
  • Crusader Kings II: Sword of Islam
  • Crusader Kings III
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Way of Life
  • Crusader Kings II
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Charlemagne
That's a nice bug you found. Too bad this game was entirely abandoned over two years ago. You can work around it with a startup event that catches adults without education traits and then aa on_host_change event with NOT = { FROM = { always = yes } }, to catch all characters created through any means.
Yeah i don’t know, I may just suffer through it, I don’t really have any experience with event modding, and I have no idea where I would start to make an event that fixes this problem.
 

Aardvark Bellay

Lord Wuffington of Grumpytown by the barks
21 Badges
Apr 5, 2001
15.442
2.858
  • Divine Wind
  • Stellaris Sign-up
  • Hearts of Iron IV Sign-up
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Holy Knight (pre-order)
  • 500k Club
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Victoria 2
  • Victoria: Revolutions
  • Heir to the Throne
  • Crusader Kings II
  • Europa Universalis III
  • Deus Vult
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Charlemagne
Nope I’ve messed with that. So when you start a game anyone passed 14 is f-Ed because they’re technically passed adulthood but the game doesn’t give you an automatic trait unless they were older, or 16. So basically the pocket between what I set my adulthood and to 16 they get nothing on start ups.

Err.....by my experience and memory education doesn't always end, regarding the edcuation trait, with becoming an adult.
I had characters become 19 or so before they got their education trait. It's relatively rare, but happens occasionaly.
So i'm not sure if you not getting an education trait on testing is necessarily telling.

On the other hand....i don't want to claim to know enough about how it works either.

PS: With the Conclave DLC that was. Don't remember what it was like without Conclave.
Though i believe now to recall it wasn't happening at a fixed date/time without the DLC either.
Just my 2cents.
 
Last edited:

StriborsForest

Recruit
Feb 1, 2022
3
0
Trying to add a few more Hellenic Gods to the game via the "Dedicate Temple" event. I know that an event can't have more than 4 options so my way of getting around that is to make the 4th option take you to another page, essentially.

Here are two examples of what that code in the HF_religious_events.txt file looks like

}
option = {
name = EVTOPT_TEMPLE_DIONYSOS_ERMES_SELECTION
custom_tooltip = { text = EVTOPT_TEMPLE_DIONYSOS_ERMES_SELECTION_TT }
hidden_effect = { character_event = { id = pantheon_event.4 } }
}
}

#Dionysus and Hermes
character_event = {
id = pantheon_event.4
desc = EVTDESCHF23204

}
option = {
name = EVTOPT_TEMPLE_HERA_HESTIA_SELECTION
custom_tooltip = { text = EVTOPT_TEMPLE_HERA_HESTIA_SELECTION_TT }
hidden_effect = { character_event = { id = pantheon_event.1 } }
}
}

#Hera and Hestia
character_event = {
id = pantheon_event.1
desc = EVTDESCHF23201

My issue is that all of the custom options that I added only take me to the event that lets me pick between Dionysus and Hermes and this happens on all the available options?? Does anyone know what I'm doing wrong?