• 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.
Does c_247109 mean the character id with 247109, or something else? Does just using 247109 work? Is it the case that anywhere you can use just the numbers, you can add c_ and vice versa? or is this something else.

Yes, those are character IDs, but they require c_ in front of them, since numbers by themselves refer to province IDs.

Data\Ck2\Religions.pdox.

This is not showing up on my end strangely, and this is a vanilla example right?

I copied

Code:
(N Y) = { Left = "has_selected_religion_feature" Right = ReligionFeature }

from ReligionFeatureTrigger in Religions.pdox to ReligionTrigger in Religion.pdox, since that's the scope listed in the error log, and that made them go away on my end.

Yes I think it's a 29 feb issue (you could change to 28 to see if it disappears, to be sure that's the issue)

That did indeed remove it from Validator's error log. Even though the game never displays February 29, it seems to have no issue loading date clauses that use it.
 
Code:
At <mod>\common\cb_types\00_cb_types.txt [new_crusade\on_success_title\hidden_tooltip\any_crusade_participant] (Line 5528, column 4):
Invalid node "any_crusade_participant" in scope TitleHiddenCommandTooltip (value is: <a complex type>)

Also works correctly in-game. Joined a crusade, selected selfish stance, saved game, deleted existing opinion modifier from Pope, loaded the save, and saw it re-added on successful end of the crusade, as expected.

Code:
At <mod>\common\cb_types\01_cb_types.txt [northern_crusade_war\on_success_title\ROOT\hidden_tooltip\most_participating_attacker] (Line 8542, column 5):
Invalid node "most_participating_attacker" in scope CharHiddenCommandTooltip (value is: <a complex type>)

Tested, works as expected.

Code:
At <mod>\common\cb_types\00_cb_types.txt [new_crusade\on_success_title\hidden_tooltip\ROOT\else_if\e_byzantium\owner\else_if\capital_scope\create_title] (Line 5200, column 10):
Invalid node "create_title" in scope ProvCommand (value is: <a complex type>)

Executing the following code as Charlemagne creates a titular empire of Vermandois (capital), so it seems to work just fine.

Code:
ROOT = {
    capital_scope = {
        create_title = {
            tier = EMPEROR
            landless = no
            temporary = no
            name = "fourth_crusade_greek_empire_name"
            holder = PREV
            culture = PREV
            custom_created = yes
            base_title = THIS
        }
    }
}

Code:
At <mod>\events\HFP_crusade_events.txt [character_event\immediate\else_if\random_dynasty_member\limit\NAND] (Line 2051, column 6):
Since there is only one item within the NAND clause, it is redundant and unnecessary.

Validator should probably suggest using a NOT clause instead of a NAND clause in this case, since removing it changes the effect of the code

Code:
At <mod>\common\technology.txt [TECH_GROUP_ECONOMY\TECH_TRADE_PRACTICES\modifier\tradevalue_mult] (Line 422, column 4):
Invalid node "tradevalue_mult" in scope JunkModifiers (value is: 0.6)

At <mod>\common\technology.txt [TECH_GROUP_MILITARY\TECH_MELEE\modifier\custom_modifier_text] (Line 48, column 4):
Invalid node "custom_modifier_text" in scope JunkModifiers (value is: better_melee_tactics_custom_modifier_tt)

At <mod>\common\technology.txt [TECH_GROUP_MILITARY\TECH_SKIRMISH\modifier\custom_modifier_text] (Line 38, column 4):
Invalid node "custom_modifier_text" in scope JunkModifiers (value is: better_skirmisher_tactics_custom_modifier_tt)

Can be observed to function correctly in-game. The latter two were added in patch 3.1.

Code:
At <mod>\common\laws\succession_laws.txt [succession_laws\succ_hre_elective\vassal_limit] (Line 848, column 3):
Invalid node "vassal_limit" in scope DecisionDef (value is: 20)

Working correctly. HRE in 1066 start has +42 from laws. 10 is from Centralisation law, 12 from council power laws, so the remaining 20 must be from this special HRE succession law.

