• 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.
Very much a hard thing then.

It will go to the bottom of the pile, in that case.

Don't get used to it, I'm just (voluntarily) unemployed for another week or so :) . As repeat_event has been addressed you no longer need to state it but can instead pick some other hard issue. Any issues with repeat_event which you report will either be fixed if it's easy enough or end up in hard bucket again.

Best of luck with your new job!
All the errors in vanilla script related to repeat_event have indeed vanished. Marvellous! I cannot thank you enough for your efforts. You've gone above and beyond.
I'm doing some preliminary testing on a potentially hard thing, but chances are the scripting system isn't quite as powerful/dynamic as I had hoped.

Please post example error of this one

Apologies, false report.

Code:
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\random_character\c_frisia\usurp_title_plus_barony_if_unlanded_and_vassals\type] (Line 565, column 8):
"usurp" is not a valid UsurpType.

This one still remains. Seems like I didn't include this in the list yesterday, only in the error logs and the screenshot. Apologies.

Code:
--- Error 1 of 3 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\747\wonder\random_upgrade_on_wonder] (Line 320, column 7):
Invalid node "random_upgrade_on_wonder" in scope WonderBuildingCommand (value is: <a complex type>)
--- Error 2 of 3 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\any_wonder_upgrade] (Line 336, column 5):
Invalid node "any_wonder_upgrade" in scope CharCommand (value is: <a complex type>)
--- Error 3 of 3 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\random_wonder_upgrade] (Line 340, column 5):
Invalid node "random_wonder_upgrade" in scope CharCommand (value is: <a complex type>)

'any_wonder_upgrade' is valid anywhere, in both trigger and effect scopes.
'random_wonder_upgrade' is valid in all effect scopes.
'random_upgrade_on_wonder' is valid in wonder effect scope.

Code:
--- Error 1 of 2 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\save_persistent_event_target\scope] (Line 282, column 6):
"c_144999" is not a valid MaybeEventTargetArtifactCharOffmapPowerProvSocietyTitle, AnyTitle, "religion_scope", or "secret_religious_cult".
--- Error 2 of 2 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\save_persistent_event_target\scope] (Line 282, column 6):
Scope could not be resolved: c_144999

Can confirm 'scope' accepts character IDs. Also works in character history (inside 'effect(even_if_dead) = { }' and title history ('effect = { }'). Can be used in character history to setup historical popes for 'Crowned by the Pope'-trait.

Code:
--- Error 1 of 4 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\is_decision_potential] (Line 132, column 5):
"request_to_rank_up_within_society" is not a valid PureDecision.
--- Error 2 of 4 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\is_decision_allowed] (Line 133, column 5):
"request_to_rank_up_within_society" is not a valid PureDecision.
--- Error 3 of 4 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\is_decision_potential] (Line 134, column 5):
"faction_succ_seniority_ultimatum" is not a valid PureDecision.
--- Error 4 of 4 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\is_decision_allowed] (Line 135, column 5):
"faction_succ_seniority_ultimatum" is not a valid PureDecision.

Decisions under 'plot_decisions' and 'society_decisions' are also valid RHS arguments here. Decisions used above are found in 'mnm_society_decisions.txt' and 'faction_decisions.txt'.
 
Last edited:
Hola amigo. Got more cool error that showed up.

Spawn unit allows you to use liege, top_liege, etc.
--- Error 1 of 8 ---
At <mod>\decisions\rtp_decisions.txt [decisions\rtp_raise_patriots_d\effect\if\spawn_unit\match_character] (Line 347, column 6):
"top_liege" is not a valid ThisChar.
Additional information: Expected one of: THIS, ROOT, FROM, FROMFROM, FROMFROMFROM (and so on), PREV, PREVPREV (and so on)
--- Error 2 of 8 ---
At <mod>\decisions\rtp_decisions.txt [decisions\rtp_raise_patriots_d\effect\else_if\spawn_unit\match_character] (Line 365, column 6):
"top_liege" is not a valid ThisChar.
Additional information: Expected one of: THIS, ROOT, FROM, FROMFROM, FROMFROMFROM (and so on), PREV, PREVPREV (and so on)
--- Error 3 of 8 ---
At <mod>\decisions\rtp_decisions.txt [decisions\rtp_raise_patriots_d\effect\else_if\spawn_unit\match_character] (Line 383, column 6):
"top_liege" is not a valid ThisChar.
Additional information: Expected one of: THIS, ROOT, FROM, FROMFROM, FROMFROMFROM (and so on), PREV, PREVPREV (and so on)
--- Error 4 of 8 ---
At <mod>\decisions\rtp_decisions.txt [decisions\rtp_raise_patriots_d\effect\else\spawn_unit\match_character] (Line 395, column 6):
"top_liege" is not a valid ThisChar.
Additional information: Expected one of: THIS, ROOT, FROM, FROMFROM, FROMFROMFROM (and so on), PREV, PREVPREV (and so on)
--- Error 5 of 8 ---
At <mod>\decisions\rtp_decisions.txt [decisions\rtp_raise_zealouts_d\effect\if\spawn_unit\match_character] (Line 226, column 6):
"top_liege" is not a valid ThisChar.
Additional information: Expected one of: THIS, ROOT, FROM, FROMFROM, FROMFROMFROM (and so on), PREV, PREVPREV (and so on)
--- Error 6 of 8 ---
At <mod>\decisions\rtp_decisions.txt [decisions\rtp_raise_zealouts_d\effect\else_if\spawn_unit\match_character] (Line 244, column 6):
"top_liege" is not a valid ThisChar.
Additional information: Expected one of: THIS, ROOT, FROM, FROMFROM, FROMFROMFROM (and so on), PREV, PREVPREV (and so on)
--- Error 7 of 8 ---
At <mod>\decisions\rtp_decisions.txt [decisions\rtp_raise_zealouts_d\effect\else_if\spawn_unit\match_character] (Line 262, column 6):
"top_liege" is not a valid ThisChar.
Additional information: Expected one of: THIS, ROOT, FROM, FROMFROM, FROMFROMFROM (and so on), PREV, PREVPREV (and so on)
--- Error 8 of 8 ---
At <mod>\decisions\rtp_decisions.txt [decisions\rtp_raise_zealouts_d\effect\else\spawn_unit\match_character] (Line 274, column 6):
"top_liege" is not a valid ThisChar.
Additional information: Expected one of: THIS, ROOT, FROM, FROMFROM, FROMFROMFROM (and so on), PREV, PREVPREV (and so on)

And same thing with create_character it seems
--- Error 1 of 16 ---
At <mod>\events\rtp_check_events.txt [character_event\immediate\if\if\if\create_character\religion] (Line 2839, column 7):
"location" is not a valid Random, Religion, MaybeEventTargetCharOffmapPowerProvReligionSocietyTitle, ReligionTargetCheck, Liege, or CharTargetExcludingMaybeEventTarget.
--- Error 2 of 16 ---
At <mod>\events\rtp_check_events.txt [character_event\immediate\if\if\if\create_character\culture] (Line 2840, column 7):
"location" is not a valid Culture, MaybeEventTargetCharCultureOffmapPowerProvTitle, Random, or Liege.
--- Error 3 of 16 ---
At <mod>\events\rtp_check_events.txt [character_event\immediate\if\if\else\create_character\religion] (Line 2849, column 7):
"location" is not a valid Random, Religion, MaybeEventTargetCharOffmapPowerProvReligionSocietyTitle, ReligionTargetCheck, Liege, or CharTargetExcludingMaybeEventTarget.
--- Error 4 of 16 ---
At <mod>\events\rtp_check_events.txt [character_event\immediate\if\if\else\create_character\culture] (Line 2850, column 7):
"location" is not a valid Culture, MaybeEventTargetCharCultureOffmapPowerProvTitle, Random, or Liege.
--- Error 5 of 16 ---
At <mod>\events\rtp_check_events.txt [character_event\immediate\if\else\if\create_character\religion] (Line 2864, column 7):
"location" is not a valid Random, Religion, MaybeEventTargetCharOffmapPowerProvReligionSocietyTitle, ReligionTargetCheck, Liege, or CharTargetExcludingMaybeEventTarget.
--- Error 6 of 16 ---
At <mod>\events\rtp_check_events.txt [character_event\immediate\if\else\if\create_character\culture] (Line 2865, column 7):
"location" is not a valid Culture, MaybeEventTargetCharCultureOffmapPowerProvTitle, Random, or Liege.
--- Error 7 of 16 ---
At <mod>\events\rtp_check_events.txt [character_event\immediate\if\else\else\create_character\religion] (Line 2874, column 7):
"location" is not a valid Random, Religion, MaybeEventTargetCharOffmapPowerProvReligionSocietyTitle, ReligionTargetCheck, Liege, or CharTargetExcludingMaybeEventTarget.
--- Error 8 of 16 ---
At <mod>\events\rtp_check_events.txt [character_event\immediate\if\else\else\create_character\culture] (Line 2875, column 7):
"location" is not a valid Culture, MaybeEventTargetCharCultureOffmapPowerProvTitle, Random, or Liege.
--- Error 9 of 16 ---
At <mod>\events\rtp_landless_events.txt [character_event\immediate\if\if\create_character\religion] (Line 449, column 6):
"location" is not a valid Random, Religion, MaybeEventTargetCharOffmapPowerProvReligionSocietyTitle, ReligionTargetCheck, Liege, or CharTargetExcludingMaybeEventTarget.
--- Error 10 of 16 ---
At <mod>\events\rtp_landless_events.txt [character_event\immediate\if\if\create_character\culture] (Line 450, column 6):
"location" is not a valid Culture, MaybeEventTargetCharCultureOffmapPowerProvTitle, Random, or Liege.
--- Error 11 of 16 ---
At <mod>\events\rtp_landless_events.txt [character_event\immediate\if\else\create_character\religion] (Line 459, column 6):
"location" is not a valid Random, Religion, MaybeEventTargetCharOffmapPowerProvReligionSocietyTitle, ReligionTargetCheck, Liege, or CharTargetExcludingMaybeEventTarget.
--- Error 12 of 16 ---
At <mod>\events\rtp_landless_events.txt [character_event\immediate\if\else\create_character\culture] (Line 460, column 6):
"location" is not a valid Culture, MaybeEventTargetCharCultureOffmapPowerProvTitle, Random, or Liege.
--- Error 13 of 16 ---
At <mod>\events\rtp_landless_events.txt [character_event\immediate\else\if\create_character\religion] (Line 474, column 6):
"location" is not a valid Random, Religion, MaybeEventTargetCharOffmapPowerProvReligionSocietyTitle, ReligionTargetCheck, Liege, or CharTargetExcludingMaybeEventTarget.
--- Error 14 of 16 ---
At <mod>\events\rtp_landless_events.txt [character_event\immediate\else\if\create_character\culture] (Line 475, column 6):
"location" is not a valid Culture, MaybeEventTargetCharCultureOffmapPowerProvTitle, Random, or Liege.
--- Error 15 of 16 ---
At <mod>\events\rtp_landless_events.txt [character_event\immediate\else\else\create_character\religion] (Line 484, column 6):
"location" is not a valid Random, Religion, MaybeEventTargetCharOffmapPowerProvReligionSocietyTitle, ReligionTargetCheck, Liege, or CharTargetExcludingMaybeEventTarget.
--- Error 16 of 16 ---
At <mod>\events\rtp_landless_events.txt [character_event\immediate\else\else\create_character\culture] (Line 485, column 6):
"location" is not a valid Culture, MaybeEventTargetCharCultureOffmapPowerProvTitle, Random, or Liege.

