• 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.
Showing developer posts only. Show all posts in this thread.
Set is to "show all errors". Gave me this:
Parse Failure
Path: <appdir>\C:\Crusader Kings II\mod\swmh2615.mod
Error: There were 2 instances of the mod with name "Project Balance". It was required as a dependency of "Some what more historic 2.615". These include the following: "C:\Crusader Kings II\mod\ProjectBalance.mod", "C:\Crusader Kings II\.\mod\ProjectBalance.mod",
 
False positive:
At <mod>\common\cb_types\Vanilla CBs.txt [crusade\on_success_title\if[2]\most_participating_attacker\if[2]\if] (Line 3186, Column 6):
Invalid node "destroy_landed_title" in scope CharIfClause (value is: PREV)
destroy_landed_title is valid as long as it points to an actual title. It can be called from any scope.

Oh and the Validator is currently using 1 GB of memory; I think something might be wrong :p
In fact, it seems to increase by a few hundred MB every time I validate. Looks like there's some sort of memory leak.
 
Fixed the false positive. Just to check, destroy_landed_title=yes is valid in a title scope and destroys the current title?

Validator loads a whole bunch of things into memory, so 1 GB sounds reasonable. Does the increase of 100s of MBs happen even when your memory is full? If not I believe that is expected behavior where the system doesn't bother to clean up memory unless memory starts getting full. FWIW I get about 1 GB, but between runs, it gets cleaned up and doesn't increase.
I'm not entirely sure is = yes works; I always use = THIS.

I don't know if it keeps leaking memory if I'm at max, as I'm virtually never at max :p
Though with Firefox being especially leaky lately (hit 2 GB at one point, even), I might get there.
 
Am I the only one the get hundreds of messages that PREV and PREVPREV are invalid values in events (or decisions?). The files in question are all vanilla files so they can't all be wrong, right?
The Validator still has some false positives when it comes to PREVing, I believe.
 
v1.3 RC7 has been released.

Download here: http://www.mediafire.com/?2wiwekvto0mhi2l
Thanks, that solved my issues with it refusing to check some mods.
However, one request: Would it be possible to have it not list the errors of dependencies? When I'm checking PB+SWMH I really don't care about the errors in PB or SWMH, just the compatch.
 
Thanks.
I think it is about time for me to just list every error report and false positive that annoys me in some way :p

At <mod>\history\characters\norwegian.txt [102531\1066.9.14\effect\spawn_unit[3]\province] (Line 835, Column 5):
"995" is not a valid ThisProv, LandProvince, or ThisChar.
spawn_unit works fine in sea provinces, assuming only ships are spawned. It might be possible to spawn soldier on ships as well, but I have not checked.

At <mod>\history\characters\PB.txt [9999999] (Line 1, Column 1):
No birth found for character.
No idea why I'm getting this, since I've got a birth-date defined:
1.1.1={
birth="1.1.1"
}

At <mod>\events\PB_historical.txt [letter_event[1]\option[1]\hidden_tooltip\k_rum\de_jure_liege] (Line 683, Column 14):
"0" is not a valid ThisChar, ThisTitle, or AnyTitle.
0 is definitely a valid value for the de_jure_liege command.

At <mod>\events\PB_various.txt [character_event[3]\option[1]] (Line 243, Column 2):
Invalid node "revoke_law" in scope Option (value is: the_crusade_target)
revoke_law works fine in the Option scope.

At <mod>\events\PB_various.txt [letter_event] (Line 719, Column 1):
The event is set to be triggered only, but it is never called.
The event is triggered via an ambition.

At <mod>\events\plot_events.txt [letter_event[30]\option\reverse_opinion\who] (Line 2525, Column 4):
"FROMFROM" is not a valid ThisChar, OpinionClauseDefinedTypes, ThisProv, or ThisTitle.
reverse_opinion should work just fine with FROMFROM.

At <mod>\common\static_modifiers.txt [family_palace] (Line 423, Column 1):
Invalid node "retinuesize" in scope <anon> (value is: -100000)
retinuesize is perfectly valid from a holding scope.

