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

Whizzer

CKPlus Triumvirate
77 Badges
Jun 17, 2014
1.622
795
  • Semper Fi
  • Hearts of Iron III Collection
  • Heir to the Throne
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Leviathan: Warships
  • The Kings Crusade
  • Magicka
  • Victoria: Revolutions
  • Rome Gold
  • Cities in Motion
  • Sengoku
  • Sword of the Stars
  • Sword of the Stars II
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Warlock: Master of the Arcane
  • Europa Universalis IV: Mare Nostrum
  • Hearts of Iron III
  • A Game of Dwarves
  • Cities in Motion 2
  • 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: Sword of Islam
  • Dungeonland
  • Crusader Kings II: Sunset Invasion
  • Europa Universalis III
  • Divine Wind
  • Hearts of Iron III: Their Finest Hour
  • For the Motherland
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Conclave
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Magicka: Wizard Wars Founder Wizard
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • War of the Roses
  • Crusader Kings III
  • Europa Universalis IV
I mean I was getting overflow tech pts from having a large empire - all of europe and steppe. So i had neg econ tech pt somehow. I tech up the capital of a duchy before granting it. So if there was a way to set back everything in game to 0 to even out it would be nice

Ok. I don't know how to set tech back during game, I admit I have never seen that done in my 5+ years of modding the game.

This works just fine, in province scope for all non nomadic-rulers, character scope for nomadic rulers:

Code:
change_tech = {
	technology = TECH_NAVAL
	value = -1
}

You can't reduce tech by more than its current level, so use a while loop as long as it's above the desired value.
You could also skip the spending and adjust your tech points with the following commands, again in while loops to reach the desired value.
Do note while loops can't run more than 100k times, so if you want to change tech by more than that, change it in bigger increments, for example.

Code:
culture_techpoints	
economy_techpoints
military_techpoints
 
  • 1Like
  • 1
Reactions:

kiannameiou

Second Lieutenant
1 Badges
Apr 27, 2021
157
18
  • Crusader Kings II
Nvm I think its too complicated and downright silly. Moving on;

is there any way to restrict marriage for all siblings still at court? I try to expand my dynasty but the other landed members keep sending proposals in. Trying to give away all but 1 king title out to dynasty members.

=======

Code:
kill_dynasty = {
        filter = realm
        
        from_potential = {
            
            ai = no
        }
        potential = {
            ai = yes
            NOT = { dynasty = FROM}
        }
        allow = {
            always = yes
        }
        effect = {
            death = { death_reason = death_murder_unknown killer = FROM }
            any_dynasty_member = {
                #is_adult = yes
                death = { death_reason = death_murder_unknown killer = FROM }
            }
        }
        revoke_allowed = {
            always = no
        }
        ai_will_do = {
            factor = 0
        }
    }

If the comment is removed, the log reports error. Trying to reduce the decision to kill off only adults of targeted person's dynasty.
 
Last edited:

Whizzer

CKPlus Triumvirate
77 Badges
Jun 17, 2014
1.622
795
  • Semper Fi
  • Hearts of Iron III Collection
  • Heir to the Throne
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Leviathan: Warships
  • The Kings Crusade
  • Magicka
  • Victoria: Revolutions
  • Rome Gold
  • Cities in Motion
  • Sengoku
  • Sword of the Stars
  • Sword of the Stars II
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Warlock: Master of the Arcane
  • Europa Universalis IV: Mare Nostrum
  • Hearts of Iron III
  • A Game of Dwarves
  • Cities in Motion 2
  • 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: Sword of Islam
  • Dungeonland
  • Crusader Kings II: Sunset Invasion
  • Europa Universalis III
  • Divine Wind
  • Hearts of Iron III: Their Finest Hour
  • For the Motherland
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Conclave
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Magicka: Wizard Wars Founder Wizard
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • War of the Roses
  • Crusader Kings III
  • Europa Universalis IV
Nvm I think its too complicated and downright silly. Moving on;

is there any way to restrict marriage for all siblings still at court? I try to expand my dynasty but the other landed members keep sending proposals in. Trying to give away all but 1 king title out to dynasty members.

There's a button on the interface to restrict marriage. Not sure for which characters it works, but it includes all of your children and likely grandchildren, so it may also work for siblings. Should it fail to work, you could apply the flag ai_flag_refuse_marriage until you want them to be able to marry again. See patch 2.8 changelog for more details and limitations on that.