Also I am using these Scripted Score Values in ai_will_do but the validator is flooding with errors.
According to the patchnotes: "- Added Scripted score values similar to scripted triggers and effects. Can be utilized in ai_chance, ai_will_do, random list weighting and anything that utilizes the triggered modifiers to calculate a value."
--- Error 1 of 12 ---
At <mod>\common\scripted_score_values\rtp_scripted_score_values.txt [rtp_lawful_neutral_ssv\modifier\trait] (Line 1061, column 3):
Invalid node "trait" in scope AiWillDoFromFromNoneModifier (value is: cynical)
* called from <mod>\common\laws\rtp_laws.txt [laws\rtp_holidays_1_l\ai_will_do\rtp_lawful_neutral_ssv] (Line 1273, column 4)
--- Error 2 of 12 ---
At <mod>\common\scripted_score_values\rtp_scripted_score_values.txt [rtp_lawful_neutral_ssv\modifier\trait] (Line 1057, column 3):
Invalid node "trait" in scope AiWillDoFromFromNoneModifier (value is: trusting)
* called from <mod>\common\laws\rtp_laws.txt [laws\rtp_holidays_1_l\ai_will_do\rtp_lawful_neutral_ssv] (Line 1273, column 4)
--- Error 3 of 12 ---
At <mod>\common\scripted_score_values\rtp_scripted_score_values.txt [rtp_lawful_neutral_ssv\modifier\trait] (Line 1053, column 3):
Invalid node "trait" in scope AiWillDoFromFromNoneModifier (value is: just)
* called from <mod>\common\laws\rtp_laws.txt [laws\rtp_holidays_1_l\ai_will_do\rtp_lawful_neutral_ssv] (Line 1273, column 4)
--- Error 4 of 12 ---
At <mod>\common\scripted_score_values\rtp_scripted_score_values.txt [rtp_lawful_neutral_ssv\modifier\trait] (Line 1049, column 3):
Invalid node "trait" in scope AiWillDoFromFromNoneModifier (value is: honest)
* called from <mod>\common\laws\rtp_laws.txt [laws\rtp_holidays_1_l\ai_will_do\rtp_lawful_neutral_ssv] (Line 1273, column 4)
--- Error 5 of 12 ---
At <mod>\common\scripted_score_values\rtp_scripted_score_values.txt [rtp_lawful_neutral_ssv\modifier\trait] (Line 1041, column 3):
Invalid node "trait" in scope AiWillDoFromFromNoneModifier (value is: erudite)
* called from <mod>\common\laws\rtp_laws.txt [laws\rtp_holidays_1_l\ai_will_do\rtp_lawful_neutral_ssv] (Line 1273, column 4)
--- Error 6 of 12 ---
At <mod>\common\scripted_score_values\rtp_scripted_score_values.txt [rtp_lawful_neutral_ssv\modifier\trait] (Line 1029, column 3):
Invalid node "trait" in scope AiWillDoFromFromNoneModifier (value is: content)
* called from <mod>\common\laws\rtp_laws.txt [laws\rtp_holidays_1_l\ai_will_do\rtp_lawful_neutral_ssv] (Line 1273, column 4)
--- Error 7 of 12 ---
At <mod>\common\scripted_score_values\rtp_scripted_score_values.txt [rtp_lawful_neutral_ssv\modifier\trait] (Line 1024, column 3):
Invalid node "trait" in scope AiWillDoFromFromNoneModifier (value is: proud)
* called from <mod>\common\laws\rtp_laws.txt [laws\rtp_holidays_1_l\ai_will_do\rtp_lawful_neutral_ssv] (Line 1273, column 4)
--- Error 8 of 12 ---
At <mod>\common\scripted_score_values\rtp_scripted_score_values.txt [rtp_lawful_neutral_ssv\modifier\trait] (Line 1020, column 3):
Invalid node "trait" in scope AiWillDoFromFromNoneModifier (value is: envious)
* called from <mod>\common\laws\rtp_laws.txt [laws\rtp_holidays_1_l\ai_will_do\rtp_lawful_neutral_ssv] (Line 1273, column 4)
--- Error 9 of 12 ---
At <mod>\common\scripted_score_values\rtp_scripted_score_values.txt [rtp_lawful_neutral_ssv\modifier\trait] (Line 1016, column 3):
Invalid node "trait" in scope AiWillDoFromFromNoneModifier (value is: wroth)
* called from <mod>\common\laws\rtp_laws.txt [laws\rtp_holidays_1_l\ai_will_do\rtp_lawful_neutral_ssv] (Line 1273, column 4)
--- Error 10 of 12 ---
At <mod>\common\scripted_score_values\rtp_scripted_score_values.txt [rtp_lawful_neutral_ssv\modifier\trait] (Line 1008, column 3):
Invalid node "trait" in scope AiWillDoFromFromNoneModifier (value is: greedy)
* called from <mod>\common\laws\rtp_laws.txt [laws\rtp_holidays_1_l\ai_will_do\rtp_lawful_neutral_ssv] (Line 1273, column 4)
--- Error 11 of 12 ---
At <mod>\common\scripted_score_values\rtp_scripted_score_values.txt [rtp_lawful_neutral_ssv\modifier\trait] (Line 1000, column 3):
Invalid node "trait" in scope AiWillDoFromFromNoneModifier (value is: chaste)
* called from <mod>\common\laws\rtp_laws.txt [laws\rtp_holidays_1_l\ai_will_do\rtp_lawful_neutral_ssv] (Line 1273, column 4)
--- Error 12 of 12 ---
At <mod>\common\scripted_score_values\rtp_scripted_score_values.txt [rtp_lawful_neutral_ssv\modifier\trait] (Line 995, column 3):
Invalid node "trait" in scope AiWillDoFromFromNoneModifier (value is: humble)
* called from <mod>\common\laws\rtp_laws.txt [laws\rtp_holidays_1_l\ai_will_do\rtp_lawful_neutral_ssv] (Line 1273, column 4)
 
Last edited:
The console command 'run' can execute script files found in Documents\Paradox Interactive\Crusader Kings II. Could The Validator verify the script in these files? They're all run in character scope (ROOT is the currently controlled character), with no FROMs available.

While such files need no extension, it's of course sensible to require the same .txt extension all other script files use. Validator would have to exclude settings.txt and pdx_login.txt. This feature should definitely be optional, or it may interfere with verifying setting of event targets in mods, among other things.

Code:
At <mod>\common\governments\feudal_governments.txt [feudal_governments\roman_imperial_government\allow] (Line 341, column 3):
Invalid node "allow" in scope GovernmentDef (value is: <a complex type>)

Supported and tested, works in tandem with 'is_government_allowed'-trigger.

Code:
--- Error 1 of 4 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\is_targeted_decision_potential] (Line 139, column 5):
<a complex type> is not a valid TargettedDecision.
--- Error 2 of 4 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\is_title_decision_potential] (Line 162, column 5):
<a complex type> is not a valid TitleDecision.
--- Error 3 of 4 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\is_settlement_decision_potential] (Line 234, column 5):
<a complex type> is not a valid SettlementDecision.
--- Error 4 of 4 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\is_trade_post_decision_allowed] (Line 313, column 5):
<a complex type> is not a valid TradePostDecision.

