• 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.
Have I done something wrong? I set the game path to 'C:\Program Files (x86)\Steam\steamapps\common\crusader kings ii' then selected Crusader Kings II on the right, validate all options and hit validate and all I got was this:

Code:
Beginning validation...

ec) EXCEPTION CONTEXT

dec) DEFAULT EXCEPTION CONTEXT



ERROR
System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at Audax.Validator.Clausewitz.Ck2.Ck2LocalizationManager.LocalizationEntry.ProcessSquiggly(String text, Int32& i)
   at Audax.Validator.Clausewitz.Ck2.Ck2LocalizationManager.LocalizationEntry.ProcessText(String text)
   at Audax.Validator.Clausewitz.Ck2.Ck2LocalizationManager.LocalizationEntry..ctor(ElementNode entryNode)
   at Audax.Validator.Clausewitz.Ck2.Ck2LocalizationManager.Initialize(ElementNode configNode, Scope scope)
   at Audax.Validator.Clausewitz.Ck2.Ck2LocalizationManager.LocalizationPrevalidationTask.OnPrevalidation(Context c, Scope scope)
   at Audax.Validator.GameValidator.Validate(Action onEachValidatorCompleteAction)

The only error I was given was a localization error:

Code:
--- Error 1 of 1 ---
Localization error
At localisation\RulerDesigner.csv [Entry[67]\3] (68, 111):
Missing character after §: §RDiese Religion ist nicht spielbar§
 
Uhm, oh, I have a micro Mod which let CK2 CTD on start but the validator sees no error. Is this a bug or a feature? Can I help?

The Validator won't catch everything, unfortunately. But if you do manage to pinpoint the cause of the error, please tell me and I will try to add it to the list of checked things.

Have I done something wrong? I set the game path to 'C:\Program Files (x86)\Steam\steamapps\common\crusader kings ii' then selected Crusader Kings II on the right, validate all options and hit validate and all I got was this:

Code:
Beginning validation...

ec) EXCEPTION CONTEXT

dec) DEFAULT EXCEPTION CONTEXT



ERROR
System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at Audax.Validator.Clausewitz.Ck2.Ck2LocalizationManager.LocalizationEntry.ProcessSquiggly(String text, Int32& i)
   at Audax.Validator.Clausewitz.Ck2.Ck2LocalizationManager.LocalizationEntry.ProcessText(String text)
   at Audax.Validator.Clausewitz.Ck2.Ck2LocalizationManager.LocalizationEntry..ctor(ElementNode entryNode)
   at Audax.Validator.Clausewitz.Ck2.Ck2LocalizationManager.Initialize(ElementNode configNode, Scope scope)
   at Audax.Validator.Clausewitz.Ck2.Ck2LocalizationManager.LocalizationPrevalidationTask.OnPrevalidation(Context c, Scope scope)
   at Audax.Validator.GameValidator.Validate(Action onEachValidatorCompleteAction)

The only error I was given was a localization error:

Code:
--- Error 1 of 1 ---
Localization error
At localisation\RulerDesigner.csv [Entry[67]\3] (68, 111):
Missing character after §: §RDiese Religion ist nicht spielbar§

I can confirm that checking localization makes the Validator fail. It seems to work fine as long as localization checking is disabled.

Running through my mod with the Validator now. I'll edit this post with further feedback.

Sorry, that's a bug. I've fixed it for the next version so that it won't crash, but just report the errors. As an aside, does anyone know if Paradox cares about localization errors in the foreign languages? Because there's at least a hundred of them.
 
Jamie, report all localization errors in the bug forum. You could upload a log file from your validator assuming it keeps check of them all. I'm sure they will fix them for a future patch if they know which lines to correct.
 
Some things, mostly from 1.05, the Validator doesn't yet recognize:
From cb_types:

  • any_attacker
  • most_participating_attacker
  • any_defender
  • most_participating_defender
  • plot_target_title
  • grant_title
  • grant_title_no_opinion
  • usurp_title
  • remove_claim
  • participation_scaled_prestige
  • participation_scaled_piety
  • end_war = invalid
  • can_ask_to_join_war
  • holding_type
  • de_facto_liege
  • tier = FROM
  • tier = PREV
  • abdicate
  • abdicate_to_most_liked_by
  • prisoner = FROM
  • has_crown_law_title
  • check_de_jure_tier
  • any_realm_title
  • is_crusade
  • destroy_landed_title
  • occupy_minors_of_occupied_settlements
  • gain_all_occupied_titles
  • succession_w_cooldown
  • any_claim
  • is_claim_all
  • usurp_title_only
  • can_attack_vassals
  • abdicate_to
  • controls_religion
  • de_jure_liege_or_above

