• 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.
For flags, Validator could do a reverse of what I assume it does to verify if those flags are missing. It looks at titles listed in landed_titles.txt and can denote any flags missing, so why not do the reverse and look at what gfx are in the flag folder and output a list of any they are not in the landed_titles.txt?

Similarly, when scanning localisation files, cross-reference the entries to all other files and output "error" for any that pop up as not being referencing anywhere.

For flags, that would work, but for localization, there's lots of entries that the game uses directly (i.e. the exe), so that they wouldn't appear in any of the database files, but would still be used.
 
Had an error slip through. One of my building prereqs had a typo and the validator didn't catch it as an undefined building. Also, I've had a bunch of provinces show up as noculture and noreligion.
 
I don't know what happened but I recently tried to use validator (an older version) and got an error, when I updated, it still get the error;

Code:
Beginning validation...

ec) EXCEPTION CONTEXT



ERROR
System.ArgumentOutOfRangeException: Das angegebene Argument liegt außerhalb des gültigen Wertebereichs.
Parametername: count
   bei System.Linq.Enumerable.Range(Int32 start, Int32 count)
   bei Audax.Validator.Clausewitz.Ck2.Ck2ConstraintFactory.LoadDefaultConstraints()
   bei Audax.Validator.TypeCore.ConstraintPrevalidation.<OnPrevalidation>b__1(KeyValuePair`2 fac)
   bei System.Linq.Enumerable.<SelectManyIterator>d__31`3.MoveNext()
   bei Audax.Validator.TypeCore.ConstraintPrevalidation.OnPrevalidation(Context c, Scope scope)
   bei Audax.Validator.GameValidator.Validate(Action onEachValidatorCompleteAction)
 
Had an error slip through. One of my building prereqs had a typo and the validator didn't catch it as an undefined building. Also, I've had a bunch of provinces show up as noculture and noreligion.
Could you describe that in more detail, please? At a first glance, that seems to be being checked.
I don't know what happened but I recently tried to use validator (an older version) and got an error, when I updated, it still get the error;

Code:
Beginning validation...

ec) EXCEPTION CONTEXT



ERROR
System.ArgumentOutOfRangeException: Das angegebene Argument liegt außerhalb des gültigen Wertebereichs.
Parametername: count
   bei System.Linq.Enumerable.Range(Int32 start, Int32 count)
   bei Audax.Validator.Clausewitz.Ck2.Ck2ConstraintFactory.LoadDefaultConstraints()
   bei Audax.Validator.TypeCore.ConstraintPrevalidation.<OnPrevalidation>b__1(KeyValuePair`2 fac)
   bei System.Linq.Enumerable.<SelectManyIterator>d__31`3.MoveNext()
   bei Audax.Validator.TypeCore.ConstraintPrevalidation.OnPrevalidation(Context c, Scope scope)
   bei Audax.Validator.GameValidator.Validate(Action onEachValidatorCompleteAction)

I think this relates to your map\default.map file. Could you post the values of max_provinces and sea_starts? But basically if sea_starts is less than 1, or sea_starts > max_provinces, then the Validator won't be happy (whether it's supposed to not be happy, I don't know). In any case, if it is allowed, then I'll change it to be allowed and if not, I'll make the error message friendlier.
 
Could you describe that in more detail, please? At a first glance, that seems to be being checked.


I think this relates to your map\default.map file. Could you post the values of max_provinces and sea_starts? But basically if sea_starts is less than 1, or sea_starts > max_provinces, then the Validator won't be happy (whether it's supposed to not be happy, I don't know). In any case, if it is allowed, then I'll change it to be allowed and if not, I'll make the error message friendlier.

The map loads fine without any sea provinces (all white), so I guess it's allowed, but that is more than likely the issue I guess with the validator. I thought I royally f---d something up lol. I'll add some sea provinces and validate my work later, thanks for the tip :)
 
Could you describe that in more detail, please? At a first glance, that seems to be being checked.
I had a valid building chain called ct_fortifications_# that worked just fine. Later on, I wanted to put ct_fortification_1 in prerequisites for a building, but called it ct_fortifications_1, which is undefined. I got ingame and saw that I couldn't upgrade because I hadn't built nobuilding. It'll load just fine, but the prereqs will never be satisfied. It validated my buildings file and never said a thing.
 
The map loads fine without any sea provinces (all white), so I guess it's allowed, but that is more than likely the issue I guess with the validator. I thought I royally f---d something up lol. I'll add some sea provinces and validate my work later, thanks for the tip :)

Okay cool, so what were your values of sea_starts and max_provinces? Just so I can make sure that it won't crash in the future.

I had a valid building chain called ct_fortifications_# that worked just fine. Later on, I wanted to put ct_fortification_1 in prerequisites for a building, but called it ct_fortifications_1, which is undefined. I got ingame and saw that I couldn't upgrade because I hadn't built nobuilding. It'll load just fine, but the prereqs will never be satisfied. It validated my buildings file and never said a thing.

Ah got it, I fixed it. Did you also mention you had an issue with noculture and noreligion?
 
Ah got it, I fixed it. Did you also mention you had an issue with noculture and noreligion?
I have no idea what's even causing it. My religions and cultures are all working since the characters have them (except for the odd random gen who has noculture or noreligion).
 
