• 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.
False positive:

Code:
--- Error 1 of 1 ---
At <mod>\common\scripted_effects\00_scripted_effects.txt [increase_depopulation_effect\if\random_list\20\modifier\location] (Line 2061, column 6):
Invalid node "location" in scope ProvRandomListModifier (value is: <a complex type>)
* called from common\disease\00_disease.txt [typhoid_fever\yearly_province_pulse\random_list\8\increase_depopulation_effect] (Line 295, column 5)

yearly_province_pulse is probably a province scope.

Code:
--- Error 1 of 1 ---
At <mod>\decisions\ACR_society_decisions.txt [targeted_decisions\the_sand_snakes_recruit\ai_will_do\modifier\is_interested_in_any_society] (Line 385, column 5):
Invalid node "is_interested_in_any_society" in scope AiWillDoModifier (value is: yes)

New CharScope condition, takes a bool.
 
Last edited:
Also, new CharScope command set_secret_religion and scope religion_scope (usable from characters, provinces, and societies that have religions associated to them).

New CharScope condition has_secret_religion, takes a bool on the RHS.

For some reason, secret_religious_cult refers to the secret religious societies (instead of secret_religious_society, which would make a lot more sense). I don't know where this comes from, the string isn't found in the society template definition. There are 40 references to secret_religious_cult in the decisions file for them, so it must work.

religion and religion_group can now take a complex type in the RHS.

Code:
religion = { target_type = secret target = FROM }

target_type can be secret, public, or true.

New CharScope effect, convert_to_secret_religion. Takes a bool.
New CharScope effect, clear_secret_religion. Takes a bool.
New CharScope condition, has_secret_society. Takes a bool.
is_holy_site can take a religion on the RHS.

demesne and self are new filter and ai_filter options for decisions.
 
