• 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.
Yes, that is a limitation of validator analysis, and a smarter analysis would take a great amount of effort.

I expected as much. Not a big deal and a rare occurrence.

Not seing any relevant error when using the repro and can't find the error listed in vanilla either. Can you package the repro as a mod and make sure it shows up there, in case I set up the on_actions call wrong?

No longer seems to come up. Not sure what was going on, since I didn't do anything about it.

I mean when we switch to owner from an offmap scope, should the new scope be char (the owning character) or title (the owning title) or what? Will go with owner since it seems more likely based on other ones. Though then what's the difference between owner and ruler for offmap powers?

It scopes to a character scope, yes. It looks to me like you implemented just that already.

Not without significant difficulty.

Alright, no big deal either. Another rare occurrence.

Validator is wondering what FROM is. Right now none of the hardcoded effects have a FROM set as I don't know if they have FROMs or not. So please list the FROMs/FROMFROMs/etc for the hardcoded effects. For this specific effect I assume FROM=char but inform if that is wrong.

I see. I'll try to find out the various FROMs, if any exist.

I assume this is the same as "trait".

Yes.

So what is the situation? Despite being a narrative_event it has root=title because it is called as such from on_actions?

Correct. It looks like you already put something in place for this, though it does generate a few new errors.

Code:
--- Error 1 of 3 ---
At <mod>\events\on_action_events.txt [narrative_event\immediate\if\character_event] (Line 6223, column 4):
Invalid node "character_event" in scope TitleIfClause (value is: <a complex type>)
--- Error 2 of 3 ---
At <mod>\events\on_action_events.txt [narrative_event\only_rulers] (Line 6175, column 2):
Invalid node "only_rulers" in scope CharMaybeTitleEvent (value is: yes)
--- Error 3 of 3 ---
At <mod>\events\on_action_events.txt [narrative_event\option\trigger\is_heretic] (Line 4441, column 4):
Invalid node "is_heretic" in scope TitleTrigger (value is: yes)

While ROOT is a title in this special on_action mess, THIS (i.e. the opening scope) is still a character (as per my testing that I included last time), so this should still be valid.

This is complaining about the RHS as the error states. So what is it, RHS of "religion" can be any of the society things? That is what I will do for now anyways.

Correct, any society name works. It needs to have 'associated_religion' set, if it's not a secret religious society, but that's probably better left up to scripters to take care of.

What does random do in this case? What is the code snippet?

A randomly generated number between 0 and 100 needs to conform to the operator and RHS number. I suppose there isn't anything that two of such nodes could accomplish that one couldn't, since this is just about chance for something to succeed. Rarely used in vanilla.

Does anything actually use this in vanilla or anywhere? If not and no one knows the point what is actually the point of supporting it?

No, not that I know of. I've been trying to find any undocumented features that are potentially useful. It does appear this one is very much useless. Perhaps a holdover from early in CK2 development, before it was cut loose.
Edit: Found it commented out in ze_council_power_laws.txt, so it was likely something (partially) implemented in Conclave.

Well what's the reason ROOT is allowed here? Obviously ROOT can be used in this scope but the error isn't saying that ROOT isn't even allowed to be used in the current scope.

All the other uses of ROOT are characters. Vanilla uses 'family = ROOT' here (line 447) and as far as I've been able to ascertain, that's an alias for 'dynasty'. Testing shows neither accepts a title, so I strongly suspect ROOT is a character scope here. If only CK2's error detection and/or documentation was halfway decent.

Edit: No, it's title scope, so vanilla had a bug for many years. 'family' does NOT accept title scopes.

This is already supposed to work along with a few of the others. So you are saying it doesn't work?

I'm fairly sure I only added items to the list that Validator reported on. I'll check again.
Edit: Of the below script, the first half raises an error in Validator, the second one does not.
If it helps, CK2 can handle character IDs containing 10 digits without issue, perhaps more.

Code:
vassalize_or_take_under_title = {
    title = b_pempton
    enemy = c_2601795
    type = host
}

vassalize_or_take_under_title = {
    title = e_arabia
    enemy = c_34002
    type = host
}

For anything which is noted as hard (including repeat_event), pick one to repost for next time (for which the interval betwen times may well grow) and should the easy ones prove short enough to do then I will take a look at it (but no guarantees that anything useful will actually come out of it). When posting a hard thing include all the context in the post so I don't have to scroll around looking for things.

Or just invest in the successor software and make everyone's lives happier.

I'll pick a nice example.

Also, for now, the Validator is much closer to full support of the CK2 scripting syntax than CWTools. I do hope I'm nearing the end of these massive reports, however. Thanks for your continued support.

Code:
At <mod>\events\hl_raiding_adventurers_events.txt [character_event\immediate\any_army] (Line 1825, column 3):
There may be no duplications of a "set_can_toggle_looting" clause.
There were 2 duplicates.
    [I37224|L1826|C4]: set_can_toggle_looting = yes
    [I37279|L1828|C4]: set_can_toggle_looting = no

Maybe I forgot this one last time. Valid script in any case. Vanilla code does the following:
Code:
any_army = {
    set_can_toggle_looting = yes
    set_looting = yes
    set_can_toggle_looting = no
}


Code:
At <mod>\events\HFP_holy_order_events.txt [letter_event\option\custom_tooltip\event_target:potential_title\capital_scope\FROM\else\capital] (Line 267, column 8):
"event_target:potential_title" is not a valid ThisProv, ThisTitle, BaronTitle, or CountTitle.

Appears to be a result of one of my latest reports, so apologies for messing this up. I tested this to work with saved event targets of baron and count tier. This vanilla example uses a count tier title, so it should be valid.

Code:
At <mod>\events\on_action_events.txt [narrative_event\trigger\OR\OR\AND\crusade_target_title] (Line 6189, column 6):
Invalid node "crusade_target_title" in scope TitleTrigger (value is: <a complex type>)

Testing shows this to be valid in character, title, province and religion scopes.

Code:
At <mod>\localisation\00_artifacts.csv [Entry\1] (Line 319, column 32):
No match found for found_saint; are all validations selected? Otherwise it may be a Validator bug.

Getting 96 of these now. All validations except characters are selected.

Code:
--- Error 1 of 2 ---
At <mod>\events\HFP_pregnancy_events.txt [character_event\immediate\ROOT\save_event_target_as] (Line 350, column 12):
No users of this event target event_target:scoped_baby
--- Error 2 of 2 ---
At <mod>\localisation\15_events_holy_fury.csv [Entry\1] (Line 628, column 24):
There were no setters for this event target event_target:inherited_artifact

56 of these remaining, so most of them no longer show up.

Code:
--- Error 1 of 3 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope] (Line 127, column 4):
There may be no duplications of a "leads_faction" clause. (Are you missing an 'or' or 'not' wrapper?)
There were 2 duplicates.
    [I2938|L167|C5]: leads_faction = faction_lower_crown_authority
    [I2989|L168|C5]: leads_faction = faction_independence
--- Error 2 of 3 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope] (Line 127, column 4):
There may be no duplications of a "is_heir" clause.
There were 2 duplicates.
    [I3033|L170|C5]: is_heir = c_6392
    [I3055|L171|C5]: is_heir = c_91487
--- Error 3 of 3 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope] (Line 127, column 4):
There may be no duplications of a "has_position" clause. (Are you missing an 'or' or 'not' wrapper?)
There were 2 duplicates.
    [I3080|L173|C5]: has_position = job_spymaster
    [I3114|L174|C5]: has_position = c_6392

Since these can take more than bools, using two or more is reasonable, if a tad unlikely.

Code:
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\capital_scope\trade_route] (Line 164, column 6):
"event_target:test_province" is not a valid Province or TradeRoute.

Takes saved event targets of province type as well.

Code:
--- Error 1 of 2 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\any_army\any_unit_leader\siege\phase] (Line 195, column 8):
Invalid node "phase" in scope SiegeTrigger (value is: skirmish)
--- Error 2 of 2 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\any_army\any_unit_leader\combat\phase] (Line 198, column 8):
Invalid node "phase" in scope SiegeTrigger (value is: skirmish)

Tested to work. Takes 'skirmish', 'melee' and 'pursuit'.

Code:
--- Error 1 of 15 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\has_de_jure_pretension] (Line 176, column 5):
Invalid node "has_de_jure_pretension" in scope CharTrigger (value is: c_6392)
--- Error 2 of 15 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\has_de_jure_pretension] (Line 177, column 5):
Invalid node "has_de_jure_pretension" in scope CharTrigger (value is: liege)
--- Error 3 of 15 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\has_de_jure_pretension] (Line 178, column 5):
Invalid node "has_de_jure_pretension" in scope CharTrigger (value is: spouse)
--- Error 4 of 15 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\has_de_jure_pretension] (Line 179, column 5):
Invalid node "has_de_jure_pretension" in scope CharTrigger (value is: event_target:test_character)
--- Error 5 of 15 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\has_de_jure_pretension] (Line 180, column 5):
Invalid node "has_de_jure_pretension" in scope CharTrigger (value is: k_france)
--- Error 6 of 15 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\has_de_jure_pretension] (Line 181, column 5):
Invalid node "has_de_jure_pretension" in scope CharTrigger (value is: b_zwolle)
--- Error 7 of 15 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\has_de_jure_pretension] (Line 182, column 5):
Invalid node "has_de_jure_pretension" in scope CharTrigger (value is: c_brugge)
--- Error 8 of 15 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\has_de_jure_pretension] (Line 183, column 5):
Invalid node "has_de_jure_pretension" in scope CharTrigger (value is: d_flanders)
--- Error 9 of 15 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\has_de_jure_pretension] (Line 184, column 5):
Invalid node "has_de_jure_pretension" in scope CharTrigger (value is: e_arabia)
--- Error 10 of 15 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\has_de_jure_pretension] (Line 185, column 5):
Invalid node "has_de_jure_pretension" in scope CharTrigger (value is: event_target:test_barony)
--- Error 11 of 15 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\has_de_jure_pretension] (Line 186, column 5):
Invalid node "has_de_jure_pretension" in scope CharTrigger (value is: event_target:test_county)
--- Error 12 of 15 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\has_de_jure_pretension] (Line 187, column 5):
Invalid node "has_de_jure_pretension" in scope CharTrigger (value is: event_target:test_duchy)
--- Error 13 of 15 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\has_de_jure_pretension] (Line 188, column 5):
Invalid node "has_de_jure_pretension" in scope CharTrigger (value is: event_target:test_kingdom)
--- Error 14 of 15 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\has_de_jure_pretension] (Line 189, column 5):
Invalid node "has_de_jure_pretension" in scope CharTrigger (value is: event_target:test_empire)
--- Error 15 of 15 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\has_de_jure_pretension] (Line 190, column 5):
Invalid node "has_de_jure_pretension" in scope CharTrigger (value is: event_target:test_province)

Valid in character scope. Takes any character/title/province ID/scope/saved event target.

Code:
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\any_wonder_owner\any_demesne_wonder_upgrade] (Line 276, column 6):
Invalid node "any_demesne_wonder_upgrade" in scope CharMaybeLimitCommand (value is: <a complex type>)

Valid scope in character scope (trigger and effect).

Code:
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\reverse_set_opinion_levy_raised_days] (Line 264, column 5):
Invalid node "reverse_set_opinion_levy_raised_days" in scope CharCommand (value is: <a complex type>)

