Mean time to happen

From EU3 Wiki

(Redirected from MTTH)
Jump to: navigation, search

Mean time to happen (MTTH) is used by the event engine to decide when to trigger events. This defines how often, on average, an event should fire if its triggers are true. There is no mechanism in the game for recording how long it has actually been since the event conditions were satisfied; instead, MTTH is used to calculate a monthly chance of the event firing, and unless conditions change, the probability is exactly the same each month. This means that even an event with a very high MTTH could possibly fire immediately after the conditions are met, and could also possibly not fire at all for the entire game.


Let's say an event start like this:

country_event = {

    id = 1010

    trigger = {
        NOT = { primary_culture = irish }
        owns = 373  # Meath
    }
    
    mean_time_to_happen = {
        months = 216
    }
    ...

Here, the triggers are true if a non-irish country owns Meath. With a MTTH of 216 months this event will fire on average once in every 18 years, however, it may actually fire at any time (with a 1/216 probability of firing each month).

MTTH modifiers

You can add a whole range of modifiers to the MTTH that will decrease or increase the value. The modifier consists of a trigger statement and a multiplier factor that is added to the MTTH if the trigger is true. It can look e.g. like this:

    modifier = {
        factor = 0.8
        NOT = { ADM = 4 }
    }

The trigger here is valid if the monarch's administrative rating is below 4. If this is true, the MTTH above would become 216*0.8 = 172.8 months, or a little over 14 years.

These modifier triggers are checked separately. That means that you can have additional modifiers for higher/lower values. An example:

    modifier = {
        factor = 0.9
        NOT = { ADM = 4 }
    }
    modifier = {
        factor = 0.9
        NOT = { ADM = 5 }
    }
    modifier = {
        factor = 0.9
        NOT = { ADM = 6 }
    }
    modifier = {
        factor = 1.1
        ADM = 6 
    }

The way these are scripted, the first three will be true if the monarch has ADM 3, giving a MTTH of 216*0.9*0.9*0.9 = 157.464 months, or just over 13 years. If the monarch has ADM 5, only the third will be true.

Personal tools