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

stars2heaven

Major
39 Badges
Aug 17, 2012
552
136
  • Crusader Kings II
  • Warlock 2: The Exiled
  • Crusader Kings II: Jade Dragon
  • Stellaris Sign-up
  • Crusader Kings II: Reapers Due
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Age of Wonders III
  • Crusader Kings II: Conclave
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Stellaris: Necroids
  • Crusader Kings II: Horse Lords
  • Pillars of Eternity
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Pre-order
  • 500k Club
  • Warlock: Master of the Arcane
  • Stellaris
  • Europa Universalis IV
  • 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: Call to arms event
  • Magicka
  • Stellaris: Synthetic Dawn
I played through several rulers and realized that I have never seen this event happen for myself or any other ruler despite qualifying for it. I've been looking at the code to try to understand how it works and I have a few questions.

1. The event has the is_only_triggered = yes line. What other event is supposed to call for this one?

2. The event also has a trigger. I thought this was unnecessary when there is an is_only_triggered.

3. Why are there modifiers for what appear to be a MTTH when the event is triggered by something else?

4. Any idea why this event seems to never fire?

Here is the relevant part of the code, the rest is cleanup and the options sections:
Code:
###########################################
#                                         #
# Zoroastrian Holy Pets Events            #
#                                         #
# ID ZP.1-ZP.100                           #
#                                         #
###########################################

# Written by Henrik "Groogy" Hansson
# In Memory of Nix the Hedgehog, forever missed never forgotten
#
# Events are inspired from the Vendidad texts taken from the Avesta
# and historical texts that retell Persian relationship with "Dogs"

namespace = ZP

### As a pious Zoroastrian we need a holy dog
character_event = {
    id = ZP.1
    desc = EVTDESC_ZP_1
    picture = GFX_evt_steppe_mercenaries
    border = GFX_event_normal_frame_war

    is_triggered_only = yes

    capable_only = yes
    prisoner = no
    only_rulers = yes
    religion_group = zoroastrian_group

    weight_multiplier = {
        days = 1

        modifier = {
            factor = 2
            has_focus = focus_theology
        }
        modifier = {
            factor = 2
            has_focus = focus_family
        }
        modifier = {
            factor = 2
            trait = zealous
        }
        modifier = {
            factor = 2
            trait = kind
        }
        modifier = {
            factor = 1.5
            trait = martial_cleric
        }
        modifier = {
            factor = 1.5
            trait = scholarly_theologian
        }
        modifier = {
            factor = 1.5
            trait = mastermind_theologian
        }

        modifier = {
            factor = 1.5
            piety = 150
        }

        modifier = {
            factor = 1.5
            piety = 300
        }

        modifier = {
            factor = 1.5
            piety = 600
        }

        modifier = {
            factor = 1.5
            piety = 1200
        }

        modifier = {
            factor = 0.1
            trait = cynical
        }
        modifier = {
            factor = 0.1
            trait = cruel
        }
    }

    trigger = {
        is_adult = yes
        NOT = { trait = masterless_dog }
        NOT = { trait = house_dog }
        NOT = { trait = hedgehog }
        NOT = { trait = otter }
    }
   
    option = {
        name = "EVTOPTA_ZP_1"
        character_event = { id = ZP.2 }
    }

    option = {
        name = "EVTOPTB_ZP_1"
        character_event = { id = ZP.3 }
    }

    option = {
        name = "EVTOPTC_ZP_1"
        character_event = { id = ZP.4 }
    }

    option = {
        name = "EVTOPTD_ZP_1"
        piety = -10
    }
}
 

Toa Kraka

Dislikes you
67 Badges
Dec 25, 2011
1.810
1.226
  • Crusader Kings II
  • Europa Universalis III
  • Europa Universalis IV
  • Victoria 2
  • Teleglitch: Die More Edition
1. The event has the is_only_triggered = yes line. What other event is supposed to call for this one?
It's triggered by on_five_year_pulse/random_events in common/on_actions/00_on_actions.txt.
2. The event also has a trigger. I thought this was unnecessary when there is an is_only_triggered.
Well, putting triggers for the zillions of events in the on_actions file would be awkward and annoying, wouldn't it? It's a second layer of checks: When the on_actions file attempts to trigger the event, it won't fire if the character doesn't match the trigger conditions in the event file.
3. Why are there modifiers for what appear to be a MTTH when the event is triggered by something else?
This affects the weight granted to the event in the on_actions file. Check out the relevant wiki section.
4. Any idea why this event seems to never fire?
Well, there are dozens of different events in the on_five_year_pulse section, and this event has a rather low base weight (only 1, while the other events in this section have a base weight of 10). Maybe you've just been unlucky.
 

stars2heaven

Major
39 Badges
Aug 17, 2012
552
136
  • Crusader Kings II
  • Warlock 2: The Exiled
  • Crusader Kings II: Jade Dragon
  • Stellaris Sign-up
  • Crusader Kings II: Reapers Due
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Age of Wonders III
  • Crusader Kings II: Conclave
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Stellaris: Necroids
  • Crusader Kings II: Horse Lords
  • Pillars of Eternity
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Pre-order
  • 500k Club
  • Warlock: Master of the Arcane
  • Stellaris
  • Europa Universalis IV
  • 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: Call to arms event
  • Magicka
  • Stellaris: Synthetic Dawn
Thanks for the info. It's been a while since I've done much with modding for this game and I wasn't aware that it used pulses now. It all makes pretty good sense to me now. Thanks again!