Code:
At <mod>\common\cb_types\01_cb_types.txt [liberate_religion\on_success_title\custom_tooltip\hidden_tooltip\event_target:new_ruler\vassalize_or_take_under_title\as_if_allied_to] (Line 1865, column 7):
"ROOT" is not a valid Bool.

"as_if_allied_to" takes a character scope, not a boolean. See patch 2.8, which has an explanation.

Code:
At <mod>\events\HF_religious_events.txt [character_event\option\hidden_tooltip\start_faction] (Line 4918, column 4):
The required "title" entry was not found.

A 'character' faction does not require 'title' node, according to Wiki.
Event works correctly in-game.

Code:
At <mod>\decisions\LT_936_decisions.txt [decisions\shiite_caliphate_cairo_decision\effect\796\if\add_holding_slot] (Line 362, column 6):
"2" is not a valid "1".

Can take any applicable integer value, both positive and negative (should likely be capped at 6 and -6).

Code:
At <mod>\decisions\mnm_society_decisions.txt [targeted_decisions\assassins_recruit\from_potential\OR] (Line 885, column 4):
There may be no duplications of a "society_rank" clause.
There were 2 duplicates.
    [I18637|L887|C5]: society_rank = 2
    [I18660|L888|C5]: society_rank = 3

At <mod>\events\mnm_hermetics_events.txt [character_event\trigger\NOT\days_in_society] (Line 12039, column 11):
"0" is not a valid PositiveInt.

Should be okay if the checks are for strict equality (==). This goes for other checks too, probably every numerical check that supports the 2.8 numeric operators.

Code:
At <mod>\decisions\LT_936_decisions.txt [decisions\shiite_caliphate_cairo_decision\effect\796\if\limit\796\NOR] (Line 356, column 8):
There may be no duplications of a "num_of_max_settlements" clause.
There were 2 duplicates.
    [I6905|L357|C9]: num_of_max_settlements = 6
    [I6941|L358|C9]: num_of_max_settlements = 7

These are not duplicates, being in different if = {} clauses.

Code:
At <mod>\events\mnm_artifacts_events.txt [character_event\immediate\random_child\limit] (Line 11400, column 4):
There may be no duplications of a "age" clause.
There were 2 duplicates.
    [I258964|L11402|C5]: age = 16
    [I258979|L11403|C5]: age = 9

These are distinct checks, due to 2.8's new numerical operators

Code:
At <mod>\common\artifacts\02_artifacts_wonders.txt [antiquity_book_architecture\local_build_cost_modifier] (Line 60, column 2):
Invalid node "local_build_cost_modifier" in scope ArtifactDef (value is: -0.1)

Works in-game.
 
Not sure if I;m doing this right but I was trying a little while back to edit an older mod back into compatibility with current CK2 for personal play before leaving it for a little bit. I come back to continue working on it with the current version of Validator and this is all I get back? Any clue what I'm doing wrong?
Code:
Validation Error Log
----------------------------------------------------------

Parse Failure
Path: <mod>\common\landed_titles\landed_titles.txt
Approximate location: Line -1, column -1
Error: The file was not properly closed by a closing bracket.

Parse Failure
Path: <mod>\common\landed_titles\wre.txt
Approximate location: Line -1, column -1
Error: The file was not properly closed by a closing bracket.

----------------------------------------------------------
End of Validation Error Log

Now I'm very much an amateur at coding and modding in general but I'm pretty sure in most cases lines and columns of code don't fall into the negatives.
 
Now I'm very much an amateur at coding and modding in general but I'm pretty sure in most cases lines and columns of code don't fall into the negatives.

-1 usually means the specific place couldn't be found, or there are several places at which something is wrong. error.log, produced by the game, may be more helpful here. It's likely one missing closing bracket caused an avalanche of errors, so look for the first error listed related to the file you're trying to investigate and fix.
 
I copied

Code:
(N Y) = { Left = "has_selected_religion_feature" Right = ReligionFeature }
from ReligionFeatureTrigger in Religions.pdox to ReligionTrigger in Religion.pdox, since that's the scope listed in the error log, and that made them go away on my end.
Well that's strange then but it should work without copying. So wondering why things are different.

Yes, those are character IDs, but they require c_ in front of them, since numbers by themselves refer to province IDs.