At <mod>\common\objectives\00_plots.txt [plot_seize_trade_post\chance\modifier[10]\NOT\ROOT] (Line 1903, Column 5):
Invalid node "holder_scope" in scope ProvTrigger (value is: <a complex type>)
The scope for type = rep_trade_posts CBs isn't really a province scope, but a holding scope. Thus holder_scope is valid.

At <mod>\common\landed_titles\landed_titles.txt [b_ziani] (Line 6470, Column 1):
The string b_ziani was not found in localization.
The patrician baronies don't need localization as they use the dynasty's name.

That should cover near everything.
On another note, is it just me or is validation quite slow now? Before it'd take about 40s for all of PB, now it takes 95s. Even accounting for PB growing in size it seems that the Validator is slower than it used to be.
 
Rather annoying false-positive:
At <mod>\events\waylit_siege_events.txt [character_event[5]\option[1]\FROMFROM\holder_scope\limit\at_location] (Line 1708, Column 6):
"FROMFROM" is not a valid ThisProv, ThisChar, or Province.

Getting that with "FROM" as well, despite the events working perfectly fine.

Another false positive: "num_of_baron_titles" is a valid condition, just like count, duke, etc.
 
Last edited:
The new version should explain more about why the Validator thinks something is an error. So then we can determine what is actually wrong.
At <mod>\events\battle_events.txt [character_event[1]\immediate\FROMFROM[1]] (Line 156, Column 3):
No direct match found for FROMFROM (is the casing correct?). However, other possible matches in scope CharCommand were found.
Left: [ThisChar] cannot be correct because of left: FROMFROM points to <null>.
However, a Char was expected.
The FROMFROM could not be determined, because the FROM of [<mod>\common\on_actions\00_on_actions.txt] (666, 3): on_battle_lost\random_events\10 could not be determined.
This event , at [<mod>\common\on_actions\00_on_actions.txt] (666, 3): on_battle_lost\random_events\10, must be called from somewhere else, which it is not.


FROMFROM for such events is the enemy character.
 
At <mod>\events\waylit_siege_events.txt [character_event[6]\option[4]\FROMFROM\holder_scope\any_courtier\limit\at_location] (Line 2884, Column 7):
"FROMFROM" is not a valid ThisProv, ThisChar, or Province.
ThisProv: cannot be because FROMFROM points to Title.
However, a Prov was expected.
The scope was inferred to be Title, but this did not work.

ThisChar: cannot be because FROMFROM points to Title.
However, a Char was expected.
The scope was inferred to be Title, but this did not work.

location can point to a title without problems, because if not, every single one of those events would break :p
 
Which such events? Ones called by on_battle_lost and won, presumably, and are there others? Do FROM, THIS, ROOT also have special meanings?
on_combat_pulse
on_siege_pulse
on_battle_won
on_battle_won_leader
on_battle_lost
on_battle_lost_leader
on_siege_won_leader
on_siege_lost_leader

I believe it's the case for all of those.
 
I don't think the Validator needs to be quite so strict on how an event is called. It appears calling a narrative_event via "character_event" works just fine. As an example you could trigger event 6300. All its choices trigger events that are written as character events in the choices, but the events themselves are narrative events.
I believe it also works just fine to refer to letter events as character events when calling them, though I have not specifically tested it.
 
Yeah, there's an option in the ValidatorSettings.txt file to change this, but I still think it's good to warn on default.
Thanks.
Down to "only" 230 errors (characters excluded; so damn many errors in the vanilla files that are edited by PB).
 
Here is some support for v1.10. Please report any issues; there were some new things I didn't add because I wasn't sure if they were correct or not, so if they are correct please report them here so they can be fixed.

http://www.mediafire.com/download/rym9cmohor039bd/Audax.Validator_v1.3_RC12_pre2.rar
Right, false positives time then:
At <mod>\common\buildings\00_CastleCulture.txt [castle\ca_culture_scottish_0\trigger\TECH_CASTLE_CONSTRUCTION] (Line 2171, Column 15):
"0" is not a valid PInt.
0 is definitely a valid tech level now, and is used to determine starting buildings.