Code:
kill_dynasty = {
        filter = realm
        
        from_potential = {
            
            ai = no
        }
        potential = {
            ai = yes
            NOT = { dynasty = FROM}
        }
        allow = {
            always = yes
        }
        effect = {
            death = { death_reason = death_murder_unknown killer = FROM }
            any_dynasty_member = {
                #is_adult = yes
                death = { death_reason = death_murder_unknown killer = FROM }
            }
        }
        revoke_allowed = {
            always = no
        }
        ai_will_do = {
            factor = 0
        }
    }

If the comment is removed, the log reports error. Trying to reduce the decision to kill off only adults of targeted person's dynasty.

Put limit = {} around adult = yes.
 

kiannameiou

Second Lieutenant
1 Badges
Apr 27, 2021
157
18
  • Crusader Kings II
Thanks, forgot abt that limit code.
Restrict marriage does not work on siblings for some reason - really it should if they are still at court...


======

Code:
kill_dynasty = {
        filter = realm
       
        from_potential = {
           
            ai = no
           
        }
        potential = {
            ai = yes
            NOT = { dynasty = FROM}
            is_adult = yes
           
        }
        allow = {
            always = yes
        }
        effect = {
            death = { death_reason = death_murder_unknown killer = FROM }
            any_dynasty_member = {
                limit = { age > 6 }
               
                death = { death_reason = death_murder_unknown killer = FROM }
            }
           
            any_dynasty_member =
            {
                limit = { age < 6 }
                if = {
                limit = {
                    FROM = {
                        NOT = {
                            is_female = yes
                        }
                    }
                }
                hidden_tooltip = {
                    father = { ROOT = { set_real_father = PREV } }
                    set_mother = 0
                }
                set_father = FROM
                dynasty = FROM
                hidden_tooltip = {
                    any_child = {
                        limit = { is_child_of = THIS }
                        dynasty = ROOT

                        any_child = {
                            limit = { is_child_of = THIS }
                            dynasty = ROOT

                            any_child = {
                                limit = { is_child_of = THIS }
                                dynasty = ROOT
                            }
                        }
                    }
                }
            }
            if = {
                limit = {
                    FROM = {
                        is_female = yes
                    }
                }
                set_mother = FROM
                dynasty = FROM
                hidden_tooltip = {
                    any_child = {
                        limit = { is_child_of = THIS }
                        dynasty = ROOT

                        any_child = {
                            limit = { is_child_of = THIS }
                            dynasty = ROOT

                            any_child = {
                                limit = { is_child_of = THIS }
                                dynasty = ROOT
                            }
                        }
                    }
                }
            }
           
            }
        }
        revoke_allowed = {
            always = no
        }
        ai_will_do = {
            factor = 0
        }
    }

Decided to go with an age condition instead. Is it possible to change the age condition to be;
anyone older than my eldest child dies
anyone younger than my eldest child gets adopted
 
Last edited:

Grand Admiral Edward

Colonel
17 Badges
Sep 5, 2020
811
611
  • Crusader Kings II: Sword of Islam
  • Crusader Kings III
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Way of Life
  • Crusader Kings II
  • 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
Can traits have "On_action" triggers? Also, is there a trigger for immediate conception trigger (not the 2 month delay of on_pregnancy)? I want to create a trait that increases the martial and prowess of a pregnant character, and wondering if that would work, or would I have to create an event that does that?
 
Last edited:

Whizzer

CKPlus Triumvirate
77 Badges
Jun 17, 2014
1.622
795
  • Semper Fi
  • Hearts of Iron III Collection
  • Heir to the Throne
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Leviathan: Warships
  • The Kings Crusade
  • Magicka
  • Victoria: Revolutions
  • Rome Gold
  • Cities in Motion
  • Sengoku
  • Sword of the Stars
  • Sword of the Stars II
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Warlock: Master of the Arcane
  • Europa Universalis IV: Mare Nostrum
  • Hearts of Iron III
  • A Game of Dwarves
  • Cities in Motion 2
  • 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: Sword of Islam
  • Dungeonland
  • Crusader Kings II: Sunset Invasion
  • Europa Universalis III
  • Divine Wind
  • Hearts of Iron III: Their Finest Hour
  • For the Motherland
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Conclave
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Magicka: Wizard Wars Founder Wizard
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • War of the Roses
  • Crusader Kings III
  • Europa Universalis IV