Valid, works like its regular counterpart.

Code:
--- Error 1 of 5 ---
At <mod>\decisions\conversion_decisions.txt [targeted_decisions\convert_to_outremer\ai_will_do\trigger] (Line 2547, column 4):
Invalid node "trigger" in scope AiWillDoFromFromNone (value is: <a complex type>)
--- Error 2 of 5 ---
At <mod>\common\laws\crown_laws.txt [de_jure_laws\investiture_law_1\ai_will_do\trigger] (Line 497, column 4):
Invalid node "trigger" in scope AiWillDoFromFromNone (value is: <a complex type>)
--- Error 3 of 5 ---
At <mod>\common\wonder_upgrades\00_wonder_upgrades.txt [upgrade_spikes\ai_will_do\trigger] (Line 319, column 3):
Invalid node "trigger" in scope AiWillDoWonderUpgrade (value is: <a complex type>)
--- Error 4 of 5 ---
At <mod>\common\death_text\00_death_text.txt [death_text_child\weight_multiplier\trigger] (Line 721, column 3):
Invalid node "trigger" in scope <anon> (value is: <a complex type>)
--- Error 1 of 5 ---
At <mod>\common\heir_text\00_heir_text.txt [heir_text_five_skills\weight_multiplier\trigger] (Line 1127, column 3):
Invalid node "trigger" in scope <anon> (value is: <a complex type>)

Added in 3.0:
Scripted value calculations such as ai_chance, ai_will_do, selection_score etc. now supports adding a trigger field effectively nullifying the field.

Code:
At <mod>\common\laws\succession_laws.txt [gender_laws\enatic_succession\potential\holder_scope\trigger_else_if\trigger_if\defacto_liege_title] (Line 1731, column 7):
Invalid node "defacto_liege_title" in scope <anon> (value is: <a complex type>)

Tested to work in character scope.
 
Last edited:
Jamie, I know you want us to switch over, but I find this tool so much easier to use to find bugs.

In the latest version, I can no longer click "off" localization errors. What section are they a part of now? I get tons of duplicate localization entries whenever it was selected in the past, so was nice to turn off.
 
Here's a small mod for repeat_event. Start as any ruler and enter 'event RepeatEvents.1' into the console. You will see ten modifiers added to the ruler's capital province. If running the game with '-scriptlog' parameter, output in game.log will show FROM is the ruler every time and there are no FROMFROM, FROMFROMFROM and FROMFROMFROMFROM in any of them.

Running 'event RepeatEvents.3' instead will only add one such modifier because now the scopes don't match anymore. Validator is correct to complain about scopes here, but not about the previous event chain.

Here is the output from my games for both event chains, using William the Bastard in the classic CK2 starting bookmark 'Stamford Bridge' (1066.9.15):

Code:
[effectimplementation.cpp:18398]: EVENT [1066.9.15]:RepeatEvents.1
[effectimplementation.cpp:18414]: [1066.9.15] file: events/RepeatEvents.txt line: 11:
§Yroot§!:
seed=49900
char=140 (Duke William 'the Bastard')
§Ythis§!:
seed=49900
char=140 (Duke William 'the Bastard')

[effectimplementation.cpp:18398]: EVENT [1066.9.15]:RepeatEvents.2
[effectimplementation.cpp:18414]: [1066.9.15] file: events/RepeatEvents.txt line: 35:
§Yroot§!:
seed=49903
province=97 (Rouen)
§Yfrom§!:
seed=49901
char=140 (Duke William 'the Bastard')
§Ythis§!:
seed=49903
province=97 (Rouen)

[effectimplementation.cpp:18398]: EVENT [1066.9.15]:RepeatEvents.2
[effectimplementation.cpp:18414]: [1066.9.15] file: events/RepeatEvents.txt line: 35:
variables=
{
    local_count=9.000
}
§Yroot§!:
seed=49908
province=97 (Rouen)
§Yfrom§!:
seed=49901
char=140 (Duke William 'the Bastard')
§Ythis§!:
seed=49910
province=97 (Rouen)
§Yprev§!:
seed=49908
province=97 (Rouen)

[effectimplementation.cpp:18398]: EVENT [1066.9.15]:RepeatEvents.2
[effectimplementation.cpp:18414]: [1066.9.15] file: events/RepeatEvents.txt line: 35:
variables=
{
    local_count=8.000
}
§Yroot§!:
seed=49908
province=97 (Rouen)
§Yfrom§!:
seed=49901
char=140 (Duke William 'the Bastard')
§Ythis§!:
seed=49917
province=97 (Rouen)
§Yprev§!:
seed=49908
province=97 (Rouen)

[effectimplementation.cpp:18398]: EVENT [1066.9.15]:RepeatEvents.2
[effectimplementation.cpp:18414]: [1066.9.15] file: events/RepeatEvents.txt line: 35:
variables=
{
    local_count=7.000
}
§Yroot§!:
seed=49908
province=97 (Rouen)
§Yfrom§!:
seed=49901
char=140 (Duke William 'the Bastard')
§Ythis§!:
seed=49924
province=97 (Rouen)
§Yprev§!:
seed=49908
province=97 (Rouen)

[effectimplementation.cpp:18398]: EVENT [1066.9.15]:RepeatEvents.2
[effectimplementation.cpp:18414]: [1066.9.15] file: events/RepeatEvents.txt line: 35:
variables=
{
    local_count=6.000
}
§Yroot§!:
seed=49908
province=97 (Rouen)
§Yfrom§!:
seed=49901
char=140 (Duke William 'the Bastard')
§Ythis§!:
seed=49931
province=97 (Rouen)
§Yprev§!:
seed=49908
province=97 (Rouen)

[effectimplementation.cpp:18398]: EVENT [1066.9.15]:RepeatEvents.2
[effectimplementation.cpp:18414]: [1066.9.15] file: events/RepeatEvents.txt line: 35:
variables=
{
    local_count=5.000
}
§Yroot§!:
seed=49908
province=97 (Rouen)
§Yfrom§!:
seed=49901
char=140 (Duke William 'the Bastard')
§Ythis§!:
seed=49938
province=97 (Rouen)
§Yprev§!:
seed=49908
province=97 (Rouen)

[effectimplementation.cpp:18398]: EVENT [1066.9.15]:RepeatEvents.2
[effectimplementation.cpp:18414]: [1066.9.15] file: events/RepeatEvents.txt line: 35:
variables=
{
    local_count=4.000
}
§Yroot§!:
seed=49908
province=97 (Rouen)
§Yfrom§!:
seed=49901
char=140 (Duke William 'the Bastard')
§Ythis§!:
seed=49945
province=97 (Rouen)
§Yprev§!:
seed=49908
province=97 (Rouen)

[effectimplementation.cpp:18398]: EVENT [1066.9.15]:RepeatEvents.2
[effectimplementation.cpp:18414]: [1066.9.15] file: events/RepeatEvents.txt line: 35:
variables=
{
    local_count=3.000
}
§Yroot§!:
seed=49908
province=97 (Rouen)
§Yfrom§!:
seed=49901
char=140 (Duke William 'the Bastard')
§Ythis§!:
seed=49952
province=97 (Rouen)
§Yprev§!:
seed=49908
province=97 (Rouen)

[effectimplementation.cpp:18398]: EVENT [1066.9.15]:RepeatEvents.2
[effectimplementation.cpp:18414]: [1066.9.15] file: events/RepeatEvents.txt line: 35:
variables=
{
    local_count=2.000
}
§Yroot§!:
seed=49908
province=97 (Rouen)
§Yfrom§!:
seed=49901
char=140 (Duke William 'the Bastard')
§Ythis§!:
seed=49959
province=97 (Rouen)
§Yprev§!:
seed=49908
province=97 (Rouen)

[effectimplementation.cpp:18398]: EVENT [1066.9.15]:RepeatEvents.2
[effectimplementation.cpp:18414]: [1066.9.15] file: events/RepeatEvents.txt line: 35:
variables=
{
    local_count=1.000
}
§Yroot§!:
seed=49908
province=97 (Rouen)
§Yfrom§!:
seed=49901
char=140 (Duke William 'the Bastard')
§Ythis§!:
seed=49966
province=97 (Rouen)
§Yprev§!:
seed=49908
province=97 (Rouen)

Code:
[effectimplementation.cpp:18398]: EVENT [1066.9.15]:RepeatEvents.3
[effectimplementation.cpp:18414]: [1066.9.15] file: events/RepeatEvents.txt line: 110:
§Yroot§!:
seed=36903
char=140 (Duke William 'the Bastard')
§Ythis§!:
seed=36903
char=140 (Duke William 'the Bastard')

[effectimplementation.cpp:18398]: EVENT [1066.9.15]:RepeatEvents.4
[effectimplementation.cpp:18414]: [1066.9.15] file: events/RepeatEvents.txt line: 134:
§Yroot§!:
seed=36906
province=97 (Rouen)
§Yfrom§!:
seed=36904
char=140 (Duke William 'the Bastard')
§Ythis§!:
seed=36906
province=97 (Rouen)

