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

Meatloaf

Private
38 Badges
Oct 24, 2002
16
0
Visit site
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Reapers Due
  • Tyranny: Archon Edition
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Way of Life
  • Age of Wonders III
  • Crusader Kings II: Jade Dragon
  • Shadowrun Returns
  • Crusader Kings II: Holy Fury
  • Imperator: Rome Deluxe Edition
  • Imperator: Rome
  • Prison Architect
  • Crusader Kings III
  • Europa Universalis III Complete
  • 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
  • Deus Vult
  • Crusader Kings II
  • Impire
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Europa Universalis: Rome
  • Rome Gold
  • Rome: Vae Victis
  • 500k Club
  • Cities: Skylines
Code:
obj_have_a_son = {
	type = character
	allow = {
		NOT = {
			any_child = {
				is_female = no
			}
		}
	}
	chance = {
		factor = 100
		modifier = {
			factor = 2.0
			traits = loving
		}
	}
	success = {
		any_child = {
			is_female = no
		}
	}
	abort = {
		age = 45
	}
	effect = {
		family_prestige = 5
		religious_conviction = 3
	}
}

I was wondering if I could use a time limit to trigger the abort for this event. Would it be possible to have the event abort after 2 years, instead of waiting until the character is 45?

Also, I'm pretty new to modding and have a question regarding the trigger of this objective:

Code:
chance = {
		factor = 100
		modifier = {
			factor = 2.0
			traits = loving
		}
	}

How can I tweak this so that it will only trigger 20% of the time?

Thanks!
 
This is just a wild wild wild guess (because I don't have the time to test it out this morning) but you should try: abort = { obj_whatever_it_is = 730 }. Let me know if that works.

EDIT: It works. I'm kicking myself that I didn't think of that before.
 
Last edited:
Code:
abort = { obj_whatever_it_is = 730 }

So, if I'm understanding this correctly, "obj_whatever_it_is" is essentially a timer variable, counting down days?

Or did you mean for me to use "obj_have_a_son" and simply used the phrase "obj_whatever_it_is" to indicate whatever the objective name is?
 
Last edited:
You'd have to replace "obj_whatever_it_is" with the name of the objective, gnosticdogma just used it as a placeholder. So, in your case it'd be:

Code:
abort = { obj_have_a_son = 730 }