• 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.

VorpalNeko

First Lieutenant
4 Badges
Jul 20, 2012
281
20
  • Crusader Kings II
  • Europa Universalis IV
  • 500k Club
  • Europa Universalis IV: Pre-order
Thanks for the idea. Perhaps a flag, since one can't remove variables.
A false positive: owned_by is a valid condition that works in province scope. (Unsure if works in other scopes. Doesn't work for titles, but other conditions work for that.)
Code:
namespace = testz
character_event = {
    id = testz.1
    hide_window = yes
 
    is_triggered_only = yes
 
    immediate = {
        any_province = {
            limit = { owned_by = ROOT }
            log = "T001: [This.GetID] [This.GetName] owned by [Prev.GetID] [Prev.GetTitledName]"
        }
    }
}
This conditions seems to be missing from the wiki and is not used in vanilla. Super-secret undocumented opcode, lol?
 
Last edited:

zijistark

HIP Lead
58 Badges
Jan 29, 2013
5.118
3.074
zijistark.com
  • Crusader Kings II
  • Stellaris: Apocalypse
  • Knights of Honor
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Pre-order
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Semper Fi
  • Victoria: Revolutions
  • Europa Universalis IV: Res Publica
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • For the Motherland
  • Crusader Kings II: The Old Gods
  • Cities in Motion
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Europa Universalis IV: Wealth of Nations
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Europa Universalis III: Chronicles
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV: Rights of Man
  • Victoria 2
  • Stellaris: Humanoids Species Pack
  • Hearts of Iron IV: Expansion Pass
  • Crusader Kings III
  • Stellaris: Synthetic Dawn
  • Hearts of Iron IV: Death or Dishonor
  • 500k Club
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV
  • Crusader Kings II: Monks and Mystics
  • Hearts of Iron IV: Together for Victory
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Cadet
  • Stellaris Sign-up
  • Hearts of Iron IV Sign-up
  • Stellaris
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
False positive:

Code:
--- Error 1 of 1 ---
At <mod>\decisions\00_emf_customize_decisions.txt [decisions\emf_customize_vanilla_crusades\potential\OR\is_multiplayer_host_character] (Line 258, column 5):
Invalid node "is_multiplayer_host_character" in scope CharTrigger (value is: yes)

This simple yes/no character trigger was added in patch 2.5.2, and it's been in production successfully in 30+ high-profile places in EMF since that release.
 

zijistark

HIP Lead
58 Badges
Jan 29, 2013
5.118
3.074
zijistark.com
  • Crusader Kings II
  • Stellaris: Apocalypse
  • Knights of Honor
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Pre-order
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Semper Fi
  • Victoria: Revolutions
  • Europa Universalis IV: Res Publica
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • For the Motherland
  • Crusader Kings II: The Old Gods
  • Cities in Motion
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Europa Universalis IV: Wealth of Nations
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Europa Universalis III: Chronicles
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV: Rights of Man
  • Victoria 2
  • Stellaris: Humanoids Species Pack
  • Hearts of Iron IV: Expansion Pass
  • Crusader Kings III
  • Stellaris: Synthetic Dawn
  • Hearts of Iron IV: Death or Dishonor
  • 500k Club
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV
  • Crusader Kings II: Monks and Mystics
  • Hearts of Iron IV: Together for Victory
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Cadet
  • Stellaris Sign-up
  • Hearts of Iron IV Sign-up
  • Stellaris
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
False positive regarding the title scope, succ_law_title, being used in an effect in title scope. I only seem to get errors with this when it's inside an any_title effect, but it may be more widespread. Error:

Code:
--- Error 1 of 1 ---
At <mod>\events\emf_gender_eq.txt [character_event\immediate\any_title\succ_law_title] (Line 141, column 4):
Invalid node "succ_law_title" in scope TitleMaybeLimitCommand (value is: <a complex type>)

Referenced code, lines 132-142 (indicated error is on line 141):

Code:
any_title = {
    limit = {
        has_holder = yes
        succ_law_title = {
            NOT = { has_law = true_cognatic_succession }
            is_law_potential = true_cognatic_succession
        }
        NOT = { holder = ROOT }
    }
    succ_law_title = { set_title_flag = emf_not_feminist_enough }
}

The succ_law_title scope is indeed valid in title effects.
 

zijistark

HIP Lead
58 Badges
Jan 29, 2013
5.118
3.074
zijistark.com
  • Crusader Kings II
  • Stellaris: Apocalypse
  • Knights of Honor
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Pre-order
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Semper Fi
  • Victoria: Revolutions
  • Europa Universalis IV: Res Publica
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • For the Motherland
  • Crusader Kings II: The Old Gods
  • Cities in Motion
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Europa Universalis IV: Wealth of Nations
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Europa Universalis III: Chronicles
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV: Rights of Man
  • Victoria 2
  • Stellaris: Humanoids Species Pack
  • Hearts of Iron IV: Expansion Pass
  • Crusader Kings III
  • Stellaris: Synthetic Dawn
  • Hearts of Iron IV: Death or Dishonor
  • 500k Club
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV
  • Crusader Kings II: Monks and Mystics
  • Hearts of Iron IV: Together for Victory
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Cadet
  • Stellaris Sign-up
  • Hearts of Iron IV Sign-up
  • Stellaris
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
@Rylock reported this over a year ago, but I think you missed it, Jamie, as it's never stopped being an issue AFAIK.

The issue is with the [admittedly quite strange] scopes set for the GRANT_LANDED_TITLE_INTERACTION_ACCEPT_EVENT on_action events. The following code is confirmed to work perfectly on EMF, and CK2Plus also relies upon very similar code that suffers from scope-related false positives / general confusion due to this on_action:

Code:
# PlusFaction.211 [Granted Title]
# GRANT_LANDED_TITLE_INTERACTION_ACCEPT_EVENT - updates faction response to a granted title
character_event = {
    id = PlusFaction.211

    is_triggered_only = yes
    hide_window = yes

    immediate = {
        FROM = { character_event = { id = PlusFaction.212 days = 1 } }

        holder_scope = {
            log = "INFO: title grant: [Root.GetID] ([Root.GetFullBaseName]) granted to [This.GetTitledFirstName] (ID: [This.GetID]) by [From.GetTitledName] (ID: [From.GetID])"

            # Title grant may have transferred de jure vassals under the new owner implicitly, so check the new
            # owner's vassals for PF state invalidation.
            any_vassal = {
                limit = { is_playable = yes }
                pf_liege_change_effect = yes
            }
        }
    }
}

Here, the ROOT scope is actually the granted title (despite being a character_event) and the FROM scope is a character scope for the title granter. Thus, the grantee can only be referenced through 'ROOT = { holder_scope = { ... } }'. If another event (such as PlusFaction.212 in the above-referenced code) is called from here, the FROM stack behaves as per normal with the subsequent event's FROM scope becoming the granted title, FROMFROM the granter, etc.

EDIT: Just to be clear, the related Validator errors are all the ones you'd expect for no special-case handling of this on_action's scope behavior: the Validator thinks that ROOT ought to be a character-- not a title, which is wrong.
 

Jamie550

'
53 Badges
Jan 29, 2007
4.225
197
  • Stellaris: Leviathans Story Pack
  • Victoria 2
  • 200k Club
  • 500k Club
  • Europa Universalis IV: Pre-order
  • Victoria 2 Beta
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Stellaris: Necroids
  • Stellaris: Nemesis
  • Crusader Kings II
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Sons of Abraham
  • Deus Vult
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Call to arms event
  • Arsenal of Democracy
  • For the Motherland
  • Galactic Assault
  • Hearts of Iron III
  • Heir to the Throne
  • Europa Universalis III Complete
  • Knights of Pen and Paper +1 Edition
  • Magicka
  • March of the Eagles
  • Europa Universalis III Complete
  • Victoria: Revolutions
  • Europa Universalis: Rome
  • Semper Fi
The upcoming version tries to make trigger_switch better, but see if it actually works.

Maybe this conversation with Divine will clear things up.
It sounds like this is sketchy and may disappear, what do people think of whether we should make it work or not? (I'm not sure how complex it would be but it's definitely not trivial).

As for

Yes, in CBs:
Trying this (making ROOT point to char instead of title) causes a bunch more errors. For example (in vanilla):
Code:
--- Error 1 of 1 ---
At common\objectives\00_plots.txt [plot_weaken_fellow_vassal\chance\modifier\NOT\ROOT\holder_scope] (Line 1404, column 6):
Invalid node "holder_scope" in scope CharTrigger (value is: <a complex type>)
--- Error 1 of 1 ---
At common\objectives\00_plots.txt [plot_gain_vassal_title\allow\hidden_tooltip\OR\AND\holder_scope\NOT\any_demesne_title\location\duchy\title] (Line 332, column 11):
"ROOT" is not a valid AnyTitle or MaybeEventTargetProvTitle.
MaybeEventTargetProvTitle: cannot be because ThisProv: cannot be because ROOT points to <Char>, not Prov.
	ThisTitle: cannot be because ROOT points to <Char>, not Title.
You can see the errors by adding the line "ThisTarget = Char" at Extension\Data\Ck2\Objectives.pdox, line 148.

Link in my sig, the part with the version number.
I do not get the error when trying it out. I would also like to point out the vanilla file has a syntax error in the vanilla file on line 2494. If you fix the syntax error things may work. Someone should also complain to Paradox about the syntax issue so they fix it.

Side note: the code I am in the process of integrating originally had the add_consort coded differently, i.e.,
Code:
1238.1.1={
effect={c_166938={add_consort=ROOT}}
}
Which method of adding consorts actually works? Does anyone have experience with this?
No idea but what does c_166938 even mean in this case?

Code:
--- Error 1 of 1 ---
At <mod>\history\characters\mongol.txt [166937\1240.1.1\birth] (Line 7848, column 3):
This character, 166937, is a bastard/legit_bastard, but does not have the trait.
The mother is scripted to be a concubine prior to the birth of this character:
Code:
1238.1.1={
effect = { add_consort = 166938 }
}
Code:
166937 ={
name="Asutai" # son of Möngke
dynasty=11100
religion="tengri_pagan"
culture="mongol"
father=217265
mother=166938
add_trait="child_of_consort"
1240.1.1 = {
birth = yes
}
1266.1.1 = {
death = yes
}
}
I guess there's no chance that just having add_consort without an "effect" block will work?

I wonder, is anything allowed in these effect blocks? So you could have character A, in an effect block, cause character B and C to become spouses? Or a title effect scope that marries a bunch of characters? Or randomly killing people? That the Validator really would not be able to handle.

False positive:

Code:
--- Error 1 of 1 ---
At <mod>\decisions\00_emf_customize_decisions.txt [decisions\emf_customize_vanilla_crusades\potential\OR\is_multiplayer_host_character] (Line 258, column 5):
Invalid node "is_multiplayer_host_character" in scope CharTrigger (value is: yes)

This simple yes/no character trigger was added in patch 2.5.2, and it's been in production successfully in 30+ high-profile places in EMF since that release.
Will add it, but curious what kind of stuff it is used for.

@Rylock reported this over a year ago, but I think you missed it, Jamie, as it's never stopped being an issue AFAIK.

The issue is with the [admittedly quite strange] scopes set for the GRANT_LANDED_TITLE_INTERACTION_ACCEPT_EVENT on_action events. The following code is confirmed to work perfectly on EMF, and CK2Plus also relies upon very similar code that suffers from scope-related false positives / general confusion due to this on_action:

Code:
# PlusFaction.211 [Granted Title]
# GRANT_LANDED_TITLE_INTERACTION_ACCEPT_EVENT - updates faction response to a granted title
character_event = {
    id = PlusFaction.211

    is_triggered_only = yes
    hide_window = yes

    immediate = {
        FROM = { character_event = { id = PlusFaction.212 days = 1 } }

        holder_scope = {
            log = "INFO: title grant: [Root.GetID] ([Root.GetFullBaseName]) granted to [This.GetTitledFirstName] (ID: [This.GetID]) by [From.GetTitledName] (ID: [From.GetID])"

            # Title grant may have transferred de jure vassals under the new owner implicitly, so check the new
            # owner's vassals for PF state invalidation.
            any_vassal = {
                limit = { is_playable = yes }
                pf_liege_change_effect = yes
            }
        }
    }
}

Here, the ROOT scope is actually the granted title (despite being a character_event) and the FROM scope is a character scope for the title granter. Thus, the grantee can only be referenced through 'ROOT = { holder_scope = { ... } }'. If another event (such as PlusFaction.212 in the above-referenced code) is called from here, the FROM stack behaves as per normal with the subsequent event's FROM scope becoming the granted title, FROMFROM the granter, etc.

EDIT: Just to be clear, the related Validator errors are all the ones you'd expect for no special-case handling of this on_action's scope behavior: the Validator thinks that ROOT ought to be a character-- not a title, which is wrong.
It seems pretty strange that things are done this way. Are you sure that it is intentional? You would really hope that Paradox could stick the title in FROMFROM or something, or otherwise make a title_event to make things make sense. Is it possible to lobby for something that makes more sense?
 

zijistark

HIP Lead
58 Badges
Jan 29, 2013
5.118
3.074
zijistark.com
  • Crusader Kings II
  • Stellaris: Apocalypse
  • Knights of Honor
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Pre-order
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Semper Fi
  • Victoria: Revolutions
  • Europa Universalis IV: Res Publica
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • For the Motherland
  • Crusader Kings II: The Old Gods
  • Cities in Motion
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Europa Universalis IV: Wealth of Nations
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Europa Universalis III: Chronicles
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV: Rights of Man
  • Victoria 2
  • Stellaris: Humanoids Species Pack
  • Hearts of Iron IV: Expansion Pass
  • Crusader Kings III
  • Stellaris: Synthetic Dawn
  • Hearts of Iron IV: Death or Dishonor
  • 500k Club
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV
  • Crusader Kings II: Monks and Mystics
  • Hearts of Iron IV: Together for Victory
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Cadet
  • Stellaris Sign-up
  • Hearts of Iron IV Sign-up
  • Stellaris
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
No idea but what does c_166938 even mean in this case?
It's a direct way of scoping to the character w/ ID 166938. To a parser, it might otherwise look like some kind of malformed county title. The difference is that no county title may start with a numeric character directly after the "c_" prefix.

Will add it, but curious what kind of stuff it is used for.

When a mod offers scenario customization decisions (generally only available before unpausing the game), it's helpful to be able to detect which player character is actually the host of a multiplayer game so that only they can fiddle with these settings. That's one use.

It seems pretty strange that things are done this way. Are you sure that it is intentional? You would really hope that Paradox could stick the title in FROMFROM or something, or otherwise make a title_event to make things make sense. Is it possible to lobby for something that makes more sense?

I agree that it's [very] strange that things are done this way, but I don't think lobbying Paradox to change the API is in the cards.
 
  • 1
Reactions:

blackninja9939

Experienced Programmer - Crusader Kings 3
Paradox Staff
78 Badges
Aug 28, 2013
2.401
7.847
  • Crusader Kings III
  • Stellaris: Federations
  • Battle for Bosporus
  • Stellaris: Nemesis
  • Hearts of Iron IV: No Step Back
  • Europa Universalis IV
  • Crusader Kings III: Royal Edition
  • Europa Universalis 4: Emperor
  • Stellaris: Necroids
  • Crusader Kings II
  • Crusader Kings II: Holy Fury
  • Imperator: Rome - Magna Graecia
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Old Gods
  • Europa Universalis IV: Rights of Man
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Synthetic Dawn
  • Surviving Mars
  • BATTLETECH
  • Europa Universalis IV: Mandate of Heaven
  • Crusader Kings II: Monks and Mystics
  • Tyranny: Archon Edition
  • Europa Universalis IV: Rule Britannia
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Colonel
  • Stellaris Sign-up
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Apocalypse
  • Stellaris: Lithoids
  • Stellaris: Distant Stars
  • Europa Universalis IV: Dharma
  • Shadowrun Returns
  • Imperator: Rome Deluxe Edition
  • Prison Architect
  • Imperator: Rome Sign Up
  • Stellaris: Ancient Relics
  • Age of Wonders: Planetfall
  • Crusader Kings II: Conclave
  • Crusader Kings II: The Republic
  • Victoria 2
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Stellaris
  • Mount & Blade: Warband
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Sunset Invasion
It's a direct way of scoping to the character w/ ID 166938. To a parser, it might otherwise look like some kind of malformed county title. The difference is that no county title may start with a numeric character directly after the "c_" prefix.
Wait you can directly scope to characters by doing c_charid?? That is quite awesome
 
  • 1
Reactions:

Jamie550

'
53 Badges
Jan 29, 2007
4.225
197
  • Stellaris: Leviathans Story Pack
  • Victoria 2
  • 200k Club
  • 500k Club
  • Europa Universalis IV: Pre-order
  • Victoria 2 Beta
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Stellaris: Necroids
  • Stellaris: Nemesis
  • Crusader Kings II
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Sons of Abraham
  • Deus Vult
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Call to arms event
  • Arsenal of Democracy
  • For the Motherland
  • Galactic Assault
  • Hearts of Iron III
  • Heir to the Throne
  • Europa Universalis III Complete
  • Knights of Pen and Paper +1 Edition
  • Magicka
  • March of the Eagles
  • Europa Universalis III Complete
  • Victoria: Revolutions
  • Europa Universalis: Rome
  • Semper Fi
It's a direct way of scoping to the character w/ ID 166938. To a parser, it might otherwise look like some kind of malformed county title. The difference is that no county title may start with a numeric character directly after the "c_" prefix.
Is the Validator happy with this? I don't remember adding this but maybe I did?
 

M@ni@c

Lt. General
52 Badges
Apr 27, 2002
1.333
376
Visit site
  • Age of Wonders
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Crusader Kings II: Reapers Due
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Pillars of Eternity
  • Age of Wonders II
  • Crusader Kings II: Jade Dragon
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Crusader Kings III
  • Stellaris: Nemesis
  • Divine Wind
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Darkest Hour
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Crusader Kings II
  • Europa Universalis IV
  • Heir to the Throne
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Sword of the Stars
  • Sword of the Stars II
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • 500k Club
The issue is with the [admittedly quite strange] scopes set for the GRANT_LANDED_TITLE_INTERACTION_ACCEPT_EVENT on_action events. ...

Here, the ROOT scope is actually the granted title (despite being a character_event) and the FROM scope is a character scope for the title granter. Thus, the grantee can only be referenced through 'ROOT = { holder_scope = { ... } }'. If another event (such as PlusFaction.212 in the above-referenced code) is called from here, the FROM stack behaves as per normal with the subsequent event's FROM scope becoming the granted title, FROMFROM the granter, etc.

EDIT: Just to be clear, the related Validator errors are all the ones you'd expect for no special-case handling of this on_action's scope behavior: the Validator thinks that ROOT ought to be a character-- not a title, which is wrong.

I just had to write an event firing off GRANT_LANDED_TITLE_INTERACTION_ACCEPT_EVENT myself, and I cannot confirm what you write. My event works perfectly for the ROOT as the title grantee, while it does not work if I write it using holder_scope.
 

richvh

Preserver of the Light
63 Badges
Dec 1, 2001
14.691
1.999
Visit site
  • Stellaris: Leviathans Story Pack
  • Pillars of Eternity
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Knights of Pen and Paper 2
  • Crusader Kings II: Conclave
  • Stellaris
  • Hearts of Iron IV Sign-up
  • Stellaris Sign-up
  • Crusader Kings II: Reapers Due
  • Tyranny: Archon Edition
  • Tyranny: Archon Edition
  • Tyranny: Gold Edition
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Surviving Mars
  • Stellaris: Synthetic Dawn
  • Tyranny - Tales from the Tiers
  • Tyranny - Bastards Wound
  • Age of Wonders III
  • Age of Wonders: Shadow Magic
  • Age of Wonders
  • Age of Wonders II
  • Crusader Kings II: Jade Dragon
  • Crusader Kings III: Royal Edition
  • Europa Universalis IV: Call to arms event
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • A Game of Dwarves
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Magicka
  • Majesty 2 Collection
  • Europa Universalis IV: Res Publica
  • Europa Universalis: Rome
  • Rome Gold
  • Rome: Vae Victis
  • 500k Club
  • Cities: Skylines
@Jamie550: Can something be added to the settings file to either disable checks for valid DLC names, or allow addition of a DLC name to the valid list? It would make use a little easier for those betas who use it.
 

zijistark

HIP Lead
58 Badges
Jan 29, 2013
5.118
3.074
zijistark.com
  • Crusader Kings II
  • Stellaris: Apocalypse
  • Knights of Honor
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Pre-order
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Semper Fi
  • Victoria: Revolutions
  • Europa Universalis IV: Res Publica
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • For the Motherland
  • Crusader Kings II: The Old Gods
  • Cities in Motion
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Europa Universalis IV: Wealth of Nations
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Europa Universalis III: Chronicles
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV: Rights of Man
  • Victoria 2
  • Stellaris: Humanoids Species Pack
  • Hearts of Iron IV: Expansion Pass
  • Crusader Kings III
  • Stellaris: Synthetic Dawn
  • Hearts of Iron IV: Death or Dishonor
  • 500k Club
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV
  • Crusader Kings II: Monks and Mystics
  • Hearts of Iron IV: Together for Victory
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Cadet
  • Stellaris Sign-up
  • Hearts of Iron IV Sign-up
  • Stellaris
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
I just had to write an event firing off GRANT_LANDED_TITLE_INTERACTION_ACCEPT_EVENT myself, and I cannot confirm what you write. My event works perfectly for the ROOT as the title grantee, while it does not work if I write it using holder_scope.
I also cannot confirm what you've written.

I can confirm what I've written.
 

Jamie550

'
53 Badges
Jan 29, 2007
4.225
197
  • Stellaris: Leviathans Story Pack
  • Victoria 2
  • 200k Club
  • 500k Club
  • Europa Universalis IV: Pre-order
  • Victoria 2 Beta
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Stellaris: Necroids
  • Stellaris: Nemesis
  • Crusader Kings II
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Sons of Abraham
  • Deus Vult
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Call to arms event
  • Arsenal of Democracy
  • For the Motherland
  • Galactic Assault
  • Hearts of Iron III
  • Heir to the Throne
  • Europa Universalis III Complete
  • Knights of Pen and Paper +1 Edition
  • Magicka
  • March of the Eagles
  • Europa Universalis III Complete
  • Victoria: Revolutions
  • Europa Universalis: Rome
  • Semper Fi
@Jamie550: Can something be added to the settings file to either disable checks for valid DLC names, or allow addition of a DLC name to the valid list? It would make use a little easier for those betas who use it.
In the upcoming version you will be able to do
Code:
(AddToEnum Dlc) = { "Top Secret Dlc" }

I just had to write an event firing off GRANT_LANDED_TITLE_INTERACTION_ACCEPT_EVENT myself, and I cannot confirm what you write. My event works perfectly for the ROOT as the title grantee, while it does not work if I write it using holder_scope.
I also cannot confirm what you've written.

I can confirm what I've written.
@M@ni@c what does your working/nonworking event look like?

Anyone else have comments/opinions on this? I'm disinclined to add it assuming it is correct, because it might be a bunch of extra work and it seems annoying. However if this causes issues for lots of people then maybe I'll do it anyways.
 

zijistark

HIP Lead
58 Badges
Jan 29, 2013
5.118
3.074
zijistark.com
  • Crusader Kings II
  • Stellaris: Apocalypse
  • Knights of Honor
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Pre-order
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Semper Fi
  • Victoria: Revolutions
  • Europa Universalis IV: Res Publica
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • For the Motherland
  • Crusader Kings II: The Old Gods
  • Cities in Motion
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Europa Universalis IV: Wealth of Nations
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Europa Universalis III: Chronicles
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV: Rights of Man
  • Victoria 2
  • Stellaris: Humanoids Species Pack
  • Hearts of Iron IV: Expansion Pass
  • Crusader Kings III
  • Stellaris: Synthetic Dawn
  • Hearts of Iron IV: Death or Dishonor
  • 500k Club
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV
  • Crusader Kings II: Monks and Mystics
  • Hearts of Iron IV: Together for Victory
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Cadet
  • Stellaris Sign-up
  • Hearts of Iron IV Sign-up
  • Stellaris
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
Anyone else have comments/opinions on this? I'm disinclined to add it assuming it is correct, because it might be a bunch of extra work and it seems annoying. However if this causes issues for lots of people then maybe I'll do it anyways.

If you think it'd actually require some significant re-working to accomplish, don't fix it. I only have so much code triggered from that obscure on_action that can be affected by Validator errors about problems originating from incorrect-- and propogating-- scope type assumptions that are nevertheless true in almost all mods' code. Resolution of the issue of those consequent but limited false positives is way less important to me than a lot of other things you could be doing w/ the Validator.

I just wanted to submit it in case you felt the fix would be easy-- a property entirely dependent upon the Validator's design and whether certain subtle assumptions have been made in its code at times.

Cheers,
-ziji
 

M@ni@c

Lt. General
52 Badges
Apr 27, 2002
1.333
376
Visit site
  • Age of Wonders
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Crusader Kings II: Reapers Due
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Pillars of Eternity
  • Age of Wonders II
  • Crusader Kings II: Jade Dragon
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Crusader Kings III
  • Stellaris: Nemesis
  • Divine Wind
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Darkest Hour
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Crusader Kings II
  • Europa Universalis IV
  • Heir to the Throne
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Sword of the Stars
  • Sword of the Stars II
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • 500k Club
@M@ni@c what does your working/nonworking event look like?

You can test it with something as simple as:
reverse_add_favor = liege # works
vs
holder_scope = { reverse_add_favor = liege } # doesn't give a favor

or more complete copy-pastable code:

Code:
#don't forget namespace
character_event =
{
    id = Maniac.134
    desc = "EVTDESCM134"
    picture = "GFX_evt_emissary"
    hide_window = no  
    is_triggered_only = yes
  
    option = {
        name = "OK"       
        reverse_add_favor = liege # works
        #holder_scope = { reverse_add_favor = liege } # doesn't give a favor
    }  
}

#00_on_actions.txt
GRANT_LANDED_TITLE_INTERACTION_ACCEPT_EVENT = {
    events = {
        228
        Maniac.134
    }
}
 

Jamie550

'
53 Badges
Jan 29, 2007
4.225
197
  • Stellaris: Leviathans Story Pack
  • Victoria 2
  • 200k Club
  • 500k Club
  • Europa Universalis IV: Pre-order
  • Victoria 2 Beta
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Stellaris: Necroids
  • Stellaris: Nemesis
  • Crusader Kings II
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Sons of Abraham
  • Deus Vult
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Call to arms event
  • Arsenal of Democracy
  • For the Motherland
  • Galactic Assault
  • Hearts of Iron III
  • Heir to the Throne
  • Europa Universalis III Complete
  • Knights of Pen and Paper +1 Edition
  • Magicka
  • March of the Eagles
  • Europa Universalis III Complete
  • Victoria: Revolutions
  • Europa Universalis: Rome
  • Semper Fi
What exactly does the trade category in the validator check? I'm trying to debug a problem with the silk road and i figured it'd be under trade but I had no porblem reports.
common/trade_routes.

If you think it'd actually require some significant re-working to accomplish, don't fix it. I only have so much code triggered from that obscure on_action that can be affected by Validator errors about problems originating from incorrect-- and propogating-- scope type assumptions that are nevertheless true in almost all mods' code. Resolution of the issue of those consequent but limited false positives is way less important to me than a lot of other things you could be doing w/ the Validator.

I just wanted to submit it in case you felt the fix would be easy-- a property entirely dependent upon the Validator's design and whether certain subtle assumptions have been made in its code at times.

Cheers,
-ziji
I haven't looked at whether it is hard or not yet but have a feeling. Anyways depending on popular opinion even if its a bit tricky it may be done anyways. Though I'm curious what you think of the example above - if I understand correctly it ought to work, or was this the case where you had to wrap it in ROOT?
 

theStormWeaver

Lead Dev - Ancient Religions
64 Badges
Jul 28, 2012
2.407
474
www.github.com
  • Battle for Bosporus
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV
  • Crusader Kings II: Reapers Due
  • Rome Gold
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Charlemagne
  • Crusader Kings II
  • Stellaris: Humanoids Species Pack
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Jade Dragon
  • Hearts of Iron IV: Death or Dishonor
  • Surviving Mars
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings III
  • Surviving Mars: Digital Deluxe Edition
  • Cities: Skylines - Parklife
  • Stellaris: Distant Stars
  • Shadowrun Returns
  • Surviving Mars: First Colony Edition
  • Crusader Kings II: Holy Fury
  • Imperator: Rome Sign Up
  • Stellaris: Ancient Relics
  • Imperator: Rome - Magna Graecia
  • Rome: Vae Victis
  • 500k Club
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris Sign-up
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Stellaris: Digital Anniversary Edition
  • Cities: Skylines
  • Imperator: Rome
  • Surviving Mars: First Colony Edition
  • Stellaris - Path to Destruction bundle
Code:
--- Error 1 of 1 ---
At <mod>\events\ACR_egyptian_events.txt [character_event\option\new_character\spawn_unit\province] (Line 2915, column 6):
"ROOT" is not a valid MaybeEventTargetProv or Province.
MaybeEventTargetProv: cannot be because ROOT points to <CharCommand>, not Prov.

This usage is shown to work in vanilla (cm_charlemagne_story_events.txt:1737). Seems spawn_unit will accept character scopes in province and home. Not sure what the precise behavior is, whether it's <current location> or <capitol>.
 

Jamie550

'
53 Badges
Jan 29, 2007
4.225
197
  • Stellaris: Leviathans Story Pack
  • Victoria 2
  • 200k Club
  • 500k Club
  • Europa Universalis IV: Pre-order
  • Victoria 2 Beta
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Stellaris: Necroids
  • Stellaris: Nemesis
  • Crusader Kings II
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Sons of Abraham
  • Deus Vult
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Call to arms event
  • Arsenal of Democracy
  • For the Motherland
  • Galactic Assault
  • Hearts of Iron III
  • Heir to the Throne
  • Europa Universalis III Complete
  • Knights of Pen and Paper +1 Edition
  • Magicka
  • March of the Eagles
  • Europa Universalis III Complete
  • Victoria: Revolutions
  • Europa Universalis: Rome
  • Semper Fi
Code:
--- Error 1 of 1 ---
At <mod>\events\ACR_egyptian_events.txt [character_event\option\new_character\spawn_unit\province] (Line 2915, column 6):
"ROOT" is not a valid MaybeEventTargetProv or Province.
MaybeEventTargetProv: cannot be because ROOT points to <CharCommand>, not Prov.

This usage is shown to work in vanilla (cm_charlemagne_story_events.txt:1737). Seems spawn_unit will accept character scopes in province and home. Not sure what the precise behavior is, whether it's <current location> or <capitol>.
So it definitely works? There was a comment here: https://forum.paradoxplaza.com/foru...ith-minimal-pain.597480/page-92#post-19717214

that for province it may not work, at least in the past.