Code:
--- Error 1 of 4 ---
At <mod>\events\RepeatEvents.txt [province_event\trigger\FROM] (Line 127, column 3):
No direct match found for FROM (is the casing correct?). However, other possible matches in scope ProvTrigger were found.
Left: [ThisChar] Right: [CharTrigger] cannot be correct because of left: FROM points to <null>.
However, a Char was expected.
This scope was inferred to have scope Char, but the call at <mod>\events\RepeatEvents.txt [province_event\immediate\while\province_event\id] (Line 185, column 5)(event RepeatEvents.4) is of scope Prov.
Left: [ThisProv] Right: [ProvTrigger] cannot be correct because of left: FROM points to <null>.
However, a Prov was expected.
This scope was inferred to have scope Char, but the call at <mod>\events\RepeatEvents.txt [province_event\immediate\while\province_event\id] (Line 185, column 5)(event RepeatEvents.4) is of scope Prov.
Left: [ThisTitle] Right: [TitleTrigger] cannot be correct because of left: FROM points to <null>.
However, a Title was expected.
This scope was inferred to have scope Char, but the call at <mod>\events\RepeatEvents.txt [province_event\immediate\while\province_event\id] (Line 185, column 5)(event RepeatEvents.4) is of scope Prov.
Left: [ThisUnit] Right: [UnitTrigger] cannot be correct because of left: FROM points to <null>.
However, a Unit was expected.
This scope was inferred to have scope Char, but the call at <mod>\events\RepeatEvents.txt [province_event\immediate\while\province_event\id] (Line 185, column 5)(event RepeatEvents.4) is of scope Prov.
Left: [ThisSociety] Right: [SocietyTrigger] cannot be correct because of left: FROM points to <null>.
However, a Society was expected.
This scope was inferred to have scope Char, but the call at <mod>\events\RepeatEvents.txt [province_event\immediate\while\province_event\id] (Line 185, column 5)(event RepeatEvents.4) is of scope Prov.
Left: [ThisArtifact] Right: [ArtifactTrigger] cannot be correct because of left: FROM points to <null>.
However, a Artifact was expected.
This scope was inferred to have scope Char, but the call at <mod>\events\RepeatEvents.txt [province_event\immediate\while\province_event\id] (Line 185, column 5)(event RepeatEvents.4) is of scope Prov.
Left: [ThisBattle] Right: [BattleTrigger] cannot be correct because of left: FROM points to <null>.
However, a Battle was expected.
This scope was inferred to have scope Char, but the call at <mod>\events\RepeatEvents.txt [province_event\immediate\while\province_event\id] (Line 185, column 5)(event RepeatEvents.4) is of scope Prov.
Left: [ThisWar] Right: [WarTrigger] cannot be correct because of left: FROM points to <null>.
However, a War was expected.
This scope was inferred to have scope Char, but the call at <mod>\events\RepeatEvents.txt [province_event\immediate\while\province_event\id] (Line 185, column 5)(event RepeatEvents.4) is of scope Prov.
Left: [ThisSiege] Right: [SiegeTrigger] cannot be correct because of left: FROM points to <null>.
However, a Siege was expected.
This scope was inferred to have scope Char, but the call at <mod>\events\RepeatEvents.txt [province_event\immediate\while\province_event\id] (Line 185, column 5)(event RepeatEvents.4) is of scope Prov.
Left: [ThisOffmapPower] Right: [OffmapPowerTrigger] cannot be correct because of left: FROM points to <null>.
However, a OffmapPower was expected.
This scope was inferred to have scope Char, but the call at <mod>\events\RepeatEvents.txt [province_event\immediate\while\province_event\id] (Line 185, column 5)(event RepeatEvents.4) is of scope Prov.
Left: [ThisReligion] Right: [ReligionTrigger] cannot be correct because of left: FROM points to <null>.
However, a Religion was expected.
This scope was inferred to have scope Char, but the call at <mod>\events\RepeatEvents.txt [province_event\immediate\while\province_event\id] (Line 185, column 5)(event RepeatEvents.4) is of scope Prov.
Left: [ThisCulture] Right: [CultureTrigger] cannot be correct because of left: FROM points to <null>.
However, a Culture was expected.
This scope was inferred to have scope Char, but the call at <mod>\events\RepeatEvents.txt [province_event\immediate\while\province_event\id] (Line 185, column 5)(event RepeatEvents.4) is of scope Prov.
Left: [ThisBloodline] Right: [BloodlineTrigger] cannot be correct because of left: FROM points to <null>.
However, a Bloodline was expected.
This scope was inferred to have scope Char, but the call at <mod>\events\RepeatEvents.txt [province_event\immediate\while\province_event\id] (Line 185, column 5)(event RepeatEvents.4) is of scope Prov.
Left: [ThisWonderBuilding] Right: [WonderBuildingTrigger] cannot be correct because of left: FROM points to <null>.
However, a WonderBuilding was expected.
This scope was inferred to have scope Char, but the call at <mod>\events\RepeatEvents.txt [province_event\immediate\while\province_event\id] (Line 185, column 5)(event RepeatEvents.4) is of scope Prov.
Left: [ThisWonderUpgrade] Right: [WonderUpgradeTrigger] cannot be correct because of left: FROM points to <null>.
However, a WonderUpgrade was expected.
This scope was inferred to have scope Char, but the call at <mod>\events\RepeatEvents.txt [province_event\immediate\while\province_event\id] (Line 185, column 5)(event RepeatEvents.4) is of scope Prov.
--- Error 2 of 4 ---
At <mod>\events\RepeatEvents.txt [province_event\trigger\FROM] (Line 127, column 3):
Invalid use of 'FROM': This scope was inferred to have scope Char, but the call at <mod>\events\RepeatEvents.txt [province_event\immediate\while\province_event\id] (Line 185, column 5)(event RepeatEvents.4) is of scope Prov.
--- Error 3 of 4 ---
At <mod>\events\RepeatEvents.txt [province_event\trigger\FROM] (Line 28, column 3):
No direct match found for FROM (is the casing correct?). However, other possible matches in scope ProvTrigger were found.
Left: [ThisChar] Right: [CharTrigger] cannot be correct because of left: FROM points to <null>.
However, a Char was expected.
This scope was inferred to have scope Char, but the call at <mod>\events\RepeatEvents.txt [province_event\immediate\while\repeat_event\id] (Line 86, column 5)(event RepeatEvents.2) is of scope Prov.
Left: [ThisProv] Right: [ProvTrigger] cannot be correct because of left: FROM points to <null>.
However, a Prov was expected.
This scope was inferred to have scope Char, but the call at <mod>\events\RepeatEvents.txt [province_event\immediate\while\repeat_event\id] (Line 86, column 5)(event RepeatEvents.2) is of scope Prov.
Left: [ThisTitle] Right: [TitleTrigger] cannot be correct because of left: FROM points to <null>.
However, a Title was expected.
This scope was inferred to have scope Char, but the call at <mod>\events\RepeatEvents.txt [province_event\immediate\while\repeat_event\id] (Line 86, column 5)(event RepeatEvents.2) is of scope Prov.
Left: [ThisUnit] Right: [UnitTrigger] cannot be correct because of left: FROM points to <null>.
However, a Unit was expected.
This scope was inferred to have scope Char, but the call at <mod>\events\RepeatEvents.txt [province_event\immediate\while\repeat_event\id] (Line 86, column 5)(event RepeatEvents.2) is of scope Prov.
Left: [ThisSociety] Right: [SocietyTrigger] cannot be correct because of left: FROM points to <null>.
However, a Society was expected.
This scope was inferred to have scope Char, but the call at <mod>\events\RepeatEvents.txt [province_event\immediate\while\repeat_event\id] (Line 86, column 5)(event RepeatEvents.2) is of scope Prov.
Left: [ThisArtifact] Right: [ArtifactTrigger] cannot be correct because of left: FROM points to <null>.
However, a Artifact was expected.
This scope was inferred to have scope Char, but the call at <mod>\events\RepeatEvents.txt [province_event\immediate\while\repeat_event\id] (Line 86, column 5)(event RepeatEvents.2) is of scope Prov.
Left: [ThisBattle] Right: [BattleTrigger] cannot be correct because of left: FROM points to <null>.
However, a Battle was expected.
This scope was inferred to have scope Char, but the call at <mod>\events\RepeatEvents.txt [province_event\immediate\while\repeat_event\id] (Line 86, column 5)(event RepeatEvents.2) is of scope Prov.
Left: [ThisWar] Right: [WarTrigger] cannot be correct because of left: FROM points to <null>.
However, a War was expected.
This scope was inferred to have scope Char, but the call at <mod>\events\RepeatEvents.txt [province_event\immediate\while\repeat_event\id] (Line 86, column 5)(event RepeatEvents.2) is of scope Prov.
Left: [ThisSiege] Right: [SiegeTrigger] cannot be correct because of left: FROM points to <null>.
However, a Siege was expected.
This scope was inferred to have scope Char, but the call at <mod>\events\RepeatEvents.txt [province_event\immediate\while\repeat_event\id] (Line 86, column 5)(event RepeatEvents.2) is of scope Prov.
Left: [ThisOffmapPower] Right: [OffmapPowerTrigger] cannot be correct because of left: FROM points to <null>.
However, a OffmapPower was expected.
This scope was inferred to have scope Char, but the call at <mod>\events\RepeatEvents.txt [province_event\immediate\while\repeat_event\id] (Line 86, column 5)(event RepeatEvents.2) is of scope Prov.
Left: [ThisReligion] Right: [ReligionTrigger] cannot be correct because of left: FROM points to <null>.
However, a Religion was expected.
This scope was inferred to have scope Char, but the call at <mod>\events\RepeatEvents.txt [province_event\immediate\while\repeat_event\id] (Line 86, column 5)(event RepeatEvents.2) is of scope Prov.
Left: [ThisCulture] Right: [CultureTrigger] cannot be correct because of left: FROM points to <null>.
However, a Culture was expected.
This scope was inferred to have scope Char, but the call at <mod>\events\RepeatEvents.txt [province_event\immediate\while\repeat_event\id] (Line 86, column 5)(event RepeatEvents.2) is of scope Prov.
Left: [ThisBloodline] Right: [BloodlineTrigger] cannot be correct because of left: FROM points to <null>.
However, a Bloodline was expected.
This scope was inferred to have scope Char, but the call at <mod>\events\RepeatEvents.txt [province_event\immediate\while\repeat_event\id] (Line 86, column 5)(event RepeatEvents.2) is of scope Prov.
Left: [ThisWonderBuilding] Right: [WonderBuildingTrigger] cannot be correct because of left: FROM points to <null>.
However, a WonderBuilding was expected.
This scope was inferred to have scope Char, but the call at <mod>\events\RepeatEvents.txt [province_event\immediate\while\repeat_event\id] (Line 86, column 5)(event RepeatEvents.2) is of scope Prov.
Left: [ThisWonderUpgrade] Right: [WonderUpgradeTrigger] cannot be correct because of left: FROM points to <null>.
However, a WonderUpgrade was expected.
This scope was inferred to have scope Char, but the call at <mod>\events\RepeatEvents.txt [province_event\immediate\while\repeat_event\id] (Line 86, column 5)(event RepeatEvents.2) is of scope Prov.
--- Error 4 of 4 ---
At <mod>\events\RepeatEvents.txt [province_event\trigger\FROM] (Line 28, column 3):
Invalid use of 'FROM': This scope was inferred to have scope Char, but the call at <mod>\events\RepeatEvents.txt [province_event\immediate\while\repeat_event\id] (Line 86, column 5)(event RepeatEvents.2) is of scope Prov.

I hope this is everything you need to see what can be done about implementing this into The Validator.
 

Attachments

  • RepeatEvents.zip
    3,4 KB · Views: 0
Last edited:
While ROOT is a title in this special on_action mess, THIS (i.e. the opening scope) is still a character (as per my testing that I included last time), so this should still be valid.
Validator treats opening scope as ROOT and requires THIS wrappers to switch to the THIS scope, probably due to various other scopes that existed. Fixing will be difficult.

All the other uses of ROOT are characters. Vanilla uses 'family = ROOT' here (line 447) and as far as I've been able to ascertain, that's an alias for 'dynasty'. Testing shows neither accepts a title, so I strongly suspect ROOT is a character scope here. If only CK2's error detection and/or documentation was halfway decent.

Edit: No, it's title scope, so vanilla had a bug for many years. 'family' does NOT accept title scopes.

Ok so my understanding is nothing needs to be done here for Validator.

As an aside what is generally the point of allowing duplicate RHS in triggers? Suppose validator complains about "gold = 20" and actually there are comparison operators. But what is the situation where you want to do e.g. "gold > 20 ; gold == 20" instead of just "gold >= 20"?

I'm fairly sure I only added items to the list that Validator reported on. I'll check again.
Edit: Of the below script, the first half raises an error in Validator, the second one does not.
If it helps, CK2 can handle character IDs containing 10 digits without issue, perhaps more.

Does the character ID definitely exist? Is this supposed to repro on CleanSlate?

Getting 96 of these now. All validations except characters are selected.

Is province_saint being set/read correctly? Could only find a set of save_persistent_event_target but access is via "persistent_event_target:province_saint" (this access sets found_saint)

56 of these remaining, so most of them no longer show up.

Will need repros for these (I assume a recent CleanSlate?) and also exactly which ones you have problems with, and where you think the missing getter/setter is for each one.

@Whizzer little time this week, no chance to look at repeat_event. Next weeks may be bad as well, unclear. Please continue to include a link in your reports to your repeat_event post until it is done.

Jamie, I know you want us to switch over, but I find this tool so much easier to use to find bugs.

