• 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.
Oh, I'm still a couple versions back, sorry.
 
With just downloaded 1.2, I'm getting this:
Code:
ec) EXCEPTION CONTEXT
ec) Validation Task: Buildings
Validation Key: Buildings
Validation Type: Audax.Validator.TypeExtension.DeclarativeValidatorJob
ec) Validating element with constraint [Buildings] @ <mod>\common\buildings\00_buildings.txt ! temple\tp_hashcavlevy_7\potential: 
ec) Validating constraint [String] @ <mod>\common\buildings\00_buildings.txt ! temple\tp_hashcavlevy_7\potential: 
ec) Validating element with constraint [BuildingGroup] @ <mod>\common\buildings\00_buildings.txt ! temple\tp_hashcavlevy_7\potential: 
ec) Validating element with constraint [BuildingGroup] @ <mod>\common\buildings\00_buildings.txt ! temple\tp_hashcavlevy_7\potential: 
ec) Validating constraint [String] @ <mod>\common\buildings\00_buildings.txt ! temple\tp_hashcavlevy_7\potential: 
ec) Validating element with constraint [BuildingDef] @ <mod>\common\buildings\00_buildings.txt ! temple\tp_hashcavlevy_7\potential: 
ec) Validating element with constraint [BuildingDef] @ <mod>\common\buildings\00_buildings.txt ! temple\tp_hashcavlevy_7\potential: 
ec) Validating constraint ["potential"] @ <mod>\common\buildings\00_buildings.txt ! temple\tp_hashcavlevy_7\potential: 
ec) Validating element with constraint [BuildProvTrigger] @ <mod>\common\buildings\00_buildings.txt ! temple\tp_hashcavlevy_7\potential: 
ec) Validating element with constraint [BuildProvTrigger] @ <mod>\common\buildings\00_buildings.txt ! temple\tp_hashcavlevy_7\potential: 
ec) Validating constraint [BuildProvTrigger] @ <mod>\common\buildings\00_buildings.txt ! temple\tp_hashcavlevy_7\potential: 