Last edited:
Super sorry for reporting so many things at once :(
I'm trying to get Ancient Religions up and running for 2.7.1 and I'm running into thousands of errors related to new functionality so I wanna make sure you are aware of them sooner rather than later.

Code:
--- Error 1 of 1 ---
At <mod>\events\mnm_secret_religious_societies_events.txt [character_event\option\trigger_switch\catholic] (Line 8275, column 4):
Invalid node "catholic" (value is: <a complex type>)

Seems to be having issues with trigger_switch ? Maybe religion is a new on_trigger option in 2.7?

Also, true_religion and true_religion_group are new conditions. They can take a religion on the right, or anything that can have a religion. I believe this even includes templated societies, but I'm not certain.
 
I'm having quite a bit of trouble with a scripted effect that I'm using for debugging. For instance, code such as this...
Code:
    if = { limit = { ROOT = { always = yes } } log = "Root: [Root.GetName][Root.GetBestName] ([Root.GetMaleFemale],[Root.GetAgeYears],[Root.GetID],[Root.Location.GetIName],[Root.PrimaryTitle.GetName])" }
    if = { limit = { FROM = { always = yes } } log = "From: [From.GetName][From.GetBestName] ([From.GetMaleFemale],[From.GetAgeYears],[From.GetID],[From.Location.GetIName],[From.PrimaryTitle.GetName])" }
    if = { limit = { new_character = { always = yes } }   log = "new_character: [new_character.GetName][new_character.GetBestName] ([new_character.GetMaleFemale],[new_character.GetAgeYears],[new_character.GetID],[new_character.Location.GetIName],[new_character.PrimaryTitle.GetName])" }
...etc.
...fills up the Validator output with thousands of:
Code:
--- Error 7132 of 8376 ---
At <mod>\common\scripted_effects\00_scripted_effects.txt [print_scope_effect\if\limit\FROM] (Line 6975, column 19):
No direct match found for FROM (is the casing correct?). However, other possible matches in scope CharTrigger were found.
Left: [ThisChar] Right: [CharTrigger] cannot be correct because of left: FROM points to <null>.
However, a Char was expected.

I know that they're not always valid. Which is precisely why I'm using an always = yes check to only log the valid scopes. I don't suppose there's any alternative besides trying to remember to comment out that effect whenever I run the Validator?
 
False positive:

Code:
--- Error 1 of 1 ---
At <mod>\common\scripted_effects\00_scripted_effects.txt [increase_depopulation_effect\if\random_list\20\modifier\location] (Line 2061, column 6):
Invalid node "location" in scope ProvRandomListModifier (value is: <a complex type>)
* called from common\disease\00_disease.txt [typhoid_fever\yearly_province_pulse\random_list\8\increase_depopulation_effect] (Line 295, column 5)

yearly_province_pulse is probably a province scope..
If it is already a province scope why does it need a location={} scope change?

Code:
--- Error 1 of 1 ---
At <mod>\events\mnm_secret_religious_societies_events.txt [character_event\option\trigger_switch\catholic] (Line 8275, column 4):
Invalid node "catholic" (value is: <a complex type>)

Seems to be having issues with trigger_switch ? Maybe religion is a new on_trigger option in 2.7?
Unaware of any issues with on_trigger, can you link mod that shows this?

I'm having quite a bit of trouble with a scripted effect that I'm using for debugging. For instance, code such as this...
Code:
    if = { limit = { ROOT = { always = yes } } log = "Root: [Root.GetName][Root.GetBestName] ([Root.GetMaleFemale],[Root.GetAgeYears],[Root.GetID],[Root.Location.GetIName],[Root.PrimaryTitle.GetName])" }
    if = { limit = { FROM = { always = yes } } log = "From: [From.GetName][From.GetBestName] ([From.GetMaleFemale],[From.GetAgeYears],[From.GetID],[From.Location.GetIName],[From.PrimaryTitle.GetName])" }
    if = { limit = { new_character = { always = yes } }   log = "new_character: [new_character.GetName][new_character.GetBestName] ([new_character.GetMaleFemale],[new_character.GetAgeYears],[new_character.GetID],[new_character.Location.GetIName],[new_character.PrimaryTitle.GetName])" }
...etc.
...fills up the Validator output with thousands of:
Code:
--- Error 7132 of 8376 ---
At <mod>\common\scripted_effects\00_scripted_effects.txt [print_scope_effect\if\limit\FROM] (Line 6975, column 19):
No direct match found for FROM (is the casing correct?). However, other possible matches in scope CharTrigger were found.
Left: [ThisChar] Right: [CharTrigger] cannot be correct because of left: FROM points to <null>.
However, a Char was expected.

I know that they're not always valid. Which is precisely why I'm using an always = yes check to only log the valid scopes. I don't suppose there's any alternative besides trying to remember to comment out that effect whenever I run the Validator?

Not sure if it will work, but check Information/DidYouKnow.pdf and check "Ignore Errors on a case-by-case basis"
 
If it is already a province scope why does it need a location={} scope change?

I don't know, it's vanilla code.

Unaware of any issues with on_trigger, can you link mod that shows this?

It's vanilla, you can find it here: mnm_secret_religious_societies_events.txt:7881, the event id is MNM.3890
Also, turns out it's triggering on secret_religion, which was probably the problem.
 
Nice. That cut down my error list to 550, plus using the 'ignore errors' code worked for my debug effect. (My mistake was that I tried using Ignore_ALL when I should've used Ignore_NEXT. Thought that the errors I was seeing were on the error list, but evidently not.)

This still seems like false positive:
Code:
--- Error 1 of 1 ---
At <mod>\events\ze_various_events.txt [character_event\option\FROM\new_title] (Line 1136, column 4):
Invalid node "new_title" in scope CharCommand (value is: <a complex type>)
Used after create_title, should be valid.

And more:
Code:
--- Error 1 of 1 ---
At <mod>\events\adventures_the_old_gods.txt [character_event\immediate\if\limit\OR\event_target:adventure_home_province\is_island] (Line 4287, column 47):
Invalid node "is_island" in scope ProvTrigger (value is: yes)
Valid conditional, although rarely used. Boolean, it simply checks if the province is in island_region.txt.

Code:
--- Error 1 of 1 ---
At <mod>\decisions\rip_various_decisions.txt [decisions\shut_the_gates\allow\OR\custom_tooltip\hidden_tooltip\OR\capital_scope\has_epidemic] (Line 1018, column 26):
Invalid node "has_epidemic" in scope ProvTrigger (value is: yes)
This works even though the wiki claims otherwise. Here's a decision tooltip of this allow:
Code:
           capital_scope = {
               has_epidemic = yes
           }
           location = {
               has_epidemic = yes
           }
falsepositive.png

(The character is count of Leon, but he's currently elsewhere to raise troops . His capital has an epidemic, but not the current location. Everything checks out.)
sWezigU
 
Last edited:
More false positives:
Code:
--- Error 1 of 1 ---
At <mod>\events\mnm_grand_debate_events.txt [character_event\immediate\change_variable] (Line 345, column 3):
At most 2 instance(s) of a "which" entry are allowed, but there are 3 instances.
This is valid usage now:
Code:
       change_variable = {
           which = debate_score
           which = debate_learning
           which = ROOT
       }
It adds ROOT's debate_learning to current scope's debate_score. Hasn't been documented, but works. For more info, there's https://forum.paradoxplaza.com/foru...nted-new-cool-feature-with-variables.1003568/
 
Am I missing something here, or is this a false positive?:
Code:
--- Error 1 of 1 ---
At <mod>\decisions\conversion_decisions.txt [decisions\convert_to_attacker_religion\ai_will_do\modifier\any_war\attacker\OR\using_cb] (Line 334, column 8):
Invalid node "using_cb" in scope SideTrigger (value is: crusade)

Actual code:
Code:
           any_war = {
               defender = { character = ROOT }
               attacker = {
                   NOT = { religion = ROOT }
                   religion_authority = 0.5
                   OR = {
                       NOT = { religion_group = pagan_group }
                       is_reformed_religion = yes
                   }
               }
               OR = {
                   using_cb = crusade
                   using_cb = holy_war
               }
           }
Validator output says that those using_cb's are within the attacker scope, but as far as I can see they're after it, within any_war. Which is proper scope.

---

Also, I'm getting a crash when clicking on some of the errors, such as this:
Code:
--- Error 1 of 1 ---
At <mod>\events\hl_raiding_adventurers_events.txt [character_event\immediate\liege\capital_scope\ROOT\create_title\base_title] (Line 355, column 7):
"THIS" is not a valid ThisTitle.
THIS points to <CharCommand>, not Title.
Additional information: THIS points to <CharCommand>, not Title.
Code:
App: A FATAL ERROR HAS OCCURRED
Time: 9.5.2017 20:47:48
Validator Version: 1.21.0 [1.21.0.0]
System.NullReferenceException: Object reference not set to an instance of an object.
   at Audax.Validator.ContextValidatorSystem.ThisFromConstraint.KeyMatchesScope(ContextValidator scope)
   at Audax.Validator.ContextValidatorSystem.ThisFromConstraint.StringValidateWeak(ElementNode node, String value)
   at Audax.Validator.ContextValidatorSystem.ThisFromConstraint.StringValidate(ElementNode node, String value, Boolean onNode)
   at Audax.Validator.TypeCore.StringJudgeConstraint.ElementValidate(ElementNode node)
   at Audax.Validator.Internal.TypeMismatchErrorDialog.RecalculateError()
   at Audax.Validator.Internal.TypeMismatchErrorDialog..ctor(Context c, TypeMismatchError error, ErrorQueue queue)
   at Audax.Validator.Internal.TypeMismatchError.ShowDetails(ErrorQueue queue)
   at Audax.Validator.MainWindow.ErrorDoubleClick(Object sender, MouseButtonEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.Controls.Control.HandleDoubleClick(Object sender, MouseButtonEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   at System.Windows.UIElement.OnMouseDownThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
 
Last edited:
False positive with on_action event

On_action of my event
Code:
# From = Attacker, Root = Defender
on_war_ended_victory = {
    events = {
        REC.1522
    }
}

# From = Attacker, Root = Defender
on_war_ended_whitepeace = {
    events = {
        REC.1522
    }
}

# From = Attacker, Root = Defender
on_war_ended_defeat = {
    events = {
        REC.1522
    }
}

# From = Attacker, Root = Defender
on_war_ended_invalid = {
    events = {
        REC.1522
    }
}

My event
Code:
character_event = {
    id = REC.1522
    
    hide_window = yes
    
    is_triggered_only = yes
    
    immediate = {
        if = {
            limit = { trait = batisseur_cathedrale }
            character_event = { id = REC.1523 days = 30}
        }
        From = {
            if = {
                limit = { trait = batisseur_cathedrale }
                character_event = { id = REC.1523 days = 30}
            }
        }
    }
}

The 2 errors of the Validator which doesn't like my From
Code:
--- Error 1 of 1 ---
At <mod>\events\ReC_flavour_events.txt [character_event\immediate\From] (Line 1222, column 3):
No direct match found for From (is the casing correct?). However, other possible matches in scope CharCommand were found.
Left: [ThisChar] Right: [CharCommand] cannot be correct because of left: From points to <null>.
However, a Char was expected.
This scope was inferred to have scope Char, but the call at <mod>\common\on_actions\L3T_on_actions.txt [on_war_ended_invalid\events\REC.1522] (Line 87, column 3) is of scope <null>.
Left: [ThisProv] Right: [ProvCommand] cannot be correct because of left: From points to <null>.
However, a Prov was expected.
This scope was inferred to have scope Char, but the call at <mod>\common\on_actions\L3T_on_actions.txt [on_war_ended_invalid\events\REC.1522] (Line 87, column 3) is of scope <null>.
Left: [ThisTitle] Right: [TitleCommand] cannot be correct because of left: From points to <null>.
However, a Title was expected.
This scope was inferred to have scope Char, but the call at <mod>\common\on_actions\L3T_on_actions.txt [on_war_ended_invalid\events\REC.1522] (Line 87, column 3) is of scope <null>.
Left: [ThisWar] Right: [WarCommand] cannot be correct because of left: From points to <null>.
However, a War was expected.
This scope was inferred to have scope Char, but the call at <mod>\common\on_actions\L3T_on_actions.txt [on_war_ended_invalid\events\REC.1522] (Line 87, column 3) is of scope <null>.
Left: [ThisArtifact] Right: [ArtifactCommand] cannot be correct because of left: From points to <null>.
However, a Artifact was expected.
This scope was inferred to have scope Char, but the call at <mod>\common\on_actions\L3T_on_actions.txt [on_war_ended_invalid\events\REC.1522] (Line 87, column 3) is of scope <null>.
Left: [ThisSociety] Right: [SocietyCommand] cannot be correct because of left: From points to <null>.
However, a Society was expected.
This scope was inferred to have scope Char, but the call at <mod>\common\on_actions\L3T_on_actions.txt [on_war_ended_invalid\events\REC.1522] (Line 87, column 3) is of scope <null>.

Code:
--- Error 1 of 1 ---
At <mod>\events\ReC_flavour_events.txt [character_event\immediate\From] (Line 1222, column 3):
Invalid use of 'From': This scope was inferred to have scope Char, but the call at <mod>\common\on_actions\L3T_on_actions.txt [on_war_ended_invalid\events\REC.1522] (Line 87, column 3) is of scope <null>.
 
I don't know, it's vanilla code.
Leaving alone for now since it does seem strange.

It's vanilla, you can find it here: mnm_secret_religious_societies_events.txt:7881, the event id is MNM.3890
Also, turns out it's triggering on secret_religion, which was probably the problem.
Do not observe the error so it does indeed seem like it was because it was secret_religion.

Am I missing something here, or is this a false positive?:
Can you post a link to the mod/etc? I can't seem to reproduce this.

Also, I'm getting a crash when clicking on some of the errors, such as this:

Does it always happen with certain errors? Are you clicking them while validation is still happening or after it's done?
 
Can you post a link to the mod/etc? I can't seem to reproduce this.
Ack. My bad, not a false positive. I was looking at the wrong block.

Does it always happen with certain errors? Are you clicking them while validation is still happening or after it's done?
That's the only one I've seen crash consistently.
Both during and after validation, in 1.12.1 too.

I already changed the code, but managed to revert it to the version that crashes:
Code:
           capital_scope = {
               save_event_target_as = target_province
               ROOT = {
                   set_defacto_liege = THIS
                   create_title = { #Add primary_title?
                       tier = DUKE
                       landless = yes
                       adventurer = yes
                       temporary = yes
                       culture = ROOT
                       name = "CLAIMANT_ADVENTURE"
                       holder = ROOT
                       base_title = THIS #PREV?
                   }
                   log = "DEBUG: TITLE25"
                   title_debug = yes
--- Error 1 of 1 ---
At <mod>\events\hl_raiding_adventurers_events.txt [character_event\immediate\liege\capital_scope\ROOT\create_title\base_title] (Line 355, column 7):
"THIS" is not a valid ThisTitle.
THIS points to <CharCommand>, not Title.
Additional information: THIS points to <CharCommand>, not Title.


I mean, that is pretty broken, yes. I had been trying to fix it for so long that I started experimenting with alternate solutions. I still don't know for sure if THIS works within create_title.

...this version doesn't crash:
Code:
           capital_scope = {
               save_event_target_as = target_province
               ROOT = {
                   primary_title = {
                       set_defacto_liege = THIS
                       create_title = { #Add primary_title?
                           tier = DUKE
                           landless = yes
                           adventurer = yes
                           temporary = yes
                           culture = ROOT
                           name = "CLAIMANT_ADVENTURE"
                           holder = ROOT
                           base_title = PREV #PREV?
                       }
                   }
                   log = "DEBUG: TITLE25"
                   title_debug = yes
(Added primary_title scope, changed base_title to PREV. Still broken, though. Urgh.)
 
Last edited:
I'm confused why this thread wasn't stickied like 3 years ago. It's probably in the top three most important modding resources available.
It's sometimes difficult to find the thread when there hasn't been activity in a week or so.
Well, the Validator has it's own page on the wiki, which references this thread.
 
Is it possible to remove the notification "Char IDs 10 digits or longer can cause problems" anywhere in the files with relative ease? I got the message the first 1000 times, and I get it, but we are assigned IDs based on 10 digits for our mods that aren't overhauls.