I copied

Code:
(N Y) = { Left = "has_selected_religion_feature" Right = ReligionFeature }

from ReligionFeatureTrigger in Religions.pdox to ReligionTrigger in Religion.pdox, since that's the scope listed in the error log, and that made them go away on my end.



That did indeed remove it from Validator's error log. Even though the game never displays February 29, it seems to have no issue loading date clauses that use it.

There is a flag in ValidatorSettings to allow feb 29 on years when it's actually valid IIRC.

Code:
At <mod>\common\cb_types\00_cb_types.txt [new_crusade\on_success_title\hidden_tooltip\any_crusade_participant] (Line 5528, column 4):
Invalid node "any_crusade_participant" in scope TitleHiddenCommandTooltip (value is: <a complex type>)
Also works correctly in-game. Joined a crusade, selected selfish stance, saved game, deleted existing opinion modifier from Pope, loaded the save, and saw it re-added on successful end of the crusade, as expected.
Ok so

1. Is it correct that this is title scope due to on_success_title
2. Currently any_crusade_participant is allowed by validator in char and religion scopes. So this is saying it's now allowed in title scopes as well? Or is it actually allowed in any scope?

Code:
At <mod>\common\cb_types\01_cb_types.txt [northern_crusade_war\on_success_title\ROOT\hidden_tooltip\most_participating_attacker] (Line 8542, column 5):
Invalid node "most_participating_attacker" in scope CharHiddenCommandTooltip (value is: <a complex type>)
Tested, works as expected.

Right now valdiator accepts this in a title scope. So is it correct that on_success_title.ROOT here is a char scope, but most_participating_attacker also works in char scopes? Or is it some other reason why it works?

Should be okay if the checks are for strict equality (==). This goes for other checks too, probably every numerical check that supports the 2.8 numeric operators.

This will likely be a bit of whack a mole for Validator

Code:
At <mod>\decisions\LT_936_decisions.txt [decisions\shiite_caliphate_cairo_decision\effect\796\if\limit\796\NOR] (Line 356, column 8):
There may be no duplications of a "num_of_max_settlements" clause.
There were 2 duplicates.
[I6905|L357|C9]: num_of_max_settlements = 6
[I6941|L358|C9]: num_of_max_settlements = 7
These are not duplicates, being in different if = {} clauses.

Can you post the code? Though this might just be a case of needing to allow dups due to comparison operators.
 
There is a flag in ValidatorSettings to allow feb 29 on years when it's actually valid IIRC.

I'll keep that in mind.

Ok so

1. Is it correct that this is title scope due to on_success_title
2. Currently any_crusade_participant is allowed by validator in char and religion scopes. So this is saying it's now allowed in title scopes as well? Or is it actually allowed in any scope?

It's one of several scopes added with 3.0 and the new crusade mechanics. Since only one new style crusade can be active at any time, it's likely it can be called from any scope. I can try some more testing.

Right now valdiator accepts this in a title scope. So is it correct that on_success_title.ROOT here is a char scope, but most_participating_attacker also works in char scopes? Or is it some other reason why it works?

Could it work if some outer scope is a war scope and it checks from there?

Can you post the code? Though this might just be a case of needing to allow dups due to comparison operators.

This is just vanilla code, as are nearly all of these recent false positives I've been finding.
 
Hi,

Great job on the validator. Congrats!

The trigger "is_vassal_or_below_of" reports as an error when there is an instance in vanilla file HF_antagonize_events.txt where it is used. The only difference is in the former (my mod) I use "NOT = { is_vassal_or_below_of = ROOT }" while in the later it uses just "is_vassal_or_below_of = ROOT".
 
Got a few more.

Code:
At <mod>\common\scripted_effects\00_scripted_effects.txt [move_childrens_crusade_region_effect\if\primary_title\set_preferred_capital] (Line 25675, column 21):
"c_genoa" is not a valid MaybeEventTarget(Title).

Wiki says about 'set_preferred_capital': 'Works for both dynamic and static titles since patch 2.8.'