RHS is a clause, see valid, tested examples below:

Code:
is_targeted_decision_potential/allowed = {
    key = prisoner_torture # ID of targeted decision
    character = c_91487/spouse/liege/event_target:saved_character/FROM
}

is_targeted_decision_potential/allowed = {
    key = prisoner_torture # ID of targeted decision
    character = b|c|d|k|e_something/event_target:some_title/event_target:some_province/FROM (title or province)
}

is_title_decision_potential/allowed = {
    key = set_crown_focus # ID of title decision
    title = c_frisia/ROOT (relative scopes can point to titles and provinces)/capital_holding/capital_scope/78 (province ID)/event_target:some_title (but not provinces)
}

is_settlement_decision_potential/allowed = {
    key = convert_tribal_to_castle # ID of settlement decision
    title = event_target:test_barony/capital_holding/b_brunsbuttel/FROM (title)
}

is_trade_post/hospital/fort_decision_potential/allowed = {
    key = abandon_trade_post # ID of trade_post/hospital/fort decision
    title = 78 (province ID)/capital_scope/capital_holding/b|c|d|k|e_something/primary_title/event_target:some_province/event_target:some_title/ROOT (title or province)
}

Patch 2.4 also mentions a 'settlement'-parameter, but it doesn't seem to do anything.

Code:
--- Error 1 of 5 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\capital_scope\has_crusade_war_started] (Line 138, column 6):
Invalid node "has_crusade_war_started" in scope ProvTrigger (value is: yes)
--- Error 2 of 5 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\religion_scope\has_crusade_war_started] (Line 143, column 6):
Invalid node "has_crusade_war_started" in scope ReligionTrigger (value is: yes)
--- Error 3 of 5 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\secret_religious_cult\has_crusade_war_started] (Line 148, column 6):
Invalid node "has_crusade_war_started" in scope SocietyTrigger (value is: yes)
--- Error 4 of 5 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\k_papal_state\has_crusade_war_started] (Line 153, column 6):
Invalid node "has_crusade_war_started" in scope TitleTrigger (value is: yes)
--- Error 5 of 5 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\has_crusade_war_started] (Line 157, column 5):
Invalid node "has_crusade_war_started" in scope CharTrigger (value is: yes)

Tested to work in character, province, title, society and religion trigger scopes. Takes a bool.

Code:
--- Error 1 of 4 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\export_to_variable\value] (Line 732, column 6):
"alternate_start_value" is not a valid ExportToVariableCharValue.
--- Error 2 of 4 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\export_to_variable\value] (Line 738, column 6):
"alternate_start_min_value" is not a valid ExportToVariableCharValue.
--- Error 3 of 4 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\export_to_variable\value] (Line 744, column 6):
"alternate_start_max_value" is not a valid ExportToVariableCharValue.
--- Error 4 of 4 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\export_to_variable\key] (Line 742, column 6):
Invalid node "key" in scope <anon> (value is: num_counties)

From official documentation (also found in common\alternate_start_documentation.info):
Code:
export_to_variable = {                # Will export the value chosen by the player for a setting to a provided variable
    which = variable_name            # Variable to export to
    value = alternate_start_value/        # What to export
        alternate_start_min_value/
        alternate_start_max_value    
    key = setting_name            # Which setting to export it from
}

'key' takes any 'setting' defined in common\alternate_start\00_settings.txt (and likely any text file in that folder), that uses 'min' and 'max' values.
''value' takes the three literals as shown above.

Here's some example script that works:
Code:
export_to_variable = {
    key = num_counties
    which = start_value
    value = alternate_start_value
}

export_to_variable = {
    key = num_counties
    which = min_value
    value = alternate_start_min_value
}

export_to_variable = {
    key = num_counties
    which = max_value
    value = alternate_start_max_value
}

export_to_variable = {
    key = female_ruler_percentage
    which = start_value_2
    value = alternate_start_value
}

export_to_variable = {
    key = female_ruler_percentage
    which = min_value_2
    value = alternate_start_min_value
}

export_to_variable = {
    key = female_ruler_percentage
    which = max_value_2
    value = alternate_start_max_value
}

Code:
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\capital_scope\destroy_wonder] (Line 593, column 6):
Invalid node "destroy_wonder" in scope ProvCommand (value is: yes)

Added in 3.2, valid only in province effect scopes, takes 'yes'.
 
Last edited:
Amiga. Or just amigue because why assume anyways.

And same thing with create_character it seems
These are showing something other than liege etc but I assume you mean that one can use "location" in these contexts.

Also I am using these Scripted Score Values in ai_will_do but the validator is flooding with errors.
According to the patchnotes: "- Added Scripted score values similar to scripted triggers and effects. Can be utilized in ai_chance, ai_will_do, random list weighting and anything that utilizes the triggered modifiers to calculate a value."

If you read the error you will see that it is not complaining about scripted score errors in and of themselves. Instead they are complaining about trait being invalid, as the valdiator thinks that this is a ROOT=title scope (based on the fact that it is a "laws" clause. So what is wrong? Is ROOT not actually title, is "trait" allowed in such a scope, or what?

The console command 'run' can execute script files found in Documents\Paradox Interactive\Crusader Kings II. Could The Validator verify the script in these files? They're all run in character scope (ROOT is the currently controlled character), with no FROMs available.
Will not be adding this since it's a new feature and there are workarounds.
 
Not to be argumentative, but the run console command has been in use at least 2.5 years…

Your call anyway, just saying it's not new.
From the point of view of the Validator, it would be a new feature that the Validator needs to support checking such files. As opposed to bugfixes for things which Validator already checks.
 
I used to the validator and a long list of errors and things needed to be fixed showed up and im unsure if its correct but it shouldnt have that many errors or is my game corrupted
 
I used to the validator and a long list of errors and things needed to be fixed showed up and im unsure if its correct but it shouldnt have that many errors or is my game corrupted
If you mean Vanilla then don't worry. It got thousands and thousands of bugs and issues, that's normal. The tool is mostly to check your mods.
 
Coming back to several things related to 'fancy' scopes ('liege', 'spouse', etc.) I reported on before, namely things like the following:

Code:
save_persistent_event_target = {
    name = capital_target
    scope = capital_scope
}

export_to_variable = {
    which = spouse_stewardship
    value = stewardship
    who = spouse
}

religion = capital_scope

I previously suspected any scope valid in the current scope can be used here, but that turned out to be false. There is a select list of scopes that work and if they work in one of these situations, they work in all of them (if and only if, meaning the same scopes work in all situations and there are no scopes that work in at least one, but not all of them).

Hopefully, this allows for a much easier way to check such script. At least one choice remains: Allow for any such scope to be used wherever they're valid, or restrict them to fitting scopes only? I suspect the former would be easiest to implement, and leave it up to modders to make choices that are correct and functional in-game.

For example, the 'county' scope is only valid in province scopes, 'wonder_owner' only in wonder scopes and 'society' only in character scopes.

In any case, here's a full list of scopes I've successfully tested as the RHS for triggers/effects ('religion', 'culture'), 'save_persistent_event_target' and 'export_to_variable'.
In addition, all religion and cultures can also be referenced directly, since they are all available as scopes (see examples below this list).
For clarity, the existing functionality, allowing ,among other things, 'religion = spouse', would be subsumed by this new list of scopes, as this extends the allowed scopes for such purposes.

Code:
religion_scope
true_religion_scope
secret_religion_scope
secret_religious_cult
culture_scope
gfx_culture_scope

family_palace
realm
faction_claimant
location
county
crownlaw_title
defacto_liege_title
dejure_liege_title
clan_title
wonder_owner
society
owner
holder_scope

betrothed
consort
current_heir
educator
highest_ranked_relative
job_chancellor
job_marshal
job_treasurer
job_spiritual
job_spymaster
killer
liege
liege_before_war
lover
mother
mother_even_if_dead
player_heir
spouse
supported_claimant
top_liege
location
suzerain
true_father
true_father_even_if_dead
regent

least_populous_clan_vassal
least_populous_clan_vassal_except_me
least_prestigious_clan_vassal
least_prestigious_clan_vassal_except_me
most_populous_clan_vassal
most_populous_clan_vassal_except_me
most_prestigious_clan_vassal
most_prestigious_clan_vassal_except_me
strongest_clan_vassal
strongest_clan_vassal_except_me
weakest_clan_vassal
weakest_clan_vassal_except_me

Code:
d_knights_templar = {
    save_persistent_event_target = {
        name = holy_order_religion
        scope = catholic
    }
}

I hope this was clear enough.
This also applies to 'check_variable', 'set_variable', etc., but Validator doesn't complain about anything I've tested.

Code:
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\hermetics\society_type] (Line 147, column 6):
"warrior_lodge_norse" is not a valid MaybeEventTarget(Society).

This trigger takes society IDs.

Code:
--- Error 1 of 2 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\secret_religious_cult\society_type] (Line 153, column 6):
"secret_religious_society_orthodox" is not a valid MaybeEventTarget(Society).
--- Error 2 of 2 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\secret_religious_society_orthodox] (Line 156, column 5):
Invalid node "secret_religious_society_orthodox" in scope CharTrigger (value is: <a complex type>)

'secret_religious_society_<religion_ID>' is both valid as a scope, as well as a RHS to both 'is_society' and 'society_type' triggers.