From the character files:

  • death_reason
  • killer

From the decision/law files:

  • Laws don't recognize modded-in groups ("empire_centralization" is not a valid <the standard group names>)
  • any_vassal
  • any_de_jure_vassal
  • set_investiture
  • set_allow_free_infidel_revokation
  • set_allow_title_revokation
  • set_protected_inheritance
  • set_the_kings_full_peace
  • set_the_kings_peace
  • set_appoint_generals
  • gender_succ
  • None of the succession laws seem to be recognized as valid
From the event files:

  • death_reason
  • reverse_culture
  • custom character modifiers aren't recognized, it instead seems to use a set list. I'd recommend firing an error if a modifier is never checked instead
  • add_province_modifier
  • remove_province_modifier
  • has_province_modifier
  • plot_target_title
  • grant_title
  • No succession laws are recognized as valid
  • culture = ROOT/PREV, and similar, when it is referring to a province rather than character. Probably applies to religion = ROOT as well.
From static_modifiers:

  • naval_organisation (does nothing, but valid)
  • naval_morale (does nothing, but valid)
From objectives:

  • promised_a_title
  • promised_a_marriage
  • realm_titles
  • a bunch of stuff in the plot_weaken_fellow_vassal plot (can't tell exactly what)
  • a bunch of stuff in the plot_kill_character plot (can't tell exactly what)
  • a bunch of stuff in the plot_gain_vassal_title plot (can't tell exactly what)
  • player_allow
  • realm_characters_plus
  • succession laws once again
  • vassal_titles
Religion and culture colors, probably due to them using 0 to 1 values rather than 0 to 255.

From techology:
  • SHORT_REIGN_LENGTH
  • RELIGION_FLEX
  • CULTURE_FLEX
  • ADD_PIETY_MODIFIER
  • ADD_PRESTIGE_MODIFIER
  • CHURCH_OPINION
  • TOWN_OPINION
  • CASTLE_OPINION
  • LOCAL_BUILD_TIME_MODIFIER
  • TEMPLE_TAX_MODIFIER
  • CITY_TAX_MODIFIER
  • CASTLE_TAX_MODIFIER
  • LAND_MORALE
  • SIEGE_DEFENCE
  • SIEGE_SPEED
  • KNIGHTS_OFFENSIVE
  • LIGHT_CAVALRY_OFFENSIVE
  • HEAVY_INFANTRY_OFFENSIVE
  • PIKEMEN_OFFENSIVE
  • HEAVY_INFANTRY_DEFENSIVE
  • KNIGHTS_DEFENSIVE
  • HORSE_ARCHERS_DEFENSIVE
  • ARCHERS_DEFENSIVE
  • LIGHT_CAVALRY_DEFENSIVE
  • ARCHERS_OFFENSIVE
  • HORSE_ARCHERS_OFFENSIVE
From landed_titles:

  • Crusade weights (E.G., muslim = 200). Not sure if hardcoded to muslim/orthodox/catholic/christian, or if any religion or religious group is allowed.
  • is_heresy_of shouldn't be limited to ROOT/PREV/similar; it should include all religions
  • dignity
  • strength_growth_per_century (mercenary-only attribute)
 
Last edited:
@Meneth: Thanks! I'll look at them later (so you can keep editing the same post if you wish), but a few clarifications.

(FYI, 1.05 moved many modifiers to a folder so the Validator can't find them, but it has been fixed for the next release)

1. The missing things you mention in CB types; are any of them exclusive to CB types i.e. you can't use them anywhere else?
2. Are the gender_succ values (cognatic, etc) hardcoded?
3. I allow add/remove province modifier inside province scopes. I guess if you do add/remove province modifier in a character scope, it will add the modifier to the province that the character is at?
4. The succession laws; are they hardcoded values as well?
5. Can you use commands like "set_the_kings_full_peace" anywhere, e.g. in event files?
 
@Meneth: Thanks! I'll look at them later (so you can keep editing the same post if you wish), but a few clarifications.

(FYI, 1.05 moved many modifiers to a folder so the Validator can't find them, but it has been fixed for the next release)

1. The missing things you mention in CB types; are any of them exclusive to CB types i.e. you can't use them anywhere else?
2. Are the gender_succ values (cognatic, etc) hardcoded?
3. I allow add/remove province modifier inside province scopes. I guess if you do add/remove province modifier in a character scope, it will add the modifier to the province that the character is at?
4. The succession laws; are they hardcoded values as well?
5. Can you use commands like "set_the_kings_full_peace" anywhere, e.g. in event files?
Will keep modifying it yeah, think I'm slowly approaching the end now.

1. Most of them are exclusive to wars, which can be checked in events and such. Some are commands that events should be able to call.
2 to 4. Yup
5. Haven't tested it, but almost everything in the decision files can be used elsewhere, so it probably isn't an exception.

Edit: I'm done scanning through my mod now, complete list is in the post above.
 
Last edited:
@Jamie550:

I've done similar work for EU3 (and for games from another company), but no more, because: my programs are Linux/Cygwin Windows and text and command-line based, and I've learned the hard way that Windows developers/modders generally won't make the extra effort to learn the needed (minimal) Linux/Unix skills to use my game file debugging/validation toolkits effectively, or at all.

Yours seem to fit the bill, however. :cool:

Any developer/modder who doesn't see the need for script and data file validation and

http://en.wikipedia.org/wiki/Automated_code_review

-- any such developer/modder is clueless, IMO.

You can lead a horse to water, but you can't make him drink. ;)

More power to you. Best of luck with your CK2 Validator!
 
Last edited:
* It doesn't understand holder_scope within a PREV-scope, it seems. (cb_types.txt)
* "PREV" is not a valid ThisTitle" it should be, however (cb_types.txt)
* Colors in cultures.txt and religion.txt still show up as errors.
* Graphical_unit_culture gives an error (cultures.txt)
* any_vassal in decisions gives an error. Pretty much everything that's valid for events should be valid in the decision files.
* Character and province modifiers (unless specified in the modifier files) show as errors. The event and objective systems lets one create arbitrary modifiers for scripting purposes without defining them outside the event/objective files.
* naval_morale and naval_organisation in static_modifiers.
* held_title_rating in objectives.txt
* mercenary = no isn't recognized as a valid condition (objectives.txt)

Much fewer issues than last time, even though there were a few small patches in-between :)
 
* It doesn't understand holder_scope within a PREV-scope, it seems. (cb_types.txt)
Can you post the exact error?
* "PREV" is not a valid ThisTitle" it should be, however (cb_types.txt)
Can you post the exact error?
* Colors in cultures.txt and religion.txt still show up as errors.
Is it because some of the numbers exceed 255? I was under the impression that colors ranged from 0 to 255.
* any_vassal in decisions gives an error. Pretty much everything that's valid for events should be valid in the decision files.
Can you post the exact error?
* Character and province modifiers (unless specified in the modifier files) show as errors. The event and objective systems lets one create arbitrary modifiers for scripting purposes without defining them outside the event/objective files.
I thought this was character/province flags? Or maybe you could post an example?
* held_title_rating in objectives.txt
Could you post the error?
* mercenary = no isn't recognized as a valid condition (objectives.txt)
Could you post the error?

I've fixed the issues that aren't quoted. Me asking for the error is sometimes because I stupidly messed up my copy of the files, sorry :eek:o
 
Can you post the exact error?
Can you post the exact error?

Is it because some of the numbers exceed 255? I was under the impression that colors ranged from 0 to 255.

Can you post the exact error?

I thought this was character/province flags? Or maybe you could post an example?

Could you post the error?

Could you post the error?

I've fixed the issues that aren't quoted. Me asking for the error is sometimes because I stupidly messed up my copy of the files, sorry :eek:o

Are there friends and rivals? I see any_friend, any_rival, random_friend, random_rival, num_of_friends and num_of_rivals but that's all. So I'm wondering if they actually exist or not.
1, 2, 4, 6, and 7:
rMOBP.png

Do you want the code as well?

3: No, the colors in religion and culture range from 0 to 1.

5: When looking at it again it seems Paradox simply made a mistake, so disregard that.

"Are there friends and rivals? I see any_friend, any_rival, random_friend, random_rival, num_of_friends and num_of_rivals but that's all. So I'm wondering if they actually exist or not. "
They were implemented in 1.05.
 
Hmm so 0-1. The thing is, it passes my validation happily. Do all of the color entries give you errors, or just a few of them?

RE holder_scope: The validator currently treats this as being in a character trigger, in which holder_scope wouldn't make sense. But that may be an issue with how it treats PREV. Could you tell me which scope the PREV points to (i.e. is it most_participating attacker, on_success_title, or which), so I can make sure it is actually pointing to it?

Same thing with usurp_title, can you tell me where PREV points?

It seems strange to use any_vassal within a title scope (why not do holder_scope={ any_vassal = {...} }) but I guess it works, so have added it.

I have added held_title_rating and mercenary.

Thank you for all your help :)
 
Hmm so 0-1. The thing is, it passes my validation happily. Do all of the color entries give you errors, or just a few of them?

RE holder_scope: The validator currently treats this as being in a character trigger, in which holder_scope wouldn't make sense. But that may be an issue with how it treats PREV. Could you tell me which scope the PREV points to (i.e. is it most_participating attacker, on_success_title, or which), so I can make sure it is actually pointing to it?

Same thing with usurp_title, can you tell me where PREV points?

It seems strange to use any_vassal within a title scope (why not do holder_scope={ any_vassal = {...} }) but I guess it works, so have added it.

I have added held_title_rating and mercenary.

Thank you for all your help :)
1) From what I can tell, all of them show up as errors (or at the very least most of them)

2) It's referring to on_success_title, so the PREV is a title-scope in this case. I guess the if might be confusing the validator?
3) Points to the same as above