At <mod>\common\cb_types\Old Gods.txt [pagan_county_conquest] (Line 1037, Column 1):
Invalid node "prestige_cost" in scope CbTypeDef (value is: 100)
prestige_cost and piety_cost are valid arguments in a CB's definition now.

At <mod>\decisions\succession_laws.txt [succession_laws\succ_gavelkind\potential] (Line 11, Column 3):
Invalid node "rebel" in scope DecisionTrigger (value is: no)
"rebel = no/yes" is apparently a valid thing to check for now. Presumably it returns true for characters that are part of liberation rebellions and similar.

At <mod>\events\misc_old_gods_events.txt [character_event[9]\option\k_germany] (Line 1037, Column 3):
Invalid node "adjective" in scope TitleCommand (value is: )
Adjective is a valid thing now. You could for example change the adjective for a title from "Norse" to "Norwegian". It can also be blank, which will reset it to whatever is defined in localisation.

At <mod>\events\misc_old_gods_events.txt [character_event[6]\option[3]\capital_scope\ROOT\spawn_fleet] (Line 730, Column 5):
Invalid node "cannot_inherit" in scope <anon> (value is: yes)
cannot_inherit is a valid thing to put in a spawn_fleet or spawn_army scope. It disbands the army/fleet upon the ruler's death.

At <mod>\events\misc_old_gods_events.txt [narrative_event[1]\option\hidden_tooltip[2]] (Line 812, Column 3):
Invalid node "any_realm_province" in scope CharCommand (value is: <a complex type>)
I think this false positive might be showing up due to it being a narrative event?

At <mod>\events\PB_historical.txt [character_event[7]\option[1]\spawn_unit] (Line 1067, Column 3):
Invalid node "disband_on_peace" in scope <anon> (value is: yes)
Same as cannot_inherit, except disbands when the ruler is at peace rather than dead.

At <mod>\history\provinces\290 - Uppland.txt [960.1.1\b_birka] (Line 28, Column 2):
"0" is not a valid Building or ImprovementValue.
Seems you can destroy holdings now by going <holding> = 0

At <mod>\common\religions\pagan.txt [pagan_group\west_african_pagan\color] (Line 484, Column 3):
<a complex type> is not a valid FloatColor.
You can use RGB values ranging from 0 to 255 as well now in addition to 0 to 1.

At <mod>\history\titles\k_leon.txt [924.1.1] (Line 1, Column 1):
Invalid node "effect" in scope DateClause (value is: <a complex type>)
The "effect" scope is now valid in title history.

At <mod>\common\landed_titles\e_spain.txt [e_spain\k_leon\allow\FROM] (Line 25, Column 4):
Invalid node "any_previous_holder" in scope CharTrigger (value is: <a complex type>)
That's now a valid scope from a title.

At <mod>\common\traits\00_traits.txt [chaste] (Line 920, Column 1):
Invalid node "christian_church_opinion" in scope Trait (value is: 10)
That's now a valid opinion modifier. I don't believe they can be named dynamically based on religion, though I have not tested.

At <mod>\common\traits\02_traits.txt [viking] (Line 190, Column 1):
Invalid node "religious" in scope Trait (value is: yes)
That's now a valid trait argument. It removes the trait when the character's religion changes.
 
Last edited:
This definitely works? Apparently in the past it did not.
I think you're right that it didn't work before. It does work now though; I've successfully used it to turn all the Pechenegs' provinces Cuman.

The Validator thinks that it's in a CharTrigger scope, not a title. Can you clarify?
It's a title allow scope; I guess that's not 100% the same as a character scope.

The events seem to spit out a million issues with FROMFROMFROMFROMFROM, PREVPREVPREV, and similar. Do you happen to know if the validator needs fixing in regards to this?
Not quite sure what you mean.
I do know they added PREVPREVPREVPREV though.
 
1) Fixed

2) So it is a scope that includes CharTrigger, but also has a bit extra, like any_previous_holder which normally doesn't work in a CharTrigger but does for titles?

