- 2
The following is completely valid code (verified by game logs), but the this Validator version complains about religion and culture_group settings for on_trigger, calling them invalid:
namespace = testz
character_event = {
id = testz.001
hide_window = yes
trigger = { }
mean_time_to_happen = { months = 2 }
immediate = {
trigger_switch = {
on_trigger = religion
catholic = { log = "T001: Catholic" }
orthodox = { log = "T001: Orthodox" }
sunni = { log = "T001: Sunni" }
shiite = { log = "T001: Shiite" }
}
}
}
character_event = {
id = testz.002
hide_window = yes
trigger = { }
mean_time_to_happen = { months = 1 }
immediate = {
trigger_switch = {
on_trigger = culture
greek = { log = "T002: Greek" }
persian = { log = "T002: Persian" }
norse = { log = "T002: Norse" }
lombard = { log = "T002: Lombard" }
irish = { log = "T003: Irish" }
}
}
}
character_event = {
id = testz.003
hide_window = yes
trigger = { }
mean_time_to_happen = { months = 1 }
immediate = {
trigger_switch = {
on_trigger = culture_group
north_germanic = { log = "T003: North Germanic" }
iberian = { log = "T003: Iberian" }
byzantine = { log = "T003: Byzantine" }
baltic = { log = "T003: Baltic" }
}
}
}
--- Error 1 of 1 ---
At <mod>\events\ze_extra_events.txt [character_event\option\FROM\primary_title\change_mercenary_composition\from] (Line 418, column 6):
Invalid node "from" in scope <anon> (value is: light_infantry)
change_mercenary_composition = {
from = light_infantry
type = pikemen
change = 50
}
--- Error 1 of 1 ---
At <mod>\events\achievement_events.txt [character_event\trigger\any_favor_ower] (Line 9516, column 3):
Invalid node "any_favor_ower" in scope CharTrigger (value is: <a complex type>)
Is "from" optional in change_mercenary_composition? Some don't have that.Syntax for change_mercenary_composition is:Code:--- Error 1 of 1 --- At <mod>\events\ze_extra_events.txt [character_event\option\FROM\primary_title\change_mercenary_composition\from] (Line 418, column 6): Invalid node "from" in scope <anon> (value is: light_infantry)
where from and type both take troop types.Code:change_mercenary_composition = { from = light_infantry type = pikemen change = 50 }
I reported this before; any_favor_ower is a new character scope. The one place it is used in vanilla is in common/achievements.txt.Code:--- Error 1 of 1 --- At <mod>\events\achievement_events.txt [character_event\trigger\any_favor_ower] (Line 9516, column 3): Invalid node "any_favor_ower" in scope CharTrigger (value is: <a complex type>)
Those that don't have it are in the send more troops event; those that do are in the send equipment event. The former are adding more troops of the specified type, the latter are changing one troop type (the "from") to another (the "type"). So yes, optional.Is "from" optional in change_mercenary_composition? Some don't have that.
--- Error 1 of 1 ---
At <mod>\common\council_voting\05_selfish_pattern.txt [selfish_pattern_against\enforce_peace\OR\custom_tooltip\hidden_tooltip\any_war\OR\defender\PREV\attacker] (Line 243, column 10):
Invalid node "attacker" in scope CharTrigger (value is: <a complex type>)
--- Error 1 of 1 ---
At <mod>\common\objectives\00_factions.txt [faction_overthrow\chance\modifier\ROOT\clan_title] (Line 10509, column 5):
Invalid node "clan_title" in scope TitleTrigger (value is: <a complex type>)
--- Error 1 of 1 ---
At <mod>\common\council_voting\05_selfish_pattern.txt [selfish_pattern_against\declare_war_interaction\custom_tooltip\hidden_tooltip\OR\FROMFROMFROMFROM\holder_scope\any_liege] (Line 123, column 8):
"ROOT_FROMFROM" is not a valid CharTriggerWithCount.
--- Error 1 of 1 ---
At <mod>\events\ze_extra_events.txt [character_event\trigger\NOR\holds_favor_on] (Line 1899, column 4):
"LIEGE" is not a valid MaybeEventTarget(Char).
--- Error 1 of 1 ---
At events\rip_treatment_events.txt [character_event\option\if\trigger_switch\on_trigger] (Line 3014, column 5):
"trait" is not a valid on_trigger.
--- Error 1 of 1 ---
Incorrect Literal
At common\minor_titles\00_minor_titles.txt [title_court_physician\attribute] (Line 2839, column 2):
Expected value: martial
Actual value: learning
Not all triggers seem valid strangely, for instance "region" doesn't work."trait" is a valid on_trigger. I suspect any valid trigger can be used as an on_trigger, with the following blocks being any valid RHS for the trigger used as the on_triggerCode:--- Error 1 of 1 --- At events\rip_treatment_events.txt [character_event\option\if\trigger_switch\on_trigger] (Line 3014, column 5): "trait" is not a valid on_trigger.
Given that region (a province trigger) doesn't work, and some character triggers that are not used in vanilla work, I'd say any character trigger works.
However, it seems that triggers which are valid both in character and province, also work for province-scoped trigger_swtich.Indeed when I tried region with on_trigger, it was inside a province scope (location)
So there's been a lot of confusion around any_war. The last discussion was that any_war assumes its parent's scope, which in this case would be the root scope (I think char?). So that "attacker" is allowed in char? Or that it actually counts as war scope which does have attacker?PREV scopes to the preceding any_war scope. I discussed this with Divine.Code:--- Error 1 of 1 --- At <mod>\common\council_voting\05_selfish_pattern.txt [selfish_pattern_against\enforce_peace\OR\custom_tooltip\hidden_tooltip\any_war\OR\defender\PREV\attacker] (Line 243, column 10): Invalid node "attacker" in scope CharTrigger (value is: <a complex type>)
ROOT is the target character of the faction in the chance block, not the starting title scope.Code:--- Error 1 of 1 --- At <mod>\common\objectives\00_factions.txt [faction_overthrow\chance\modifier\ROOT\clan_title] (Line 10509, column 5): Invalid node "clan_title" in scope TitleTrigger (value is: <a complex type>)
So "any_liege = ROOT_FROMFROM" is valid? As opposed to "any_liege = { some char stuff }". This seems rather different from all other scopes.ROOT_FROM etc. should be valid RHS anywhere that can take a CharCode:--- Error 1 of 1 --- At <mod>\common\council_voting\05_selfish_pattern.txt [selfish_pattern_against\declare_war_interaction\custom_tooltip\hidden_tooltip\OR\FROMFROMFROMFROM\holder_scope\any_liege] (Line 123, column 8): "ROOT_FROMFROM" is not a valid CharTriggerWithCount.
trigger_switch = { on_trigger = X Y = { } }
trigger_switch = { on_trigger = "ai" "yes" = {} "no" = {} }
trigger_switch = { on_trigger = "holds_favor_on" "ROOT" = {} FROM = {} }
trigger_switch = { on_trigger = "ai_honor" 0 = {} 1 = {} }
trigger_switch = { on_trigger = "is_targetted_decision_allowed" decision1 = {} decision2 = {} }