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

Carmagnola

Captain
8 Badges
Mar 10, 2004
478
2
  • Deus Vult
  • Europa Universalis III
  • Divine Wind
  • Heir to the Throne
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Victoria: Revolutions
  • 500k Club
I know this may be a rather sensitive topic, but since I have studied something about suicide, I thought I would add modifiers to the original event.
Suicide was even more dramatic in the Middle Ages. Unless it was motivated by honor or some other "legitimate" cause, the body would be abused and the estates might be confiscated. But it was quite uncommon among the nobility, who had other outlets.

Code:
###########################
#### Death - Suicide  #####
###########################

character_event = {
	id = 1002

	picture = "event_madness"

	trigger = {
		condition = { type = age value = 12 }
		condition = {
			type = or
			condition = { type = trait value = stress_symptom }
			condition = { type = trait value = depression }
			condition = { type = trait value = schizofrenia }
		}
	}

	mean_time_to_happen = {
		months = 2400
		modifier = {
			condition = { type = trait value = depression }
			factor = 0.7
		}
		modifier = {
			condition = { type = trait value = schizofrenia }
			factor = 0.75
		}
		modifier = {
			condition = { type = trait value = reckless }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = wise }
			factor = 1.2
		}
		modifier = {#Not meant to be judgmental Just a proxy for how many friends they had
			condition = { type = trait value = selfish }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = generous }
			factor = 1.2
		}
		modifier = {
			condition = { type = trait value = skeptical }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = zealous }
			factor = 1.2
		}
		modifier = {
			condition = { type = trait value = illness }
			factor = 0.9
		}
		modifier = {
			condition = { type = not value = { type = prestige value = 0 } }
			factor = 0.9
		}
		modifier = {
			condition = { type = not value = { type = prestige value = -200 } }
			factor = 0.8
		}
		modifier = {
			condition = { type = prestige value = 100 }
			factor = 1.1
		}
		modifier = {
			condition = { type = prestige value = 1000 }
			factor = 2
		}
		modifier = {
			condition = { type = gender value = male }
			factor = 0.8
		}
		modifier = {
			condition = { type = gender value = female }
			factor = 1.2
		}
		modifier = {
			condition = { type = is_married }
			factor = 1.2
		}	
		modifier = {
			condition = { type = ruler }
			factor = 1.3
		}	
		modifier = {
			condition = {
				type = and 
				condition = { type = age value = 60 }
				condition = { type = trait value = illness }
				condition = { type = trait value = depression }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = and 
				condition = { type = age value = 70 }
				condition = { type = trait value = illness }
				condition = { type = trait value = depression }
			}
			factor = 0.9
		}
	}
	immidiate = {
		effect = { #It is discovered it was suicide
			type = random 
			chance = 50
			effect = { type = add_trait value = excommunicated }
			effect = { type = prestige scale = -5 }
			effect = { type = gold scale = -1 } #Heir must bribe, to avoid confiscation
			effect = { type = add_trait for = random_son }value = depression
			effect = { type = add_trait for = random_son }value = stress_symptom
			effect = { type = add_trait for = spouse value = stress_symptom }
			}
		effect = { type = death }
	}

}



1) The biggest question is: can I put several events after the type = random effect?

2) Balance. So, for a male courtier, unmarried, over 70, with low prestige (<-200), depressed, schizofrenic, ill, reckless, selfish and skeptical, the MTTH would end up with 0.125 at about 300 months. Conversely, a stressed married female ruler, wise, generous and zealous, and with high prestige (think Queen Elisabeth II :) ) would have a 6.5, or 15,500 months MTTH.

Does anyone know how to go from MTTH to probability, approximately? I don't know if these numbers are balanced; I'd like to have at least a good 25% probability for the first one and next to zero for the second.

Any help from experience modders would be greatly appreciated. Thanks.

EDIT: Fixed syntax
 
Last edited:
First of all this can strike any courtier, I guess it's intended?
Secondly, adding Excommunication to dead people is just flavour.
Thirdly, scale is quite silly if the person hit by the event isn't a ruler. Courtiers don't have income.
Unfortunately I can't answer your biggest question. Some greater thinkers must answer that.
 
1) I think you can, but it might be better to have a separate random chance for each effect, otherwise it will be all or nothing.
2) Not sure how the probability is calculated, but if you manually trigger the event from the console, you'll be shown its % chance per day.
 
Thanks, I didn't know about the daily probability and I wasn't clear about the scale thing. Now I can calculate the probability for any period of time. It was indeed intended to trigger for anyone, and with all events firing together or none.

I tried it out and it works like a charm: just one case happened in 25 years, that'd be about right.

So the answer to (1) is yes, it can be done, in case anybody wondered.