3) If I validate events, there are a million complaints like the following, and I wonder if some of them would need to be fixed? (PREV and FROM in the Validator work to an arbitrary number, even if that's not the case in the game. That can be limited if the game has limitations)

--- Error 1 of 1 ---
At events\adventures_the_old_gods.txt [character_event[7]\immediate\liege\capital_scope\random_independent_ruler\random_realm_province\ROOT\spawn_unit[1]\match_character] (Line 942, Column 9):
"PREVPREV" is not a valid ThisChar.
PREVPREV points to ProvCommand.
However, a Char was expected.
Additional information: PREVPREV points to ProvCommand.
However, a Char was expected.
--- Error 1 of 1 ---
At events\adventures_the_old_gods.txt [character_event[7]\immediate\liege\capital_scope\random_independent_ruler\random_realm_province\ROOT\spawn_unit[1]\owner] (Line 940, Column 9):
"THIS" is not a valid ThisChar.
THIS points to <None>, not Char.
Additional information: THIS points to <None>, not Char.
--- Error 1 of 1 ---
At events\adventures_the_old_gods.txt [character_event[3]\immediate\liege\capital_scope\ROOT\random_claim\holder_scope\ROOT\random_list\33[2]\spawn_unit[1]\province] (Line 373, Column 12):
"PREVPREVPREVPREV" is not a valid ThisProv, Province, or ThisChar.
ThisProv: cannot be because PREVPREVPREVPREV points to TitleCommand.
However, a Prov was expected.
ThisChar: cannot be because PREVPREVPREVPREV points to TitleCommand.
However, a Char was expected.
--- Error 1 of 1 ---
At events\friends_rivals_events.txt [character_event[1]\option[1]\host\random_courtier\opinion\who] (Line 158, Column 6):
"FROM" is not a valid ThisChar, OpinionClauseDefinedTypes, ThisProv, or ThisTitle.
ThisChar: cannot be because FROM points to <null>.
However, a Char was expected.
The event must have is_triggered_only set to true.
ThisProv: cannot be because FROM points to <null>.
However, a Prov was expected.
The event must have is_triggered_only set to true.
ThisTitle: cannot be because FROM points to <null>.
However, a Title was expected.
The event must have is_triggered_only set to true.
--- Error 1 of 1 ---
At events\on_action_events.txt [character_event[41]\option\opinion\who] (Line 3335, Column 4):
"FROMFROM" is not a valid ThisChar, OpinionClauseDefinedTypes, ThisProv, or ThisTitle.
ThisChar: cannot be because FROMFROM points to <null>.
However, a Char was expected.
The FROMFROM could not be determined, because the FROM of [events\on_action_events.txt] (3301, 25): character_event[40]\immediate\hidden_tooltip\any_child\character_event\id could not be determined.
This scope, at [events\on_action_events.txt] (3301, 25): character_event[40]\immediate\hidden_tooltip\any_child\character_event\id, has no FROM due to the fact that [common\on_actions\00_on_actions.txt] (1341, 3): on_forced_consort\events\660 has no scope.
ThisProv: cannot be because FROMFROM points to <null>.
However, a Prov was expected.
The FROMFROM could not be determined, because the FROM of [events\on_action_events.txt] (3301, 25): character_event[40]\immediate\hidden_tooltip\any_child\character_event\id could not be determined.
This scope, at [events\on_action_events.txt] (3301, 25): character_event[40]\immediate\hidden_tooltip\any_child\character_event\id, has no FROM due to the fact that [common\on_actions\00_on_actions.txt] (1341, 3): on_forced_consort\events\660 has no scope.
ThisTitle: cannot be because FROMFROM points to <null>.
However, a Title was expected.
The FROMFROM could not be determined, because the FROM of [events\on_action_events.txt] (3301, 25): character_event[40]\immediate\hidden_tooltip\any_child\character_event\id could not be determined.
This scope, at [events\on_action_events.txt] (3301, 25): character_event[40]\immediate\hidden_tooltip\any_child\character_event\id, has no FROM due to the fact that [common\on_actions\00_on_actions.txt] (1341, 3): on_forced_consort\events\660 has no scope.
--- Error 1 of 1 ---
At events\rebel_events_the_old_gods.txt [province_event[6]\trigger\owner\top_liege\any_war\defender\character] (Line 2022, Column 19):
"PREV" is not a valid ThisChar, OpinionClauseDefinedTypes, ThisTitle, or CharacterId.
ThisChar: cannot be because PREV points to WarTrigger.
However, a Char was expected.
ThisTitle: cannot be because PREV points to WarTrigger.
However, a Title was expected.
2) Seems so.
3) I think a number of those are legitimate bugs, while others might be false positives. Pretty hard to determine which are which.
 