Did some tests, takes any (non-titular) title (b_, c_, d_ and e_).
For (right-hand side) b_ and c_, sets de jure capital to corresponding province, for higher titles, sets it to the de jure province of that title.
Also takes a province number (set_preferred_capital = 325) and sets de jure capital accordingly.
Does not take relative scopes (FROM, ROOT, PREV etc.) and saved event targets, from my testing.

Code:
At <mod>\events\rip_prosperity_events.txt [province_event\option\random\modifier\wonder\is_being_looted] (Line 102, column 7):
Invalid node "is_being_looted" in scope WonderTrigger (value is: no)

At <mod>\events\rip_prosperity_events.txt [province_event\option\random\modifier\wonder\is_damaged] (Line 101, column 7):
Invalid node "is_damaged" in scope WonderTrigger (value is: no)

Both valid triggers/conditions for wonders.

Code:
At <mod>\common\wonder_upgrades\00_wonder_upgrades.txt [upgrade_temple_complex\allow\num_of_wonder_upgrades] (Line 1768, column 3):
Invalid node "num_of_wonder_upgrades" in scope WonderDefWithWonderTrigger (value is: 4)

Tested to work in-game.

Code:
At <mod>\events\LT_wonder_maintenance_events.txt [character_event\immediate\if\limit\event_target:target_wonder\any_upgrade_on_wonder\NOT\wonder_upgrade] (Line 120, column 15):
Invalid node "wonder_upgrade" in scope WonderUpgradeTrigger (value is: event_target:upgrade_00)

Trigger used in wonder_upgrade scope to check equality against another wonder upgrade (already built or under construction).

Code:
At <mod>\decisions\HFP_holy_order_decisions.txt [decisions\form_knights_of_calatrava\effect\custom_tooltip\new_character\opinion\name] (Line 109, column 7):
Invalid node "name" in scope OpinionCommand (value is: opinion_formed_order)

At <mod>\decisions\HFP_holy_order_decisions.txt [decisions\form_knights_of_calatrava\effect\custom_tooltip\new_character\opinion] (Line 108, column 6):
The required "modifier" entry was not found.

'name' and 'modifier' clauses are synonyms in opinion commands too, just as on modifier clauses.
See bottom of this post https://forum.paradoxplaza.com/foru...th-minimal-pain.597480/page-104#post-20623944)
Tested to confirm.

Code:
At <mod>\common\wonders\00_wonders.txt [wonder_lighthouse\potential\FROMFROMFROM\is_coastal] (Line 1568, column 20):
Invalid node "is_coastal" in scope ProvTrigger (value is: yes)

Testing indicates this to be either an alias or duplicate trigger of 'port'.

Code:
At <mod>\common\dynasties\00_dynasties.txt [902\is_modified] (Line 6157, column 2):
Invalid node "is_modified" in scope Dynasty (value is: yes)

At <mod>\map\geographical_region.txt [world_himalayas\inclusive] (Line 247, column 2):
Invalid node "inclusive" in scope GeographicalRegionDef (value is: yes)

Former added in 3.0, latter added in 3.1.1, both entirely undocumented.
 
Last edited:
Code:
At <mod>\common\dynasties\00_dynasties.txt [902\is_modified] (Line 6157, column 2):
Invalid node "is_modified" in scope Dynasty (value is: yes)

At <mod>\map\geographical_region.txt [world_himalayas\inclusive] (Line 247, column 2):
Invalid node "inclusive" in scope GeographicalRegionDef (value is: yes)

Former added in 3.0, latter added in 3.1.1, both entirely undocumented.

Do you know what they do or are they just mysteriously there in vanilla code?
 
No, I have no idea what they do, sadly. I've found no mention of them in patch notes, the wiki or anywhere else.
I notice that in my current save game, "is_modified" appear only on my own dynasty, which was produced in the Ruler Designer. Looking back the same is true of a save game from 2 years ago. My guess is that the devs created the coat of arms, dynasty name, etc. in the Ruler Designer, saved the game, and copied the code.
 
I notice that in my current save game, "is_modified" appear only on my own dynasty, which was produced in the Ruler Designer. Looking back the same is true of a save game from 2 years ago. My guess is that the devs created the coat of arms, dynasty name, etc. in the Ruler Designer, saved the game, and copied the code.