Code:
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\check_variable] (Line 150, column 5):
The right sides of a "which" clause may not be identical.
There were 2 duplicates.
    [I2648|L152|C6]: which = some_variable
    [I2620|L151|C6]: which = some_variable

Valid when using 2.8-style numerical operators. See example below:

Code:
check_variable = {
    which = some_variable # variable to use in current scope
    which < some_variable # variable to use in second scope
    which = catholic      # scope to pull second variable from
}

Code:
--- Error 1 of 2 ---
At <mod>\common\council_voting\01_pragmatist_pattern.txt [pragmatist_pattern_for\revoke_title_interaction\custom_tooltip\hidden_tooltip\FROMFROMFROM] (Line 176, column 5):
No direct match found for FROMFROMFROM (is the casing correct?). However, other possible matches in scope CharTrigger were found.
This* (i.e. FROM, FROMFROM, PREV, etc)
    Left: [ThisChar, ThisProv, ThisTitle, ThisUnit, ThisSociety, ThisArtifact, ThisBattle, ThisWar, ThisSiege, ThisOffmapPower, ThisReligion, ThisCulture, ThisBloodline, ThisWonderBuilding, ThisWonderUpgrade]
    Right: [CharTrigger, ProvTrigger, TitleTrigger, UnitTrigger, SocietyTrigger, ArtifactTrigger, BattleTrigger, WarTrigger, SiegeTrigger, OffmapPowerTrigger, ReligionTrigger, CultureTrigger, BloodlineTrigger, WonderBuildingTrigger, WonderUpgradeTrigger]
    (using ThisChar as an example for analysis)
    cannot be correct because:
    FROMFROMFROM points to <null>.
    However, a Char was expected.
    This is not a valid place to use FROM.
--- Error 2 of 2 ---
At <mod>\common\council_voting\01_pragmatist_pattern.txt [pragmatist_pattern_for\revoke_title_interaction\custom_tooltip\hidden_tooltip\FROMFROMFROM] (Line 176, column 5):
Invalid use of 'FROMFROMFROM': This is not a valid place to use FROM.

Found in EMF, part of HIP. Documentation found in vanilla files:

04_malcontent_pattern.txt, line 137 (mentions FROMFROMFROM is a title).

Code:
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\is_trade_post_decision_potential\key] (Line 251, column 6):
"abandon_trade_post" is not a valid TradePostDecision.

Found in (vanilla file) decisions\trade_post_decisions.txt. Tested to work in-game.

Code:
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope] (Line 134, column 4):
There may be no duplications of a Province clause.
There were 2 duplicates.
    [I3330|L182|C5]: 78 = {   owner = {    is_targeted_decision_allowed = {     key = prisoner_torture    character = PREV   }  } }
    [I3989|L216|C5]: 78 = {   owner = {    is_title_decision_potential = {     key = set_crown_focus    title = PREV   }  } }

These are not duplicates.

Code:
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\prestige] (Line 809, column 5):
"some_variable" is not a valid Double.

Also takes variables, just like 'wealth' and 'piety' already do.

Code:
--- Error 1 of 2 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\capital_holding\holder_scope\spawn_unit] (Line 702, column 7):
All or none of the following must appear: "match_mult" or "match_character"
However, the following appear: match_mult
--- Error 2 of 2 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\capital_holding\holder_scope\spawn_unit\match_settlement] (Line 706, column 8):
Invalid node "match_settlement" in scope <anon> (value is: PREV)

'match_settlement' can be used instead of 'match_character', only one of the two should be used. Should probably always be accompanied by 'match_mult', same as 'mult_' Takes any scope to a barony title (b_, relative title scope, title saved event target, or 'capital_holding').

Code:
--- Error 1 of 7 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\NOT\society_is_active] (Line 135, column 12):
Invalid node "society_is_active" in scope TitleTrigger (value is: hermetics)
--- Error 2 of 7 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\religion_scope\NOT\society_is_active] (Line 145, column 14):
Invalid node "society_is_active" in scope ReligionTrigger (value is: hermetics)
--- Error 3 of 7 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\NOT\society_is_active] (Line 141, column 13):
Invalid node "society_is_active" in scope CharTrigger (value is: hermetics)
--- Error 4 of 7 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\culture_scope\society_is_active] (Line 149, column 6):
Invalid node "society_is_active" in scope CultureTrigger (value is: hermetics)
--- Error 5 of 7 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\capital_scope\NOT\society_is_active] (Line 155, column 14):
Invalid node "society_is_active" in scope ProvTrigger (value is: hermetics)
--- Error 6 of 7 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\capital_holding\NOT\society_is_active] (Line 160, column 14):
Invalid node "society_is_active" in scope TitleTrigger (value is: hermetics)
--- Error 7 of 7 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\747\wonder\NOT\society_is_active] (Line 166, column 15):
Invalid node "society_is_active" in scope WonderBuildingTrigger (value is: hermetics)

Works in all trigger scopes.

Code:
At <mod>\decisions\hf_warrior_lodge_decisions.txt [targeted_decisions\claim_duel_decision\is_high_prio] (Line 245, column 3):
The string claim_duel_decision_named was not found in localization.

'_named' loc keys for targeted decisions are optional, falls back on decision name loc if not present.

Code:
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\society_has_active_progress] (Line 150, column 5):
"hermetics" is not a valid Bool.

Can take a society name.

Code:
--- Error 1 of 6 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\is_liege_of] (Line 140, column 5):
"k_france" is not a valid MaybeEventTargetCharProvTitle or CharTargetExcludingMaybeEventTarget.
--- Error 2 of 6 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\is_liege_or_above] (Line 147, column 5):
"k_france" is not a valid MaybeEventTargetCharProvTitle or CharTargetExcludingMaybeEventTarget.
--- Error 3 of 6 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\vassal_of] (Line 161, column 5):
"k_france" is not a valid MaybeEventTargetCharTitle or CharTargetExcludingMaybeEventTarget.
--- Error 4 of 6 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\is_vassal_or_below] (Line 168, column 5):
"k_france" is not a valid MaybeEventTarget(Char, Title).
--- Error 5 of 6 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\is_vassal_or_below] (Line 170, column 5):
"c_144999" is not a valid MaybeEventTarget(Char, Title).
--- Error 6 of 6 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\is_vassal_or_below_of] (Line 175, column 5):
"k_france" is not a valid MaybeEventTargetCharTitle or CharTargetExcludingMaybeEventTarget.

The following triggers all take any title/character scope (ID, relative scope, saved event target).

is_liege_of
is_liege_or_above
is_liege_or_above_of
vassal_of
is_vassal_or_below
is_vassal_or_below_of

Code:
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\any_realm_province\any_province_holding\holder_scope\OR\character] (Line 144, column 9):
"d_knights_templar" is not a valid MaybeEventTargetCharTitle, OpinionClauseDefinedTypes, CharTargetExcludingMaybeEventTarget, or Bool.

'character'-trigger also accepts title IDs.

Code:
--- Error 1 of 8 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\religion] (Line 140, column 5):
"d_knights_templar" is not a valid TopLiege, Religion, or MaybeEventTargetCharProvReligionSocietyTitle, CharTargetExcludingMaybeEventTarget, ReligionTargetCheck, or SocietyThingsWithoutThis.
--- Error 2 of 8 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\secret_religion] (Line 141, column 5):
"d_knights_templar" is not a valid Religion, MaybeEventTargetCharProvReligionSocietyTitle, NewChar, or SocietyThingsWithoutThis, ReligionTargetCheck, or ReligionTrigger.
--- Error 3 of 8 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\true_religion] (Line 142, column 5):
"d_knights_templar" is not a valid Religion, MaybeEventTargetCharProvReligionSocietyTitle, NewChar, or SocietyThingsWithoutThis, or ReligionTargetCheck.
--- Error 4 of 8 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\culture] (Line 143, column 5):
"d_knights_templar" is not a valid Culture or MaybeEventTargetCharCultureProvTitle, OpinionClauseDefinedTypes, or CharTargetExcludingMaybeEventTarget.
--- Error 5 of 8 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\graphical_culture] (Line 145, column 5):
"d_knights_templar" is not a valid GraphicalCultureType or MaybeEventTargetChar.
--- Error 6 of 8 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\graphical_culture] (Line 152, column 5):
"ROOT" is not a valid GraphicalCultureType or MaybeEventTargetChar.
MaybeEventTargetChar: cannot be because ROOT points to <TitleTrigger>, not Char.
--- Error 7 of 8 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\is_heresy_of] (Line 140, column 5):
"d_knights_templar" is not a valid Religion or MaybeEventTargetCharProvReligionSocietyTitle.
--- Error 8 of 8 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\is_parent_religion] (Line 141, column 5):
"d_knights_templar" is not a valid MaybeEventTargetCharProvReligionSocietyTitle or Religion.

These triggers also all accept title IDs, 'graphical_culture' also accepts relative title scopes.

religion
secret_religion
true_religion
culture
graphical_culture
is_heresy_of
is_parent_religion