at the time 281/282, but it's increased to over 330-odd and counting.
So sea_start = 281, max_prov = 282? Strangely I just tried it and it is fine (and it seems like those numbers wouldn't be problematic anyways)
I have no idea what's even causing it. My religions and cultures are all working since the characters have them (except for the odd random gen who has noculture or noreligion).
Hmm, maybe you could find a character that has "noculture", save the game, and then find the character in the save file and see what their assigned culture is?
 
Heeeere's Wiz... with the false positives.

--- Error 1 of 1 ---
At <mod>\events\newevents.txt [character_event[2]\option\hidden_tooltip] (Line 96, Column 3):
Invalid node "father_even_if_dead" in scope CharCommand (value is: <a complex type>)

This is a valid scope.

--- Error 1 of 1 ---
At <mod>\events\traits_effects_events.txt [character_event[306]\option[2]\FROM\prisoner] (Line 17363, Column 4):
"yes" is not a valid ThisChar or No.

prisoner = yes/no works fine.

And that's it for today.
 
Heeeere's Wiz... with the false positives.



This is a valid scope.



prisoner = yes/no works fine.

And that's it for today.

Thanks, fixed. Though, what does "prisoner = yes" do exactly? I assume it puts the guy in prison, but that would be the prisoner of the ROOT or which?
 
It can be used as a trigger -- I currently have it as a requirement for raising crown authority that neither you (the king) nor any of your de jure vassals (counts/dukes) are imprisoned.
 
That's a great idea SoH, have you thought about doing an event that checks for when a King is imprisoned and then reduces crown authority if it's over a certain length of time? Same for regencies, reduce crown authority if the regency lasts for so long.
 
Imprisoned by current liege.
Will prisoner = yes trigger for jailers other than current liege?

*edit*
Hmm, maybe you could find a character that has "noculture", save the game, and then find the character in the save file and see what their assigned culture is?
Looked through dynasties at the top of the save file,
Code:
	161=
	{
		name="East River Park"
		coat_of_arms=
		{
			data=
			{
3 1 3 2 13 3 8 1 3 2 13 3 8 1 3 2 13 3 8 1 3 2 13 3 8 			}
			religion_group="none"
		}
	}

There's not even a culture defined for this guy. As opposed to this guy, who works:

Code:
	203=
	{
		name="of The Herring Safe & Lock Co. Building"
		culture="wasp"
		coat_of_arms=
		{
			data=
			{
0 1 22 2 5 1 7 			}
			religion_group="manhattan"
		}
	}

And this guy, who doesn't, but at least has a defined culture:

Code:
	60=
	{
		name="Grant"
		culture="wasp"
		coat_of_arms=
		{
			data=
			{
2 0 24 9 2 5 3 0 24 9 2 5 3 			}
			religion_group="none"
		}
	}

*edit*
Looking at the provinces themselves in the save. Two Bridges is defined as culture = asian and religion = chinatown,
Code:
13=
{
	name="Two Bridges"
	culture=asian
	religion=chinatown
	max_settlements=3
	b_laguardiahouses=
	{
		type=castle
		date="1.1.1"
		build_time="1.1.1"
		ca_fortification_1=yes
		levy=
		{
			light_infantry=
			{
				50 50 
			}
			heavy_infantry=
			{
				20 20 
			}
			light_cavalry=
			{
				6 6 
			}
		}
	}
	title="c_twobridges"
	technology=
	{
		level=
		{
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 		}
		progress=
		{
0 9 9 3 8 5 8 3 1 5 2 5 0 0 0 0 0 0 0 0 0 1 0 0 		}
	}
}

I go to the next province, Chinatown, and neither of these are defined.
Code:
14=
{
	name="Chinatown"
	max_settlements=4
	b_nyccriminalcourt=
	{
		type=castle
		date="1.1.1"
		build_time="1.1.1"
		ca_fortification_1=yes
		levy=
		{
			light_infantry=
			{
				55 55 
			}
			heavy_infantry=
			{
				22 22 
			}
			light_cavalry=
			{
				6 6 
			}
		}
	}
	b_confuciusplaza=
	{
		type=temple
		date="1.1.1"
		build_time="1.1.1"
		levy=
		{
			light_infantry=
			{
				14 14 
			}
			heavy_infantry=
			{
				14 14 
			}
			archers=
			{
				8 8 
			}
		}
	}
	title="c_chinatown"
	technology=
	{
		level=
		{
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 		}
		progress=
		{
0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 		}
	}
}

In the /history/provinces/ files, these two values are identical. They're both culture = asian and religion = chinatown, and they both refer to their correct respective province.

I don't get it. The characters are probably undefined because of the provinces, but there simply isn't any reason that these provinces shouldn't be using the cultures and religions I set them to.
 
Last edited:

Does setting up history files work like that?
Every history file I've seen other than the one you've written there has for ex.
Code:
# 1 - Vestisland

# County Title
title = c_vestisland

# Settlements
max_settlements = 2
b_reykjavik = castle
b_alftanes = city

#b_skalholt = temple
#b_pingvellir = castle
#b_kjalarnes = castle
#b_hvamm = castle
#b_hlidarendi = castle
#b_borg = castle

# Misc
culture = icelandic
religion = catholic


# History
 
Jamie, quick question here. Are there parts of the Validator that require aspects of .NET 4.0, or could it potentially be backported to .NET 3.5? The only reason I ask is because the WINE implementation I use only supports up to 3.5, and there's no indication yet of when they'll get 4.0 support up and running.

I'm only vaguely acquainted with .NET, so I'm afraid I can't offer much help directly, but I did find, with about two seconds' worth of Google-fu, the following two links that may help you conceptualize such a project, if you're even willing to consider it:

http://stackoverflow.com/questions/...ck-for-backporting-new-net-framework-features

http://www.fidelitydesign.net/?p=415 (beware, for here there be SQL calls!)