• 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.
There is a new condition: realm_size. It checks the number of realm holdings (all baronies) a landed character has, including all vassals, vassals of vassals, and so forth.

Also, I am getting false positives for DLC event IDs. So that, LoR and ToG events show up as invalid event IDs.

This is a great tool, still. It's been very helpful finding some errors. I ran it through the character histories and boy are there are lot of problems. :blink:
Most of them are warnings, like this character is too young to be married or be a parent, some might be false positives, such as using "yes" rather than the date in the date scope for birth and death dates.
 
Just something to point out and I don't know if someone already did... I have an event and it shows the validator giving an error as follows:
at <mod> .... etc...
This event is set to be triggered only but it is never called.

The problem here is that I checked and rechecked... A decision that I created IS calling the event. I did a test run on my game and yep... The decision with it's underlying event chain works perfectly.
 
Just something to point out and I don't know if someone already did... I have an event and it shows the validator giving an error as follows:
at <mod> .... etc...
This event is set to be triggered only but it is never called.

The problem here is that I checked and rechecked... A decision that I created IS calling the event. I did a test run on my game and yep... The decision with it's underlying event chain works perfectly.

Can you post the decision and event? The Validator is probably missing a call check somewhere.
 
There is a new condition: realm_size. It checks the number of realm holdings (all baronies) a landed character has, including all vassals, vassals of vassals, and so forth.

Also, I am getting false positives for DLC event IDs. So that, LoR and ToG events show up as invalid event IDs.

This is a great tool, still. It's been very helpful finding some errors. I ran it through the character histories and boy are there are lot of problems. :blink:
Most of them are warnings, like this character is too young to be married or be a parent, some might be false positives, such as using "yes" rather than the date in the date scope for birth and death dates.

Do you know if "yes" works for birth and death? They started showing up in the latest patch, I think, so it might work now, but I haven't tested.
 
Do you know if "yes" works for birth and death? They started showing up in the latest patch, I think, so it might work now, but I haven't tested.
They put in the changelog that the innermost date is now ignored, so I have to assume that "yes" is now entirely valid.
 
Edit: One false positive:
At <mod>\common\cb_types\Vanilla CBs.txt [claim\can_use\ROOT\OR\dynasty] (Line 66, Column 5):
"25061" is not a valid ThisChar or OpinionClauseDefinedTypes.
1.10 allowed checking for a dynasty ID directly.

Likewise, one can trigger against a character ID directly now (e.g., trigger = { character = 140 } ). I don't imagine it's as popular as dynasty matching, but nevertheless...
 
Thanks, though somehow I ended up at 367 errors now when I had 360 in the last version.

Edit: One false positive:
At <mod>\common\cb_types\Vanilla CBs.txt [claim\can_use\ROOT\OR\dynasty] (Line 66, Column 5):
"25061" is not a valid ThisChar or OpinionClauseDefinedTypes.
1.10 allowed checking for a dynasty ID directly.

At <mod>\common\landed_titles\landed_titles.txt [k_shiite] (Line 352, Column 1):
Invalid node "caliphate" in scope KingTitleDef (value is: yes)
I'm pretty sure you can have any title be a caliphate; or at least any title above county level.

These should be fixed.

There is a new condition: realm_size. It checks the number of realm holdings (all baronies) a landed character has, including all vassals, vassals of vassals, and so forth.

Also, I am getting false positives for DLC event IDs. So that, LoR and ToG events show up as invalid event IDs.

This is a great tool, still. It's been very helpful finding some errors. I ran it through the character histories and boy are there are lot of problems. :blink:
Most of them are warnings, like this character is too young to be married or be a parent, some might be false positives, such as using "yes" rather than the date in the date scope for birth and death dates.

I added realm_size (hopefully correctly). Can you post the errors about invalid event IDs? "yes" now works for birth and death dates (even though the right side is ignored, the Validator will still warn about junk like "yess" or "2.23.4.2" or similar).

Just something to point out and I don't know if someone already did... I have an event and it shows the validator giving an error as follows:
at <mod> .... etc...
This event is set to be triggered only but it is never called.