Code:
--- Error 1 of 8 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\cathar\religion_allows_male_temple_holders] (Line 164, column 6):
Invalid node "religion_allows_male_temple_holders" in scope ReligionTrigger (value is: yes)
--- Error 2 of 8 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\cathar\religion_allows_female_temple_holders] (Line 162, column 6):
Invalid node "religion_allows_female_temple_holders" in scope ReligionTrigger (value is: yes)
--- Error 3 of 8 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\cathar\secret_religious_cult\religion_allows_male_temple_holders] (Line 172, column 7):
Invalid node "religion_allows_male_temple_holders" in scope SocietyTrigger (value is: yes)
--- Error 4 of 8 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\cathar\secret_religious_cult\religion_allows_female_temple_holders] (Line 170, column 7):
Invalid node "religion_allows_female_temple_holders" in scope SocietyTrigger (value is: yes)
--- Error 5 of 8 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\728\religion_allows_male_temple_holders] (Line 157, column 6):
Invalid node "religion_allows_male_temple_holders" in scope ProvTrigger (value is: yes)
--- Error 6 of 8 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\728\religion_allows_female_temple_holders] (Line 155, column 6):
Invalid node "religion_allows_female_temple_holders" in scope ProvTrigger (value is: yes)
--- Error 7 of 8 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\k_france\religion_allows_male_temple_holders] (Line 180, column 6):
Invalid node "religion_allows_male_temple_holders" in scope TitleTrigger (value is: yes)
--- Error 8 of 8 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\k_france\religion_allows_female_temple_holders] (Line 178, column 6):
Invalid node "religion_allows_female_temple_holders" in scope TitleTrigger (value is: yes)

All tested to work.

Code:
--- Error 1 of 17 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\opinion\who] (Line 141, column 6):
"d_knights_hospitaler" is not a valid MaybeEventTargetCharTitle, OpinionClauseDefinedTypes, or CharTargetExcludingMaybeEventTarget.
--- Error 2 of 17 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\reverse_opinion\who] (Line 146, column 6):
"d_knights_hospitaler" is not a valid MaybeEventTargetCharTitle, OpinionClauseDefinedTypes, or CharTargetExcludingMaybeEventTarget.
--- Error 3 of 17 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\personal_opinion\who] (Line 151, column 6):
"d_knights_hospitaler" is not a valid MaybeEventTargetCharTitle, OpinionClauseDefinedTypes, or CharTargetExcludingMaybeEventTarget.
--- Error 4 of 17 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\reverse_personal_opinion\who] (Line 156, column 6):
"d_knights_hospitaler" is not a valid MaybeEventTargetCharTitle, OpinionClauseDefinedTypes, or CharTargetExcludingMaybeEventTarget.
--- Error 5 of 17 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\their_opinion\who] (Line 161, column 6):
"d_knights_hospitaler" is not a valid MaybeEventTargetCharTitle, OpinionClauseDefinedTypes, or CharTargetExcludingMaybeEventTarget.
--- Error 6 of 17 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\opinion_diff\second] (Line 167, column 6):
"d_knights_templar" is not a valid MaybeEventTargetChar or OpinionClauseDefinedTypes.
--- Error 7 of 17 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\reverse_opinion_diff\second] (Line 173, column 6):
"d_knights_templar" is not a valid MaybeEventTargetChar or OpinionClauseDefinedTypes.
--- Error 8 of 17 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\personal_opinion_diff\second] (Line 179, column 6):
"d_knights_templar" is not a valid MaybeEventTargetChar or OpinionClauseDefinedTypes.
--- Error 9 of 17 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\reverse_personal_opinion_diff\second] (Line 185, column 6):
"d_knights_templar" is not a valid MaybeEventTargetChar or OpinionClauseDefinedTypes.
--- Error 10 of 17 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\opinion_levy_raised_days\who] (Line 190, column 6):
"d_knights_hospitaler" is not a valid MaybeEventTargetCharTitle, OpinionClauseDefinedTypes, or CharTargetExcludingMaybeEventTarget.
--- Error 11 of 17 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\reverse_opinion_levy_raised_days\who] (Line 195, column 6):
"d_knights_hospitaler" is not a valid MaybeEventTargetCharTitle, OpinionClauseDefinedTypes, or CharTargetExcludingMaybeEventTarget.
--- Error 12 of 17 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\realm_levy_diff\who] (Line 200, column 6):
"d_knights_hospitaler" is not a valid MaybeEventTargetChar or CharTargetExcludingMaybeEventTarget.
--- Error 13 of 17 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\reverse_realm_levy_diff\who] (Line 205, column 6):
"d_knights_hospitaler" is not a valid MaybeEventTargetChar or CharTargetExcludingMaybeEventTarget.
--- Error 14 of 17 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\reverse_has_opinion_modifier\who] (Line 220, column 6):
"d_knights_templar" is not a valid MaybeEventTargetCharTitle, OpinionClauseDefinedTypes, or CharTargetExcludingMaybeEventTarget.
--- Error 15 of 17 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\has_opinion_modifier\who] (Line 225, column 6):
"d_knights_templar" is not a valid MaybeEventTargetCharTitle, OpinionClauseDefinedTypes, or CharTargetExcludingMaybeEventTarget.
--- Error 16 of 17 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\opinion\who] (Line 795, column 6):
"d_knights_templar" is not a valid MaybeEventTargetCharProvTitle, OpinionClauseDefinedTypes, New, or CharTargetExcludingMaybeEventTarget.
--- Error 17 of 17 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\reverse_opinion\who] (Line 800, column 6):
"d_knights_templar" is not a valid MaybeEventTargetCharProvTitle, OpinionClauseDefinedTypes, New, or CharTargetExcludingMaybeEventTarget.

All tested to work. In short, these all accept title IDs, on 'who'/'first'/'second' nodes.

Triggers
opinion
reverse_opinion
personal_opinion
reverse_personal_opinion
their_opinion
opinion_diff
reverse_opinion_diff
personal_opinion_diff
reverse_personal_opinion_diff
opinion_levy_raised_days
reverse_opinion_levy_raised_days
realm_levy_diff
reverse_realm_levy_diff
max_realm_levy_diff
reverse_max_realm_levy_diff
has_opinion_modifier
reverse_has_opinion_modifier

Effects:
opinion
reverse_opinion

Code:
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\capital_scope\owned_by] (Line 147, column 6):
"c_6392" is not a valid MaybeEventTarget(Char).

Tested to work

-----------------------------------------------------------------------------------

Found in 'A Game of Thrones' mod, version 2.1:

Code:
At <mod>\common\cb_types\000_dothraki_cb_types.txt [cb_liberate_nomad_duchy\on_success\FROM\if\hidden_tooltip\remove_special_character_title] (Line 1551, column 24):
"yes" is not a valid LocalizationKey.

Can confirm this works.

Code:
--- Error 1 of 5 ---
At <mod>\common\council_positions\04_malcontent.txt [malcontent\selection\additive_modifier\localisation_key] (Line 48, column 4):
Invalid node "localisation_key" in scope <anon> (value is: MALCONTENT_MOTIVE)
--- Error 2 of 5 ---
At <mod>\common\council_positions\04_malcontent.txt [malcontent\selection\additive_opinion_modifier\localisation_key] (Line 89, column 4):
Invalid node "localisation_key" in scope <anon> (value is: COUNCIL_POSITION_OPINION)
--- Error 3 of 5 ---
At <mod>\common\council_positions\04_malcontent.txt [malcontent\selection\additive_compared_realm_size_modifier\localisation_key] (Line 101, column 4):
Invalid node "localisation_key" in scope <anon> (value is: COUNCIL_REALM_SIZE)
--- Error 4 of 5 ---
At <mod>\common\council_positions\04_malcontent.txt [malcontent\selection\additive_power_diff_modifier\localisation_key] (Line 95, column 4):
Invalid node "localisation_key" in scope <anon> (value is: COUNCIL_POSITION_POWER)
--- Error 5 of 5 ---
At <mod>\common\council_positions\04_malcontent.txt [malcontent\selection\additive_realm_size_modifier\localisation_key] (Line 107, column 4):
Invalid node "localisation_key" in scope <anon> (value is: COUNCIL_REALM_SIZE)

Can confirm all of these work.

Code:
At <mod>\common\scripted_effects\dynamic_coa_effects.txt [set_dynamic_coa_effect\else_if\set_coa] (Line 165, column 3):
"c_hollard" is not a valid MaybeEventTargetTitle or AnyTitle.
* called from <mod>\events\adventures_the_old_gods.txt [character_event\immediate\liege\capital_scope\ROOT\random_claim\holder_scope\ROOT\if\any_demesne_title\set_dynamic_coa_effect] (Line 2440, column 32)

Can confirm this takes any title ID.

Code:
--- Error 1 of 2 ---
At <mod>\events\cadet_event.txt [character_event\immediate\FROM\set_dynasty_name] (Line 8915, column 4):
"[This.GetCadetHouseName]" is not a valid LocalizationKey.
--- Error 2 of 2 ---
At <mod>\events\traditional_dynastic_claims_events.txt [character_event\immediate\random_owned_bloodline\set_name] (Line 1681, column 4):
"[Root.GetBloodlineName]" is not a valid LocalizationKey.

Tested to take localisation, like so:

Code:
set_dynasty_name = [This.PrimaryTitle.GetFullBaseName]
set_name = [Prev.PrimaryTitle.GetFullBaseName]


Code:
At <mod>\events\raiding_events.txt [character_event\immediate\if\random_artifact\limit\previous_owner] (Line 7551, column 6):
Invalid node "previous_owner" in scope ArtifactTrigger (value is: <a complex type>)

Tested to work.