In the latest version, I can no longer click "off" localization errors. What section are they a part of now? I get tons of duplicate localization entries whenever it was selected in the past, so was nice to turn off.
I think the other tool is open source and welcomes contributions AFAIK.

It is now at the bottom as "ZZZ Localisation" because it has to run last and it is the state of the code that it is easier to do this. I guess that's what happens when you have a decade long tool without sufficient staffing, talent, testing, quality investments, etc etc and a lack of motivation to improve the situation due to the legacy characteristic of the code.
 
Validator treats opening scope as ROOT and requires THIS wrappers to switch to the THIS scope, probably due to various other scopes that existed. Fixing will be difficult.

I see, however THIS is only possible as a RHS scope, unlike ROOT, FROM etc.

Ok so my understanding is nothing needs to be done here for Validator.

As an aside what is generally the point of allowing duplicate RHS in triggers? Suppose validator complains about "gold = 20" and actually there are comparison operators. But what is the situation where you want to do e.g. "gold > 20 ; gold == 20" instead of just "gold >= 20"?

The 'family' trigger should no longer accept title scopes, which I think it currently does.

As for duplicate RHS triggers, they can be used to restrict numerical values to a range, for example 'wealth > 100; wealth <= 500'. Obviously the example you provided is rather silly and was never meant as anything more than a report.

Does the character ID definitely exist? Is this supposed to repro on CleanSlate?

It's not a historical character, but a randomly generated baron at game start. If that's intended, nothing needs to be done.

Is province_saint being set/read correctly? Could only find a set of save_persistent_event_target but access is via "persistent_event_target:province_saint" (this access sets found_saint)

'found_saint' is set in 'crusade_give_artifact_effect', which is one of those hardcoded scripted effects. See 04_scripted_effects_crusades.txt, line 108 (CleanSlate).
For 'province_saint', see below.

Will need repros for these (I assume a recent CleanSlate?) and also exactly which ones you have problems with, and where you think the missing getter/setter is for each one.

I've checked all of them. Most were indeed actual errors, so unless something changed in Validator, I must have missed/ignored them before. In any case, here are the remaining false positives and some details on them. Line numbers are accurate for CleanSlate, though they should be similar if not identical in vanilla CK2.

Code:
At <mod>\localisation\15_tooltips_holy_fury.csv [Entry\2] (Line 257, column 126):
There were no setters for this event target event_target:reconquista_beneficiary_target

Found in HF_realm_decisions.txt, lines 644-647 (save_persistent_event_target).

Code:
At <mod>\common\scripted_effects\01_scripted_effects_duels.txt [set_loser_flags_and_save_opponent_effect\save_event_target_as] (Line 2150, column 2):
No users of this event target event_target:root_character

Found in 01_scripted_effects_duels.txt, lines 2101 and 2150.

Code:
At <mod>\localisation\15_events_holy_fury.csv [Entry\1] (Line 628, column 24):
There were no setters for this event target event_target:inherited_artifact

Found in HFP_random_flavor_events.txt, line 2146.

Code:
At <mod>\localisation\15_events_holy_fury.csv [Entry\5] (Line 2318, column 1022):
There were no setters for this event target event_target:warrior_lodge_guest

Found in HF_tribal_events.txt, line 419 (save_persistent_event_target).

Code:
At <mod>\events\jd_chinese_invasion_events.txt [character_event\immediate\random_list\1\trigger\NOT\event_target:temple_name_title] (Line 3147, column 25):
There were no setters for this event target event_target:temple_name_title

Found in jd_chinese_invasion_events.txt, line 2710.

Code:
At <mod>\localisation\13_events_monks_and_mystics.csv [Entry\2] (Line 880, column 462):
There were no setters for this event target event_target:desecration_holder

Found in mnm_devil_worshipers_events.txt, line 7183.

Code:
At <mod>\localisation\15_events_holy_fury.csv [Entry\1] (Line 250, column 20):
There were no setters for this event target event_target:province_saint

Found in 03_scripted_effects_sainthood.txt, lines 2-5 (save_persistent_event_target_as).

Code:
At <mod>\events\LT_wonder_maintenance_events.txt [character_event\immediate\if\event_target:target_wonder\any_upgrade_on_wonder\save_event_target_as] (Line 136, column 6):
No users of this event target event_target:upgrade_01

Found in LT_wonder_maintenance_effects.txt, line 142.

@Whizzer little time this week, no chance to look at repeat_event. Next weeks may be bad as well, unclear. Please continue to include a link in your reports to your repeat_event post until it is done.

Will do.

Code:
--- Error 1 of 3 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\capital_scope\has_religion_feature] (Line 177, column 6):
Invalid node "has_religion_feature" in scope ProvTrigger (value is: religion_peaceful)
--- Error 2 of 3 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\capital_holding\has_religion_feature] (Line 183, column 6):
Invalid node "has_religion_feature" in scope TitleTrigger (value is: religion_peaceful)
--- Error 3 of 3 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\secret_religious_cult\has_religion_feature] (Line 189, column 6):
Invalid node "has_religion_feature" in scope SocietyTrigger (value is: religion_peaceful)

Tested to work in all three scopes.

Code:
--- Error 1 of 1 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\revolt_distance] (Line 155, column 5):
Invalid node "revolt_distance" in scope CharTrigger (value is: 100)

Added in patch 1.07, but never used in vanilla. Supports 2.8-style numerical operators. Haven't figured out what this one actually does. Only seems to work in character scope.

Code:
--- Error 1 of 1 ---
At <mod>\common\landed_titles\landed_titles.txt [e_france\k_france\usurpation_abides_allow] (Line 28803, column 3):
Invalid node "usurpation_abides_allow" in scope KingTitleDef (value is: no)

Added in 2.8.2. Tested to work. Should also work in duchy and empire titles, since those can also be usurped.

Code:
--- Error 1 of 1 ---
At <mod>\common\heir_text\00_heir_text.txt [heir_text_five_skills\weight_multiplier\trigger] (Line 1127, column 3):
Invalid node "trigger" in scope <anon> (value is: <a complex type>)

Forgot this one last time, works like all other MTTH clauses.

Code:
--- Error 1 of 4 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\any_dejure_liege_title] (Line 277, column 5):
Invalid node "any_de_jure_liege_title" in scope CharCommand (value is: <a complex type>)
--- Error 2 of 4 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\any_dejure_liege_title] (Line 268, column 4):
Invalid node "any_de_jure_liege_title" in scope DecisionCommand (value is: <a complex type>)
--- Error 3 of 4 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\any_de_facto_liege_title] (Line 285, column 5):
Invalid node "any_de_facto_liege_title" in scope CharCommand (value is: <a complex type>)
--- Error 4 of 4 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\any_de_facto_liege_title] (Line 276, column 4):
Invalid node "any_de_facto_liege_title" in scope DecisionCommand (value is: <a complex type>)

Tested to work in both title and character effect scopes. Do not work in trigger scopes.

Code:
--- Error 1 of 3 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\any_defacto_liege] (Line 272, column 4):
Invalid node "any_defacto_liege" in scope DecisionCommand (value is: <a complex type>)
--- Error 2 of 3 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\any_defacto_liege] (Line 134, column 5):
Invalid node "any_defacto_liege" in scope CharTrigger (value is: <a complex type>)
--- Error 3 of 3 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\any_defacto_liege] (Line 127, column 4):
Invalid node "any_defacto_liege" in scope DecisionTriggerFromFromNone (value is: <a complex type>)

Tested to work in character and title trigger scopes, but not in character effect scope. These scope to titles, confusingly.
any_dejure_liege also does not work in character effect scope.

Code:
--- Error 1 of 4 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\secret_religious_cult\crusade_religion_targeting_us] (Line 151, column 6):
Invalid node "crusade_religion_targeting_us" in scope SocietyTrigger (value is: <a complex type>)
--- Error 2 of 4 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\crusade_religion_targeting_us] (Line 139, column 4):
Invalid node "crusade_religion_targeting_us" in scope DecisionTriggerFromFromNone (value is: <a complex type>)
--- Error 3 of 4 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\secret_religious_cult\crusade_religion_targeting_us] (Line 321, column 6):
Invalid node "crusade_religion_targeting_us" in scope SocietyCommand (value is: <a complex type>)
--- Error 4 of 4 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\crusade_religion_targeting_us] (Line 309, column 4):
Invalid node "crusade_religion_targeting_us" in scope DecisionCommand (value is: <a complex type>)

Tested to work in title and society trigger and effect scopes.

Code:
--- Error 1 of 2 ---
At <mod>\common\laws\ze_demesne_laws.txt [laws\status_of_women_1\allow\any_feud_rival_clan] (Line 157, column 4):
Invalid node "any_feud_rival_clan" in scope DecisionTriggerFromFromNone (value is: <a complex type>)
--- Error 2 of 2 ---
At <mod>\common\laws\ze_demesne_laws.txt [laws\status_of_women_1\effect\any_feud_rival_clan] (Line 174, column 4):
Invalid node "any_feud_rival_clan" in scope DecisionCommand (value is: <a complex type>)

Added in 2.4, tested to work in title trigger and effect scope. Scopes to titles.
There is no corresponding 'random_' scope.

