• 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.
Right then, false positives time!

"There are more PREV clauses than parent scopes" Can_use_title can be scoped to via PREVs.
FROMFROM is a valid scope for CBs; it is the aggressor. ROOT is usually the same, but not when pushing someone else's claim.
de_jure_liege_or_above works fine from province scope.
The Validator really needs to just ignore empty history files. Getting a hundred or so errors due to having to override some vanilla province histories is a bit annoying. This applies to both "the required x entry was not found" and to "duplicate IDs in file names"
 
In CB types, FROMFROM you can use in any of the trigger/command scopes and it will always refer to a character?

Can you post the code for the more PREV clause error?

Fixed the de_jure_liege_or_above issue.

For the empty history file, there should be an entry in ValidatorSettings.txt, "ProvinceHistory.NoWarnOnEmptyFile" if you're referring to province history
1. Yes.
2. can_use_title = { FROM = { any_realm_title = { de_jure_liege_or_above = PREVPREV } } }
4. Okay, thanks. Should probably be on by default though :p
Edit: That doesn't seem to work. I'm still getting not found errors after uncommenting that line.
 
1. Fixed
2. I can't seem to duplicate that; no error gets reported.
4. Hmm, works for me. To clarify, this only works for province history. Are there other history files that are often empty?
Title history can be empty, but that wouldn't report any errors anyway.
The line I'm supposed to uncomment is in SettingsFiles\ck2.txt, right? It isn't doing anything for me.
 
Right then, false positives time.
I'm getting a bunch of '"k_bavaria" is not a valid ThisChar or ThisTitle' when doing "de_jure_liege_or_above = k_bavaria" and such. Any title in landed_titles should work fine.
""THIS" is not a valid ThisChar." - THIS is valid
"Invalid node "de_jure_vassal_or_below" in scope CharTrigger (value is: PREV)" - That's a valid condition.
"Invalid node "set_de_facto_liege" in scope CharCommand (value is: THIS)" - That's a valid command.
"Invalid node "succ_law_title" in scope TitleTrigger (value is: <a complex type>)" - That's a valid scope.

"Incorrect Literal
Expected value: default_culture_modifier
Actual value: cultural_flexibility"
One can actually set that modifier to things, as long as they're in static_modifiers.
"There must be at least one non-factor entry within a factor modifier." - Nope. Paradox uses one with only "factor = 0.5" to slow a bunch of stuff down.
""yes" is not a valid ThisTitle." - True, but it is a valid argument for "destoy_landed_title"
"Invalid node "prestige" in scope TitleTrigger (value is: 100)"
""yes" is not a valid Faction." - True, but it is a valid argument for "leads_faction"