Code:
At <mod>\events\valyrian_steel_events.txt [character_event\immediate\hidden_tooltip\random_artifact\random_artifact_owner] (Line 582, column 5):
Invalid node "random_artifact_owner" in scope ArtifactRandomCommand (value is: <a complex type>)

Tested to work.
 
Last edited:
Can confirm this takes any title ID.
The repro is in AGOT 2.1? Please provide link.

AnyTitle should already include all title IDs, which makes this error strange.

Tested to take localisation, like so:
Are these any localization strings? Will be a hard thing I think (but there was another localization hard thing IIRC, IIRC the two are closely related in that we need to queue localization strings to be checked when the rest of localization is checked. Which helps handle things like saved scopes and so on. So if you bring that other one back as well and describe them together as a hard thing I can take a look as a hard thing.

In any case, here's a full list of scopes I've successfully tested as the RHS for triggers/effects ('religion', 'culture'), 'save_persistent_event_target' and 'export_to_variable'.
In addition, all religion and cultures can also be referenced directly, since they are all available as scopes (see examples below this list).

For export_to_variable I assume you mean "who" can be set to the Char, Prov, and Title scope changes of the ones you listed above.

So for the trigger/effect "religion" and "culture" you are saying their RHS can be any of the ones listed above? While triggers such as "secret_religion" cannot be such? I will implement as that and see.
 
Thanks once more for the update!

The repro is in AGOT 2.1? Please provide link.

AnyTitle should already include all title IDs, which makes this error strange.

Might have been an orphaned title in that mod, at it does work properly in a quick test I did.

Are these any localization strings? Will be a hard thing I think (but there was another localization hard thing IIRC, IIRC the two are closely related in that we need to queue localization strings to be checked when the rest of localization is checked. Which helps handle things like saved scopes and so on. So if you bring that other one back as well and describe them together as a hard thing I can take a look as a hard thing.

I thought Validator could at least recognise them as localisation strings, even if without seeing if they are valid. Localisation is indeed another hard thing.

For export_to_variable I assume you mean "who" can be set to the Char, Prov, and Title scope changes of the ones you listed above.

Exactly.

So for the trigger/effect "religion" and "culture" you are saying their RHS can be any of the ones listed above? While triggers such as "secret_religion" cannot be such? I will implement as that and see.

I probably overlooked 'secret/true_religion', as well as all three religion_group and culture_group triggers. I've tested them all to work.

Code:
--- Error 1 of 6 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\export_to_variable\who] (Line 408, column 6):
"father" is not a valid MaybeEventTargetCharProvTitle, RhsFancyScopeOptionToChar, RhsFancyScopeOptionToProv, or RhsFancyScopeOptionToTitle.
--- Error 2 of 6 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\export_to_variable\who] (Line 414, column 6):
"job_chancellor" is not a valid MaybeEventTargetCharProvTitle, RhsFancyScopeOptionToChar, RhsFancyScopeOptionToProv, or RhsFancyScopeOptionToTitle.
--- Error 3 of 6 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\export_to_variable\who] (Line 420, column 6):
"job_marshal" is not a valid MaybeEventTargetCharProvTitle, RhsFancyScopeOptionToChar, RhsFancyScopeOptionToProv, or RhsFancyScopeOptionToTitle.
--- Error 4 of 6 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\export_to_variable\who] (Line 426, column 6):
"job_spiritual" is not a valid MaybeEventTargetCharProvTitle, RhsFancyScopeOptionToChar, RhsFancyScopeOptionToProv, or RhsFancyScopeOptionToTitle.
--- Error 5 of 6 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\export_to_variable\who] (Line 432, column 6):
"job_spymaster" is not a valid MaybeEventTargetCharProvTitle, RhsFancyScopeOptionToChar, RhsFancyScopeOptionToProv, or RhsFancyScopeOptionToTitle.
--- Error 6 of 6 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\export_to_variable\who] (Line 438, column 6):
"job_treasurer" is not a valid MaybeEventTargetCharProvTitle, RhsFancyScopeOptionToChar, RhsFancyScopeOptionToProv, or RhsFancyScopeOptionToTitle.

A few I overlooked. Any job_<councillor> that can be modded in are not valid here, only these five scopes that are provided by the game.

Code:
At <mod>\decisions\conversion_decisions.txt [targeted_decisions\convert_to_local_religion\potential\NOT\religion] (Line 352, column 12):
"capital_scope" is not a valid Religion or MaybeEventTargetCharProvReligionSocietyTitle, CharTargetExcludingMaybeEventTarget, ReligionTargetCheck, SocietyThingsWithoutThis, AnyTitle, or RhsFancyScopeOptionToAny.

Found here. Is supported (verified by testing) for all culture/religion triggers/effects, if used in character scope, since provinces have a religion and culture. Religion/culture group triggers also support this.

Code:
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\prompt_name\name_list] (Line 402, column 6):
"TEST_KEY" is not a valid "religion" or "culture".

Can take localisation keys that look like the following (also see patch 3.0 notes):

Code:
TEST_KEY;Does|This|Even|Work;;;;;;;;;;;;;x


Code:
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\reset_coa] (Line 376, column 4):
"k_france" is not a valid MaybeEventTarget(Title).

Tested to take any title ID. Tested to work in all effect scopes except 'war' and 'siege/combat'.

Code:
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\convert_to_secret_religion] (Line 389, column 5):
"c_144999" is not a valid Yes or MaybeEventTargetChar.

Tested to take character IDs.

Code:
--- Error 1 of 2 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\set_secret_religion\target] (Line 405, column 6):
"c_144999" is not a valid MaybeEventTargetCharProvReligionSocietyTitle or NewChar.
--- Error 2 of 2 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\religion] (Line 389, column 5):
<a complex type> is not a valid Religion, MaybeEventTargetCharProvReligionSocietyTitle, CharTargetExcludingMaybeEventTarget, TopLiege, SocietyThingsWithoutThis, AnyTitle, or RhsFancyScopeOptionToAny.

'religion'-effect also supports clause syntax, specifying 'target' and 'target_type', like 'set_secret_religion' and all religion triggers. Both also take character IDs for 'target'.

Code:
At <mod>\events\soa_heresy_events.txt [narrative_event\immediate\if\d_knights_templar\save_persistent_event_target\name] (Line 1684, column 6):
This event target persistent_event_target:holy_order_religion was inferred to have type Religion at <mod>\events\on_action_events.txt [narrative_event\immediate\hidden_effect\ROOT\trigger_switch\norse_pagan_reformed\d_jomsvikings\save_persistent_event_target\name] (Line 5132, column 9) but here has type Char

Modified vanilla event, script below, also available here. FROM and FROMFROM have been religion scopes since patch 2.8, and are no longer dummy characters. Tested to work.

