• 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.
--- Error 1 of 1 ---
At <mod>\events\achievement_events.txt [character_event\trigger\start_date] (Line 2784, column 3):
Invalid node "start_date" in scope CharTrigger (value is: 1066.9.15)
start_date is a valid trigger (tested and works).
 
--- Error 1 of 1 ---
At <mod>\events\achievement_events.txt [character_event\trigger\republic_total_num_of_trade_posts] (Line 3783, column 3):
Invalid node "republic_total_num_of_trade_posts" in scope CharTrigger (value is: 80)
republic_total_num_of_trade_posts is a valid trigger (tested, recognized in game)

--- Error 1 of 1 ---
At <mod>\events\achievement_events.txt [character_event\trigger\score] (Line 3995, column 3):
Invalid node "score" in scope CharTrigger (value is: 100000)
score is a valid trigger (tested, recognized in game)
--- Error 1 of 1 ---
At <mod>\localisation\achievements.csv [Entry\1] (Line 133, column 15):
Localization error: Invalid bracket command: "GetFromRootCompliment" in "GetFromRootCompliment" in "To the [GetFromRootCompliment] [Root.GetTitledFirstName],\nCongratulations on your recent achievement.\n\nSincerely,\n[From.GetTitledFirstName] of [From.PrimaryTitle.GetName]"
GetFromRootCompliment is a valid bracket command (untested but used in vanilla, present in executable)
 
Last edited:
--- Error 1 of 1 ---
At <mod>\common\trade_routes\00_silk_route.txt [silk_road\path\1347] (Line 90, column 31):
"1347" is not a valid LandProvince.
Trade routes may pass through sea provinces.
 
I get an "Illegal closing bracket". However, I can't really locate the error myself. Is there a way for the Validator to actually show where exactly the illegal bracket is?
 
Last edited:
Use Notepad++'s bracket matching feature to find the mismatched bracket. (Choose a language that uses brackets, like C, or get the Ck2 language file from the thread linked in the tools megathread.)
 
  • 2
Reactions:
I'm getting an error on this event, but I have absolutely no idea what's wrong:

Code:
# Reincarnation: Toddler thinks of the past life
character_event = {
    id = RoI.10002
    desc = EVTDESC_RoI_10002
    picture = GFX_evt_reincarnation
    border = GFX_event_normal_frame_religion
  
    is_triggered_only = yes
  
    option = {
        name = EVTOPTA_RoI_10002
        hidden_tooltip = {
            FROM = {
                character_event = {
                    id = RoI.10003
                    days = 2
                }
            }
        }
    }
}

The error is: "Parse Failure. Token "picture" at line 210, column 2 must be an equals sign."
 
I'm getting an error on this event, but I have absolutely no idea what's wrong:

Code:
# Reincarnation: Toddler thinks of the past life
character_event = {
    id = RoI.10002
    desc = EVTDESC_RoI_10002
    picture = GFX_evt_reincarnation
    border = GFX_event_normal_frame_religion
 
    is_triggered_only = yes
 
    option = {
        name = EVTOPTA_RoI_10002
        hidden_tooltip = {
            FROM = {
                character_event = {
                    id = RoI.10003
                    days = 2
                }
            }
        }
    }
}

The error is: "Parse Failure. Token "picture" at line 210, column 2 must be an equals sign."

This one is usually the unbreakable space vs normal space thing, between "picture" and "=".
You can copy that character and replace it by normal space in all your files.
 
If you double-click on EVTDESC_RoI_10002 in notepad++, does it also select the preceding space? If so, you have to replace that pseudo-space with a real one.
 
In an event option, I'm limiting an option by limiting the employer scope, one event with ai = no and another with ai = yes. An example is below.
Code:
        trigger = {
            is_female = yes
            employer = {
                limit = { ai = no }
            }
        }

Validator doesn't like that I'm using the ai limiter within employer, giving the following error/warning (below is only one of them, the other option is generating the same thing):

Code:
--- Error 1 of 1 ---
At <mod>\events\DWRandom.txt [character_event\option\trigger\employer\limit] (Line 466, column 5):
Invalid node "limit" in scope CharTrigger (value is: <a complex type>)

I thought to use limit within employer after reading the Scopes modding page on the CK2 wiki. I've tested it in the game, and it appears to work exactly as I want it to work, with the player only seeing one option, and the ai = yes option appears to be working as well, as I'm not seeing it and it's processing (I tested by having it add an event_modifier from the ai = yes path).

So, I'm bringing it up as from my understanding is this is the kind of thing desired to be raised for correction. If not, and I'm misunderstanding, I apologize.

Also - thanks for the work put into the Valdiator, it helps so much with modding, that I've far exceeded what I ever intended to do with CK2 modding.
 
You don't use limit inside a trigger, you should just be using trigger = { ... employer = { ai = no } }
 
You don't use limit inside a trigger, you should just be using trigger = { ... employer = { ai = no } }