The problem here is that I checked and rechecked... A decision that I created IS calling the event. I did a test run on my game and yep... The decision with it's underlying event chain works perfectly.

Can you post the decision and event? Otherwise I cannot be sure which check is being missed.

Likewise, one can trigger against a character ID directly now (e.g., trigger = { character = 140 } ). I don't imagine it's as popular as dynasty matching, but nevertheless...

Added (though it is possible I missed some places, if so please post an example of the error).

I received the following error :
http://postimg.org/image/jszzj452t/

I dont quite understand what the problem is since the archivefunction is in the .mod file.

Okay, so when there is an "archive", does the Validator need to unzip something or is it already unzipped into where the path says it is?
 
Okay, so when there is an "archive", does the Validator need to unzip something or is it already unzipped into where the path says it is?
The archive line points to a zip-file. While you can unzip it to some directory, the "right" thing to do is read the files directly from the archive. Java supports that out of the box, but for .Net you have to use some third party library. A quick google found DotNetZip and this example code:
Code:
  using (ZipFile zip = ZipFile.Read("MyArchive.zip"))
  {
    ZipEntry entry = zip["NameOfEntryInArchive.doc"];
    using (var stream = entry.OpenReader()) 
    {
        var buffer = new byte[2048];
        int n;
        while ((n = stream.Read(buffer, 0, buffer.Length)) > 0) 
        {
            // do something with the buffer here.
        }
    }
  }
 
rlopez1605 said:
Quote Originally Posted by rlopez1605 View Post
Just something to point out and I don't know if someone already did... I have an event and it shows the validator giving an error as follows:
at <mod> .... etc...
This event is set to be triggered only but it is never called.

The problem here is that I checked and rechecked... A decision that I created IS calling the event. I did a test run on my game and yep... The decision with it's underlying event chain works perfectly.
Can you post the decision and event? The Validator is probably missing a call check somewhere.
I got the exact same problem.
Decisioncode:
Code:
decisions = {
	hilaria_cybele = {
		potential = {
			is_ruler = yes
			is_feudal = yes
			prisoner = no
			religion = cybele_cult	
			NOT = {
				has_character_flag = hilaria_cybele
			}
			num_of_vassals = 1
		}
		allow = {
			war = no
			any_demesne_title = {
				is_occupied = no
			}
			prisoner = no
			scaled_wealth = 0.20
			month = 2
			not = {	month = 3 }
		}
		effect = {
			scaled_wealth = -0.15
			prestige = 25
			Hidden_tooltip = { 
			set_character_flag = hilaria_cybele
			character_event = {	id = com.21  }	
			}	
			}
		
		revoke_allowed = { always = no	}
		ai_will_do = {	
		factor = 1
			modifier = {
				factor = 0
				NOT = {	scaled_wealth = 3.0}
			}					
		}
	}
}
Eventcode:
Code:
#Arbor intrat, 22th of March; Player
character_event = {
    id = com.21
    desc = "com.21.desc"
    picture = "GFX_evt_throne_room"
    
    is_triggered_only = yes
    
    option = {
        name = "com.21.a" #You decide to mourn the symbol of Attis.
		piety = 10
		hidden_tooltip = { character_event = { id = com.22 } }
	}
	option = {
        name = "com.21.b" #Mourning? You're just in it for the orgies, really.
		piety = -10
		hidden_tooltip = { character_event = { id = com.22 } }
	}
}