You're likely right, since they didn't even bother to nicely 'correct' the curly braces from save format to common coding indentation.

Code:
Parse Failure
Path: <mod>\common\scripted_effects\00_scripted_effects.txt
Approximate location: Line 27711, column 11
Error: Double quote does not have matching double quote.

Part of patch 3.3.0. There's a linebreak in the file, but the game seems to be alright with it.

Code:
--- Error 1 of 4 ---
At <mod>\common\scripted_triggers\plus_scripted_triggers.txt [can_build_more_buildings\custom_tooltip\OR\AND\FROMFROM] (Line 2725, column 5):
No direct match found for FROMFROM (is the casing correct?). However, other possible matches in scope TitleTrigger were found.
Left: [ThisChar] Right: [CharTrigger] cannot be correct because of left: FROMFROM points to <null>.
However, a Char was expected.
This is not a valid place to use FROM.
Left: [ThisProv] Right: [ProvTrigger] cannot be correct because of left: FROMFROM points to <null>.
However, a Prov was expected.
This is not a valid place to use FROM.
Left: [ThisTitle] Right: [TitleTrigger] cannot be correct because of left: FROMFROM points to <null>.
However, a Title was expected.
This is not a valid place to use FROM.
Left: [ThisUnit] Right: [UnitTrigger] cannot be correct because of left: FROMFROM points to <null>.
However, a Unit was expected.
This is not a valid place to use FROM.
Left: [ThisSociety] Right: [SocietyTrigger] cannot be correct because of left: FROMFROM points to <null>.
However, a Society was expected.
This is not a valid place to use FROM.
Left: [ThisArtifact] Right: [ArtifactTrigger] cannot be correct because of left: FROMFROM points to <null>.
However, a Artifact was expected.
This is not a valid place to use FROM.
Left: [ThisBattle] Right: [BattleTrigger] cannot be correct because of left: FROMFROM points to <null>.
However, a Battle was expected.
This is not a valid place to use FROM.
Left: [ThisWar] Right: [WarTrigger] cannot be correct because of left: FROMFROM points to <null>.
However, a War was expected.
This is not a valid place to use FROM.
Left: [ThisSiege] Right: [SiegeTrigger] cannot be correct because of left: FROMFROM points to <null>.
However, a Siege was expected.
This is not a valid place to use FROM.
Left: [ThisOffmapPower] Right: [OffmapPowerTrigger] cannot be correct because of left: FROMFROM points to <null>.
However, a OffmapPower was expected.
This is not a valid place to use FROM.
Left: [ThisReligion] Right: [ReligionTrigger] cannot be correct because of left: FROMFROM points to <null>.
However, a Religion was expected.
This is not a valid place to use FROM.
Left: [ThisCulture] Right: [CultureTrigger] cannot be correct because of left: FROMFROM points to <null>.
However, a Culture was expected.
This is not a valid place to use FROM.
Left: [ThisBloodline] Right: [BloodlineTrigger] cannot be correct because of left: FROMFROM points to <null>.
However, a Bloodline was expected.
This is not a valid place to use FROM.
Left: [ThisWonder] Right: [WonderTrigger] cannot be correct because of left: FROMFROM points to <null>.
However, a Wonder was expected.
This is not a valid place to use FROM.
Left: [ThisWonderUpgrade] Right: [WonderUpgradeTrigger] cannot be correct because of left: FROMFROM points to <null>.
However, a WonderUpgrade was expected.
This is not a valid place to use FROM.
* called from <mod>\common\buildings\000_CK2Plus_buildings.txt [nomad\no_yurts\trigger\can_build_more_buildings] (Line 2514, column 4)

--- Error 2 of 4 ---
At <mod>\common\scripted_triggers\plus_scripted_triggers.txt [can_build_more_buildings\custom_tooltip\OR\AND\FROMFROM] (Line 2725, column 5):
Invalid use of 'FROMFROM': This is not a valid place to use FROM.
* called from <mod>\common\buildings\000_CK2Plus_buildings.txt [nomad\no_yurts\trigger\can_build_more_buildings] (Line 2514, column 4)