Code:
--- Error 1 of 44 ---
At <mod>\common\laws\ze_demesne_laws.txt [laws\status_of_women_1\effect\holder_scope\weakest_clan_vassal_except_me] (Line 433, column 5):
Invalid node "weakest_clan_vassal_except_me" in scope CharCommand (value is: <a complex type>)
--- Error 2 of 44 ---
At <mod>\common\laws\ze_demesne_laws.txt [laws\status_of_women_1\effect\holder_scope\weakest_clan_vassal] (Line 429, column 5):
Invalid node "weakest_clan_vassal" in scope CharCommand (value is: <a complex type>)
--- Error 3 of 44 ---
At <mod>\common\laws\ze_demesne_laws.txt [laws\status_of_women_1\effect\holder_scope\weakest_clan_except_me] (Line 423, column 5):
Invalid node "weakest_clan_except_me" in scope CharCommand (value is: <a complex type>)
--- Error 4 of 44 ---
At <mod>\common\laws\ze_demesne_laws.txt [laws\status_of_women_1\effect\holder_scope\weakest_clan] (Line 417, column 5):
Invalid node "weakest_clan" in scope CharCommand (value is: <a complex type>)
--- Error 5 of 44 ---
At <mod>\common\laws\ze_demesne_laws.txt [laws\status_of_women_1\effect\holder_scope\strongest_clan_vassal_except_me] (Line 413, column 5):
Invalid node "strongest_clan_vassal_except_me" in scope CharCommand (value is: <a complex type>)
--- Error 6 of 44 ---
At <mod>\common\laws\ze_demesne_laws.txt [laws\status_of_women_1\effect\holder_scope\strongest_clan_except_me] (Line 403, column 5):
Invalid node "strongest_clan_except_me" in scope CharCommand (value is: <a complex type>)
--- Error 7 of 44 ---
At <mod>\common\laws\ze_demesne_laws.txt [laws\status_of_women_1\effect\holder_scope\strongest_clan] (Line 397, column 5):
Invalid node "strongest_clan" in scope CharCommand (value is: <a complex type>)
--- Error 8 of 44 ---
At <mod>\common\laws\ze_demesne_laws.txt [laws\status_of_women_1\effect\holder_scope\least_populous_clan_vassal_except_me] (Line 389, column 5):
Invalid node "least_populous_clan_vassal_except_me" in scope CharCommand (value is: <a complex type>)
--- Error 9 of 44 ---
At <mod>\common\laws\ze_demesne_laws.txt [laws\status_of_women_1\effect\holder_scope\least_populous_clan_vassal] (Line 385, column 5):
Invalid node "least_populous_clan_vassal" in scope CharCommand (value is: <a complex type>)
--- Error 10 of 44 ---
At <mod>\common\laws\ze_demesne_laws.txt [laws\status_of_women_1\effect\holder_scope\least_populous_clan_except_me] (Line 379, column 5):
Invalid node "least_populous_clan_except_me" in scope CharCommand (value is: <a complex type>)
--- Error 11 of 44 ---
At <mod>\common\laws\ze_demesne_laws.txt [laws\status_of_women_1\effect\holder_scope\least_populous_clan] (Line 373, column 5):
Invalid node "least_populous_clan" in scope CharCommand (value is: <a complex type>)
--- Error 12 of 44 ---
At <mod>\common\laws\ze_demesne_laws.txt [laws\status_of_women_1\effect\holder_scope\most_populous_clan_vassal_except_me] (Line 369, column 5):
Invalid node "most_populous_clan_vassal_except_me" in scope CharCommand (value is: <a complex type>)
--- Error 13 of 44 ---
At <mod>\common\laws\ze_demesne_laws.txt [laws\status_of_women_1\effect\holder_scope\most_populous_clan_vassal] (Line 365, column 5):
Invalid node "most_populous_clan_vassal" in scope CharCommand (value is: <a complex type>)
--- Error 14 of 44 ---
At <mod>\common\laws\ze_demesne_laws.txt [laws\status_of_women_1\effect\holder_scope\most_populous_clan_except_me] (Line 359, column 5):
Invalid node "most_populous_clan_except_me" in scope CharCommand (value is: <a complex type>)
--- Error 15 of 44 ---
At <mod>\common\laws\ze_demesne_laws.txt [laws\status_of_women_1\effect\holder_scope\most_populous_clan] (Line 353, column 5):
Invalid node "most_populous_clan" in scope CharCommand (value is: <a complex type>)
--- Error 16 of 44 ---
At <mod>\common\laws\ze_demesne_laws.txt [laws\status_of_women_1\effect\holder_scope\least_prestigious_clan_vassal_except_me] (Line 345, column 5):
Invalid node "least_prestigious_clan_vassal_except_me" in scope CharCommand (value is: <a complex type>)
--- Error 17 of 44 ---
At <mod>\common\laws\ze_demesne_laws.txt [laws\status_of_women_1\effect\holder_scope\least_prestigious_clan_vassal] (Line 341, column 5):
Invalid node "least_prestigious_clan_vassal" in scope CharCommand (value is: <a complex type>)
--- Error 18 of 44 ---
At <mod>\common\laws\ze_demesne_laws.txt [laws\status_of_women_1\effect\holder_scope\least_prestigious_clan_except_me] (Line 335, column 5):
Invalid node "least_prestigious_clan_except_me" in scope CharCommand (value is: <a complex type>)
--- Error 19 of 44 ---
At <mod>\common\laws\ze_demesne_laws.txt [laws\status_of_women_1\effect\holder_scope\least_prestigious_clan] (Line 329, column 5):
Invalid node "least_prestigious_clan" in scope CharCommand (value is: <a complex type>)
--- Error 20 of 44 ---
At <mod>\common\laws\ze_demesne_laws.txt [laws\status_of_women_1\effect\holder_scope\most_prestigious_clan_vassal_except_me] (Line 325, column 5):
Invalid node "most_prestigious_clan_vassal_except_me" in scope CharCommand (value is: <a complex type>)
--- Error 21 of 44 ---
At <mod>\common\laws\ze_demesne_laws.txt [laws\status_of_women_1\effect\holder_scope\most_prestigious_clan_except_me] (Line 315, column 5):
Invalid node "most_prestigious_clan_except_me" in scope CharCommand (value is: <a complex type>)
--- Error 22 of 44 ---
At <mod>\common\laws\ze_demesne_laws.txt [laws\status_of_women_1\effect\holder_scope\most_prestigious_clan] (Line 309, column 5):
Invalid node "most_prestigious_clan" in scope CharCommand (value is: <a complex type>)
--- Error 23 of 44 ---
At <mod>\common\laws\ze_demesne_laws.txt [laws\status_of_women_1\potential\holder_scope\weakest_clan_vassal_except_me] (Line 273, column 5):
Invalid node "weakest_clan_vassal_except_me" in scope CharTrigger (value is: <a complex type>)
--- Error 24 of 44 ---
At <mod>\common\laws\ze_demesne_laws.txt [laws\status_of_women_1\potential\holder_scope\weakest_clan_vassal] (Line 269, column 5):
Invalid node "weakest_clan_vassal" in scope CharTrigger (value is: <a complex type>)
--- Error 25 of 44 ---
At <mod>\common\laws\ze_demesne_laws.txt [laws\status_of_women_1\potential\holder_scope\weakest_clan_except_me] (Line 263, column 5):
Invalid node "weakest_clan_except_me" in scope CharTrigger (value is: <a complex type>)
--- Error 26 of 44 ---
At <mod>\common\laws\ze_demesne_laws.txt [laws\status_of_women_1\potential\holder_scope\weakest_clan] (Line 257, column 5):
Invalid node "weakest_clan" in scope CharTrigger (value is: <a complex type>)
--- Error 27 of 44 ---
At <mod>\common\laws\ze_demesne_laws.txt [laws\status_of_women_1\potential\holder_scope\strongest_clan_vassal_except_me] (Line 253, column 5):
Invalid node "strongest_clan_vassal_except_me" in scope CharTrigger (value is: <a complex type>)
--- Error 28 of 44 ---
At <mod>\common\laws\ze_demesne_laws.txt [laws\status_of_women_1\potential\holder_scope\strongest_clan_except_me] (Line 243, column 5):
Invalid node "strongest_clan_except_me" in scope CharTrigger (value is: <a complex type>)
--- Error 29 of 44 ---
At <mod>\common\laws\ze_demesne_laws.txt [laws\status_of_women_1\potential\holder_scope\strongest_clan] (Line 237, column 5):
Invalid node "strongest_clan" in scope CharTrigger (value is: <a complex type>)
--- Error 30 of 44 ---
At <mod>\common\laws\ze_demesne_laws.txt [laws\status_of_women_1\potential\holder_scope\least_populous_clan_vassal_except_me] (Line 229, column 5):
Invalid node "least_populous_clan_vassal_except_me" in scope CharTrigger (value is: <a complex type>)
--- Error 31 of 44 ---
At <mod>\common\laws\ze_demesne_laws.txt [laws\status_of_women_1\potential\holder_scope\least_populous_clan_vassal] (Line 225, column 5):
Invalid node "least_populous_clan_vassal" in scope CharTrigger (value is: <a complex type>)
--- Error 32 of 44 ---
At <mod>\common\laws\ze_demesne_laws.txt [laws\status_of_women_1\potential\holder_scope\least_populous_clan_except_me] (Line 219, column 5):
Invalid node "least_populous_clan_except_me" in scope CharTrigger (value is: <a complex type>)
--- Error 33 of 44 ---
At <mod>\common\laws\ze_demesne_laws.txt [laws\status_of_women_1\potential\holder_scope\least_populous_clan] (Line 213, column 5):
Invalid node "least_populous_clan" in scope CharTrigger (value is: <a complex type>)
--- Error 34 of 44 ---
At <mod>\common\laws\ze_demesne_laws.txt [laws\status_of_women_1\potential\holder_scope\most_populous_clan_vassal_except_me] (Line 209, column 5):
Invalid node "most_populous_clan_vassal_except_me" in scope CharTrigger (value is: <a complex type>)
--- Error 35 of 44 ---
At <mod>\common\laws\ze_demesne_laws.txt [laws\status_of_women_1\potential\holder_scope\most_populous_clan_vassal] (Line 205, column 5):
Invalid node "most_populous_clan_vassal" in scope CharTrigger (value is: <a complex type>)
--- Error 36 of 44 ---
At <mod>\common\laws\ze_demesne_laws.txt [laws\status_of_women_1\potential\holder_scope\most_populous_clan_except_me] (Line 199, column 5):
Invalid node "most_populous_clan_except_me" in scope CharTrigger (value is: <a complex type>)
--- Error 37 of 44 ---
At <mod>\common\laws\ze_demesne_laws.txt [laws\status_of_women_1\potential\holder_scope\most_populous_clan] (Line 193, column 5):
Invalid node "most_populous_clan" in scope CharTrigger (value is: <a complex type>)
--- Error 38 of 44 ---
At <mod>\common\laws\ze_demesne_laws.txt [laws\status_of_women_1\potential\holder_scope\least_prestigious_clan_vassal_except_me] (Line 185, column 5):
Invalid node "least_prestigious_clan_vassal_except_me" in scope CharTrigger (value is: <a complex type>)
--- Error 39 of 44 ---
At <mod>\common\laws\ze_demesne_laws.txt [laws\status_of_women_1\potential\holder_scope\least_prestigious_clan_vassal] (Line 181, column 5):
Invalid node "least_prestigious_clan_vassal" in scope CharTrigger (value is: <a complex type>)
--- Error 40 of 44 ---
At <mod>\common\laws\ze_demesne_laws.txt [laws\status_of_women_1\potential\holder_scope\least_prestigious_clan_except_me] (Line 175, column 5):
Invalid node "least_prestigious_clan_except_me" in scope CharTrigger (value is: <a complex type>)
--- Error 41 of 44 ---
At <mod>\common\laws\ze_demesne_laws.txt [laws\status_of_women_1\potential\holder_scope\least_prestigious_clan] (Line 169, column 5):
Invalid node "least_prestigious_clan" in scope CharTrigger (value is: <a complex type>)
--- Error 42 of 44 ---
At <mod>\common\laws\ze_demesne_laws.txt [laws\status_of_women_1\potential\holder_scope\most_prestigious_clan_vassal_except_me] (Line 165, column 5):
Invalid node "most_prestigious_clan_vassal_except_me" in scope CharTrigger (value is: <a complex type>)
--- Error 43 of 44 ---
At <mod>\common\laws\ze_demesne_laws.txt [laws\status_of_women_1\potential\holder_scope\most_prestigious_clan_except_me] (Line 155, column 5):
Invalid node "most_prestigious_clan_except_me" in scope CharTrigger (value is: <a complex type>)
--- Error 44 of 44 ---
At <mod>\common\laws\ze_demesne_laws.txt [laws\status_of_women_1\potential\holder_scope\most_prestigious_clan] (Line 149, column 5):
Invalid node "most_prestigious_clan" in scope CharTrigger (value is: <a complex type>)

Various scopes added in 2.4, tested to work in character trigger and effect scope.
Scopes with 'vassal' in the name scope to characters, others scope to titles.