"No direct match found for IF. However, other possible matches in scope CharCommand were found.
Left: ["if"] Right: [CharIfClause]"
No idea why it is objecting, seeing as there is a "limit" there. Perhaps because if has been written as "IF"?
"The event is set to be triggered only, but it is never called." - I triggered it in an "effect" scope in character history (that's possible as of 1.07).
"Invalid node "culture_flex" in scope <anon> (value is: -0.4)" - Culture Flex is a valid command, as is everything else used in Technology.
"Invalid node "fertility" in scope ObjectiveDef (value is: 0.25)" - Objectives can apparently add fertility now.
"Invalid node "defending_against_claimant" in scope CharTrigger (value is: <a complex type>)" - Added in 1.07
"Invalid node "is_conquered" in scope TitleChanceModifier (value is: yes)" - Added in 1.07
 
Last edited:
- ""THIS" is not a valid ThisChar." - THIS is valid
True, but it seems like they're trying to get people to use ROOT in general, so maybe we just want to leave this as is?

- "Invalid node "set_de_facto_liege" in scope CharCommand (value is: THIS)" - That's a valid command.
Is set_defacto_liege not a valid command then? I seem to have that listed.

- "Invalid node "succ_law_title" in scope TitleTrigger (value is: <a complex type>)" - That's a valid scope.
So this switches to another title scope?

- "There must be at least one non-factor entry within a factor modifier." - Nope. Paradox uses one with only "factor = 0.5" to slow a bunch of stuff down.
Is that any different then just modifying the base factor that is on top?

- "No direct match found for IF. However, other possible matches in scope CharCommand were found.
Left: ["if"] Right: [CharIfClause]"
It's case sensitive and complaining about uppercase IF

- "Invalid node "defending_against_claimant" in scope CharTrigger (value is: <a complex type>)" - Added in 1.07
Could you expand on how this works?

Everything else should have been fixed. (I'm assuming you did verify that all the things you listed actually do work)
THIS and ROOT are not the same. THIS refers to the current scope (E.G., set_defacto_liege = THIS makes a char his own liege, and thus independent), while ROOT refers to the initial scope of an event/decision/etc.

"set_de_facto_liege", oops, didn't notice the underscore in that. You're right, set_defacto_liege is the correct way to put it.

Yeah, that's another title scope.

To my knowledge the base factor only supports integers. Either way, it is used in vanilla and works fine, so it probably shouldn't give an error report.

Ok. Not very clear from the error though. Could the text for that be improved?

I have no idea how it works, all I know is that it was added in 1.07 :)
 
Devs have been trying to solve the replace_path bug for a long time without success. I personally would be sooooo happy if you could release a version of the Validator that works in documents folder. It doesn't sound like a complicated feature to implement (I could be wrong of course). Right now, everytime I want to use the Validator with my mod I have to move it to the game main folder, then move it back to documents when I'm done. It's enough to make me use the Validator a lot less than before.

Anyway... thanks for this great tool!
To fix replace_path even with the mod in the game folder:
Make a file called userdir.txt in the CKII folder. Put a single period (.) in it, and save. All temporary data (saves, screenshots, etc) will now be saved to the game folder, and replace_path will work.
 
Thanks for the suggestion Meneth! Knowing your reputation as a modder I almost replied with a huge "YEEEEAAAH! THANK YOU!!!!!" even before trying that, but then I decided to try and it's not working. I've put a userdir.txt file containing only a '.' in the CKII main folder as you said, but the replace_path still doesn't work. All files from vanilla get read anyway, and as a result the mod is a big mess.

Am I doing something wrong? Does the trick work for you?

Do you have a steam version? I always thought the replace_path bug could be related to the long address of the mod location when CKII is installed in the program files/steam/steamapps/common etc. folder...
I don't use the Steam version, but replace_path is working fine for me with mods in the game folder.
Could you check and make sure it is saving stuff like logs and saves and such in the game folder? If not, something must've gone wrong.
 
1.2 RC5 isn't finding any localizations for me on my work computer, with mod placed in the Documents tree or in the Steam tree. This includes vanilla localizations used in the mod.
I'm guessing it is checking some directory in the My Documents folder rather than the game folder.
 
This is promising:
Beginning initialization...

ec) EXCEPTION CONTEXT

ERROR
Audax.Validator.ItemNotFoundInScopeException: Item " %Name" was not found in this scope.
at Audax.Validator.Scope.Resolve[T](String name)
at Audax.Validator.GameValidator..ctor(CFilePath path, Boolean gamePathSet)
at Audax.Validator.ValidationManager.ParseGameFiles()
Since there were problems with initial loading, validation cannot continue.

The log:

StatusLog > Beginning initialization...
StatusLog >
StatusLog > ec) EXCEPTION CONTEXT
StatusLog >
StatusLog >
StatusLog >
StatusLog > ERROR
StatusLog > Audax.Validator.ItemNotFoundInScopeException: Item " %Name" was not found in this scope.
StatusLog > at Audax.Validator.Scope.Resolve[T](String name)
StatusLog > at Audax.Validator.GameValidator..ctor(CFilePath path, Boolean gamePathSet)
StatusLog > at Audax.Validator.ValidationManager.ParseGameFiles()
StatusLog > Since there were problems with initial loading, validation cannot continue.

A FATAL ERROR HAS OCCURRED
Time: 31.10.2012 14:29:25
Validator Version: 1.2 RC5 [1.2.4.0]
System.Diagnostics.Contracts.__ContractsRuntime+ContractException: Precondition failed: value != null
at System.Diagnostics.Contracts.__ContractsRuntime.TriggerFailure(ContractFailureKind kind, String msg, String userMessage, String conditionTxt, Exception inner)
at System.Diagnostics.Contracts.__ContractsRuntime.ReportFailure(ContractFailureKind kind, String msg, String conditionTxt, Exception inner)
at System.Diagnostics.Contracts.__ContractsRuntime.Requires(Boolean condition, String msg, String conditionTxt)
at Audax.Validator.Saver.set_ModName(String value)
at Audax.Validator.ValidationManager.Close()
at Audax.Validator.MainWindow.Window_Closing(Object sender, CancelEventArgs e)
at System.Windows.Window.WmClose()
at System.Windows.Window.WindowFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.PublicHooksFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
 
