• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.
Showing developer posts only. Show all posts in this thread.
Assuming you're using Notepad++, you could make a custom language which would highlight whatever you wanted to.

I was kidding. It's just a habit to write them in caps, it doesn't actually offer any real advantages.
 
I wish people would also use brackets, spacing and new lines appropriately
having =
{
a
}
file = {
that
reads
like
}
this =
{
is
annoying }

when you could just = { put one thing }
AND = {
then have = { something else }
}

But! that's not a bug, just personal preference :ninja:

FROM is valid for use in minor_titles btw


*edit* Nvm it wasn't minor_titles that was giving that error, not sure where it was now, so disregard I guess.
Problem is that even Paradox doesn't have any standardization for this.
Personally I have a few simple rules:
The first bracket always goes on the same line as the scope. E.G.,
Code:
ROOT = {
    NOT = { religion_group = pagan_group }
}

  • Always put a space between everything, except brackets.

  • If there's only a single condition and scope, put everything on the same line. E.G., FROM = { trait = paranoid }

  • A final NOT doesn't count as anything for most purposes. E.G., FROM = { NOT = { trait = paranoid }

  • Everything else should be separated by line and indented per scope. E.G.:
Code:
can_use = {
    ROOT = {
        NOT = { religion_group = pagan_group }
        NOT = {
            AND = {
                OR = {
                    AND = {
                        religion = orthodox
                        culture = ethiopian
                    }
                    religion = monophysite
                    religion_group = muslim
                }
                FROM = { 
                    OR = {
                        AND = {
                            religion = orthodox
                            culture = ethiopian
                        }
                        religion = monophysite
                        religion_group = muslim 
                    }
                }
            }
        }
    }
}
 
It's false positives time with Wiz again!

--- Error 1 of 1 ---
At <mod>\events\job_lord_spiritual.txt [character_event[1]\option\location] (349, 3):
Invalid node "religion_authority" in scope ProvCommand (value is: -0.001)

Tested as working fine in province scope, targets the province religion.

--- Error 1 of 1 ---
At <mod>\events\province_prosperity_events.txt [province_event[9]\trigger] (757, 2):
Invalid node "has_siege" in scope ProvTrigger (value is: yes)

Tested as working fine.
 
value = is correct as far as I know. I've never tested if opinion = works though.
 
That's not the entire can_use section, no. Here's the full can_use section in Balansegang:
Code:
can_use = {
    ROOT = {
        NOT = { religion_group = pagan_group }
        NOT = {
            AND = {
                OR = {
                    AND = {
                        religion = orthodox
                        culture = ethiopian
                    }
                    religion = monophysite
                    religion_group = muslim
                }
                FROM = { 
                    OR = {
                        AND = {
                            religion = orthodox
                            culture = ethiopian
                        }
                        religion = monophysite
                        religion_group = muslim 
                    }
                }
            }
        }
        NOT = { same_realm = FROM }
        OR = {
            NOT = { religion_group = FROM }
            is_heresy_of = FROM
            is_parent_religion = FROM
        }
        top_liege = {
            religion = PREV
        }
        NOT = { has_law = empire_centralization_0 }
        OR = {
            any_realm_province = {
                any_neighbor_province = {
                    owner = {
                        top_liege = {
                            character = FROM
                        }
                    }
                }
            }
            AND = {
                NOT = { has_law = centralization_0 }
                NOT = { has_law = empire_centralization_1 }
            }
        }
        NOT = {
            AND = {
                has_law = empire_centralization_1
                any_vassal = {
                    OR = {
                        primary_title = { tier = KING }
                        primary_title = { tier = DUKE }
                    }
                    NOT = { opinion = { who = ROOT value = -10 }}
                    prisoner = no
                }
            }
        }
        NOT = {
            AND = {
                has_law = centralization_0
                any_vassal = {
                    primary_title = { tier = DUKE }
                    NOT = { opinion = { who = ROOT value = -10 }}
                    prisoner = no
                }
            }
        }
        NOT = {
            AND = {
                FROM = { religion_group = pagan_group }
                has_law = centralization_1
                any_vassal = {
                    primary_title = { tier = DUKE }
                    NOT = { opinion = { who = ROOT value = -10 }}
                    prisoner = no
                }
            }
        }
        NOT = {
            AND = {
                has_law = centralization_0
                FROM = { religion_group = pagan_group }
            }
        }
        OR = {
            NOT = { trait = content }
            trait = brave
            trait = wroth
            trait = zealous
            trait = lunatic
            trait = possessed
        }
        OR = {
            NOT = { trait = craven }
            trait = wroth
            trait = ambitious
            trait = zealous
            trait = lunatic
            trait = possessed
        }
        OR = {
            NOT = { trait = cynical }
            trait = wroth
            trait = ambitious
            trait = brave
            trait = lunatic
            trait = possessed
        }
        OR = {
            NOT = { trait = stressed }
            trait = wroth
            trait = ambitious
            trait = brave
            trait = lunatic
            trait = possessed
            trait = zealous
        }
        OR = {
            trait = lunatic
            trait = possessed
            AND = {
                NOT = { trait = depressed }
                NOT = { trait = infirm }
                NOT = { trait = incapable }
                NOT = {
                    OR = {
                        AND = {
                            trait = content
                            OR = {
                                trait = craven
                                trait = cynical
                                trait = stressed
                            }
                        }
                        AND = {
                            trait = craven
                            OR = {
                                trait = cynical
                                trait = stressed
                            }
                        }
                        AND = {
                            trait = stressed
                            trait = cynical
                        }
                    }
                }
            }
        }
        piety = 100
    }
}
This isn't really relevant to this thread though. Which reminds me of an idea I've had for a while now: A CKII modding IRC channel where we could discuss CKII in general, and modding in particular. If anyone's interested I'll create one.
 