Code:
# SoA.4200 - A heresy has become the new orthodoxy. fires on_heresy_takeover.
# FROM is new orthodoxy
# FROMFROM is new heresy
narrative_event = {
    id = SoA.4200
    title = EVTTITLE_SOA_4200
    desc = EVTDESC_SOA_4200
    picture = GFX_evt_bishop
    border = GFX_event_narrative_frame_religion
    hide_from = yes

    major = yes

    is_triggered_only = yes

    trigger = {
        OR = {
            is_alternate_start = no
            total_years_played = 1
        }
    }

    immediate = {
        log = "[From.GetName] is the new orthodoxy of [FromFrom.GetName]"

        # Update holy order persistent event target religion scopes
        # Holy Order titles and their leaders should already have been switched to the new orthodoxy

        if = {
            limit = {
                OR = {
                    catholic = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                    cathar = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                    fraticelli = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                    lollard = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                    waldensian = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                }
            }

            d_knights_templar = {
                log = "Updated persistent holy order religion scope of the [This.GetFullName] to [From.GetName]"

                save_persistent_event_target = {
                    name = holy_order_religion
                    scope = FROM
                }
            }

            d_livonian_order = {
                log = "Updated persistent holy order religion scope of the [This.GetFullName] to [From.GetName]"

                save_persistent_event_target = {
                    name = holy_order_religion
                    scope = FROM
                }
            }

            d_teutonic_order = {
                log = "Updated persistent holy order religion scope of the [This.GetFullName] to [From.GetName]"

                save_persistent_event_target = {
                    name = holy_order_religion
                    scope = FROM
                }
            }

            k_teutonic_state = {
                log = "Updated persistent holy order religion scope of the [This.GetFullName] to [From.GetName]"

                save_persistent_event_target = {
                    name = holy_order_religion
                    scope = FROM
                }
            }

            d_knights_hospitaler = {
                log = "Updated persistent holy order religion scope of the [This.GetFullName] to [From.GetName]"

                save_persistent_event_target = {
                    name = holy_order_religion
                    scope = FROM
                }
            }

            d_knights_santiago = {
                log = "Updated persistent holy order religion scope of the [This.GetFullName] to [From.GetName]"

                save_persistent_event_target = {
                    name = holy_order_religion
                    scope = FROM
                }
            }

            d_knights_calatrava = {
                log = "Updated persistent holy order religion scope of the [This.GetFullName] to [From.GetName]"

                save_persistent_event_target = {
                    name = holy_order_religion
                    scope = FROM
                }
            }
        }

        if = {
            limit = {
                OR = {
                    orthodox = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                    bogomilist = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                    iconoclast = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                    monothelite = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                    paulician = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                }
            }

            d_holy_sepulchre = {
                log = "Updated persistent holy order religion scope of the [This.GetFullName] to [From.GetName]"

                save_persistent_event_target = {
                    name = holy_order_religion
                    scope = FROM
                }
            }
        }

        if = {
            limit = {
                OR = {
                    miaphysite = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                    monophysite = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                }
            }

            d_saint_anthony = {
                log = "Updated persistent holy order religion scope of the [This.GetFullName] to [From.GetName]"

                save_persistent_event_target = {
                    name = holy_order_religion
                    scope = FROM
                }
            }
        }

        if = {
            limit = {
                OR = {
                    nestorian = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                    messalian = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                }
            }

            d_saint_addai = {
                log = "Updated persistent holy order religion scope of the [This.GetFullName] to [From.GetName]"

                save_persistent_event_target = {
                    name = holy_order_religion
                    scope = FROM
                }
            }
        }

        if = {
            limit = {
                OR = {
                    shiite = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                    druze = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                    hurufi = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                    qarmatian = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                }
            }

            d_hashshashin = {
                log = "Updated persistent holy order religion scope of the [This.GetFullName] to [From.GetName]"

                save_persistent_event_target = {
                    name = holy_order_religion
                    scope = FROM
                }
            }
        }

        if = {
            limit = {
                OR = {
                    sunni = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                    zikri = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                    yazidi = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                }
            }

            d_bektashi = {
                log = "Updated persistent holy order religion scope of the [This.GetFullName] to [From.GetName]"

                save_persistent_event_target = {
                    name = holy_order_religion
                    scope = FROM
                }
            }
        }

        if = {
            limit = {
                OR = {
                    ibadi = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                    kharijite = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                }
            }

            d_haruriyyah = {
                log = "Updated persistent holy order religion scope of the [This.GetFullName] to [From.GetName]"

                save_persistent_event_target = {
                    name = holy_order_religion
                    scope = FROM
                }
            }
        }

        if = {
            limit = {
                OR = {
                    jewish = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                    karaite = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                    samaritan = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                }
            }

            d_zealots = {
                log = "Updated persistent holy order religion scope of the [This.GetFullName] to [From.GetName]"

                save_persistent_event_target = {
                    name = holy_order_religion
                    scope = FROM
                }
            }
        }

        if = {
            limit = {
                OR = {
                    zoroastrian = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                    mazdaki = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                    manichean = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                    khurmazta = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                }
            }

            d_immortals = {
                log = "Updated persistent holy order religion scope of the [This.GetFullName] to [From.GetName]"

                save_persistent_event_target = {
                    name = holy_order_religion
                    scope = FROM
                }
            }

            d_army_light = {
                log = "Updated persistent holy order religion scope of the [This.GetFullName] to [From.GetName]"

                save_persistent_event_target = {
                    name = holy_order_religion
                    scope = FROM
                }
            }
        }

        if = {
            limit = {
                OR = {
                    norse_pagan = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                    norse_pagan_reformed = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                }
            }

            d_jomsvikings = {
                log = "Updated persistent holy order religion scope of the [This.GetFullName] to [From.GetName]"

                save_persistent_event_target = {
                    name = holy_order_religion
                    scope = FROM
                }
            }
        }

        if = {
            limit = {
                OR = {
                    tengri_pagan = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                    tengri_pagan_reformed = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                }
            }

            d_sky_lords = {
                log = "Updated persistent holy order religion scope of the [This.GetFullName] to [From.GetName]"

                save_persistent_event_target = {
                    name = holy_order_religion
                    scope = FROM
                }
            }
        }

        if = {
            limit = {
                OR = {
                    west_african_pagan = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                    west_african_pagan_reformed = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                }
            }

            d_spirit_guardians = {
                log = "Updated persistent holy order religion scope of the [This.GetFullName] to [From.GetName]"

                save_persistent_event_target = {
                    name = holy_order_religion
                    scope = FROM
                }
            }
        }

        if = {
            limit = {
                OR = {
                    slavic_pagan = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                    slavic_pagan_reformed = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                }
            }

            d_warriors_perun = {
                log = "Updated persistent holy order religion scope of the [This.GetFullName] to [From.GetName]"

                save_persistent_event_target = {
                    name = holy_order_religion
                    scope = FROM
                }
            }
        }

        if = {
            limit = {
                OR = {
                    baltic_pagan = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                    baltic_pagan_reformed = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                }
            }

            d_chosen_perkunas = {
                log = "Updated persistent holy order religion scope of the [This.GetFullName] to [From.GetName]"

                save_persistent_event_target = {
                    name = holy_order_religion
                    scope = FROM
                }
            }
        }

        if = {
            limit = {
                OR = {
                    finnish_pagan = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                    finnish_pagan_reformed = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                }
            }

            d_sons_kaleva = {
                log = "Updated persistent holy order religion scope of the [This.GetFullName] to [From.GetName]"

                save_persistent_event_target = {
                    name = holy_order_religion
                    scope = FROM
                }
            }
        }

        if = {
            limit = {
                OR = {
                    aztec = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                    aztec_reformed = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                }
            }

            d_huitzilopochtli = {
                log = "Updated persistent holy order religion scope of the [This.GetFullName] to [From.GetName]"

                save_persistent_event_target = {
                    name = holy_order_religion
                    scope = FROM
                }
            }
        }

        if = {
            limit = {
                OR = {
                    bon = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                    bon_reformed = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                }
            }

            d_dralhas_children = {
                log = "Updated persistent holy order religion scope of the [This.GetFullName] to [From.GetName]"

                save_persistent_event_target = {
                    name = holy_order_religion
                    scope = FROM
                }
            }
        }

        if = {
            limit = {
                OR = {
                    zun_pagan = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                    zun_pagan_reformed = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                }
            }

            d_zun_warriors = {
                log = "Updated persistent holy order religion scope of the [This.GetFullName] to [From.GetName]"

                save_persistent_event_target = {
                    name = holy_order_religion
                    scope = FROM
                }
            }
        }

        if = {
            limit = {
                OR = {
                    hellenic_pagan = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                    hellenic_pagan_reformed = {
                        parent_religion = {
                            religion = FROM
                        }
                    }
                }
            }

            d_myrmidons = {
                log = "Updated persistent holy order religion scope of the [This.GetFullName] to [From.GetName]"

                save_persistent_event_target = {
                    name = holy_order_religion
                    scope = FROM
                }
            }
        }

        # Dharmic religions have no heresies in vanilla
    #    if = {
    #        limit = {
    #            hindu = {
    #                parent_religion = {
    #                    religion = FROM
    #                }
    #            }
    #        }
    #
    #        # Dharmic
    #        d_followers_arjuna = {
    #            log = "Updated persistent holy order religion scope of the [This.GetFullName] to [From.GetName]"
    #
    #            save_persistent_event_target = {
    #                name = holy_order_religion
    #                scope = FROM
    #            }
    #        }
    #    }
    #
    #    if = {
    #        limit = {
    #            buddhist = {
    #                parent_religion = {
    #                    religion = FROM
    #                }
    #            }
    #        }
    #
    #        d_ashokas_chosen = {
    #            log = "Updated persistent holy order religion scope of the [This.GetFullName] to [From.GetName]"
    #
    #            save_persistent_event_target = {
    #                name = holy_order_religion
    #                scope = FROM
    #            }
    #        }
    #    }
    #
    #    if = {
    #        limit = {
    #            jain = {
    #                parent_religion = {
    #                    religion = FROM
    #                }
    #            }
    #        }
    #
    #        d_bulls_rishabha = {
    #            log = "Updated persistent holy order religion scope of the [This.GetFullName] to [From.GetName]"
    #
    #            save_persistent_event_target = {
    #                name = holy_order_religion
    #                scope = FROM
    #            }
    #        }
    #    }
    }

Designed to work with rewritten vanilla scripted effect below, fires on_character_convert_religion

Code:
abdicate_holy_order_if_religion_changes_effect = {
    if = {
        limit = {
            holy_order = yes
            ai = yes

            any_demesne_title = {
                holy_order = yes

                persistent_event_target:holy_order_religion = {
                    NOT = { religion = PREVPREV }
                }
            }
        }

        log = "[This.GetTitledFirstName] was found to be unfit to lead the [This.PrimaryTitle.GetName] due to religious conflict!\nTitle is [This.PrimaryTitle.holy_order_religion.GetName], but leader is [This.Religion.GetName].\n"
        log = "ROOT = [Root.GetTitledFirstName]\nFROM = [From.GetTitledFirstName]\nPREV = [Prev.GetTitledFirstName]"
        abdicate = yes
    }
}
------------------------------------------------------------------

Currently, Validator accepts society IDs as a RHS to 'is_in_society', but that trigger only takes a bool.
 
Last edited:
Code:
At <mod>\decisions\conversion_decisions.txt [targeted_decisions\convert_to_local_religion\effect\tooltip\religion] (Line 388, column 5):
"capital_scope" is not a valid Religion, MaybeEventTargetCharProvReligionSocietyTitle, CharTargetExcludingMaybeEventTarget, TopLiege, SocietyThingsWithoutThis, AnyTitle, or RhsFancyScopeOptionToAny.

This one still remains. Also tested to work.

Code:
--- Error 1 of 1 ---
At <mod>\events\soa_heresy_events.txt [narrative_event\immediate\if\d_knights_templar\save_persistent_event_target\scope] (Line 1685, column 6):
"FROM" is not a valid MaybeEventTargetArtifactCharOffmapPowerProvSocietyTitle, AnyTitle, PrefixedCharId, JobTitle, Religion, Culture, RhsFancyScopeOptionToReligion, RhsFancyScopeOptionToSociety, RhsFancyScopeOptionToCulture, RhsFancyScopeOptionToTitle, RhsFancyScopeOptionToProv, or RhsFancyScopeOptionToChar.
MaybeEventTargetArtifactCharOffmapPowerProvSocietyTitle: cannot be because ThisArtifact: cannot be because FROM points to Religion.
        However, a Artifact was expected.
        This scope has its FROM set by <mod>\common\on_actions\06_sons_of_abraham.txt [on_heresy_takeover\events\SoA.4200] (Line 121, column 3)(OnAction on_heresy_takeover) as Religion
    ThisChar: cannot be because FROM points to Religion.
        However, a Char was expected.
        This scope has its FROM set by <mod>\common\on_actions\06_sons_of_abraham.txt [on_heresy_takeover\events\SoA.4200] (Line 121, column 3)(OnAction on_heresy_takeover) as Religion
    ThisOffmapPower: cannot be because FROM points to Religion.
        However, a OffmapPower was expected.
        This scope has its FROM set by <mod>\common\on_actions\06_sons_of_abraham.txt [on_heresy_takeover\events\SoA.4200] (Line 121, column 3)(OnAction on_heresy_takeover) as Religion
    ThisProv: cannot be because FROM points to Religion.
        However, a Prov was expected.
        This scope has its FROM set by <mod>\common\on_actions\06_sons_of_abraham.txt [on_heresy_takeover\events\SoA.4200] (Line 121, column 3)(OnAction on_heresy_takeover) as Religion
    ThisSociety: cannot be because FROM points to Religion.
        However, a Society was expected.
        This scope has its FROM set by <mod>\common\on_actions\06_sons_of_abraham.txt [on_heresy_takeover\events\SoA.4200] (Line 121, column 3)(OnAction on_heresy_takeover) as Religion
    ThisTitle: cannot be because FROM points to Religion.
        However, a Title was expected.
        This scope has its FROM set by <mod>\common\on_actions\06_sons_of_abraham.txt [on_heresy_takeover\events\SoA.4200] (Line 121, column 3)(OnAction on_heresy_takeover) as Religion

Validator still doesn't like this construction, detailed in last week's report.

Code:
--- Error 1 of 2 ---
At <mod>\decisions\way_of_life_decisions.txt [targeted_decisions\decision_break_free\potential\trigger_else\has_opinion_modifier\who] (Line 659, column 6):
"consort" is not a valid MaybeEventTargetCharTitle, OpinionClauseDefinedTypes, CharTargetExcludingMaybeEventTarget, or AnyTitle.
--- Error 2 of 2 ---
At <mod>\events\lovers_events.txt [character_event\option\add_rival] (Line 3333, column 3):
"spouse" is not a valid CharacterId or MaybeEventTargetChar.

These have been tested to accept 'fancy' scopes.

Code:
--- Error 1 of 7 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\num_of_demesne_castles] (Line 204, column 5):
Invalid node "num_of_demesne_castles" in scope CharTrigger (value is: 0)
--- Error 2 of 7 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\num_of_demesne_cities] (Line 205, column 5):
Invalid node "num_of_demesne_cities" in scope CharTrigger (value is: 0)
--- Error 3 of 7 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\num_of_demesne_tribes] (Line 207, column 5):
Invalid node "num_of_demesne_tribes" in scope CharTrigger (value is: 0)
--- Error 4 of 7 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\num_of_demesne_temples] (Line 208, column 5):
Invalid node "num_of_demesne_temples" in scope CharTrigger (value is: 0)
--- Error 5 of 7 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\num_of_empty_holdings] (Line 213, column 5):
Invalid node "num_of_empty_holdings" in scope CharTrigger (value is: 0)
--- Error 6 of 7 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\num_of_forts] (Line 216, column 5):
Invalid node "num_of_forts" in scope CharTrigger (value is: 0)
--- Error 7 of 7 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\num_of_unique_dynasty_vassals] (Line 238, column 5):
Invalid node "num_of_unique_dynasty_vassals" in scope CharTrigger (value is: 0)