Did you try with a clean install?
Seems to've fixed it. First time I've had to do a clean install though.

Now I'm getting this issuse:
--- Error 1 of 2 ---
At <mod>\history\characters\PB.txt [9999999\1066.1.1\effect\narrative_event] (Line 13, Column 14):
Expected format: narrative_event '= <string>'
--- Error 2 of 2 ---
At <mod>\history\characters\PB.txt [9999999\1066.1.1\effect\narrative_event] (Line 13, Column 14):
Invalid event ID.

That works fine in the game, but it is stopping the Validator in its tracks.
 
Oops, it was an issue for checking for calls from the character history. Fixed (and should release soon, but if you want it now, open Extension\Data\Ck2\Calls\_Main.pdox and after line 72, insert

SearchMethod = 2

(A clean install definitely wouldn't be common to need, not sure why it was now but it should be rare you can't just overwrite it)
Thanks, seems to work now.

What's showing up now is several thousand error messages though, mainly complaining about characters being married at a younger age than 16. This is entirely historical, and I hope there's a way to at least supress those messages. Same applies to "seems too young to be a parent"
Another issue is that it is reporting duplicates with localisation files that the mod doesn't contain. The mod having a duplicate of a vanilla localisation string is not an issue, and is very much intended, as it means one does not have to copy the entire text1.csv into the mod. Edit: nevermind, this issue was due to having it set to "show all errors" due to the clean install wiping my settings.

Also: "The parent, ID 72171, is not alive on 1171.1.1, when this character was born."
In the case of the father, he doesn't really need to be alive at birth, just 9 months prior. Could you change it so that applies? There are plenty of people who've become fathers after their own death.
 
Last edited:
The settings file has been augmented with a bunch of new options, which deal with most of your character issues. The one regarding fathers after death, I will add that as an option.
I think it should probably be a default, as to my knowledge the game lets children be born in-game after the father's death if pregnancy occurs before his death.
 
Well, I can't seem to get the settings file to work. It is in my CKII folder, and it is named ValidatorSettings.txt, and I've set most of the minimum ages to 0. Yet I'm still getting errors.
 
Hmm do the other settings do anything? If so, then I'll have to look into things.
The one to disable errors for empty provinces seems to be working.
The age things should look like this, right? (With values changed):

# Sets the minimum age of marriage
(SetVar CharacterHistory.MinAgeOfMarriage) = 0
# Sets the minimum age of being a parent
(SetVar CharacterHistory.MinAgeOfParent) = 0
# Sets the minimum age of being a guardian
(SetVar CharacterHistory.MinAgeOfGuardian) = 16
# Sets the maximum age of someone needing a guardian
(SetVar CharacterHistory.MaxAgeNeedingGuardian) = 15
# Sets the maximum age of someone
(SetVar CharacterHistory.MaxAge) = 115
 
Righty, time for some more false positives:

"There may be no duplications of a "culture" clause. (Are you missing an 'or' or 'not' wrapper?)
There were 2 duplicates.
[I2631|L149|C8]: culture = PREVPREV
[I2658|L150|C8]: culture = PREVPREVPREV"
I'm checking that it is the same as two different entities, which makes perfect sense. Referring to other scopes should not count as a duplicate, only referring to actual different cultures.

"Invalid node "any_direct_de_jure_vassal_title" in scope TitleCommand (value is: <a complex type>)" - any_direct_de_jure_vassal_title was added in 1.07
Invalid node "distance" in scope CharTrigger (value is: <a complex type>) - Distance "scope" (similar to character_event and opinion_modifier and such) was added in 1.07

I think that's all the false positives triggered by my mod.
 
Still getting duplicate false positives for religion (though no longer culture):
"There may be no duplications of a "religion" clause. (Are you missing an 'or' or 'not' wrapper?)
There were 2 duplicates.
[I46255|L2579|C5]: religion = orthodox
[I46280|L2580|C5]: religion = ROOT"

I don't seem to be getting any false positives beyond that.
 
In my experience death reasons are hardcoded and you can't add new ones. Have you actually tested it?
 
Wishlist : A way to disable one type of error, the bad thing with your program is to have thousands of errors of something WAD for us. (ex : X is 1700 Years old ; normal we start in 8300 and end in 9999)

So please ;)

And also changelog ?

Thank you Jamie550
You can change the ages that are considered "normal" in the settings file.