Interesting. The Scopes modding page has two examples where it shows limit being used within it. I did what you mention though and it still works, which is awesome and I learned something new. I appreciate the quick response and your educating me further.
 
Excuse me, but I just checked the Scopes page, and I see no such examples. The section on limit on that page specifically says it can be used in a command block (i.e., immediate or option) and mentions nothing of triggers. Moreover, the role of limit in a command block is to limit multi-variant scopes (any_*, random_*), not things like liege, host, employer which scope to only one character.
 
Could you add a check that, if an event specifies a border, that it is the right border for the event type?
  • Province and character events use GFX_event_normal_frame_*
  • Narrative events use GFX_event_narrative_frame_*
  • Letter events use GFX_event_letter_frame_*
  • Long character events use GFX_event_long_frame_*
where * represents one of: war, diplomacy, intrigue, religion or economy.

I think these are just entries in the "interface" folder so a modder could basically do whatever they want with the frames?
 
I think these are just entries in the "interface" folder so a modder could basically do whatever they want with the frames?
The thing is, if you don't use the right style frame for the event type, the border won't fit right. The entries in the interface folder point to actual graphical objects in the gfx folder, which are matched to the corresponding event window objects. I'm not at a computer that can run CK2 at the moment, so I can't show the problems it causes.
 
The thing is, if you don't use the right style frame for the event type, the border won't fit right. The entries in the interface folder point to actual graphical objects in the gfx folder, which are matched to the corresponding event window objects. I'm not at a computer that can run CK2 at the moment, so I can't show the problems it causes.
But I mean that someone could make a GFX_my_cool_narrative_event_border right? Then the Validator's complaining for no reason because it can't check that a certain border is actually sized correctly. Probably someone in the ValidatorSettings file could list the appropriate borders for each event type but this seems like (almost) no one would actually bother to do that.
 
Then screw him if he can't follow established naming conventions and call it GFX_event_narrative_frame_cool. It's a feature that I would find very useful, as I have changed numerous character events to narrative events without remembering to check borders. Make it turned off unless enabled in ValidatorSettings if you must, but please include it.
 
--- Error 1 of 1 ---
At <mod>\events\achievement_events.txt [narrative_event] (Line 47, column 1):
The event is set to be triggered only, but it is never called.
The event is called in the preceding unit_event:
Code:
# Viking Raider
unit_event = {
   id = 700
   hide_window = yes
   
   ai = no
   
   is_triggered_only = yes
   
   trigger = {
     has_dlc = "Charlemagne"
     FROM = {
       culture_group = north_germanic
       OR = {
         religion = norse_pagan
         religion = norse_pagan_reformed
       }
     }
     loot = 1000
   }
   
   immediate = {
     FROM = {
       if = {
         limit = {
           NOT = { has_global_flag = achievement_viking_raider }
         }
         set_global_flag = achievement_viking_raider
         chronicle = {
           entry = CHRONICLE_ACHIEVEMENT_VIKING_RAIDER
           portrait = [From.GetID]
           picture = GFX_evt_viking_arriving_oldgods
         }
         narrative_event = {
           id = chronicled_achievements.1
         }
       }
     }
   }
}

narrative_event = {
   id = chronicled_achievements.1
 
--- Error 1 of 1 ---
At <mod>\decisions\HL_decisions.txt [decisions\become_genghis_khan\effect\if\population] (Line 245, column 5):
Invalid node "population" in scope CharIfClause (value is: 50000)
Not yet handled. "population" is only used in a character scope, both as a trigger and an effect.
--- Error 1 of 1 ---
At <mod>\decisions\settlement_decisions.txt [settlement_decisions\pillage_settlement\allow\FROM\custom_tooltip\hidden_tooltip\top_liege\PREVPREV\holder_scope] (Line 305, column 9):
Invalid node "holder_scope" in scope CharTrigger (value is: <a complex type>)
Is Validator counting custom_tooltip or hidden_tooltip as a scope change? Because I make PREVPREV to point to the allow starting scope (a title scope, since it's a settlement_decision).
--- Error 1 of 1 ---
At <mod>\decisions\trade_post_decisions.txt [trade_post_decisions\abandon_trade_post\from_potential] (Line 17, column 3):
Invalid node "from_potential" in scope DecisionDef (value is: <a complex type>)
from_potential is valid in trade_post_decisions.
--- Error 1 of 2 ---
At <mod>\common\laws\succession_laws.txt [succession_laws\succ_patrician_elective\potential\OR\holder_scope\succ_law_title] (Line 1151, column 6):
Invalid node "succ_law_title" in scope CharTrigger (value is: <a complex type>)
--- Error 2 of 2 ---
At <mod>\common\laws\succession_laws.txt [succession_laws\succ_seniority\allow\OR\holder_scope\OR\NOR\succ_law_title] (Line 160, column 8):
Invalid node "succ_law_title" in scope CharTrigger (value is: <a complex type>)
succ_law_title changes scope from character to title.