--- Error 3 of 4 ---
At <mod>\common\scripted_triggers\plus_scripted_triggers.txt [can_build_more_buildings\custom_tooltip\OR\AND\TECH_CONSTRUCTION] (Line 2724, column 5):
Invalid node "TECH_CONSTRUCTION" in scope TitleTrigger (value is: 1)
* called from <mod>\common\buildings\000_CK2Plus_buildings.txt [nomad\no_yurts\trigger\can_build_more_buildings] (Line 2514, column 4)

--- Error 4 of 4 ---
At <mod>\common\scripted_triggers\plus_scripted_triggers.txt [fort_can_build_more_buildings\custom_tooltip\OR\AND\calc_true_if\fort_has_building] (Line 3240, column 6):
Invalid node "fort_has_building" in scope <anon> (value is: fo_wooden_barbican)
* called from <mod>\common\buildings\000_CK2Plus_buildings.txt [fort\fo_wooden_barbican\trigger\fort_can_build_more_buildings] (Line 3930, column 4)

You can find this in the latest CK2Plus beta, this works perfectly.
fort_has_building is barely documented on the wiki, but it works as expected.
 
Last edited:
It's one of several scopes added with 3.0 and the new crusade mechanics. Since only one new style crusade can be active at any time, it's likely it can be called from any scope. I can try some more testing.
Ok let me know.

Could it work if some outer scope is a war scope and it checks from there?
So you mean that this is how it works, checks if there is a war scope at some point and works on that if so? Hmm that would be tricky to make work but if that is indeed how things work and there's not a more reasonable way to do it, then I can see if it can be made to work. Though may not be straightforward.

Code:
At <mod>\common\wonder_upgrades\00_wonder_upgrades.txt [upgrade_temple_complex\allow\num_of_wonder_upgrades] (Line 1768, column 3):
Invalid node "num_of_wonder_upgrades" in scope WonderDefWithWonderTrigger (value is: 4)
Tested to work in-game.

Currently Validator has this scope as being a char scope (with wonder in FROMFROM and prov in FROMFROMFROM). It also has num_of_wonder_upgrades as only allowed in wonder scope. So which part of the Validator is wrong here?

Code:
At <mod>\common\dynasties\00_dynasties.txt [902\is_modified] (Line 6157, column 2):
Invalid node "is_modified" in scope Dynasty (value is: yes)

At <mod>\map\geographical_region.txt [world_himalayas\inclusive] (Line 247, column 2):
Invalid node "inclusive" in scope GeographicalRegionDef (value is: yes)
Former added in 3.0, latter added in 3.1.1, both entirely undocumented.

Based on subsequent discussion am leaving these out for now.