All valid numerical triggers in character trigger scope. All take non-negative integers, support 2.8-style numerical operators.

Code:
--- Error 1 of 38 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\total_years_played] (Line 283, column 5):
"0" is not a valid PositiveInt.
--- Error 2 of 38 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\offmap_china\days_since_policy_change] (Line 315, column 6):
"0" is not a valid PositiveInt.
--- Error 3 of 38 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\offmap_china\days_since_status_change] (Line 316, column 6):
"0" is not a valid PositiveInt.
--- Error 4 of 38 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\capital_holding\num_of_buildings] (Line 324, column 6):
"0" is not a valid PositiveInt.
--- Error 5 of 38 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\capital_scope\hospital_level] (Line 330, column 6):
"0" is not a valid PositiveInt.
--- Error 6 of 38 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\capital_scope\num_of_max_settlements] (Line 331, column 6):
"0" is not a valid PositiveInt.
--- Error 7 of 38 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\any_artifact\quality] (Line 348, column 6):
"0" is not a valid PositiveInt.
--- Error 8 of 38 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\747\wonder\wonder_age] (Line 300, column 7):
"0" is not a valid PositiveInt.
--- Error 9 of 38 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\747\wonder\wonder_stage] (Line 301, column 7):
"0" is not a valid PositiveInt.
--- Error 10 of 38 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\747\wonder\wonder_stage_age] (Line 302, column 7):
"0" is not a valid PositiveInt.
--- Error 11 of 38 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\day_of_birth] (Line 160, column 5):
"0" is not a valid PositiveInt.
--- Error 12 of 38 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\days_at_current_society_rank] (Line 161, column 5):
"0" is not a valid PositiveInt.
--- Error 13 of 38 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\demesne_garrison_size] (Line 166, column 5):
"0" is not a valid PositiveInt.
--- Error 14 of 38 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\health_traits] (Line 174, column 5):
"0" is not a valid PositiveInt.
--- Error 15 of 38 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\leader_traits] (Line 179, column 5):
"0" is not a valid PositiveInt.
--- Error 16 of 38 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\lifestyle_traits] (Line 181, column 5):
"0" is not a valid PositiveInt.
--- Error 17 of 38 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\max_manpower] (Line 184, column 5):
"0" is not a valid PositiveInt.
--- Error 18 of 38 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\month_of_birth] (Line 188, column 5):
"0" is not a valid PositiveInt.
--- Error 19 of 38 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\num_of_dynasty_members] (Line 210, column 5):
"0" is not a valid PositiveInt.
--- Error 20 of 38 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\num_of_extra_landed_titles] (Line 213, column 5):
"0" is not a valid PositiveInt.
--- Error 21 of 38 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\num_of_lovers] (Line 221, column 5):
"0" is not a valid PositiveInt.
--- Error 22 of 38 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\num_of_subrealm_castles] (Line 226, column 5):
"0" is not a valid PositiveInt.
--- Error 23 of 38 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\num_of_subrealm_cities] (Line 227, column 5):
"0" is not a valid PositiveInt.
--- Error 24 of 38 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\num_of_subrealm_tribes] (Line 229, column 5):
"0" is not a valid PositiveInt.
--- Error 25 of 38 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\num_of_subrealm_temples] (Line 230, column 5):
"0" is not a valid PositiveInt.
--- Error 26 of 38 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\num_of_spouses] (Line 231, column 5):
"0" is not a valid PositiveInt.
--- Error 27 of 38 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\num_of_trade_posts] (Line 235, column 5):
"0" is not a valid PositiveInt.
--- Error 28 of 38 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\num_of_traits] (Line 236, column 5):
"0" is not a valid PositiveInt.
--- Error 29 of 38 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\num_traits] (Line 240, column 5):
"0" is not a valid PositiveInt.
--- Error 30 of 38 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\personality_traits] (Line 243, column 5):
"0" is not a valid PositiveInt.
--- Error 31 of 38 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\realm_diplomacy] (Line 256, column 5):
"0" is not a valid PositiveInt.
--- Error 32 of 38 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\realm_intrigue] (Line 257, column 5):
"0" is not a valid PositiveInt.
--- Error 33 of 38 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\realm_learning] (Line 258, column 5):
"0" is not a valid PositiveInt.
--- Error 34 of 38 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\realm_levies] (Line 259, column 5):
"0" is not a valid PositiveInt.
--- Error 35 of 38 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\realm_martial] (Line 260, column 5):
"0" is not a valid PositiveInt.
--- Error 36 of 38 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\realm_stewardship] (Line 262, column 5):
"0" is not a valid PositiveInt.
--- Error 37 of 38 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\republic_total_num_of_trade_posts] (Line 265, column 5):
"0" is not a valid PositiveInt.
--- Error 38 of 38 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\society_influence] (Line 268, column 5):
"0" is not a valid PInt or <anon>.

These can all take 0.
 
If you read the error you will see that it is not complaining about scripted score errors in and of themselves. Instead they are complaining about trait being invalid, as the valdiator thinks that this is a ROOT=title scope (based on the fact that it is a "laws" clause. So what is wrong? Is ROOT not actually title, is "trait" allowed in such a scope, or what?

I have no clue wtf I was smoking that day, but yeah you are correct LMAO. Sorry for that false report!