4) The point of doing it within a title scope, is to limit it to vassals of that title only. For example, if you own both England and Scotland, you might want to check only the vassals of England for the purpose of changing English crown laws.
 
1) Can you post some of the color errors?

2) Okay. So we are currently in the most_participating attacker scope, so PREV will jump back to the on_success_title, because we ignore "if". Then I don't understand how the gain_settlements_under_title works, because PREVPREV seems strange. In there, we are currently in most_participating_attacker scope, and PREV brings us to the on_success_title, and then the second PREV; what does it do?

On another note, do you know what FROMFROM does in CB types? I currently only check FROM and basically allow any FROMFROM, FROMFROMFROM, etc, but hope to fix this in the near future.
 
1) Can you post some of the color errors?

2) Okay. So we are currently in the most_participating attacker scope, so PREV will jump back to the on_success_title, because we ignore "if". Then I don't understand how the gain_settlements_under_title works, because PREVPREV seems strange. In there, we are currently in most_participating_attacker scope, and PREV brings us to the on_success_title, and then the second PREV; what does it do?

On another note, do you know what FROMFROM does in CB types? I currently only check FROM and basically allow any FROMFROM, FROMFROMFROM, etc, but hope to fix this in the near future.
1)
duh9t.png

Relevant code: "color = { 0.4 0.4 0.3 }"

2) I guess gain_settlements_under_title counts as a scope for some reason. Either that, or Paradox made a mistake, or I simply can't figure it out.
3) There are no FROMFROMFROMs that I can find. FROMFROM however is the character the attacker is pushing the claim for. AFAIK it is only valid for CBs with the flag "push_claim = yes"
 
1)
duh9t.png

Relevant code: "color = { 0.4 0.4 0.3 }"

2) I guess gain_settlements_under_title counts as a scope for some reason. Either that, or Paradox made a mistake, or I simply can't figure it out.
3) There are no FROMFROMFROMs that I can find. FROMFROM however is the character the attacker is pushing the claim for. AFAIK it is only valid for CBs with the flag "push_claim = yes"

1) Oh how could I have been so stupid. Your locale uses commas for decimals so of course it gets confused by periods, since I stupidly didn't take care of that in this case. Fixed for next version.
2) Hmm, but IF definitely doesn't count as a scope. I'll fix that part then.
3) Thanks. Now how to get it to work...