The Validator also tells me about a Parse Failure, due to "invalid character ["]" at Line 188, Column 19 of this event:
Code:
character_event = {
	ID = com.5
	desc = "com.5.desc"
	picture = "GFX_evt_emissary
	capable_only = yes
	prisoner = no
	
	trigger = {
		is_friend = yes
		war = no
		in_command = no
		has_character_flag = reading_ancients
		has_character_flag = found_arnobius
	}
	
	mean_time_to_happen = {	month = 1 }
	
	option = { #Since you now have a big library...you decide to dispute with all your friends in there!
	     [COLOR="#FF0000"]   name = "com.5.a"[/COLOR]
	        trigger = { 
		is_friend = yes
		has_character_flag = bought_library 
		}
		add_trait = initiate
	}	
	option = { #You and your friend decide to have regularly disputes about these matters...
		name = "com.5.b"
		trigger = { is_friend = yes }
		random_friend = { add_trait = initiate }
		add_trait = initiate
	}
	option = { #You hole up in your extensive library...
		name = "com.5.c"
		trigger = { is_friend = yes }
		add_trait = initiate
		add_trait = shy
	}
	option = {#I have no friends...
		name = "com.5.d"
		trigger = {is_friend = no }
		add_trait = initiate
	}
}
I'm not sure whether or not this is the right place to post the problem, since the vallidator is obviously correct: The game keeps crushing at "loading events". But: The twelve nearly identical options before the difficult child are working. I really don't know what that error means.^^"
A very handy tool regardless, quite the time and lifesaver. :)
Best regards
 
Well, I found some of the character event ID problems. In the Greek Fire event chain (byzantine_events), most the events call up character events, which are actually narrative events. The events do exist, and do work.
The runestone events seem to have the same situation (events call up character events that are actually narrative events). These all seem to be PDI coded, so I don't know if it was an oversight or some intentional use.

Perhaps this error could be changed to a more informative warning (event ID.### is a X_event, not a Y_event).

Errors from the runestone events:

--- Error 1 of 23 ---
At <mod>\events\oldgods_runestone_events.txt [character_event[2]\option[23]\hidden_tooltip\character_event\id] (Line 591, Column 42):
"TOG.570" is not a valid CharEventId.
--- Error 2 of 23 ---
At <mod>\events\oldgods_runestone_events.txt [character_event[2]\option[22]\hidden_tooltip\character_event\id] (Line 576, Column 42):
"TOG.572" is not a valid CharEventId.
--- Error 3 of 23 ---
At <mod>\events\oldgods_runestone_events.txt [character_event[2]\option[21]\hidden_tooltip\character_event\id] (Line 567, Column 42):
"TOG.571" is not a valid CharEventId.
--- Error 4 of 23 ---
At <mod>\events\oldgods_runestone_events.txt [character_event[2]\option[20]\hidden_tooltip\character_event\id] (Line 553, Column 42):
"TOG.569" is not a valid CharEventId.
--- Error 5 of 23 ---
At <mod>\events\oldgods_runestone_events.txt [character_event[2]\option[19]\hidden_tooltip\character_event\id] (Line 538, Column 42):
"TOG.568" is not a valid CharEventId.
--- Error 6 of 23 ---
At <mod>\events\oldgods_runestone_events.txt [character_event[2]\option[18]\hidden_tooltip\character_event\id] (Line 524, Column 42):
"TOG.567" is not a valid CharEventId.
--- Error 7 of 23 ---
At <mod>\events\oldgods_runestone_events.txt [character_event[2]\option[17]\hidden_tooltip\character_event\id] (Line 510, Column 42):
"TOG.566" is not a valid CharEventId.
--- Error 8 of 23 ---
At <mod>\events\oldgods_runestone_events.txt [character_event[2]\option[16]\hidden_tooltip\character_event\id] (Line 496, Column 42):
"TOG.565" is not a valid CharEventId.
--- Error 9 of 23 ---
At <mod>\events\oldgods_runestone_events.txt [character_event[2]\option[15]\hidden_tooltip\character_event\id] (Line 482, Column 42):
"TOG.564" is not a valid CharEventId.
--- Error 10 of 23 ---
At <mod>\events\oldgods_runestone_events.txt [character_event[2]\option[14]\hidden_tooltip\character_event\id] (Line 468, Column 42):
"TOG.563" is not a valid CharEventId.
--- Error 11 of 23 ---
At <mod>\events\oldgods_runestone_events.txt [character_event[2]\option[13]\hidden_tooltip\character_event\id] (Line 454, Column 42):
"TOG.562" is not a valid CharEventId.
--- Error 12 of 23 ---
At <mod>\events\oldgods_runestone_events.txt [character_event[2]\option[12]\hidden_tooltip\character_event\id] (Line 440, Column 42):
"TOG.561" is not a valid CharEventId.
--- Error 13 of 23 ---
At <mod>\events\oldgods_runestone_events.txt [character_event[2]\option[11]\hidden_tooltip\character_event\id] (Line 426, Column 42):
"TOG.560" is not a valid CharEventId.
--- Error 14 of 23 ---
At <mod>\events\oldgods_runestone_events.txt [character_event[2]\option[10]\hidden_tooltip\character_event\id] (Line 412, Column 42):
"TOG.559" is not a valid CharEventId.
--- Error 15 of 23 ---
At <mod>\events\oldgods_runestone_events.txt [character_event[2]\option[9]\hidden_tooltip\character_event\id] (Line 398, Column 42):
"TOG.558" is not a valid CharEventId.
--- Error 16 of 23 ---
At <mod>\events\oldgods_runestone_events.txt [character_event[2]\option[8]\hidden_tooltip\character_event\id] (Line 384, Column 42):
"TOG.557" is not a valid CharEventId.
--- Error 17 of 23 ---
At <mod>\events\oldgods_runestone_events.txt [character_event[2]\option[7]\hidden_tooltip\character_event\id] (Line 370, Column 42):
"TOG.556" is not a valid CharEventId.
--- Error 18 of 23 ---
At <mod>\events\oldgods_runestone_events.txt [character_event[2]\option[6]\hidden_tooltip\character_event\id] (Line 361, Column 42):
"TOG.555" is not a valid CharEventId.
--- Error 19 of 23 ---
At <mod>\events\oldgods_runestone_events.txt [character_event[2]\option[5]\hidden_tooltip\character_event\id] (Line 347, Column 42):
"TOG.554" is not a valid CharEventId.
--- Error 20 of 23 ---
At <mod>\events\oldgods_runestone_events.txt [character_event[2]\option[4]\hidden_tooltip\character_event\id] (Line 333, Column 42):
"TOG.553" is not a valid CharEventId.
--- Error 21 of 23 ---
At <mod>\events\oldgods_runestone_events.txt [character_event[2]\option[3]\hidden_tooltip\character_event\id] (Line 319, Column 42):
"TOG.552" is not a valid CharEventId.
--- Error 22 of 23 ---
At <mod>\events\oldgods_runestone_events.txt [character_event[2]\option[2]\hidden_tooltip\character_event\id] (Line 305, Column 42):
"TOG.551" is not a valid CharEventId.
--- Error 23 of 23 ---
At <mod>\events\oldgods_runestone_events.txt [character_event[2]\option[1]\hidden_tooltip\character_event\id] (Line 296, Column 42):
"TOG.550" is not a valid CharEventId.
 
--- Error 1 of 1 ---
Directory Not Found
The directory "C:\Users\Radan\Documents\Paradox Interactive\Crusader Kings II\mod\Mare Nostra\map" was not found.

Beginning validation...

ec) EXCEPTION CONTEXT