False positive:
--- Error 1 of 1 ---
At <mod>\events\province_prosperity_events.txt [province_event[8]\mean_time_to_happen\modifier[9]\owner] (800, 4):
Invalid node "realm_learning" in scope CharTrigger (value is: 40)

realm_learning is tested as working (all the realm_stat checks do).
 
BTW, you might want to update the OP. It says that the Validator only checks dynasty, history and localisation but it checks a lot more than that now.
 
The lesson being to not use Norton ;)
Norton has never been particularly good. I'd recommend using Microsoft Security Essentials instead; it is free as long as you have a legal copy of Windows.
 
It's false positives time again (the best time).

--- Error 1 of 1 ---
At <mod>\decisions\loan_decisions.txt [decisions\ai_take_loan\allow] (Line 103, Column 3):
Invalid node "monthly_income" in scope DecisionTrigger (value is: 1)

monthly_income tested as working fine.

--- Error 1 of 1 ---
At <mod>\events\province_prosperity_events.txt [province_event[5]\trigger\OR\owner\ROOT] (Line 449, Column 5):
Invalid node "controller" in scope ProvTrigger (value is: <a complex type>)

controller tested as working fine (targets controller of capital barony).

--- Error 1 of 1 ---
At <mod>\common\technology.txt [TECH_GROUP_MILITARY\TECH_CASTLES\5\modifier] (Line 232, Column 4):
Invalid node "SUPPLY_LIMIT" in scope JunkModifiers (value is: 10)

Tested as working fine, you appear to be able to put any province effects in tech.
 
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.
 
A few false-positives:
tech_growth_modifier_economy, _culture, and_military are all valid from building scope:
At <mod>\common\buildings.txt [temple\tp_town_5] (Line 4290, Column 2):
Invalid node "tech_growth_modifier_economy" in scope BuildingDef (value is: 0.02)
 
False positive:

--- Error 1 of 1 ---
At <mod>\decisions\loan_decisions.txt [decisions\ai_take_loan\potential] (Line 266, Column 3):
Invalid node "difficulty" in scope DecisionTrigger (value is: 2)

difficulty = 0-4 is a valid condition.
 
1.0 Release Candidate 10 is available: Download here

This version is somewhat compatible with 1.06, but there are also some potential false positives that I'm not sure about. So please tell me about any issues that there are.


You can tweak a number of validation settings by copying a text file from the SettingsFiles folder into the game directory or mod directory, and naming it ValidatorSettings.txt. Then just open it and modify. This is where many of the former settings got moved to.

Also, comment ignore is here! Simply put
Code:
# Audax Validator "." Ignore_XXXX
in front of the node causing the error that you want to ignore. XXXX is an error code, found in Information/errorCodes.txt. So far only a few errors are supported, so tell me which ones you really want to be able to ignore. For more information, see DidYouKnow.pdf, in the dowload.
Have you accounted for the exporting of various common files done in 1.06?
 
Is there a quick way to turn off the localisation checking? It's virtually impossible to detect actual errors among all the "not found in localisation" spam.
 
Validator breaks for me upon validating, saying it can't parse my mod-file. My mod-file
Code:
name = "Balansegang" # name of your mod, shown in launcher
archive = "mod/balansegang" # location of your mod files 
replace_path = "history\provinces" # optional. if you want to repalce a path instead of just extend the files already in the base game (liek if you want to have completely new technologies)
user_dir = "Balansegang" # optional. creates a sub directory where settings/map cache/savegames etc can be safely written for your mod and not get mixed up
The error message:
--- Error 1 of 1 ---
Parse Failure
Path: <appdir>\E:\Crusader Kings II backup\mod\balansegang.mod
Error: Corrupt mod file: E:\Crusader Kings II backup\mod\balansegang.mod [The element with name path was not found.]