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

Heavenly Serpent

First Lieutenant
48 Badges
Jun 15, 2017
262
24
  • Europa Universalis IV: Dharma
  • Europa Universalis IV: Rights of Man
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Stellaris: Distant Stars
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Golden Century
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Crusader Kings III
  • Europa Universalis 4: Emperor
  • Stellaris: Necroids
  • Stellaris: Nemesis
  • Stellaris
  • Europa Universalis IV
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Charlemagne
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Res Publica
  • Crusader Kings II: Jade Dragon
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II
So, I'm trying to write a series of connected events that can consistently reference and use a pair of rulers, started by a targeted decision so that the chain, starting with the decision, looks kind of like this:

Decision by A, acting on B, starts Event 1:

Event 1 happens for B, who sends Event 2 to A, and then Event 3 on a 10 day delay.

Event 2 fires for A.

Event 3 fires for A, and selecting any of the three options available will send Event 4 to B.

Event 4 fires for B, killing B, and setting A to B's killer.

However, I'm having difficulty figuring out what all of the ROOT and FROM and FROMFROMs and whatnot should be; right now, Event 3 is sending to B instead of to A, and Event 4 is sent to B instead.

I also can't get the localisation files to do [FROM.GetFirstName] for any of them, so that B's name won't show up in any of A's events, and A's name won't show up in any of B's events, leaving blank spaces instead.

Finally, I can't seem to get Opinion Modifiers to set between both characters so that A has an opinion towards B as a result of the chain, and B has a similar opinion toward A, and that's a separate issue of the incorrect delivery of Event 3.

If anybody has any advice on how I should structure these events so that they send correctly and can reference localization correctly, and especially if you have a really clear and concise explanation of how Scope Operators such as ROOT and FROM work (since my dumb ass clearly doesn't) I would greatly appreciate your help.
 
ROOT is whatever scope this event you're writing in was triggered for. If you call an event on Heinrich, within that event's script, ROOT would refer to Heinrich.
If you trigger an event on Louis, from Heinrich's code, then in Louis' event (event 2), Heinrich is the FROM (and Louis is the ROOT). So to get back to Heinrich, trigger an event in the FROM scope.

Localisation: use [From.GetFirstName] rather than [FROM.GetFirstName] :) Yeah, it is finicky like that.

Opinion modifiers are not very intuitive to add. Try this:
Code:
opinion = {
  modifier = your_modifier
  who = FROM
  years/months = <whatever time you want>
}
reverse_opinion = {
  modifier = your_modifier
  who = FROM
  years/months = <whatever time you want>
}
The first one sets ROOT's opinion of FROM, and the second one sets FROM's opinion of ROOT.
 
Code:
character_event = {
    id = example.0004
    desc = EVTDESCexample.0004
    is_triggered_only = yes
    option = {
        name = EVTOPTAexample.0004
      
        ai_chance = {
        factor = 100
        }
        hidden_tooltip = {
            character_event = { id = example.0006 days = 20 }
        }
        custom_tooltip = {
            text = example_strong_tt
        }
    }
    option = {
        name = EVTOPTBexample.0004
        ai_chance = {
        factor = 100
        }
        custom_tooltip = {
            text = example_sexy_tt
        }
        character_event = { id = example.0007 days = 20 }
    }
    option = {
        custom_tooltip = {
            text = example_brainy_tt
        }
        ai_chance = {
        factor = 100
        }
        name = EVTOPTCexample.0004
        character_event = { id = example.0008 days = 20 }
    }
}

Here's an example of another event that I just cannot seem to get working. It won't fire the other events, which are all built just fine! Any idea what could be causing the problem?
 
Have you tried removing the extra zeros in the event ids? Like using example.8 instead of example.0008. That's may be causing the issue... Also, remember to have a namespace at the top of your file that matches the id one. So you'd need a namespace = example at the top of your event file.