can a character event have a random target? Here's the (slightly modified to be SFW, although the mod itself definitely isn't) code for an event I;m writing, and wondering if it would work: [[random_target.title_palace_training_guard] OR [random_target.title_palace_training_2_guard]]. Or would it need something like has_minor_title as well. Does the OR even work as well?
Localisation doesn't work like that. You'll have to select the desired character in script, which is usually done in immediate. See this wiki page for some examples.
One more thing, can traits have "On_action" triggers? Also, is there a trigger for immediate conception trigger (not the 2 month delay of on_pregnancy)? I want to create a trait that increases the martial and prowess of a pregnant character, and wondering if that would work, or would I have to create an event that does that?
No, traits have no on_actions. Your best bet is likely a MTTH event, mean-time-to-happen.
 

Whizzer

CKPlus Triumvirate
77 Badges
Jun 17, 2014
1.622
795
  • Semper Fi
  • Hearts of Iron III Collection
  • Heir to the Throne
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Leviathan: Warships
  • The Kings Crusade
  • Magicka
  • Victoria: Revolutions
  • Rome Gold
  • Cities in Motion
  • Sengoku
  • Sword of the Stars
  • Sword of the Stars II
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Warlock: Master of the Arcane
  • Europa Universalis IV: Mare Nostrum
  • Hearts of Iron III
  • A Game of Dwarves
  • Cities in Motion 2
  • 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: Sword of Islam
  • Dungeonland
  • Crusader Kings II: Sunset Invasion
  • Europa Universalis III
  • Divine Wind
  • Hearts of Iron III: Their Finest Hour
  • For the Motherland
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Conclave
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Magicka: Wizard Wars Founder Wizard
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • War of the Roses
  • Crusader Kings III
  • Europa Universalis IV
Restrict marriage does not work on siblings for some reason - really it should if they are still at court...

Decided to go with an age condition instead. Is it possible to change the age condition to be;
anyone older than my eldest child dies
anyone younger than my eldest child gets adopted
Hope this snippet helps:
Code:
FROM = {
    random_child = {
        limit = {
            NOT = {
                any_sibling = {
                    is_child_of = ROOT_FROM
                    is_older_than = PREV
                }
            }
        }
        
        save_event_target_as = FROMs_oldest_child
    }
}

any_child = {
    if = {
        limit = { is_older_than = event_target:FROMs_oldest_child }
        do_stuff_here
    }
    else = {
        do_other_stuff_here
    }
}
 

GodModder

First Lieutenant
39 Badges
May 10, 2021
282
41
  • Shadowrun Returns
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Age of Wonders III
  • Crusader Kings II: Jade Dragon
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Digital Anniversary Edition
  • Shadowrun: Hong Kong
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Crusader Kings III
  • Stellaris: Necroids
  • Stellaris: Nemesis
  • Crusader Kings II: Way of Life
  • 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
  • Majesty 2 Collection
  • Crusader Kings II
  • Pillars of Eternity
  • Magicka 2
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Reapers Due
I'm helping @0rth0d0xypr0xy with his mod adding a decision to create the duchy of Avignon, and am trying to set a potential = { } condition that will hide the decision if the duchy has been created. I've tried a few different things, like is_title_active, but those haven't worked.

What condition can I put in the potential block that will keep the decision from appearing if the duchy has already been created?

Update: has_holder = no worked.
 
Last edited:

kiannameiou

Second Lieutenant
1 Badges
Apr 27, 2021
157
18
  • Crusader Kings II
Are there any other code validator tools for ck2 apart from the one on the wiki? Cant seem to get rid of this error log;
[trigger.cpp:2193]: Unknown trigger-type: "=" at file: line: -1

Its just so vague.

Or if anyone can help validate I've attached the zip of all my mods.
 

Attachments

  • mod.zip
    9,6 MB · Views: 0

Darth_Mouse69

Corporal
3 Badges
Jun 30, 2021
47
3
  • Crusader Kings II
  • Hearts of Iron IV: Cadet
  • Imperator: Rome
I cant make my custom coa into the game, it keeps coming up with a random coa, I followed the tutorial.
heres the code
texture = {
file = "gfx\\coats_of_arms\\Tegeingl.tga"
size = { x = 1 y = 1 }
noOfFrames = 1
color = 0
random = no # Do not use for random CoAs
}
the dynasty code:
390006 = {
name = "Tegeingl"
culture = "welsh"
religion = "catholic"
coat_of_arms = {
template = 0
layer = {
texture = 10
texture_internal = 0
emblem = 0
color = 0
color = 0
color = 0
}
}
}
 

Aerotinge