ERROR
System.NullReferenceException: Object reference not set to an instance of an object.
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)

Do you know what could be causing this? My mod's not even a map mod so I dunno why it's giving a map error...
 
The archive line points to a zip-file. While you can unzip it to some directory, the "right" thing to do is read the files directly from the archive. Java supports that out of the box, but for .Net you have to use some third party library. A quick google found DotNetZip and this example code:
Code:
  using (ZipFile zip = ZipFile.Read("MyArchive.zip"))
  {
    ZipEntry entry = zip["NameOfEntryInArchive.doc"];
    using (var stream = entry.OpenReader()) 
    {
        var buffer = new byte[2048];
        int n;
        while ((n = stream.Read(buffer, 0, buffer.Length)) > 0) 
        {
            // do something with the buffer here.
        }
    }
  }
I have changed so that the 'archive' option does not automatically crash things, but as of now it will not look at the zip file, and requires the files to be extracted to what 'path' is specified as. Since this is the first complaint about archive in a very long time, it doesn't seem worthwhile to try to fix (since it will be complicated). But if lots of people are using 'archive', I will add better support. (So post if you are indeed using archive).

I got the exact same problem.
Decisioncode:
Code:
decisions = {
	hilaria_cybele = {
		potential = {
			is_ruler = yes
			is_feudal = yes
			prisoner = no
			religion = cybele_cult	
			NOT = {
				has_character_flag = hilaria_cybele
			}
			num_of_vassals = 1
		}
		allow = {
			war = no
			any_demesne_title = {
				is_occupied = no
			}
			prisoner = no
			scaled_wealth = 0.20
			month = 2
			not = {	month = 3 }
		}
		effect = {
			scaled_wealth = -0.15
			prestige = 25
			Hidden_tooltip = { 
			set_character_flag = hilaria_cybele
			character_event = {	id = com.21  }	
			}	
			}
		
		revoke_allowed = { always = no	}
		ai_will_do = {	
		factor = 1
			modifier = {
				factor = 0
				NOT = {	scaled_wealth = 3.0}
			}					
		}
	}
}
Eventcode:
Code:
#Arbor intrat, 22th of March; Player
character_event = {
    id = com.21
    desc = "com.21.desc"
    picture = "GFX_evt_throne_room"
    
    is_triggered_only = yes
    
    option = {
        name = "com.21.a" #You decide to mourn the symbol of Attis.
		piety = 10
		hidden_tooltip = { character_event = { id = com.22 } }
	}
	option = {
        name = "com.21.b" #Mourning? You're just in it for the orgies, really.
		piety = -10
		hidden_tooltip = { character_event = { id = com.22 } }
	}
}