Code:
--- Error 1 of 4 ---
At <mod>\common\scripted_triggers\plus_scripted_triggers.txt [can_build_more_buildings\custom_tooltip\OR\AND\FROMFROM] (Line 2725, column 5):
No direct match found for FROMFROM (is the casing correct?). However, other possible matches in scope TitleTrigger were found.
Left: [ThisChar] Right: [CharTrigger] cannot be correct because of left: FROMFROM points to <null>.
However, a Char was expected.
This is not a valid place to use FROM.
Left: [ThisProv] Right: [ProvTrigger] cannot be correct because of left: FROMFROM points to <null>.
However, a Prov was expected.
This is not a valid place to use FROM.
Left: [ThisTitle] Right: [TitleTrigger] cannot be correct because of left: FROMFROM points to <null>.
However, a Title was expected.
This is not a valid place to use FROM.
Left: [ThisUnit] Right: [UnitTrigger] cannot be correct because of left: FROMFROM points to <null>.
However, a Unit was expected.
This is not a valid place to use FROM.
Left: [ThisSociety] Right: [SocietyTrigger] cannot be correct because of left: FROMFROM points to <null>.
However, a Society was expected.
This is not a valid place to use FROM.
Left: [ThisArtifact] Right: [ArtifactTrigger] cannot be correct because of left: FROMFROM points to <null>.
However, a Artifact was expected.
This is not a valid place to use FROM.
Left: [ThisBattle] Right: [BattleTrigger] cannot be correct because of left: FROMFROM points to <null>.
However, a Battle was expected.
This is not a valid place to use FROM.
Left: [ThisWar] Right: [WarTrigger] cannot be correct because of left: FROMFROM points to <null>.
However, a War was expected.
This is not a valid place to use FROM.
Left: [ThisSiege] Right: [SiegeTrigger] cannot be correct because of left: FROMFROM points to <null>.
However, a Siege was expected.
This is not a valid place to use FROM.
Left: [ThisOffmapPower] Right: [OffmapPowerTrigger] cannot be correct because of left: FROMFROM points to <null>.
However, a OffmapPower was expected.
This is not a valid place to use FROM.
Left: [ThisReligion] Right: [ReligionTrigger] cannot be correct because of left: FROMFROM points to <null>.
However, a Religion was expected.
This is not a valid place to use FROM.
Left: [ThisCulture] Right: [CultureTrigger] cannot be correct because of left: FROMFROM points to <null>.
However, a Culture was expected.
This is not a valid place to use FROM.
Left: [ThisBloodline] Right: [BloodlineTrigger] cannot be correct because of left: FROMFROM points to <null>.
However, a Bloodline was expected.
This is not a valid place to use FROM.
Left: [ThisWonder] Right: [WonderTrigger] cannot be correct because of left: FROMFROM points to <null>.
However, a Wonder was expected.
This is not a valid place to use FROM.
Left: [ThisWonderUpgrade] Right: [WonderUpgradeTrigger] cannot be correct because of left: FROMFROM points to <null>.
However, a WonderUpgrade was expected.
This is not a valid place to use FROM.
* called from <mod>\common\buildings\000_CK2Plus_buildings.txt [nomad\no_yurts\trigger\can_build_more_buildings] (Line 2514, column 4)

--- Error 2 of 4 ---
At <mod>\common\scripted_triggers\plus_scripted_triggers.txt [can_build_more_buildings\custom_tooltip\OR\AND\FROMFROM] (Line 2725, column 5):
Invalid use of 'FROMFROM': This is not a valid place to use FROM.
* called from <mod>\common\buildings\000_CK2Plus_buildings.txt [nomad\no_yurts\trigger\can_build_more_buildings] (Line 2514, column 4)

--- Error 3 of 4 ---
At <mod>\common\scripted_triggers\plus_scripted_triggers.txt [can_build_more_buildings\custom_tooltip\OR\AND\TECH_CONSTRUCTION] (Line 2724, column 5):
Invalid node "TECH_CONSTRUCTION" in scope TitleTrigger (value is: 1)
* called from <mod>\common\buildings\000_CK2Plus_buildings.txt [nomad\no_yurts\trigger\can_build_more_buildings] (Line 2514, column 4)

--- Error 4 of 4 ---
At <mod>\common\scripted_triggers\plus_scripted_triggers.txt [fort_can_build_more_buildings\custom_tooltip\OR\AND\calc_true_if\fort_has_building] (Line 3240, column 6):
Invalid node "fort_has_building" in scope <anon> (value is: fo_wooden_barbican)
* called from <mod>\common\buildings\000_CK2Plus_buildings.txt [fort\fo_wooden_barbican\trigger\fort_can_build_more_buildings] (Line 3930, column 4)

You can find this in the latest CK2Plus beta, this works perfectly.
fort_has_building is barely documented on the wiki, but it works as expected.


Errors 1 and 2: What is FROMFROM? Validator has ROOT=Title, FROM=Char but no fromfrom (for nomads specifically, regular buildings are different). The comment on top of 00_nomad.txt does not mention a FROMFROM and I'm unclear what it means for ROOT and FROM.

Error 3: Suggests that the Validator should be treating ROOT=Prov, though that's kind of strange in that if ROOT=Prov and FROM=Char then how does it refer to Title/Holding?

Error 4: Ok so it is something that works in title scope? Or is it province scope? (I'm guessing it's province scope based on the name). And the RHS is jut some improvement name?
 