Gouverneur van Torkia
41 Badges
Aug 1, 2018
570
170
  • Battle for Bosporus
  • Surviving Mars
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Together for Victory
  • Hearts of Iron IV: Cadet
  • Crusader Kings II
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Third Rome
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Dharma
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Cradle of Civilization
  • Age of Wonders III
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Mandate of Heaven
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Golden Century
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Cossacks
  • Crusader Kings III Referal
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV
  • 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: Art of War
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Pre-order
What version was once functional for allowed_holdings_religion and allowed_holdings_culture in governments?
The AI do not utilize these flags well, it simply gives out titles as if they're wrong holdings, regardless its religion/culture.
But I remember this used to be a thing.
 
Last edited:

kiannameiou

Second Lieutenant
1 Badges
Apr 27, 2021
157
18
  • Crusader Kings II
Is there a way to increase the number of doctrines I can have when I am reforming a religion?
Check the more doctrine mods in the workshop. Theres 3 4 6 9 12. I'm already having difficulty squeezing in 9 doctrine so no idea if 12 works

===========

How to replicate the cathar bishop secession for other religions? I'd like female bishops for some of my favorite heresies like fratceli, to maybe have a female pope hehe.
While allowing female temple holders allows female bishops to be appointed, their successors are male for non cathar.
 
Last edited:

GodModder