The Validator also tells me about a Parse Failure, due to "invalid character ["]" at Line 188, Column 19 of this event:
Code:
character_event = {
	ID = com.5
	desc = "com.5.desc"
	picture = "GFX_evt_emissary
	capable_only = yes
	prisoner = no
	
	trigger = {
		is_friend = yes
		war = no
		in_command = no
		has_character_flag = reading_ancients
		has_character_flag = found_arnobius
	}
	
	mean_time_to_happen = {	month = 1 }
	
	option = { #Since you now have a big library...you decide to dispute with all your friends in there!
	     [COLOR="#FF0000"]   name = "com.5.a"[/COLOR]
	        trigger = { 
		is_friend = yes
		has_character_flag = bought_library 
		}
		add_trait = initiate
	}	
	option = { #You and your friend decide to have regularly disputes about these matters...
		name = "com.5.b"
		trigger = { is_friend = yes }
		random_friend = { add_trait = initiate }
		add_trait = initiate
	}
	option = { #You hole up in your extensive library...
		name = "com.5.c"
		trigger = { is_friend = yes }
		add_trait = initiate
		add_trait = shy
	}
	option = {#I have no friends...
		name = "com.5.d"
		trigger = {is_friend = no }
		add_trait = initiate
	}
}
I'm not sure whether or not this is the right place to post the problem, since the vallidator is obviously correct: The game keeps crushing at "loading events". But: The twelve nearly identical options before the difficult child are working. I really don't know what that error means.^^"
A very handy tool regardless, quite the time and lifesaver. :)
Best regards
I think the issue with event calling has been fixed, but yell if it isn't. As for the quotes, Can you try retyping the quotes and see what happens? It's possible that the quotes aren't actually the same character as the quote (even if they look the same). If that is the case, IMO it's best to always use the standard quote, but if lots of people disagree I can look into fixing it.

Well, I found some of the character event ID problems. In the Greek Fire event chain (byzantine_events), most the events call up character events, which are actually narrative events. The events do exist, and do work.
The runestone events seem to have the same situation (events call up character events that are actually narrative events). These all seem to be PDI coded, so I don't know if it was an oversight or some intentional use.

Perhaps this error could be changed to a more informative warning (event ID.### is a X_event, not a Y_event).

Errors from the runestone events:

It turns out that character/narrative/other character-y events can be called from any of them. There's a setting in the settings file that you can use to disable this error, but IMO it's still cleaner to keep everything straight, so the error is on by default. Unfortunately, due to the decentralized character of the Validator, it is not easy to change the error message to something smart like that.

Do you know what could be causing this? My mod's not even a map mod so I dunno why it's giving a map error...

I am not sure. Your base game file does have a "map" folder right? And your .mod file doesn't have replace_path for map? Maybe you can post the .mod file.