Here's a list, for convenience:
Code:
most_prestigious_clan
most_prestigious_clan_except_me
most_prestigious_clan_vassal
most_prestigious_clan_vassal_except_me
least_prestigious_clan
least_prestigious_clan_except_me
least_prestigious_clan_vassal
least_prestigious_clan_vassal_except_me
least_populous_clan
least_populous_clan_except_me
least_populous_clan_vassal
least_populous_clan_vassal_except_me
most_populous_clan
most_populous_clan_except_me
most_populous_clan_vassal
most_populous_clan_vassal_except_me
strongest_clan
strongest_clan_except_me
strongest_clan_vassal
strongest_clan_vassal_except_me
weakest_clan
weakest_clan_except_me
weakest_clan_vassal
weakest_clan_vassal_except_me

Code:
--- Error 1 of 2 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\has_cb] (Line 146, column 5):
Invalid node "has_cb" in scope CharTrigger (value is: c_144999)
--- Error 2 of 2 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\reverse_has_cb] (Line 148, column 5):
Invalid node "reverse_has_cb" in scope CharTrigger (value is: c_144999)

Added in 2.5. Valid in character scope, take any character (ID, relative scope, saved event target).

Code:
--- Error 1 of 3 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\capital_scope\is_preparing_crusade] (Line 160, column 6):
Invalid node "is_preparing_crusade" in scope ProvTrigger (value is: yes)
--- Error 2 of 3 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\secret_religious_cult\is_preparing_crusade] (Line 165, column 6):
Invalid node "is_preparing_crusade" in scope SocietyTrigger (value is: yes)
--- Error 3 of 3 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\k_papal_state\is_preparing_crusade] (Line 150, column 6):
Invalid node "is_preparing_crusade" in scope TitleTrigger (value is: yes)

Tested to work in these scopes.

Code:
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\is_neutral] (Line 149, column 5):
Invalid node "is_neutral" in scope CharTrigger (value is: yes)

Tested to work in character scope. Takes a bool. Checks if character has no vice traits and no virtue traits.

Hard stuff: repeat_event
 
Last edited:
1588630940,1588630941
see, however THIS is only possible as a RHS scope, unlike ROOT, FROM etc.
You can always request it in the hard stuff bucket at some later point.

The 'family' trigger should no longer accept title scopes, which I think it currently does.
Have changed it so that the RHS can no longer point to ROOT/etc pointing to a title

As for duplicate RHS triggers, they can be used to restrict numerical values to a range, for example 'wealth > 100; wealth <= 500'. Obviously the example you provided is rather silly and was never meant as anything more than a report.
Ok so I definitely think you reported some comparison operator issue where we only reported RHS duplicates but don't feel like looking for it so maybe it doesn't exist.

To be clear, for any comparison operator, we can always require that the RHS be unique?

It's not a historical character, but a randomly generated baron at game start. If that's intended, nothing needs to be done.
I don't think Validator can predict which characters get randomly generated. So this is actually useful to have in a mod that you target randomly generated characters in the game script?

Found in 03_scripted_effects_sainthood.txt, lines 2-5 (save_persistent_event_target_as).
If you use save_persistent_event_target_as, would you then need to use "persistent_event_target:province_saint" instead of "event_target:province_saint"?

Found in HF_realm_decisions.txt, lines 644-647 (save_persistent_event_target).
Same question: Saving with save_persistent_event_target but not accessing with "persistent_event_target:XXX"

Found in 01_scripted_effects_duels.txt, lines 2101 and 2150.
This is saying nothing is using the event target that was saved. Where is the event target being used?

Found in HFP_random_flavor_events.txt, line 2146.
We see an error at the callsite which explains the false positive.
Code:
--- Error 230 of 601 ---
At <mod>\events\HFP_random_flavor_events.txt [character_event\immediate\FROM] (Line 2146, column 3):
No direct match found for FROM (is the casing correct?). However, other possible matches in scope CharCommand were found.
Left: [ThisChar] Right: [CharCommand] cannot be correct because of left: FROM points to <null>.
However, a Char was expected.
This scope was inferred to have scope Char, but the call at <mod>\common\on_actions\15_holy_fury.txt [on_artifact_inheritance\random_events\5] (Line 653, column 3)(OnAction on_artifact_inheritance) is of scope Artifact.
Left: [ThisProv] Right: [ProvCommand] cannot be correct because of left: FROM points to <null>.
However, a Prov was expected.
This scope was inferred to have scope Char, but the call at <mod>\common\on_actions\15_holy_fury.txt [on_artifact_inheritance\random_events\5] (Line 653, column 3)(OnAction on_artifact_inheritance) is of scope Artifact.
Left: [ThisTitle] Right: [TitleCommand] cannot be correct because of left: FROM points to <null>.

This looks like an issue with repeat_event most likely. Or at least we should wait for repeat_event to be solved before reexamining it.

Found in jd_chinese_invasion_events.txt, line 2710.
Possibly also repeat_event issue.

Found in mnm_devil_worshipers_events.txt, line 7183.
Code:
--- Error 243 of 601 ---
At <mod>\events\mnm_devil_worshipers_events.txt [character_event\immediate\FROM\save_event_target_as] (Line 7110, column 12):
This event target event_target:dw_desecration_target was inferred to have type Char at <mod>\events\mnm_devil_worshipers_events.txt [character_event\immediate\random_quest_target\save_event_target_as] (Line 7146, column 4) but here has type Title
I assume this error indicates problems which are preventing desecration_holder from working. You can see whether the error is real or a false positive or what.

Found in LT_wonder_maintenance_effects.txt, line 142.
Is log statements the only strings we have to check for these (besides localization ofc), and do they behave just like localization strings? Anyways you can put this on the hard things list if you care enough.

Any not replied to also look like the save_persistent_event_target but not accessing with persistent_event_target: issue

Added in patch 1.07, but never used in vanilla. Supports 2.8-style numerical operators. Haven't figured out what this one actually does. Only seems to work in character scope.

We should probably wait until it turns out to be useful before adding it.

Here's a list, for convenience:
Was convenient to have the list.

The about-to-be-posted version will not have this.
 
You can always request it in the hard stuff bucket at some later point.

I'll add it to the list.

Have changed it so that the RHS can no longer point to ROOT/etc pointing to a title

Thanks!

Ok so I definitely think you reported some comparison operator issue where we only reported RHS duplicates but don't feel like looking for it so maybe it doesn't exist.

To be clear, for any comparison operator, we can always require that the RHS be unique?

Yes, I think that's fine. Apologies for reporting bunk. There are possible exceptions, with triggers that don't properly support numerical operators, which I've listed at the top of this page, but I doubt they'll be used.

I don't think Validator can predict which characters get randomly generated. So this is actually useful to have in a mod that you target randomly generated characters in the game script?

No, it was just for testing purposes. Generated character IDs can't be (meaningfully) predicted in any way. Validator is likely functioning properly.

If you use save_persistent_event_target_as, would you then need to use "persistent_event_target:province_saint" instead of "event_target:province_saint"?

I suspect the game doesn't discriminate between the two. Patch 3.0 mentions this, with regard to localisation: "In the case of collision with a regular event target, the persistent target takes precedence". I'll run some tests.

This is saying nothing is using the event target that was saved. Where is the event target being used?

Apologies, it's used in localisation/03_customizable_localisation_duels.txt.

We see an error at the callsite which explains the false positive.
Code:
--- Error 230 of 601 ---
At <mod>\events\HFP_random_flavor_events.txt [character_event\immediate\FROM] (Line 2146, column 3):
No direct match found for FROM (is the casing correct?). However, other possible matches in scope CharCommand were found.
Left: [ThisChar] Right: [CharCommand] cannot be correct because of left: FROM points to <null>.
However, a Char was expected.
This scope was inferred to have scope Char, but the call at <mod>\common\on_actions\15_holy_fury.txt [on_artifact_inheritance\random_events\5] (Line 653, column 3)(OnAction on_artifact_inheritance) is of scope Artifact.
Left: [ThisProv] Right: [ProvCommand] cannot be correct because of left: FROM points to <null>.
However, a Prov was expected.
This scope was inferred to have scope Char, but the call at <mod>\common\on_actions\15_holy_fury.txt [on_artifact_inheritance\random_events\5] (Line 653, column 3)(OnAction on_artifact_inheritance) is of scope Artifact.
Left: [ThisTitle] Right: [TitleCommand] cannot be correct because of left: FROM points to <null>.

This looks like an issue with repeat_event most likely. Or at least we should wait for repeat_event to be solved before reexamining it.

Likely correct.

Code:
--- Error 243 of 601 ---
At <mod>\events\mnm_devil_worshipers_events.txt [character_event\immediate\FROM\save_event_target_as] (Line 7110, column 12):
This event target event_target:dw_desecration_target was inferred to have type Char at <mod>\events\mnm_devil_worshipers_events.txt [character_event\immediate\random_quest_target\save_event_target_as] (Line 7146, column 4) but here has type Title
I assume this error indicates problems which are preventing desecration_holder from working. You can see whether the error is real or a false positive or what.

Thanks, that helps. The cause might be 'random_quest_target', which can be a province, character and title, but Validator assumes title by default. Another low priority.

Is log statements the only strings we have to check for these (besides localization ofc), and do they behave just like localization strings? Anyways you can put this on the hard things list if you care enough.

The 'adjective'-effect can also take localisation strings. I'll check if there are any others. As far as I know they behave exactly like normal localisation strings found in .csv files, yes. I'll add it to the hard stuff list, but it's very low priority.

adjective
set_dynasty_name

We should probably wait until it turns out to be useful before adding it.

Fair enough. Further testing shows this has been ignored since it was added. Seems to always be equal to 101. Tested without Old Gods to see if it maybe did anything with the old-style rebels, but no luck there either.

Was convenient to have the list.

Glad to hear it was of use.

Code:
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\k_frisia\insert_title_history] (Line 159, column 5):
Invalid node "insert_title_history" in scope TitleCommand (value is: k_france)

Tested to also work in regular script, not just in 'effect = {}'-clauses in title history. Takes title IDs, relative scopes and saved event targets.

Code:
At <mod>\common\cb_types\00_cb_types.txt [other_dejure_county_claim\is_valid_title\any_de_jure_liege_title] (Line 12826, column 3):
Invalid node "any_de_jure_liege_title" in scope CbTitleTrigger (value is: <a complex type>)

Apologies, this one definitely works in title trigger and command scopes. I should have specified it doesn't work in character scopes.

Code:
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\any_owned_bloodline\propagate_bloodline_from] (Line 246, column 6):
Invalid node "propagate_bloodline_from" in scope BloodlineMaybeLimitCommand (value is: c_91487)

Added in 3.1. Valid in bloodline command scope, takes a character scope, ID or saved event target.

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

Added in 3.1.1. Valid in province command scope, takes a wonder ID, as found in common\wonders.

Code:
--- Error 1 of 3 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\wealth] (Line 245, column 5):
"spouse" is not a valid MaybeEventTargetChar, Double, or VariableName.
--- Error 2 of 3 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\wealth] (Line 246, column 5):
"c_144999" is not a valid MaybeEventTargetChar, Double, or VariableName.
--- Error 3 of 3 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\wealth] (Line 247, column 5):
"k_lotharingia" is not a valid MaybeEventTargetChar, Double, or VariableName.

Takes any character ID, fancy scope and title ID, as well as relative scopes and event targets of both.

Hard stuff: repeat_event
 
Last edited:
Apologies, it's used in localisation/03_customizable_localisation_duels.txt.
Right now all the triggers in custom localization are not being analyzed as they are hard to figure out what is the scope and stuff. Is there a way Validator can do that in a reasonable way?