First Lieutenant
39 Badges
May 10, 2021
282
41
  • Shadowrun Returns
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Age of Wonders III
  • Crusader Kings II: Jade Dragon
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Digital Anniversary Edition
  • Shadowrun: Hong Kong
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Crusader Kings III
  • Stellaris: Necroids
  • Stellaris: Nemesis
  • Crusader Kings II: Way of Life
  • 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
  • Majesty 2 Collection
  • Crusader Kings II
  • Pillars of Eternity
  • Magicka 2
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Reapers Due
Like an idiot, I wrote 90 events before testing any of them. Upon testing, one event shows up 20 days into a new game, with the wrong picture (the default fallback is used), a blank description, and no options available (meaning there's no way to dismiss the event or continue the game). Charinfo tells me which event it is, which is weird, because it's a is_triggered_only event that only comes at the end of a long event chain I wrote. (I double checked that I didn't accidentally call that event from another source in events, decisions, etc.)

So there may be a parsing error somewhere that's causing the code to behave unpredictably. And it turns out that validating finds the following Parse Error:

Code:
--- Error 1 of 1 ---
Parse Failure
Path: <mod>\events\gme_events.txt
Approximate location: Line 4197, column 8
Error: Token "=" at line 4197, column 8 is part of a list and thus must be a literal.

I don't know what that means.

Line 4197 reads:
Code:
FROM = { long_character_event = { id = gme.5038 } }

I don't know what's wrong with that. The only thing I can guess is that calling an event on FROM isn't valid for some reason?

The entire event that's part of is this:
Code:
character_event = {

    id = gme.5037
    hide_window = yes
    is_triggered_only = yes

    immediate = {
        save_event_target_as:gmememberofinterest
        FROM = { long_character_event = { id = gme.5038 } }
    }
}

What's wrong with it that I need to fix?
 

Whizzer

CKPlus Triumvirate
77 Badges
Jun 17, 2014
1.622
795
  • Semper Fi
  • Hearts of Iron III Collection
  • Heir to the Throne
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Leviathan: Warships
  • The Kings Crusade
  • Magicka
  • Victoria: Revolutions
  • Rome Gold
  • Cities in Motion
  • Sengoku
  • Sword of the Stars
  • Sword of the Stars II
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Warlock: Master of the Arcane
  • Europa Universalis IV: Mare Nostrum
  • Hearts of Iron III
  • A Game of Dwarves
  • Cities in Motion 2
  • 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: Sword of Islam
  • Dungeonland
  • Crusader Kings II: Sunset Invasion
  • Europa Universalis III
  • Divine Wind
  • Hearts of Iron III: Their Finest Hour
  • For the Motherland
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Conclave
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Magicka: Wizard Wars Founder Wizard
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • War of the Roses
  • Crusader Kings III
  • Europa Universalis IV
Like an idiot, I wrote 90 events before testing any of them. Upon testing, one event shows up 20 days into a new game, with the wrong picture (the default fallback is used), a blank description, and no options available (meaning there's no way to dismiss the event or continue the game). Charinfo tells me which event it is, which is weird, because it's a is_triggered_only event that only comes at the end of a long event chain I wrote. (I double checked that I didn't accidentally call that event from another source in events, decisions, etc.)

So there may be a parsing error somewhere that's causing the code to behave unpredictably. And it turns out that validating finds the following Parse Error:

What's wrong with it that I need to fix?
Line 4196 is wrong. It should be this:

Code:
save_event_target_as = gmememberofinterest

As for events randomly firing, did you include a namespace declaration at the top of your file?
 

GodModder

First Lieutenant
39 Badges
May 10, 2021
282
41
  • Shadowrun Returns
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Age of Wonders III
  • Crusader Kings II: Jade Dragon
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Digital Anniversary Edition
  • Shadowrun: Hong Kong
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Crusader Kings III
  • Stellaris: Necroids
  • Stellaris: Nemesis
  • Crusader Kings II: Way of Life
  • 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
  • Majesty 2 Collection
  • Crusader Kings II
  • Pillars of Eternity
  • Magicka 2
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Reapers Due
Line 4196 is wrong. It should be this:

Code:
save_event_target_as = gmememberofinterest

As for events randomly firing, did you include a namespace declaration at the top of your file?
Thank you. It's always something obvious that I miss! That fixed the blank event firing.

I do have the namespace declaration too.
 

GodModder

First Lieutenant
39 Badges
May 10, 2021
282
41
  • Shadowrun Returns
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Age of Wonders III
  • Crusader Kings II: Jade Dragon
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Digital Anniversary Edition
  • Shadowrun: Hong Kong
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Crusader Kings III
  • Stellaris: Necroids
  • Stellaris: Nemesis
  • Crusader Kings II: Way of Life
  • 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
  • Majesty 2 Collection
  • Crusader Kings II
  • Pillars of Eternity
  • Magicka 2
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Reapers Due
Is there a way to set a specific character as someone's heir via event? I can't find a suitable command on the wiki. Inherit causes them to immediately inherit the titles, supplanting the previous holder, instead of just being set as heir. Set_heir_designation applies to a whole religion and gives the player of that religion the ability to set whatever heir they choose, but I just want one specific character to be set as heir by event.
 

Silversweeeper

Ichi no Hito
58 Badges
Aug 24, 2012
3.943
2.840
  • Stellaris - Path to Destruction bundle
  • 500k Club
  • Europa Universalis IV: El Dorado
  • Magicka: Wizard Wars Founder Wizard
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris: Distant Stars
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Imperator: Rome Sign Up
  • Imperator: Rome Deluxe Edition
  • Crusader Kings II: Holy Fury
  • Stellaris: Megacorp
  • Europa Universalis IV
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Europa Universalis IV: Cradle of Civilization
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: Charlemagne
  • Stellaris Sign-up
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Res Publica
  • Crusader Kings II
  • 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 III Complete
  • Magicka
Is there a way to set a specific character as someone's heir via event? I can't find a suitable command on the wiki. Inherit causes them to immediately inherit the titles, supplanting the previous holder, instead of just being set as heir. Set_heir_designation applies to a whole religion and gives the player of that religion the ability to set whatever heir they choose, but I just want one specific character to be set as heir by event.

Not really. The best you could do would be to set up an on_death event (and special handling of abdication, if desired) that forces the desired inheritance using inherit or abdicate_to, but it'd not show up properly in the interface, and the AI wouldn't understand it at all (meaning it'd easily stupid its dynasty out of power by setting up the wrong kind of marriage for the true heir or would try to murder the wrong people to ensure an inheritance goes its way).
 

GodModder

First Lieutenant
39 Badges
May 10, 2021
282
41
  • Shadowrun Returns
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Age of Wonders III
  • Crusader Kings II: Jade Dragon
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Digital Anniversary Edition
  • Shadowrun: Hong Kong
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Crusader Kings III
  • Stellaris: Necroids
  • Stellaris: Nemesis
  • Crusader Kings II: Way of Life
  • 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
  • Majesty 2 Collection
  • Crusader Kings II
  • Pillars of Eternity
  • Magicka 2
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Reapers Due
Not really. The best you could do would be to set up an on_death event (and special handling of abdication, if desired) that forces the desired inheritance using inherit or abdicate_to, but it'd not show up properly in the interface, and the AI wouldn't understand it at all (meaning it'd easily stupid its dynasty out of power by setting up the wrong kind of marriage for the true heir or would try to murder the wrong people to ensure an inheritance goes its way).
Thanks. I was planning to do the on_death inherit as a fallback, so I'll resort to that.

It seems odd that, in a game revolving around dynasties, there's not a command to set an heir.
 

kiannameiou

Second Lieutenant
1 Badges
Apr 27, 2021
157
18
  • Crusader Kings II
The closest would be the designate patrician heir, but that only works for merchant republic governments.
The designate heir for religions doesnt seem to apply to the AI, they just follow whatever gender law there is. More for players i guess
 
Last edited: