#Have to be a Christian denomination with a potential Religious head, and have been singled out for Beatification
modifier = {
factor = 0
NOR = {
NAND = {
event_target:saint_person = {
religion = catholic
}
event_target:saint_person = {
religion = fraticelli
}
event_target:saint_person = {
religion = orthodox
}
event_target:saint_person = {
religion = iconoclast
}
event_target:saint_person = {
religion = nestorian
}
event_target:saint_person = {
religion = miaphysite
}
event_target:saint_person = {
religion = monophysite
}
event_target:saint_person = {
religion = monothelite
}
event_target:saint_person = {
religion = paulician
}
event_target:saint_person = {
has_religion_feature = religion_beatification
}
}
NOR = {
event_target:saint_person = {
has_character_flag = beatified
}
event_target:saint_person = {
has_religion_feature = religion_beatification
}
}
}
}
# pick characters
character_event = {
id = foo.1
is_triggered_only = yes # by on_yearly_pulse
hide_window = yes
trigger = {
trait = foo_trait
any_friend = { always = yes }
# other conditions go here
}
option = {
any_friend = {
character_event = { id = foo.2 days = 1 }
}
}
}
# run effects
character_event = {
id = foo.2
is_triggered_only = yes # by foo.1
hide_window = yes
trigger = {
FROM = { trait = foo_trait }
# other conditions go here
}
option = {
log = "(FOO) Event run for [From.GetTitledNameWithNick] (who should have the trait) and [From.GetHerHis] friend [Root.GetTitledNameWithNick]"
# effects go here
}
}
I'm having unexpected trouble with using a trait in the trigger for my events.
My code looks basically like this:
However, checking the log, I can see that the event keeps firing for characters that do not have (and never had) the trait in question. Basically any pair of friends seems to be able to get the event.
I can't wrap my head around what might be going wrong here. Anyone have an idea?
# pick characters
character_event = {
id = foo.1
is_triggered_only = yes # by on_yearly_pulse
hide_window = yes
# add pre-triggers unless you want to run for every character in game each year - so, alot
trigger = {
trait = foo_trait
num_of_friends = 1
}
immediate = {
any_friend = {
character_event = { id = foo.2 days = 1 }
}
}
}
# run effects
character_event = {
id = foo.2
is_triggered_only = yes # by foo.1
hide_window = yes
trigger = {
# FROM = { trait = foo_trait } # unneeded condition as should only trigger from characters with said trait
# other conditions go here
}
immediate = {
log = "(FOO) Event run for [From.GetTitledNameWithNick] (who should have the trait) and [From.GetHerHis] friend [Root.GetTitledNameWithNick]"
# effects go here
}
}
Try putting a log in the immediate block of the first event, might help narrow stuff down.However, checking the log
needs an immediate block first...Try putting a log in the immediate block of the first event, might help narrow stuff down.
Ahh thanks, didn't think of that. Creating an on_action event for on_new_holder which kills off any previous holder (and other claimant for good measure) should be sufficient to take care of that though. Can you think of anything else that could cause trouble?If the governor loses a tyranny revolt, he'll abdicate and wind up with a strong claim.
random_artifact = {
limit = { artifact_type = weapon_bow_auriel }
transfer_artifact = {
from = event_target:falmer_vyrthur_bow
to = ROOT
}
}
c_990001 = {
save_event_target_as = falmer_vyrthur_bow
}
I am trying to transfer an artifact from one character to the player, I've tried several ways of doing this, and this may be something trivial so I'll post it here. This is my code, what am I doing wrong as it just says 'transfer <blank>' so it isn't detecting the artifact I've scoped...
Code:random_artifact = { limit = { artifact_type = weapon_bow_auriel } transfer_artifact = { from = event_target:falmer_vyrthur_bow to = ROOT } }
Also i used
Code:c_990001 = { save_event_target_as = falmer_vyrthur_bow }
Heres the code:I'd probably use "any_artifact". Post the full code? be able to help more then
narrative_event = {
id = falmer.17
desc = EVTDESC_falmer_17
picture = GFX_evt_vyrthur_vampire
title = EVTNAME_falmer_17
is_triggered_only = yes
option = {
name = EVTOPTA_falmer_17
c_990001 = {
remove_rival = ROOT
clr_character_flag = do_not_disturb
remove_trait = on_mission
add_trait = known_vampire
save_event_target_as = falmer_vyrthur_bow
}
any_artifact = {
limit = { artifact_type = weapon_bow_auriel }
transfer_artifact = {
from = event_target:falmer_vyrthur_bow
to = ROOT
}
}
set_character_flag = vyrthur_evt_done
}
}
narrative_event = {
id = falmer.17
desc = EVTDESC_falmer_17
picture = GFX_evt_vyrthur_vampire
title = EVTNAME_falmer_17
is_triggered_only = yes
option = {
name = EVTOPTA_falmer_17
c_990001 = { # currently scope character
remove_rival = ROOT
clr_character_flag = do_not_disturb
remove_trait = on_mission
add_trait = known_vampire
any_artifact = { # checking currently scoped character for the artifact and changing the scope
limit = { artifact_type = weapon_bow_auriel }
transfer_artifact = {
from = PREV # the previous scope, aka c_990001
to = ROOT # the character the event is called on
}
}
}
set_character_flag = vyrthur_evt_done
}
}
I'm pretty sure you're trying to take the artifact from yourself (unintentionally)
Correct me if I'm wrong but, c_990001 is the character with the artifact?
Code:narrative_event = { id = falmer.17 desc = EVTDESC_falmer_17 picture = GFX_evt_vyrthur_vampire title = EVTNAME_falmer_17 is_triggered_only = yes option = { name = EVTOPTA_falmer_17 c_990001 = { # currently scope character remove_rival = ROOT clr_character_flag = do_not_disturb remove_trait = on_mission add_trait = known_vampire any_artifact = { # checking currently scoped character for the artifact and changing the scope limit = { artifact_type = weapon_bow_auriel } transfer_artifact = { from = PREV # the previous scope, aka c_990001 to = ROOT # the character the event is called on } } } set_character_flag = vyrthur_evt_done } }
give that a crack.
When you scope for the artifact it needs to be from a character scope, it then searches the scoped character
ThanksAny string can be in any localization file. So, if you are adding new ones, it's better to put them in a file specific to your mod to minimize conflicts
Complements and insults are optional.