So you mean that this is how it works, checks if there is a war scope at some point and works on that if so? Hmm that would be tricky to make work but if that is indeed how things work and there's not a more reasonable way to do it, then I can see if it can be made to work. Though may not be straightforward.

I can try some more testing, see if there are restrictions on this.

Currently Validator has this scope as being a char scope (with wonder in FROMFROM and prov in FROMFROMFROM). It also has num_of_wonder_upgrades as only allowed in wonder scope. So which part of the Validator is wrong here?

Tooltips do indeed mention the character owning the wonder, agreeing with the stated scopes, so it clearly works on characters too. It does make me wonder if this is as intended. Nested in FROMFROM seems more reasonable. Nevertheless, this code is correct and works.

Errors 1 and 2: What is FROMFROM? Validator has ROOT=Title, FROM=Char but no fromfrom (for nomads specifically, regular buildings are different). The comment on top of 00_nomad.txt does not mention a FROMFROM and I'm unclear what it means for ROOT and FROM.

Error 3: Suggests that the Validator should be treating ROOT=Prov, though that's kind of strange in that if ROOT=Prov and FROM=Char then how does it refer to Title/Holding?

You were right. I was not aware of different scopes for Nomad holdings and I was able to fix all this without further complaint from Validator. My sincere apologies.

Error 4: Ok so it is something that works in title scope? Or is it province scope? (I'm guessing it's province scope based on the name). And the RHS is jut some improvement name?

I think it's province scope, and the right-hand side is indeed an improvement/building. Forts, like hospitals and trade posts, are bound to province from what I know (hence the special triggers) and this trigger works right in the trigger clause of the building.
 
Tooltips do indeed mention the character owning the wonder, agreeing with the stated scopes, so it clearly works on characters too. It does make me wonder if this is as intended. Nested in FROMFROM seems more reasonable. Nevertheless, this code is correct and works.
If in character scope does it mean it measures total wonder upgrades the character has or something like that?

I can try some more testing, see if there are restrictions on this.



Tooltips do indeed mention the character owning the wonder, agreeing with the stated scopes, so it clearly works on characters too. It does make me wonder if this is as intended. Nested in FROMFROM seems more reasonable. Nevertheless, this code is correct and works.



You were right. I was not aware of different scopes for Nomad holdings and I was able to fix all this without further complaint from Validator. My sincere apologies.



I think it's province scope, and the right-hand side is indeed an improvement/building. Forts, like hospitals and trade posts, are bound to province from what I know (hence the special triggers) and this trigger works right in the trigger clause of the building.

Ok do we think that nomad triggers have ROOT=province then, based on error 4 which it seems we both think is a province scope trigger (as well as the comment on the top of the file)?
 
If in character scope does it mean it measures total wonder upgrades the character has or something like that?

Exactly that, yes, regardless of which wonders they are in.

Ok do we think that nomad triggers have ROOT=province then, based on error 4 which it seems we both think is a province scope trigger (as well as the comment on the top of the file)?

Error 4 was unrelated to the nomad holdings. Sorry if that was unclear until now. fort_has_building works exactly like trade_post_has_building and hospital_has_building.

Back to nomads:
If it provides clarity, I was able to use 'num_of_buildings' by first using 'capital_holding' inside the trigger scope for nomad buildings. Since FROM is the character, ROOT must indeed be the province, since that's the other scope from which 'capital_holding' can be used. Hope that helps.
 
Exactly that, yes, regardless of which wonders they are in.



Error 4 was unrelated to the nomad holdings. Sorry if that was unclear until now. fort_has_building works exactly like trade_post_has_building and hospital_has_building.

Back to nomads:
If it provides clarity, I was able to use 'num_of_buildings' by first using 'capital_holding' inside the trigger scope for nomad buildings. Since FROM is the character, ROOT must indeed be the province, since that's the other scope from which 'capital_holding' can be used. Hope that helps.

Ok for non-nomad, Validator uses ROOT=Title, FROM=Char. And that seems to work as I see Validator accepts hospital_has_building for both title and prov. And in this case it happens to be in title.

Meanwhile for nomad I think capital_holding works in title scope as well (and you actually pointed that out), so ROOT could still be title I think?

(Note: Validator treats title and holding scopes as the same)