Apologies, this one definitely works in title trigger and command scopes. I should have specified it doesn't work in character scopes.
Ok any_de_jure_liege_title and any_de_facto_liege_title are changed to work in title trigger and title command scopes only.

Would be good to mention the current hard thing each time to avoid losing track but the upcoming one hopefully at least makes a start at dealing with repeat_event. Probably somewhat buggy for now still.
 
Something that would be a nice addition (if it is possible to add and it isn't something that exists that I'm just not able to find) would be a way to restrict the log output to only contain information from one file (or even to take a file containing file names to list as input), possibly including files called by it (e.g. 00_scripted_triggers.txt errors related to an event file you're asking for output from). It is of course possible to copy-paste the log into Notepad++ or similar and delete everything irrelevant, but if you're going to be checking the same file(s) several times in succession it is a bit tedious.

Being able to suppress the warning regarding 10 digit character ids (which I can't find any way to suppress) would also be quite nice if you've got a lot of such characters and don't want them to clutter the character validation log.

Also, the call_graph.txt file is really nice to have if you want to try to track down scope errors, but unless you go looking around the Validator's files after you've run it at least once it isn't something that you would know is a thing (I literally found it just before writing this post). Being able to get that output directly in the Validator (say using a new "Event call graph" error category) would be nice, and might let more people make use of it.
 
  • 1
Reactions:
Something that would be a nice addition (if it is possible to add and it isn't something that exists that I'm just not able to find) would be a way to restrict the log output to only contain information from one file (or even to take a file containing file names to list as input), possibly including files called by it (e.g. 00_scripted_triggers.txt errors related to an event file you're asking for output from). It is of course possible to copy-paste the log into Notepad++ or similar and delete everything irrelevant, but if you're going to be checking the same file(s) several times in succession it is a bit tedious.
Won't be added due to the legacy nature of the Validator.

Being able to suppress the warning regarding 10 digit character ids (which I can't find any way to suppress) would also be quite nice if you've got a lot of such characters and don't want them to clutter the character validation log.
What error are you referring to? Please paste it here. What is the max in-game ID? For the following numbers, do they work in game, in Validator, both, or none: 1 billion, 3 billion, 5 billion

Also, the call_graph.txt file is really nice to have if you want to try to track down scope errors, but unless you go looking around the Validator's files after you've run it at least once it isn't something that you would know is a thing (I literally found it just before writing this post). Being able to get that output directly in the Validator (say using a new "Event call graph" error category) would be nice, and might let more people make use of it.
This is an internal debugging tool which may in theory change or be removed at any time (though at this point it is fairly unlikely). Hence would not wish to expose it.
 
Won't be added due to the legacy nature of the Validator.

Fair enough.

What error are you referring to? Please paste it here. What is the max in-game ID? For the following numbers, do they work in game, in Validator, both, or none: 1 billion, 3 billion, 5 billion

The "Char IDs 10 digits or longer can cause problems" error. All of the numbers you've suggested return an error in the Validator. 1 billion works in the game (and was the start of the lowest id range assigned to a mod back when mods could request id ranges), 3 does not (or, well, that character's id is set to 2147483647 once you load in despite being added as exactly 3 billion), 5 presumably does not because 3 does not. I get why the warning is there, and for someone that's not aware of the risk of overflow it certainly might be useful, but if you know you're safe it is annoying to have it show up; as an example, if I do a Character validation of the internal dev version of Tianxia with all optional settings left unchanged I currently get 11570 errors, with 10879 of them being 10 digit ID errors that I'm 100 % certain are irrelevant since our highest id character has the id 1100000000.

This is an internal debugging tool which may in theory change or be removed at any time (though at this point it is fairly unlikely). Hence would not wish to expose it.


Ah. It looks like something I might want to make use of, so my vote is for it to stay! :p
 
The "Char IDs 10 digits or longer can cause problems" error. All of the numbers you've suggested return an error in the Validator. 1 billion works in the game (and was the start of the lowest id range assigned to a mod back when mods could request id ranges), 3 does not (or, well, that character's id is set to 2147483647 once you load in despite being added as exactly 3 billion), 5 presumably does not because 3 does not. I get why the warning is there, and for someone that's not aware of the risk of overflow it certainly might be useful, but if you know you're safe it is annoying to have it show up; as an example, if I do a Character validation of the internal dev version of Tianxia with all optional settings left unchanged I currently get 11570 errors, with 10879 of them being 10 digit ID errors that I'm 100 % certain are irrelevant since our highest id character has the id 1100000000.
To be sure, are there multiple errors for 3 billion in the Validator, both the one you are complaining about and also something about "is not a valid non-negative integer"?

Do you know if the last item on this is still relevant: https://forum.paradoxplaza.com/foru...ly-and-with-minimal-pain.597480/post-21847735

If so then I can add a flag in ValidatorSettings, if not then we can remove the check altogether (and rely on the "is not a valid non-negative integer" error which should also be appearing)
 
To be sure, are there multiple errors for 3 billion in the Validator, both the one you are complaining about and also something about "is not a valid non-negative integer"?

There's only one error for that character, which is "Invalid node "3000000000" in scope CharacterFile (value is: <a complex type>)", while every other character (that has an 1 billion+ ID) has the other error and only that error unless something else also is getting flagged (e.g. someone having a child when they're too young).

Do you know if the last item on this is still relevant: https://forum.paradoxplaza.com/foru...ly-and-with-minimal-pain.597480/post-21847735

If so then I can add a flag in ValidatorSettings, if not then we can remove the check altogether (and rely on the "is not a valid non-negative integer" error which should also be appearing)

I have no idea about whether that issue is a thing at the moment and wasn't aware it had ever been an issue (maybe because I only really started with character modding a year or so back). I don't think I've noticed any stability issues I'd ascribe to the IDs, but if it is a potential risk then a flag would certainly be good enough for my purposes if that's something that can be added easily enough.
 
@Jamie550 If I had to guess (without actually testing it), I'd say the max ID is probably 2,147,483,647
 
  • 1
Reactions:
Right now all the triggers in custom localization are not being analyzed as they are hard to figure out what is the scope and stuff. Is there a way Validator can do that in a reasonable way?

I suspect it would involve scope-checking all localisation, since scoping occurs there before customizable localisation is invoked/evaluated.

Would be good to mention the current hard thing each time to avoid losing track but the upcoming one hopefully at least makes a start at dealing with repeat_event. Probably somewhat buggy for now still.

I hadn't expected another version quite soon, having gotten used to the weekly response times. I think I'll just link to the previous post in my signature (unless you've chosen not to display those on these forums).
You do seem to have made some good progress already, if going by the reduced number of error reports showing up is a reliable metric.

Here's some info on the following effects

Code:
gain_title
gain_title_plus_barony_if_unlanded
grant_kingdom_w_adjudication
grant_title
grant_title_no_opinion
usurp_title
usurp_title_only
usurp_title_plus_barony_if_unlanded
usurp_title_plus_barony_if_unlanded_and_vassals
usurp_title_plus_barony_if_unlanded_and_vassals_no_adj

These can all be used in character scope as well as in title scope. The RHS argument will have to be whatever the current scope is not, that is to say, they require both a title and a character, but don't care how they are provided. Furthermore, they also all support a clause form, specifying a 'target', which works the same as the simple form (if the current scope is a character, 'target' must be a title and vice versa). They also support character IDs and title IDs.

To top it off, here's the full list of supported 'UsurpTypes' (for TitleTransfer.pdox):

Code:
claim
created
duel
election
faction_demand
grant
holy_war
host
inheritance
invasion
revoke
revolt

UsurpTypes.png


Code:
ACQUISITION_CLAIM;Conquered as a Claimant;Conquis en tant que revendicateur;Erobert als Anspruchsteller;;Conquistado como un pretendiente;;;;;;;;;x
ACQUISITION_CREATED;Created;Création du titre;wurde erschaffen;;Fue creado;;;;;;;;;x
ACQUISITION_DUEL;Claimed in personal combat;Réclamé dans un duel;Im persönlichen Kampf behauptet;;Reclamado en combate personal;;;;;;;;;x
ACQUISITION_ELECTION;Elected;Par élection;durch Wahl erworben;;Obtenido a través de elección;;;;;;;;;x
ACQUISITION_FACTION_DEMAND;Installed by Faction Demand;Installé sous demande d'une faction;Installiert durch eine Fraktionsforderung;;Instalado por petición de la facción;;;;;;;;;x
ACQUISITION_GRANT;Granted;Par octroi;wurde dem Halter verliehen;;Fue concedida al propietario;;;;;;;;;x
ACQUISITION_HOLY_WAR;Conquered in a Holy War;Obtenu dans une guerre sainte;durch Heiligen Krieg erworben;;Obtenido a través de guerra santa;;;;;;;;;x
ACQUISITION_HOST;Conquered as an Adventurer;Conquis en tant qu'aventurier;Erobert als Abenteurer;;Conquistado como un aventurero;;;;;;;;;x
ACQUISITION_INHERITANCE;Inherited;Par héritage;durch Erbschaft erworben;;Obtenido a través de herencia;;;;;;;;;x
ACQUISITION_INVASION;Conquered in a War;Obtenu dans une guerre;durch Invasion erworben;;Obtenido a través de invasión;;;;;;;;;x
ACQUISITION_REVOKE;Revoked;Par révocation;durch Widerruf erworben;;Obtenido a través de revocación;;;;;;;;;x
ACQUISITION_REVOLT;Conquered as Leader of an Uprising;Conquis en tant que chef d'une révolte;Erobert als Anführer eines Aufstands;;Conquistado como líder de un levantamiento;;;;;;;;;x
ACQUISITION_USURP;Peacefully Usurped;Usurpé en paix;Friedliche Übernahme;;Usurpado pacíficamente;;;;;;;;;x

Here's some script example, which is fully supported by all ten effects listed above, and a few errors reported by Validator, just in case.

Any of the ten commands listed above can be substituted below.

Code:
random_character = {
    show_scope_change = no

    gain_title = c_frisia
}

random_character = {
    show_scope_change = no

    gain_title_plus_barony_if_unlanded = c_frisia
}

random_character = {
    show_scope_change = no

    grant_kingdom_w_adjudication = c_frisia
}

random_character = {
    show_scope_change = no

    grant_title = c_frisia
}

random_character = {
    show_scope_change = no

    grant_title_no_opinion = c_frisia
}

random_character = {
    show_scope_change = no

    usurp_title = c_frisia
}

random_character = {
    show_scope_change = no

    usurp_title_only = c_frisia
}

random_character = {
    show_scope_change = no

    usurp_title_plus_barony_if_unlanded = c_frisia
}

random_character = {
    show_scope_change = no

    usurp_title_plus_barony_if_unlanded_and_vassals = c_frisia
}

random_character = {
    show_scope_change = no

    usurp_title_plus_barony_if_unlanded_and_vassals_no_adj = c_frisia
}

c_gelre = {
    show_scope_change = no

    random_character = {
        show_scope_change = no

        gain_title = PREV
    }

    random_character = {
        show_scope_change = no

        gain_title_plus_barony_if_unlanded = PREV
    }

    random_character = {
        show_scope_change = no

        grant_kingdom_w_adjudication = PREV
    }

    random_character = {
        show_scope_change = no

        grant_title = PREV
    }

    random_character = {
        show_scope_change = no

        grant_title_no_opinion = PREV
    }

    random_character = {
        show_scope_change = no

        usurp_title = PREV
    }

    random_character = {
        show_scope_change = no

        usurp_title_only = PREV
    }

    random_character = {
        show_scope_change = no

        usurp_title_plus_barony_if_unlanded = PREV
    }

    random_character = {
        show_scope_change = no

        usurp_title_plus_barony_if_unlanded_and_vassals = PREV
    }

    random_character = {
        show_scope_change = no

        usurp_title_plus_barony_if_unlanded_and_vassals_no_adj = PREV
    }
}

random_character = {
    show_scope_change = no

    c_frisia = {
        show_scope_change = no

        usurp_title_plus_barony_if_unlanded_and_vassals = {
            target = PREV
            type = claim
        }
    }
}

random_character = {
    show_scope_change = no

    c_frisia = {
        show_scope_change = no

        usurp_title_plus_barony_if_unlanded_and_vassals = {
            target = PREV
            type = created
        }
    }
}

random_character = {
    show_scope_change = no

    c_frisia = {
        show_scope_change = no

        usurp_title_plus_barony_if_unlanded_and_vassals = {
            target = PREV
            type = duel
        }
    }
}

random_character = {
    show_scope_change = no

    c_frisia = {
        show_scope_change = no

        usurp_title_plus_barony_if_unlanded_and_vassals = {
            target = PREV
            type = election
        }
    }
}

random_character = {
    show_scope_change = no

    c_frisia = {
        show_scope_change = no

        usurp_title_plus_barony_if_unlanded_and_vassals = {
            target = PREV
            type = faction_demand
        }
    }
}

random_character = {
    show_scope_change = no

    c_frisia = {
        show_scope_change = no

        usurp_title_plus_barony_if_unlanded_and_vassals = {
            target = PREV
            type = grant
        }
    }
}

random_character = {
    show_scope_change = no

    c_frisia = {
        show_scope_change = no

        usurp_title_plus_barony_if_unlanded_and_vassals = {
            target = PREV
            type = holy_war
        }
    }
}

random_character = {
    show_scope_change = no

    c_frisia = {
        show_scope_change = no

        usurp_title_plus_barony_if_unlanded_and_vassals = {
            target = PREV
            type = host
        }
    }
}

random_character = {
    show_scope_change = no

    c_frisia = {
        show_scope_change = no

        usurp_title_plus_barony_if_unlanded_and_vassals = {
            target = PREV
            type = inheritance
        }
    }
}

random_character = {
    show_scope_change = no

    c_frisia = {
        show_scope_change = no

        usurp_title_plus_barony_if_unlanded_and_vassals = {
            target = PREV
            type = invasion
        }
    }
}

random_character = {
    show_scope_change = no

    c_frisia = {
        show_scope_change = no

        usurp_title_plus_barony_if_unlanded_and_vassals = {
            target = PREV
            type = revoke
        }
    }
}

random_character = {
    show_scope_change = no

    c_frisia = {
        show_scope_change = no

        usurp_title_plus_barony_if_unlanded_and_vassals = {
            target = PREV
            type = revolt
        }
    }
}

random_character = {
    show_scope_change = no

    c_frisia = {
        show_scope_change = no

        usurp_title_plus_barony_if_unlanded_and_vassals = {
            target = PREV
            type = usurp
        }
    }
}

c_gelre = {
    show_scope_change = no

    random_character = {
        show_scope_change = no

        usurp_title_plus_barony_if_unlanded_and_vassals = {
            target = PREV
            type = claim
        }
    }

    random_character = {
        show_scope_change = no

        usurp_title_plus_barony_if_unlanded_and_vassals = {
            target = PREV
            type = created
        }
    }

    random_character = {
        show_scope_change = no

        usurp_title_plus_barony_if_unlanded_and_vassals = {
            target = PREV
            type = duel
        }
    }

    random_character = {
        show_scope_change = no

        usurp_title_plus_barony_if_unlanded_and_vassals = {
            target = PREV
            type = election
        }
    }

    random_character = {
        show_scope_change = no

        usurp_title_plus_barony_if_unlanded_and_vassals = {
            target = PREV
            type = faction_demand
        }
    }

    random_character = {
        show_scope_change = no

        usurp_title_plus_barony_if_unlanded_and_vassals = {
            target = PREV
            type = grant
        }
    }

    random_character = {
        show_scope_change = no

        usurp_title_plus_barony_if_unlanded_and_vassals = {
            target = PREV
            type = holy_war
        }
    }

    random_character = {
        show_scope_change = no

        usurp_title_plus_barony_if_unlanded_and_vassals = {
            target = PREV
            type = host
        }
    }

    random_character = {
        show_scope_change = no

        usurp_title_plus_barony_if_unlanded_and_vassals = {
            target = PREV
            type = inheritance
        }
    }

    random_character = {
        show_scope_change = no

        usurp_title_plus_barony_if_unlanded_and_vassals = {
            target = PREV
            type = invasion
        }
    }

    random_character = {
        show_scope_change = no

        usurp_title_plus_barony_if_unlanded_and_vassals = {
            target = PREV
            type = revoke
        }
    }

    random_character = {
        show_scope_change = no

        usurp_title_plus_barony_if_unlanded_and_vassals = {
            target = PREV
            type = revolt
        }
    }

    random_character = {
        show_scope_change = no

        usurp_title_plus_barony_if_unlanded_and_vassals = {
            target = PREV
            type = usurp
        }
    }
}

Code:
--- Error 1 of 5 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\random_character\gain_title_plus_barony_if_unlanded] (Line 269, column 6):
Invalid node "gain_title_plus_barony_if_unlanded" in scope CharRandomCommand (value is: c_frisia)
--- Error 2 of 5 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\random_character\grant_kingdom_w_adjudication] (Line 275, column 6):
Invalid node "grant_kingdom_w_adjudication" in scope CharRandomCommand (value is: c_frisia)
--- Error 3 of 5 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\random_character\usurp_title_plus_barony_if_unlanded_and_vassals] (Line 311, column 6):
Invalid node "usurp_title_plus_barony_if_unlanded_and_vassals" in scope CharRandomCommand (value is: c_frisia)
--- Error 4 of 5 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\random_character\usurp_title_plus_barony_if_unlanded_and_vassals_no_adj] (Line 317, column 6):
Invalid node "usurp_title_plus_barony_if_unlanded_and_vassals_no_adj" in scope CharRandomCommand (value is: c_frisia)
--- Error 5 of 5 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\c_gelre\random_character\gain_title] (Line 550, column 7):
<a complex type> is not a valid MaybeEventTarget(Title).
--- Error 1 of 6 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\random_character\c_frisia\gain_title\type] (Line 531, column 8):
"usurp" is not a valid UsurpType.
--- Error 2 of 6 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\random_character\c_frisia\gain_title\type] (Line 509, column 8):
"revoke" is not a valid UsurpType.
--- Error 3 of 6 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\random_character\c_frisia\gain_title\type] (Line 487, column 8):
"inheritance" is not a valid UsurpType.
--- Error 4 of 6 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\random_character\c_frisia\gain_title\type] (Line 454, column 8):
"grant" is not a valid UsurpType.
--- Error 5 of 6 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\random_character\c_frisia\gain_title\type] (Line 432, column 8):
"election" is not a valid UsurpType.
--- Error 6 of 6 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\random_character\c_frisia\gain_title\type] (Line 410, column 8):
"created" is not a valid UsurpType.
--- Error 1 of 1 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\random_character\c_frisia\gain_title_plus_barony_if_unlanded] (Line 399, column 7):
<a complex type> is not a valid MaybeEventTargetChar or CharTargetExcludingMaybeEventTarget.
--- Error 1 of 1 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\random_character\c_frisia\grant_kingdom_w_adjudication] (Line 399, column 7):
<a complex type> is not a valid MaybeEventTargetChar or CharTargetExcludingMaybeEventTarget.