Thanks, I'll see if I find any false positives. If I do I'll edit them into this post.

Edit:
At <mod>\common\buildings\ca_shipyard.txt [castle\ca_shipyard_2] (Line 19, Column 2):
Invalid node "port" in scope BuildingDef (value is: yes)
port = yes is a valid thing for a building as of the 1.101 beta patch.

At <mod>\common\buildings\ct_trade_post.txt [city\ct_trade_post_5] (Line 109, Column 2):
Invalid node "military_techpoints" in scope BuildingDef (value is: 0.05)
Perfectly valid, though not used in vanilla. Same effect as the other techpoint stuff, just for military.

At <mod>\decisions\PB_various.txt [decisions\create_hre_france\effect\any_demesne_title\limit\OR\de_jure_liege] (Line 289, Column 7):
"e_hre" is not a valid ThisChar or ThisTitle.
Checking de_jure_liege = e_hre from any_demesne_title is perfectly valid.

At <mod>\history\titles\k_france.txt [987.7.3] (Line 86, Column 1):
Invalid node "reset_adjective" in scope DateClause (value is: yes)
Entirely valid to do to a title, including in the history files.

At <mod>\history\titles\k_france.txt [987.7.3] (Line 86, Column 1):
Invalid node "reset_name" in scope DateClause (value is: yes)
See above.

At <mod>\history\titles\k_france.txt [936.1.15] (Line 71, Column 1):
Invalid node "adjective" in scope DateClause (value is: WEST_FRANCIA_ADJ)
See above.

At <mod>\history\titles\k_france.txt [936.1.15] (Line 71, Column 1):
Invalid node "name" in scope DateClause (value is: WEST_FRANCIA)
See above.

That should be everything.
 
Last edited:
Generally I really love this tool. It helped me to iron out a great deal of small mistakes in the past.

The problem is the tag line "Find-errors-quickly-and-with-minimal-pain".
Currently finding errors comes with a big amount of pain. I am currently at 2600 "errors". Most of them are vanilla things, false positives, localisation issues or non-issues.
It would be nice if the tool had a mode where it only lists the game breaking stuff. Let's say someone migrates to 1.10 /1.101 and is missing the adjacencies entries. As long as he doesn't fix that the game won't load. Very important error. Many, many other listed errors will only make it more difficult to find the essential ones. Not everyone runs a ship as tight as Meneth does ;)
I would make different kinds of errors: warnings, errors, fatal errors and add an option to toggle them on and off.
Do make sure you've got it set to "show mod errors" rather than "show all errors".
Also take a look at the settings file so you can hide some errors you don't need.

With the combination of the two I get "only" 366 errors.

On a related note, here's one false-positive:
At <mod>\common\cb_types\Vanilla CBs.txt [county_conquest\can_use_title\OR[1]\NOT\location] (Line 7354, Column 12):
Invalid node "continent" in scope ProvTrigger (value is: region_sahara)

ProvTrigger is exactly where one should be using the continent condition.
 
Another false-ish positive:
At <mod>\common\opinion_modifiers\00_opinion_modifiers.txt [opinion_claimant_adventure_target] (Line 2262, Column 1):
The string opinion_claimant_adventure_target was not found in localization.

Essentially, any opinion modifier that doesn't actually change opinion "opinion = 0" is just used to denote a target and similar, and is never visible in the game. In such cases, no localisation is therefore needed.