ERROR
System.ArgumentOutOfRangeException: Length cannot be less than zero.
Parameter name: length
   at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
   at Audax.Validator.ContextValidatorSystem.EventId..ctor(String idString, Boolean enableNamespaces)
   at Audax.Validator.ContextValidatorSystem.CallSearchPath.SearchForCalls(Document doc, CallSearchMethod searchMethod)
   at Audax.Validator.ContextValidatorSystem.ContextFileCrawler.ContextFileCrawlerPrototype.CallSearch.ProcessPath(CFilePath path, Document doc, IList`1 stringSearches, Boolean enableNamespaces)
   at Audax.Validator.ContextValidatorSystem.ContextFileCrawler.ContextFileCrawlerPrototype.FindCalls(IList`1 callSearch, IList`1 stringSearches, CFilePath path, Document doc)
   at Audax.Validator.ContextValidatorSystem.ContextFileCrawler.ContextFileCrawlerPrototype.ProcessPath(CFilePath path, IList`1 idSearch, IList`1 callSearch, IList`1 stringSearches, IList`1 eventScopes)
   at Audax.Validator.ContextValidatorSystem.ContextFileCrawler.ContextFileCrawlerPrototype.GetWorker()
   at Audax.Validator.ContextValidatorSystem.ContextFileCrawler.get_worker()
   at Audax.Validator.ContextValidatorSystem.ContextFileCrawler.LoadAll()
   at Audax.Validator.ContextValidatorSystem.ContextValidatorInfo.Load()
   at Audax.Validator.ContextValidatorSystem.ContextValidatorInfo.Validate(Context c, String key, ElementNode node, NodeFlags flags)
   at Audax.Validator.ContextValidatorSystem.ContextValidatorConstraint.Audax.Validator.TypeCore.ICChildJudge.InternalValidate(Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ConstraintExtensions.Validate(ICChildJudge constraint, Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ComplexConstraint.ComplexConstraintWorker.ValidateInstanceAsBase(Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ComplexConstraint.ComplexConstraintWorker.ElementValidate(Context c)
   at Audax.Validator.TypeCore.ComplexConstraint.Audax.Validator.TypeCore.ICElementJudge.InternalElementValidate(Context c)
   at Audax.Validator.TypeCore.ConstraintExtensions.ElementValidate(ICElementJudge constraint, Context c)
   at Audax.Validator.TypeCore.PlaceholderConstraint.Audax.Validator.TypeCore.ICElementJudge.InternalElementValidate(Context c)
   at Audax.Validator.TypeCore.ConstraintExtensions.ElementValidate(ICElementJudge constraint, Context c)
   at Audax.Validator.TypeCore.ConstraintExtensions.ElementValidate(ICElementJudge constraint, Context c, ElementNode node)
   at Audax.Validator.TypeCore.ChildConstraintSystem.ChildConstraint.Audax.Validator.TypeCore.ICChildJudge.InternalValidate(Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ConstraintExtensions.Validate(ICChildJudge constraint, Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ComplexConstraint.ComplexConstraintWorker.ValidateInstanceAsBase(Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ComplexConstraint.ComplexConstraintWorker.ElementValidate(Context c)
   at Audax.Validator.TypeCore.ComplexConstraint.Audax.Validator.TypeCore.ICElementJudge.InternalElementValidate(Context c)
   at Audax.Validator.TypeCore.ConstraintExtensions.ElementValidate(ICElementJudge constraint, Context c)
   at Audax.Validator.TypeCore.PlaceholderConstraint.Audax.Validator.TypeCore.ICElementJudge.InternalElementValidate(Context c)
   at Audax.Validator.TypeCore.ConstraintExtensions.ElementValidate(ICElementJudge constraint, Context c)
   at Audax.Validator.TypeCore.ConstraintExtensions.ElementValidate(ICElementJudge constraint, Context c, ElementNode node)
   at Audax.Validator.TypeCore.ChildConstraintSystem.ChildConstraint.Audax.Validator.TypeCore.ICChildJudge.InternalValidate(Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ConstraintExtensions.Validate(ICChildJudge constraint, Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ComplexConstraint.ComplexConstraintWorker.ValidateInstanceAsBase(Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ComplexConstraint.ComplexConstraintWorker.ElementValidate(Context c)
   at Audax.Validator.TypeCore.ComplexConstraint.Audax.Validator.TypeCore.ICElementJudge.InternalElementValidate(Context c)
   at Audax.Validator.TypeCore.ConstraintExtensions.ElementValidate(ICElementJudge constraint, Context c)
   at Audax.Validator.TypeCore.PlaceholderConstraint.Audax.Validator.TypeCore.ICElementJudge.InternalElementValidate(Context c)
   at Audax.Validator.TypeCore.ConstraintExtensions.ElementValidate(ICElementJudge constraint, Context c)
   at Audax.Validator.TypeCore.ConstraintExtensions.ElementValidate(ICElementJudge constraint, Context c, ElementNode node)
   at Audax.Validator.TypeCore.ChildConstraintSystem.ChildConstraint.Audax.Validator.TypeCore.ICChildJudge.InternalValidate(Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ConstraintExtensions.Validate(ICChildJudge constraint, Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ComplexConstraint.ComplexConstraintWorker.ValidateInstanceAsBase(Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ComplexConstraint.ComplexConstraintWorker.ElementValidate(Context c)
   at Audax.Validator.TypeCore.ComplexConstraint.Audax.Validator.TypeCore.ICElementJudge.InternalElementValidate(Context c)
   at Audax.Validator.TypeCore.ConstraintExtensions.ElementValidate(ICElementJudge constraint, Context c)
   at Audax.Validator.TypeCore.ConstraintExtensions.ElementValidate(ICElementJudge constraint, Context c, ElementNode node)
   at Audax.Validator.TypeExtension.DeclarativeValidatorJob.DeclarativeValidatorWorker.Validate(Context c)
   at Audax.Validator.TypeExtension.DeclarativeValidatorJob.ValidateOverride()
   at Audax.Validator.ValidatorJobBase.Validate()
   at Audax.Validator.ValidatorJob.Validate()
   at Audax.Validator.GameValidator.Validate(Action onEachValidatorCompleteAction)

This is tp_hascavlevy_7:
Code:
	tp_hashcavlevy_7 = {
		potential = {
			FROM = {
				OR = {				
					culture = serindian
					culture = avar
					culture = bulgar
					culture = khazar
					culture = turkish
					culture = mongol
					culture = cuman
					culture = pecheneg
					culture = saka
					culture = parthian
					culture = hunnic				
				}			
			}
		}			
		prerequisites = { tp_householdtroops_1 }
		upgrades_from = tp_hashcavlevy_6
		build_cost = 150
		build_time = 425
		horse_archers = 40		
		knights = 13		
		light_cavalry = 40
		light_infantry = 47		
		tax_income = -0.4
		ai_creation_factor = 110
	}
}
I haven't changed 00_buildings.txt, and it didn't cause this kind of error in rc10.
 
With just downloaded 1.2, I'm getting this:
Code:
ec) EXCEPTION CONTEXT
ec) Validation Task: Buildings
Validation Key: Buildings
Validation Type: Audax.Validator.TypeExtension.DeclarativeValidatorJob
ec) Validating element with constraint [Buildings] @ <mod>\common\buildings\00_buildings.txt ! temple\tp_hashcavlevy_7\potential: 
ec) Validating constraint [String] @ <mod>\common\buildings\00_buildings.txt ! temple\tp_hashcavlevy_7\potential: 
ec) Validating element with constraint [BuildingGroup] @ <mod>\common\buildings\00_buildings.txt ! temple\tp_hashcavlevy_7\potential: 
ec) Validating element with constraint [BuildingGroup] @ <mod>\common\buildings\00_buildings.txt ! temple\tp_hashcavlevy_7\potential: 
ec) Validating constraint [String] @ <mod>\common\buildings\00_buildings.txt ! temple\tp_hashcavlevy_7\potential: 
ec) Validating element with constraint [BuildingDef] @ <mod>\common\buildings\00_buildings.txt ! temple\tp_hashcavlevy_7\potential: 
ec) Validating element with constraint [BuildingDef] @ <mod>\common\buildings\00_buildings.txt ! temple\tp_hashcavlevy_7\potential: 
ec) Validating constraint ["potential"] @ <mod>\common\buildings\00_buildings.txt ! temple\tp_hashcavlevy_7\potential: 
ec) Validating element with constraint [BuildProvTrigger] @ <mod>\common\buildings\00_buildings.txt ! temple\tp_hashcavlevy_7\potential: 
ec) Validating element with constraint [BuildProvTrigger] @ <mod>\common\buildings\00_buildings.txt ! temple\tp_hashcavlevy_7\potential: 
ec) Validating constraint [BuildProvTrigger] @ <mod>\common\buildings\00_buildings.txt ! temple\tp_hashcavlevy_7\potential: 



ERROR
System.ArgumentOutOfRangeException: Length cannot be less than zero.
Parameter name: length
   at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
   at Audax.Validator.ContextValidatorSystem.EventId..ctor(String idString, Boolean enableNamespaces)
   at Audax.Validator.ContextValidatorSystem.CallSearchPath.SearchForCalls(Document doc, CallSearchMethod searchMethod)
   at Audax.Validator.ContextValidatorSystem.ContextFileCrawler.ContextFileCrawlerPrototype.CallSearch.ProcessPath(CFilePath path, Document doc, IList`1 stringSearches, Boolean enableNamespaces)
   at Audax.Validator.ContextValidatorSystem.ContextFileCrawler.ContextFileCrawlerPrototype.FindCalls(IList`1 callSearch, IList`1 stringSearches, CFilePath path, Document doc)
   at Audax.Validator.ContextValidatorSystem.ContextFileCrawler.ContextFileCrawlerPrototype.ProcessPath(CFilePath path, IList`1 idSearch, IList`1 callSearch, IList`1 stringSearches, IList`1 eventScopes)
   at Audax.Validator.ContextValidatorSystem.ContextFileCrawler.ContextFileCrawlerPrototype.GetWorker()
   at Audax.Validator.ContextValidatorSystem.ContextFileCrawler.get_worker()
   at Audax.Validator.ContextValidatorSystem.ContextFileCrawler.LoadAll()
   at Audax.Validator.ContextValidatorSystem.ContextValidatorInfo.Load()
   at Audax.Validator.ContextValidatorSystem.ContextValidatorInfo.Validate(Context c, String key, ElementNode node, NodeFlags flags)
   at Audax.Validator.ContextValidatorSystem.ContextValidatorConstraint.Audax.Validator.TypeCore.ICChildJudge.InternalValidate(Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ConstraintExtensions.Validate(ICChildJudge constraint, Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ComplexConstraint.ComplexConstraintWorker.ValidateInstanceAsBase(Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ComplexConstraint.ComplexConstraintWorker.ElementValidate(Context c)
   at Audax.Validator.TypeCore.ComplexConstraint.Audax.Validator.TypeCore.ICElementJudge.InternalElementValidate(Context c)
   at Audax.Validator.TypeCore.ConstraintExtensions.ElementValidate(ICElementJudge constraint, Context c)
   at Audax.Validator.TypeCore.PlaceholderConstraint.Audax.Validator.TypeCore.ICElementJudge.InternalElementValidate(Context c)
   at Audax.Validator.TypeCore.ConstraintExtensions.ElementValidate(ICElementJudge constraint, Context c)
   at Audax.Validator.TypeCore.ConstraintExtensions.ElementValidate(ICElementJudge constraint, Context c, ElementNode node)
   at Audax.Validator.TypeCore.ChildConstraintSystem.ChildConstraint.Audax.Validator.TypeCore.ICChildJudge.InternalValidate(Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ConstraintExtensions.Validate(ICChildJudge constraint, Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ComplexConstraint.ComplexConstraintWorker.ValidateInstanceAsBase(Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ComplexConstraint.ComplexConstraintWorker.ElementValidate(Context c)
   at Audax.Validator.TypeCore.ComplexConstraint.Audax.Validator.TypeCore.ICElementJudge.InternalElementValidate(Context c)
   at Audax.Validator.TypeCore.ConstraintExtensions.ElementValidate(ICElementJudge constraint, Context c)
   at Audax.Validator.TypeCore.PlaceholderConstraint.Audax.Validator.TypeCore.ICElementJudge.InternalElementValidate(Context c)
   at Audax.Validator.TypeCore.ConstraintExtensions.ElementValidate(ICElementJudge constraint, Context c)
   at Audax.Validator.TypeCore.ConstraintExtensions.ElementValidate(ICElementJudge constraint, Context c, ElementNode node)
   at Audax.Validator.TypeCore.ChildConstraintSystem.ChildConstraint.Audax.Validator.TypeCore.ICChildJudge.InternalValidate(Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ConstraintExtensions.Validate(ICChildJudge constraint, Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ComplexConstraint.ComplexConstraintWorker.ValidateInstanceAsBase(Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ComplexConstraint.ComplexConstraintWorker.ElementValidate(Context c)
   at Audax.Validator.TypeCore.ComplexConstraint.Audax.Validator.TypeCore.ICElementJudge.InternalElementValidate(Context c)
   at Audax.Validator.TypeCore.ConstraintExtensions.ElementValidate(ICElementJudge constraint, Context c)
   at Audax.Validator.TypeCore.PlaceholderConstraint.Audax.Validator.TypeCore.ICElementJudge.InternalElementValidate(Context c)
   at Audax.Validator.TypeCore.ConstraintExtensions.ElementValidate(ICElementJudge constraint, Context c)
   at Audax.Validator.TypeCore.ConstraintExtensions.ElementValidate(ICElementJudge constraint, Context c, ElementNode node)
   at Audax.Validator.TypeCore.ChildConstraintSystem.ChildConstraint.Audax.Validator.TypeCore.ICChildJudge.InternalValidate(Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ConstraintExtensions.Validate(ICChildJudge constraint, Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ComplexConstraint.ComplexConstraintWorker.ValidateInstanceAsBase(Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ComplexConstraint.ComplexConstraintWorker.ElementValidate(Context c)
   at Audax.Validator.TypeCore.ComplexConstraint.Audax.Validator.TypeCore.ICElementJudge.InternalElementValidate(Context c)
   at Audax.Validator.TypeCore.ConstraintExtensions.ElementValidate(ICElementJudge constraint, Context c)
   at Audax.Validator.TypeCore.ConstraintExtensions.ElementValidate(ICElementJudge constraint, Context c, ElementNode node)
   at Audax.Validator.TypeExtension.DeclarativeValidatorJob.DeclarativeValidatorWorker.Validate(Context c)
   at Audax.Validator.TypeExtension.DeclarativeValidatorJob.ValidateOverride()
   at Audax.Validator.ValidatorJobBase.Validate()
   at Audax.Validator.ValidatorJob.Validate()
   at Audax.Validator.GameValidator.Validate(Action onEachValidatorCompleteAction)

This is tp_hascavlevy_7:
Code:
	tp_hashcavlevy_7 = {
		potential = {
			FROM = {
				OR = {				
					culture = serindian
					culture = avar
					culture = bulgar
					culture = khazar
					culture = turkish
					culture = mongol
					culture = cuman
					culture = pecheneg
					culture = saka
					culture = parthian
					culture = hunnic				
				}			
			}
		}			
		prerequisites = { tp_householdtroops_1 }
		upgrades_from = tp_hashcavlevy_6
		build_cost = 150
		build_time = 425
		horse_archers = 40		
		knights = 13		
		light_cavalry = 40
		light_infantry = 47		
		tax_income = -0.4
		ai_creation_factor = 110
	}
}
I haven't changed 00_buildings.txt, and it didn't cause this kind of error in rc10.

This error is actually caused somewhere else; it has to do with an event call with an improperly formatted event ID (e.g. maybe it has letters and is not a namespace event). Will be fixing this, of course (but not for a bit, because of exams)
 
I really love this tool, it makes it so much easier to find errors in my mod.

Some things I hope can be done for the next version:

*) Missing character trigger is_marriage_adult, is always valid where is_adult is.

*) Also another feature request... can you limit the twin check to characters with two parents set, and make it not check for bastards/legit_bastards? This'd really limit the number of false positives (especially muslims).
Chars with only one parent may be twins, but probably aren't in most cases (or their mother would also be set).
 
I'm getting problems with invalid event ID errors. Basically, the program doesn't like alphanumeric event ids, at least that's what I understand from a few tests I've made. I always get one single error, if I change that event id to only numbers, and try to validate again, the program writes only one error but for the next event in the secuence, and on and on.

All my events are of the type WHATEVER1, WHATEVER2, etc... so maybe I'm doing something wrong but I can't get the program to analyze my files.

Did anyone else have this kind of problem?
 
You need to specify a namespace for alpha-numeric IDs:
Code:
namespace = WHATEVER

character_event = {
   id = WHATEVER.1
...
}

province_event = {
   id = WHATEVER.2
...
}

This is a CK2 necessity, not something Validator arbitrarily does. Also note that (as far as I know) namespace event IDs still can't be used in on_actions.

Jamie, are you going to work on fixing my last reported problem soon? I had to downgrade to 1.2 RC10 because 1.2 is unusable for checking Lux Invicta in its current form.
 
You need to specify a namespace for alpha-numeric IDs:
Code:
namespace = WHATEVER

character_event = {
   id = WHATEVER.1
...
}

province_event = {
   id = WHATEVER.2
...
}

This is a CK2 necessity, not something Validator arbitrarily does. Also note that (as far as I know) namespace event IDs still can't be used in on_actions.

Thanks buddy! I dodged a big bullet there as I was having a problem with various events overriding each other. I now suspect it has something to do with the ids as for the program a BAST1 is the same as a RID1 and uses whatever it gets last. I've got to clean all the mess I've got. :excl:
 
Also note that (as far as I know) namespace event IDs still can't be used in on_actions.
Hmmm... not sure about that. I use namespace events in on_actions, and haven't had a problem so far.
Hope its not wishful thinking on my part. :)
 
Are they triggering? That was the problem with putting namespace IDs in on_actions, they wouldn't trigger.
 
Almost sure they are.
In fact, if they weren't, guess a number of people would be mentioning it on F&F thread by now...
Just so you know, this is one of the major ways the characters gain traits from the archetypes in F&F.
Seems it would be quite easy to spot if they weren't.
 
Maybe namespaces in on_actions got fixed in the last patch or two. I just didn't hear about it (or overlooked it in the changelog), so assumed it was still broken.

--- Error 1 of 6 ---
At <mod>\events\waylit_siege_pulse_events.txt [character_event[2]\trigger\siege\OR\AND] (Line 285, Column 5):
Invalid node "holder_scope" in scope SiegeTrigger (value is: <a complex type>)
--- Error 2 of 6 ---
At <mod>\events\waylit_siege_pulse_events.txt [character_event[2]\trigger\siege\OR\AND] (Line 285, Column 5):
Invalid node "is_capital" in scope SiegeTrigger (value is: yes)
--- Error 3 of 6 ---
At <mod>\events\waylit_siege_pulse_events.txt [character_event[2]\trigger\siege\OR] (Line 280, Column 4):
Invalid node "holder_scope" in scope SiegeTrigger (value is: <a complex type>)
--- Error 4 of 6 ---
At <mod>\events\waylit_siege_pulse_events.txt [character_event[1]\trigger\siege\OR\AND] (Line 29, Column 5):
Invalid node "holder_scope" in scope SiegeTrigger (value is: <a complex type>)
--- Error 5 of 6 ---
At <mod>\events\waylit_siege_pulse_events.txt [character_event[1]\trigger\siege\OR\AND] (Line 29, Column 5):
Invalid node "is_capital" in scope SiegeTrigger (value is: yes)
--- Error 6 of 6 ---
At <mod>\events\waylit_siege_pulse_events.txt [character_event[1]\trigger\siege\OR] (Line 24, Column 4):
Invalid node "holder_scope" in scope SiegeTrigger (value is: <a complex type>)

Code:
		siege = {
			is_attacker = no
			OR = {
				holder_scope = {
					character = ROOT
					tier = baron
				}
				AND = {
					holder_scope = {
						character = ROOT
						higher_tier_than = baron
					}
					is_capital = yes
				}
			}
		}
From studying vanilla events, it seems that siege scopes to the holding under siege. I'm sure the tier = baron part works, I haven't tested the other part since the last revision (it hadn't been working, I think it's correct now.)
 
I'm getting an exception when I'm running the validator (v1.2):

Code:
Beginning validation...

ec) EXCEPTION CONTEXT



ERROR
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: count
   at System.Linq.Enumerable.Range(Int32 start, Int32 count)
   at Audax.Validator.Clausewitz.Ck2.Ck2ConstraintFactory.LoadDefaultConstraints()
   at Audax.Validator.TypeCore.ConstraintPrevalidation.<OnPrevalidation>b__1(KeyValuePair`2 fac)
   at System.Linq.Enumerable.<SelectManyIterator>d__31`3.MoveNext()
   at Audax.Validator.TypeCore.ConstraintPrevalidation.OnPrevalidation(Context c, Scope scope)
   at Audax.Validator.GameValidator.Validate(Action onEachValidatorCompleteAction)

I'm just starting on my mod, so I've made a gazillion changes and this is my first attempt to validate.

I'm successfully validating Game of Thrones, so I think my validation installation etc. should be good. The mod crashes to desktop after loading up in the game, at the character selection screen, but there isn't anything valuable in the log files that I can see.

EDIT: Solved! It was caused by max_provinces being smaller than sea_starts in default.map

-Magnus
 
Last edited:
Time for another round of Spot the False Positive!

Invalid node "desc" in scope BuildingDef (value is: ca_con_wall_6_desc)
Desc is now a valid attribute.

Invalid node "capital_holding" in scope CharTrigger (value is: <a complex type>)
Capital_holding is now a valid scope.

Invalid node "is_merchant_republic" in scope CharTrigger (value is: yes)
That's now a valid condition.

Invalid node "intrigue" in scope BuildingDef (value is: 1)
That's now a valid attribute. The other character attributes are presumably also valid.

Invalid node "monthly_character_piety" in scope BuildingDef (value is: 0.50)
Invalid node "church_opinion" in scope BuildingDef (value is: 10)
Invalid node "monthly_character_prestige" in scope BuildingDef (value is: 0.25)
Invalid node "fertility" in scope BuildingDef (value is: 0.1)
Invalid node "retinuesize" in scope BuildingDef (value is: 3000)
All valid attributes.

Invalid node "is_patrician" in scope CharTrigger (value is: yes)
Invalid node "trade_post_owner" in scope CbTitleTrigger (value is: <a complex type>)
Invalid node "has_trade_post" in scope CbTitleTrigger (value is: yes)
Invalid node "num_of_trade_post_diff" in scope CharTrigger (value is: <a complex type>)
Invalid node "has_embargo" in scope CharTrigger (value is: FROM)
Invalid node "num_of_trade_posts" in scope CharTrigger (value is: 1)
Valid conditions.

Invalid node "seize_trade_post" in scope CbTitleCommand (value is: ROOT)
Valid command.

Invalid node "trade_post_owner" in scope CbTitleTrigger (value is: <a complex type>)
Invalid node "any_direct_de_jure_vassal_title" in scope TitleTrigger (value is: <a complex type>)
Invalid node "thirdparty_title" in scope WarTrigger (value is: <a complex type>)
Valid scopes.

Invalid node "check_all_trade_posts" in scope CbTypeDef (value is: yes)
Valid CB attribute.

Probably not all of it, but should cover most of it.
 
I really love this tool, it makes it so much easier to find errors in my mod.

Some things I hope can be done for the next version:

*) Missing character trigger is_marriage_adult, is always valid where is_adult is.

*) Also another feature request... can you limit the twin check to characters with two parents set, and make it not check for bastards/legit_bastards? This'd really limit the number of false positives (especially muslims).
Chars with only one parent may be twins, but probably aren't in most cases (or their mother would also be set).
* Added is_marriage_adult
* Fixed twin check
* You can set it to not check for bastard/legit_bastard using a settings file (I think this is what you mean?)

Jamie, are you going to work on fixing my last reported problem soon? I had to downgrade to 1.2 RC10 because 1.2 is unusable for checking Lux Invicta in its current form.
The soon-to-be-released version should be able to at least pinpoint the problem better.

Maybe namespaces in on_actions got fixed in the last patch or two. I just didn't hear about it (or overlooked it in the changelog), so assumed it was still broken.



Code:
		siege = {
			is_attacker = no
			OR = {
				holder_scope = {
					character = ROOT
					tier = baron
				}
				AND = {
					holder_scope = {
						character = ROOT
						higher_tier_than = baron
					}
					is_capital = yes
				}
			}
		}
From studying vanilla events, it seems that siege scopes to the holding under siege. I'm sure the tier = baron part works, I haven't tested the other part since the last revision (it hadn't been working, I think it's correct now.)
Should be fixed.

I'm getting an exception when I'm running the validator (v1.2):

Code:
Beginning validation...

ec) EXCEPTION CONTEXT



ERROR
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: count
   at System.Linq.Enumerable.Range(Int32 start, Int32 count)
   at Audax.Validator.Clausewitz.Ck2.Ck2ConstraintFactory.LoadDefaultConstraints()
   at Audax.Validator.TypeCore.ConstraintPrevalidation.<OnPrevalidation>b__1(KeyValuePair`2 fac)
   at System.Linq.Enumerable.<SelectManyIterator>d__31`3.MoveNext()
   at Audax.Validator.TypeCore.ConstraintPrevalidation.OnPrevalidation(Context c, Scope scope)
   at Audax.Validator.GameValidator.Validate(Action onEachValidatorCompleteAction)

I'm just starting on my mod, so I've made a gazillion changes and this is my first attempt to validate.

I'm successfully validating Game of Thrones, so I think my validation installation etc. should be good. The mod crashes to desktop after loading up in the game, at the character selection screen, but there isn't anything valuable in the log files that I can see.

EDIT: Solved! It was caused by max_provinces being smaller than sea_starts in default.map

-Magnus
Added a better error message anyways (for others that may run into this)

Time for another round of Spot the False Positive!

Invalid node "desc" in scope BuildingDef (value is: ca_con_wall_6_desc)
Desc is now a valid attribute.

Invalid node "capital_holding" in scope CharTrigger (value is: <a complex type>)
Capital_holding is now a valid scope.

Invalid node "is_merchant_republic" in scope CharTrigger (value is: yes)
That's now a valid condition.

Invalid node "intrigue" in scope BuildingDef (value is: 1)
That's now a valid attribute. The other character attributes are presumably also valid.

Invalid node "monthly_character_piety" in scope BuildingDef (value is: 0.50)
Invalid node "church_opinion" in scope BuildingDef (value is: 10)
Invalid node "monthly_character_prestige" in scope BuildingDef (value is: 0.25)
Invalid node "fertility" in scope BuildingDef (value is: 0.1)
Invalid node "retinuesize" in scope BuildingDef (value is: 3000)
All valid attributes.

Invalid node "is_patrician" in scope CharTrigger (value is: yes)
Invalid node "trade_post_owner" in scope CbTitleTrigger (value is: <a complex type>)
Invalid node "has_trade_post" in scope CbTitleTrigger (value is: yes)
Invalid node "num_of_trade_post_diff" in scope CharTrigger (value is: <a complex type>)
Invalid node "has_embargo" in scope CharTrigger (value is: FROM)
Invalid node "num_of_trade_posts" in scope CharTrigger (value is: 1)
Valid conditions.

Invalid node "seize_trade_post" in scope CbTitleCommand (value is: ROOT)
Valid command.

Invalid node "trade_post_owner" in scope CbTitleTrigger (value is: <a complex type>)
Invalid node "any_direct_de_jure_vassal_title" in scope TitleTrigger (value is: <a complex type>)
Invalid node "thirdparty_title" in scope WarTrigger (value is: <a complex type>)
Valid scopes.

Invalid node "check_all_trade_posts" in scope CbTypeDef (value is: yes)
Valid CB attribute.

Probably not all of it, but should cover most of it.

I think I got most of these, but you may have to report a few of them again soon (sorry)
 
v1.3 RC12 has been released, now hopefully compatible with v1.09

Download here: http://www.mediafire.com/?398d8u6vl3upoez

Please, if you see vanilla issues in the Validator, file a bug report or explain to me why the issue is actually the fault of the Validator, (and only excluding cases where the Validator is too strict on case sensitivity).
 
Thanks for the new version!
 
It's still crashing for me when validating Lux Invicta. This time with the error message:
Code:
ERROR
System.ArgumentOutOfRangeException: Length cannot be less than zero.
Parameter name: length
   at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
   at Audax.Validator.ContextValidatorSystem.EventId..ctor(String idString, Boolean enableNamespaces)
   at Audax.Validator.ContextValidatorSystem.CallSearchPath.SearchForCalls(Document doc, CallSearchMethod searchMethod)
   at Audax.Validator.ContextValidatorSystem.ContextFileCrawler.ContextFileCrawlerPrototype.CallSearch.ProcessPath(CFilePath path, Document doc, IList`1 stringSearches, Boolean enableNamespaces)
   at Audax.Validator.ContextValidatorSystem.ContextFileCrawler.ContextFileCrawlerPrototype.FindCalls(IList`1 callSearch, IList`1 stringSearches, CFilePath path, Document doc)
   at Audax.Validator.ContextValidatorSystem.ContextFileCrawler.ContextFileCrawlerPrototype.ProcessPath(CFilePath path, IList`1 idSearch, IList`1 callSearch, IList`1 stringSearches, IList`1 eventScopes)
   at Audax.Validator.ContextValidatorSystem.ContextFileCrawler.ContextFileCrawlerPrototype.GetWorker()
   at Audax.Validator.ContextValidatorSystem.ContextFileCrawler.get_worker()
   at Audax.Validator.ContextValidatorSystem.ContextFileCrawler.LoadAll()
   at Audax.Validator.ContextValidatorSystem.ContextValidatorInfo.Load()
   at Audax.Validator.ContextValidatorSystem.ContextValidatorInfo.Validate(Context c, String key, ElementNode node, NodeFlags flags)
   at Audax.Validator.ContextValidatorSystem.ContextValidatorConstraint.Audax.Validator.TypeCore.ICChildJudge.InternalValidate(Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ConstraintExtensions.Validate(ICChildJudge constraint, Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ComplexConstraint.ComplexConstraintWorker.ValidateInstanceAsBase(Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ComplexConstraint.ComplexConstraintWorker.ElementValidate(Context c)
   at Audax.Validator.TypeCore.ComplexConstraint.Audax.Validator.TypeCore.ICElementJudge.InternalElementValidate(Context c)
   at Audax.Validator.TypeCore.ConstraintExtensions.ElementValidate(ICElementJudge constraint, Context c)
   at Audax.Validator.TypeCore.PlaceholderConstraint.Audax.Validator.TypeCore.ICElementJudge.InternalElementValidate(Context c)
   at Audax.Validator.TypeCore.ConstraintExtensions.ElementValidate(ICElementJudge constraint, Context c)
   at Audax.Validator.TypeCore.ConstraintExtensions.ElementValidate(ICElementJudge constraint, Context c, ElementNode node)
   at Audax.Validator.TypeCore.ChildConstraintSystem.ChildConstraint.Audax.Validator.TypeCore.ICChildJudge.InternalValidate(Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ConstraintExtensions.Validate(ICChildJudge constraint, Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ComplexConstraint.ComplexConstraintWorker.ValidateInstanceAsBase(Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ComplexConstraint.ComplexConstraintWorker.ElementValidate(Context c)
   at Audax.Validator.TypeCore.ComplexConstraint.Audax.Validator.TypeCore.ICElementJudge.InternalElementValidate(Context c)
   at Audax.Validator.TypeCore.ConstraintExtensions.ElementValidate(ICElementJudge constraint, Context c)
   at Audax.Validator.TypeCore.PlaceholderConstraint.Audax.Validator.TypeCore.ICElementJudge.InternalElementValidate(Context c)
   at Audax.Validator.TypeCore.ConstraintExtensions.ElementValidate(ICElementJudge constraint, Context c)
   at Audax.Validator.TypeCore.ConstraintExtensions.ElementValidate(ICElementJudge constraint, Context c, ElementNode node)
   at Audax.Validator.TypeCore.ChildConstraintSystem.ChildConstraint.Audax.Validator.TypeCore.ICChildJudge.InternalValidate(Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ConstraintExtensions.Validate(ICChildJudge constraint, Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ComplexConstraint.ComplexConstraintWorker.ValidateInstanceAsBase(Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ComplexConstraint.ComplexConstraintWorker.ElementValidate(Context c)
   at Audax.Validator.TypeCore.ComplexConstraint.Audax.Validator.TypeCore.ICElementJudge.InternalElementValidate(Context c)
   at Audax.Validator.TypeCore.ConstraintExtensions.ElementValidate(ICElementJudge constraint, Context c)
   at Audax.Validator.TypeCore.PlaceholderConstraint.Audax.Validator.TypeCore.ICElementJudge.InternalElementValidate(Context c)
   at Audax.Validator.TypeCore.ConstraintExtensions.ElementValidate(ICElementJudge constraint, Context c)
   at Audax.Validator.TypeCore.ConstraintExtensions.ElementValidate(ICElementJudge constraint, Context c, ElementNode node)
   at Audax.Validator.TypeCore.ChildConstraintSystem.ChildConstraint.Audax.Validator.TypeCore.ICChildJudge.InternalValidate(Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ConstraintExtensions.Validate(ICChildJudge constraint, Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ComplexConstraint.ComplexConstraintWorker.ValidateInstanceAsBase(Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ComplexConstraint.ComplexConstraintWorker.ElementValidate(Context c)
   at Audax.Validator.TypeCore.ComplexConstraint.Audax.Validator.TypeCore.ICElementJudge.InternalElementValidate(Context c)
   at Audax.Validator.TypeCore.ConstraintExtensions.ElementValidate(ICElementJudge constraint, Context c)
   at Audax.Validator.TypeCore.ConstraintExtensions.ElementValidate(ICElementJudge constraint, Context c, ElementNode node)
   at Audax.Validator.TypeExtension.DeclarativeValidatorJob.DeclarativeValidatorWorker.Validate(Context c)
   at Audax.Validator.TypeExtension.DeclarativeValidatorJob.ValidateOverride()
   at Audax.Validator.ValidatorJobBase.Validate()
   at Audax.Validator.ValidatorJob.Validate()
   at Audax.Validator.GameValidator.Validate(Action onEachValidatorCompleteAction)
 
It's still crashing for me when validating Lux Invicta. This time with the error message:
Code:
ERROR
System.ArgumentOutOfRangeException: Length cannot be less than zero.
Parameter name: length
   at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
   at Audax.Validator.ContextValidatorSystem.EventId..ctor(String idString, Boolean enableNamespaces)
   at Audax.Validator.ContextValidatorSystem.CallSearchPath.SearchForCalls(Document doc, CallSearchMethod searchMethod)
   at Audax.Validator.ContextValidatorSystem.ContextFileCrawler.ContextFileCrawlerPrototype.CallSearch.ProcessPath(CFilePath path, Document doc, IList`1 stringSearches, Boolean enableNamespaces)
   at Audax.Validator.ContextValidatorSystem.ContextFileCrawler.ContextFileCrawlerPrototype.FindCalls(IList`1 callSearch, IList`1 stringSearches, CFilePath path, Document doc)
   at Audax.Validator.ContextValidatorSystem.ContextFileCrawler.ContextFileCrawlerPrototype.ProcessPath(CFilePath path, IList`1 idSearch, IList`1 callSearch, IList`1 stringSearches, IList`1 eventScopes)
   at Audax.Validator.ContextValidatorSystem.ContextFileCrawler.ContextFileCrawlerPrototype.GetWorker()
   at Audax.Validator.ContextValidatorSystem.ContextFileCrawler.get_worker()
   at Audax.Validator.ContextValidatorSystem.ContextFileCrawler.LoadAll()
   at Audax.Validator.ContextValidatorSystem.ContextValidatorInfo.Load()
   at Audax.Validator.ContextValidatorSystem.ContextValidatorInfo.Validate(Context c, String key, ElementNode node, NodeFlags flags)
   at Audax.Validator.ContextValidatorSystem.ContextValidatorConstraint.Audax.Validator.TypeCore.ICChildJudge.InternalValidate(Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ConstraintExtensions.Validate(ICChildJudge constraint, Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ComplexConstraint.ComplexConstraintWorker.ValidateInstanceAsBase(Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ComplexConstraint.ComplexConstraintWorker.ElementValidate(Context c)
   at Audax.Validator.TypeCore.ComplexConstraint.Audax.Validator.TypeCore.ICElementJudge.InternalElementValidate(Context c)
   at Audax.Validator.TypeCore.ConstraintExtensions.ElementValidate(ICElementJudge constraint, Context c)
   at Audax.Validator.TypeCore.PlaceholderConstraint.Audax.Validator.TypeCore.ICElementJudge.InternalElementValidate(Context c)
   at Audax.Validator.TypeCore.ConstraintExtensions.ElementValidate(ICElementJudge constraint, Context c)
   at Audax.Validator.TypeCore.ConstraintExtensions.ElementValidate(ICElementJudge constraint, Context c, ElementNode node)
   at Audax.Validator.TypeCore.ChildConstraintSystem.ChildConstraint.Audax.Validator.TypeCore.ICChildJudge.InternalValidate(Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ConstraintExtensions.Validate(ICChildJudge constraint, Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ComplexConstraint.ComplexConstraintWorker.ValidateInstanceAsBase(Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ComplexConstraint.ComplexConstraintWorker.ElementValidate(Context c)
   at Audax.Validator.TypeCore.ComplexConstraint.Audax.Validator.TypeCore.ICElementJudge.InternalElementValidate(Context c)
   at Audax.Validator.TypeCore.ConstraintExtensions.ElementValidate(ICElementJudge constraint, Context c)
   at Audax.Validator.TypeCore.PlaceholderConstraint.Audax.Validator.TypeCore.ICElementJudge.InternalElementValidate(Context c)
   at Audax.Validator.TypeCore.ConstraintExtensions.ElementValidate(ICElementJudge constraint, Context c)
   at Audax.Validator.TypeCore.ConstraintExtensions.ElementValidate(ICElementJudge constraint, Context c, ElementNode node)
   at Audax.Validator.TypeCore.ChildConstraintSystem.ChildConstraint.Audax.Validator.TypeCore.ICChildJudge.InternalValidate(Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ConstraintExtensions.Validate(ICChildJudge constraint, Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ComplexConstraint.ComplexConstraintWorker.ValidateInstanceAsBase(Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ComplexConstraint.ComplexConstraintWorker.ElementValidate(Context c)
   at Audax.Validator.TypeCore.ComplexConstraint.Audax.Validator.TypeCore.ICElementJudge.InternalElementValidate(Context c)
   at Audax.Validator.TypeCore.ConstraintExtensions.ElementValidate(ICElementJudge constraint, Context c)
   at Audax.Validator.TypeCore.PlaceholderConstraint.Audax.Validator.TypeCore.ICElementJudge.InternalElementValidate(Context c)
   at Audax.Validator.TypeCore.ConstraintExtensions.ElementValidate(ICElementJudge constraint, Context c)
   at Audax.Validator.TypeCore.ConstraintExtensions.ElementValidate(ICElementJudge constraint, Context c, ElementNode node)
   at Audax.Validator.TypeCore.ChildConstraintSystem.ChildConstraint.Audax.Validator.TypeCore.ICChildJudge.InternalValidate(Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ConstraintExtensions.Validate(ICChildJudge constraint, Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ComplexConstraint.ComplexConstraintWorker.ValidateInstanceAsBase(Context c, NodeFlags flags)
   at Audax.Validator.TypeCore.ComplexConstraint.ComplexConstraintWorker.ElementValidate(Context c)
   at Audax.Validator.TypeCore.ComplexConstraint.Audax.Validator.TypeCore.ICElementJudge.InternalElementValidate(Context c)
   at Audax.Validator.TypeCore.ConstraintExtensions.ElementValidate(ICElementJudge constraint, Context c)
   at Audax.Validator.TypeCore.ConstraintExtensions.ElementValidate(ICElementJudge constraint, Context c, ElementNode node)
   at Audax.Validator.TypeExtension.DeclarativeValidatorJob.DeclarativeValidatorWorker.Validate(Context c)
   at Audax.Validator.TypeExtension.DeclarativeValidatorJob.ValidateOverride()
   at Audax.Validator.ValidatorJobBase.Validate()
   at Audax.Validator.ValidatorJob.Validate()
   at Audax.Validator.GameValidator.Validate(Action onEachValidatorCompleteAction)

OK, the reason it crashes is in SELIN_events.txt, line 7533, you have an event ID 6643500138, which is higher than the Validator can handle (for technical reasons). This is easily fixed, but I feel like the game itself might not be able to handle IDs higher than about 2 billion, so maybe you can make sure that the event works as expected, and if so, I'll change the code to be accept numbers up to about 2^63 or 2^64 (and am pretty sure that the game will not be able to handle numbers higher than that).

In the meantime, the code has been fixed to generate a warning if it detects such an ID, instead of crashing.