Code:
--- Error 1 of 3 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\set_truce] (Line 255, column 5):
The required "years" entry was not found.
--- Error 2 of 3 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\set_truce\days] (Line 257, column 6):
Invalid node "days" in scope <anon> (value is: 1825)
--- Error 3 of 3 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\set_truce\months] (Line 262, column 6):
Invalid node "months" in scope <anon> (value is: 1825)

I tested 'months' and 'days' to be valid options here. One of the three is required.

Code:
--- Error 1 of 2 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\join_faction\thirdparty] (Line 274, column 6):
Invalid node "thirdparty" in scope <anon> (value is: c_168708)
--- Error 2 of 2 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\holder_scope\join_faction\title] (Line 273, column 6):
Invalid node "title" in scope <anon> (value is: k_france)

Also valid nodes here, similar to 'start_faction'. Which node is required depends on the type of faction, in case Validator can check that. See here for more details.

Code:
--- Error 1 of 2 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\enable_council_voting_on_issue] (Line 246, column 4):
"recruit_prisoner" is not a valid CouncilVotingTopic.
--- Error 2 of 2 ---
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\effect\disable_council_voting_on_issue] (Line 247, column 4):
"recruit_prisoner" is not a valid CouncilVotingTopic.

Any decision in a 'targetted_decision' or 'targeted_decision' is a valid RHS argument for these effects (see here). Uses localisation keys of this format: '<targeted_decision_name>_voting', in case Validator can check if such a key is present.

Code:
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\c_144999] (Line 130, column 5):
The right sides of a AiModifier clause may not be identical.
There were 5 duplicates.
    [I2210|L131|C6]: ai_ambition = 0
    [I2232|L132|C6]: ai_greed = 0
    [I2251|L133|C6]: ai_honor = 0
    [I2270|L134|C6]: ai_rationality = 0
    [I2295|L135|C6]: ai_zeal = 0

These are different triggers, so their RHS can be the same.

Code:
At <mod>\common\laws\demesne_laws.txt [laws\centralization_1\allow\holder_scope\c_144999\has_flag] (Line 136, column 6):
Bad name emf_disinherit_@ROOT_FROMFROM

ROOT_FROMs (up to ROOT_FROMFROMFROMFROM) are valid relative scopes to use in flag setting and checking.

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

I can confirm this works. All the usual unit modifiers like 'pikemen_offensive' work here.

_______________________________________________________________________________________________

Some minor stuff:

These triggers all take any character ID and fancy scopes ('liege', 'spouse', 'educator')
war_with

These effects all take any character ID and fancy scopes ('liege', 'spouse', 'educator')
reverse_set_opinion_levy_raised_days
wealth/treasury
add_special_interest ('who'-node)
remove_special_interest
set_truce ('who'-node)

Hard stuff: repeat_event
 
Last edited:
@Jamie550 If I had to guess (without actually testing it), I'd say the max ID is probably 2,147,483,647
Yes I know what the max of a signed 32-bit int in 2's complement representation is. The question is if there are actually stability issues for IDs from 1 to 2 billion. Unless someone shows some evidence there is I will assume either whatever issues there were were fixed, or the original issue was misstated via a broken game of telephone.

I suspect it would involve scope-checking all localisation, since scoping occurs there before customizable localisation is invoked/evaluated.
Very much a hard thing then.

I hadn't expected another version quite soon, having gotten used to the weekly response times. I think I'll just link to the previous post in my signature (unless you've chosen not to display those on these forums).
You do seem to have made some good progress already, if going by the reduced number of error reports showing up is a reliable metric.
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.

Please post example error of this one