• 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.
Hi Solmyr
in your "character_health_events.txt" you wrote

Code:
character_event = {
	id = 999
	picture = "event_death"
	trigger = {
		condition = {
			type = not
			value = {
			  type = age value = [COLOR=Red]5[/COLOR]
			  }
		}
	}

	mean_time_to_happen = {
		months = [COLOR=Red]120[/COLOR]

120 months are 10 years, it means that 50% of children will die.. :( :(

200 months of MTTH ( that is 30% ) should be more apropriate ;)

Beside this, very good work!! :) :)

ciao ciao
 
Kliwarrior said:
120 months are 10 years, it means that 50% of children will die.. :( :(

200 months of MTTH ( that is 30% ) should be more apropriate ;)

It's been mentioned that MTTH is actually higher than what's in the event due to processing (you can see that because even events with MTTH of 1 day, like initial education events, don't happen immediately and can take years before triggering). In my experience on average MTTH is about 50% higher than what's in the event, so in this case it's more like 15 years. Which means 30% is the actual percentage of deaths. ;)

Anyhow, people can test this and report if children are dying too often. If so I can tweak it in future versions.
 
This is very funny
I take a look at the event script just because I had my duchies "kindergarden" almost depleted.

And anyway I didn't any calculus about the true probabiliy of the event (more fool me :( )

Actually what you are saying about mtth and the probability is (generally speacking) wrong (some maths below) but in this case you are perfectly right! and I was wrong :D :D
With your figures, (mtth=120 and trigger only until 5yo) , 70% of children will survive (exactly 70.7 % ).
Isn't this amazing ? :) :) :)

Some maths from a math nerd (me..)

Pdox guys implemented MTTH concept in a very good way:
They check the probability every day, about a certain events.
For examples is the MTTH is 1 day, the probability is 0.5 .
That is a simple 50%.
If the MTTH is 1 months ( = 30 days ) the probability is 0.02284 (a little more then 2% )
Anybody can check this in the F12/charevent of a given event.
Where do these figures come from?

The "daily probability" is calculated so that after MTTH, (that is after a certain number of checks ) the probability that a certain event DOESN'T happen is 50%.

It means that the probability p = ( 0.5 ) ^ (1/MTTH)

So what this lead to?
First , a certain events could never happen (as Pdox guys oftain said)
Second, that after twice the MTTH , you have the event NOT happened 25% of times
After three times the MTTH you have the event NOT happened 12.5%
Finally after 4 times MTTH you have 6.25 %

In general, given a MTTH ( that is given a probability p )
the chance that the event DOESN'T happen after T days is
= ( 1 - p ) ^ T

So for the "child dead" T = 1800 (five years) p = 0.000192522 (give by the MTTH of 3600 days, or 120 months ) and the chance of don't get the event is ( 1 - 0.000192522 ) ^ 1800 = 0.707..

That is 70 % of survivors :wacko: :wacko:

Thank you for your patience of reading so far ;) ;)

ciao ciao