FROM is the person or province that sent the character the event.Hello. I am very new to modding, could someone please explain to me how does FROM work?
Also, would that command be appropriate for what I want to do in the following:
One of the first events which I'm creating (that's how I'm learning) is about getting an event after victorious battles with pagans.
So far this is what I have:
Code:character_event = { id = 900001 desc = "We have fought bravely against the pagan heathens." picture = "GFX_evt_knight_kneeling" border = GFX_event_normal_frame_religion is_triggered_only = yes trigger = { religion = catholic NOT = { trait = zealous } NOT = { trait = cynical } OR = { any_war = { using_cb = religious } any_liege = { any_war = { using_cb = religious } } } } option = { name = "EXCELLENT" add_trait = zealous } }
However, so far it works for anyone who we are fighting when using Holy War CB. How do I make it specifically against pagans?
Also, could someone please explain to me exactly how does ROOT, FROM and PREV work and how to use them properly? I'd be very much obliged.
EDIT:
After playing around for a while, during the first launch it seemed to work fine - The event actually fired during battle. Since then, nothing. I tried to increase the value in 00_on_action.txt, but that did not help (left it on 100 after tests). When firing the event in the console, strangely it says that the requirement is it is NOT holy war? Hm... I've no idea, please guide me
Basically, my ultimate goal is to create an event where Catholic ruler on defeating pagans gets a pop up, basically saying well done.![]()
You can probably use it in a battle event to check your opponent.
ROOT is whoever is getting the event (or the province it was sent from if it is a province event).
PREV is the previous scope. E.G., father = { liege = { character = PREV } }, PREV would mean the "father" scope. You can go back up to three scopes (PREVPREVPREV).
As to the triggering through console, sometimes the game is a bit silly when OR is involved, and will thus say the opposite of what it should.
A higher value in 00_on_actions should make it more common. You can also make it more common by adding a mean time to happen section; higher MTTH means higher occurrence for events triggered by on actions.