• Crusader Kings III Available Now!

    The realm rejoices as Paradox Interactive announces the launch of Crusader Kings III, the latest entry in the publisher’s grand strategy role-playing game franchise. Advisors may now jockey for positions of influence and adversaries should save their schemes for another day, because on this day Crusader Kings III can be purchased on Steam, the Paradox Store, and other major online retailers.


    Real Strategy Requires Cunning

Thezezeal

Captain
3 Badges
Dec 28, 2014
375
3
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Charlemagne
Is it possible to rotate the map-frame? I've tried editing the statics entry, but it's had no effect; I want to turn it to Portrait, as I've already altered the map to that orientation.
 

LordPeter

Marjoram
47 Badges
Mar 5, 2012
2.249
381
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Cossacks
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Mare Nostrum
  • Stellaris - Path to Destruction bundle
  • Stellaris Sign-up
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Conclave
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Synthetic Dawn
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Prison Architect
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Horse Lords
  • 500k Club
  • Europa Universalis IV: Res Publica
  • 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
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Crusader Kings II: Sword of Islam
  • Stellaris
  • Europa Universalis IV: Third Rome
  • Cities: Skylines
  • Europa Universalis IV: Cradle of Civilization
  • Crusader Kings II: Jade Dragon
How do I tell an event to check the traits and attributes of a character that has a certain character flag, as opposed to the default game behaviour of checking the character the event is happening to?
I don't understand what you mean. Can you explain in more detail, or give an example?
 

Undecided

First Lieutenant
77 Badges
Apr 27, 2008
290
3
  • Semper Fi
  • Europa Universalis IV: Wealth of Nations
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Leviathan: Warships
  • Majesty 2 Collection
  • March of the Eagles
  • Europa Universalis IV: Res Publica
  • A Game of Dwarves
  • Sword of the Stars II
  • Supreme Ruler: Cold War
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Crusader Kings II: Jade Dragon
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Art of War
  • Hearts of Iron II: Armageddon
  • 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
  • Darkest Hour
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II: Reapers Due
  • Europa Universalis III Complete
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Mount & Blade: Warband
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Holy Knight (pre-order)
  • 500k Club
  • Europa Universalis III Complete
I don't understand what you mean. Can you explain in more detail, or give an example?

For example, if you're writing a character event and you use "trait = strong" it will look at the targeted character for the trait, and no one else.

I want the event to look at a character (designated with a character flag) that isn't directly involved in an event. So in this example, check for "trait = strong" on any characters marked using "has_character_flag = { special_char_flag }"
 

Omniscient

Major
30 Badges
Oct 31, 2006
712
8
  • Crusader Kings II: Conclave
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Stellaris: Megacorp
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Crusader Kings II: Jade Dragon
  • Stellaris: Synthetic Dawn
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II: Monks and Mystics
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Crusader Kings II: Reapers Due
  • Stellaris
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Way of Life
  • Victoria 2
  • Europa Universalis IV: Res Publica
  • Hearts of Iron III
  • Europa Universalis IV: Wealth of Nations
  • Crusader Kings II: Sword of Islam
  • 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
For example, if you're writing a character event and you use "trait = strong" it will look at the targeted character for the trait, and no one else.

I want the event to look at a character (designated with a character flag) that isn't directly involved in an event. So in this example, check for "trait = strong" on any characters marked using "has_character_flag = { special_char_flag }"
You'd have to scope to them in the trigger. How you'd scope to them depends on how they're related to the ROOT character. For example, if you want to scope to any realm character with the flag and the strong trait, you'd use:
Code:
any_realm_character = {
    has_character_flag = special_char_flag
    trait = strong
}
And then, to do something to them, you'd use:
Code:
random_realm_character = { # or any_realm_character if you want it to effect everyone that meets the conditions
    limit = {
        has_character_flag = special_char_flag
        trait = strong
    }
    # any effects
}
 

Undecided

First Lieutenant
77 Badges
Apr 27, 2008
290
3
  • Semper Fi
  • Europa Universalis IV: Wealth of Nations
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Leviathan: Warships
  • Majesty 2 Collection
  • March of the Eagles
  • Europa Universalis IV: Res Publica
  • A Game of Dwarves
  • Sword of the Stars II
  • Supreme Ruler: Cold War
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Crusader Kings II: Jade Dragon
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Art of War
  • Hearts of Iron II: Armageddon
  • 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
  • Darkest Hour
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II: Reapers Due
  • Europa Universalis III Complete
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Mount & Blade: Warband
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Holy Knight (pre-order)
  • 500k Club
  • Europa Universalis III Complete
And then, to do something to them, you'd use:
Code:
random_realm_character = { # or any_realm_character if you want it to effect everyone that meets the conditions
    limit = {
        has_character_flag = special_char_flag
        trait = strong
    }
    # any effects
}
Just to clarify, would an instance of this event keep running the search until someone with the proper flag is found? Or would it fire once, and just stop if the randomly-selected individual does not have the relevant flag?
 

LordPeter

Marjoram
47 Badges
Mar 5, 2012
2.249
381
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Cossacks
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Mare Nostrum
  • Stellaris - Path to Destruction bundle
  • Stellaris Sign-up
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Conclave
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Synthetic Dawn
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Prison Architect
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Horse Lords
  • 500k Club
  • Europa Universalis IV: Res Publica
  • 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
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Crusader Kings II: Sword of Islam
  • Stellaris
  • Europa Universalis IV: Third Rome
  • Cities: Skylines
  • Europa Universalis IV: Cradle of Civilization
  • Crusader Kings II: Jade Dragon
Just to clarify, would an instance of this event keep running the search until someone with the proper flag is found? Or would it fire once, and just stop if the randomly-selected individual does not have the relevant flag?
Depends on how you implement it - the above suggested pieces of code are only scraps, after all, you'd need to use them in a context.
Here is an example of how they could be combined, I hope the annotations explain it:
Code:
if = {
    # conditions to be fulfilled: At least one character in the realm exists with both the character flag and the "strong" trait. Code below checks for that:
    any_realm_character = {    # <- is fulfilled if at least one character qualifies, but could be multiple as well!
        AND = {    # <- this AND is just for clarification, as it is the default
            has_character_flag = special_char_flag
            trait = strong
        }
    }
    # The following is the "then (do)" part of an if/else structure - that means it will only execute if a character fulfilling the conditions above has been found:
    random_realm_character = { # This will mean only one, randomly chosen character of those that qualified the condtions above will experience the event. Use any_realm_character if you want it to effect everyone that meets the conditions
        limit = {
            has_character_flag = special_char_flag
            trait = strong
        }
        # any effects
    }
}
To answer your question for this example: First the event would search until it has found a character that fulfills the conditions (has the flag and the trait), or until it has checked every character in the realm, and no one qualified.
In the case it found someone (or several!), it will pick one of those that qualified (that's the second scope with the "limit" thing), and execute the effects you specified on that person.
As @Omniscient already noted, you could also use "any_realm_character" instead of "random_realm_character", which would mean the event would scope to all characters that qualified (it could have been several, after all), and execute the effects for all of them.
In the case the condition found no character that qualified the criteria, it will simply do nothing.

Again, this is only an example event (or rather, part of it - you still need all the stuff around it, like an id, a picture etc). Events are incredibly powerful, and you could code other varieties of this event that behave differently. But this is a simple event that probably does what you want.
 

Omniscient

Major
30 Badges
Oct 31, 2006
712
8
  • Crusader Kings II: Conclave
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Stellaris: Megacorp
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Crusader Kings II: Jade Dragon
  • Stellaris: Synthetic Dawn
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II: Monks and Mystics
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Crusader Kings II: Reapers Due
  • Stellaris
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Way of Life
  • Victoria 2
  • Europa Universalis IV: Res Publica
  • Hearts of Iron III
  • Europa Universalis IV: Wealth of Nations
  • Crusader Kings II: Sword of Islam
  • 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
Just to clarify, would an instance of this event keep running the search until someone with the proper flag is found? Or would it fire once, and just stop if the randomly-selected individual does not have the relevant flag?
How often it checks depends on how you construct the event (mean time to happen of triggered on_action), but if the event trigger isn't satisfied, the event won't fire.

If you're asking about random_realm_character, it can only be used in an effect block (immediate or options), never in the trigger block.

Perhaps you could tell us, very specifically, what it is you're trying to do, so we could give more specific advice.
 
Last edited:

NoobLord

Corporal
52 Badges
May 11, 2013
28
18
  • Crusader Kings II
  • Crusader Kings III
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: The Republic
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Rights of Man
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Cradle of Civilization
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Dharma
  • Europa Universalis IV: Golden Century
  • Stellaris
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Stellaris: Ancient Relics
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Together for Victory
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Expansion Pass
  • Imperator: Rome
How do you make traits show up in the ruler designer? I can't seem to figure it out, I've tried adding customizer = yes and a ruler_designer_cost = x but it just doesn't work. The traits themselves aren't broken though, I can assign those through the console just fine.
 

Undecided

First Lieutenant
77 Badges
Apr 27, 2008
290
3
  • Semper Fi
  • Europa Universalis IV: Wealth of Nations
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Leviathan: Warships
  • Majesty 2 Collection
  • March of the Eagles
  • Europa Universalis IV: Res Publica
  • A Game of Dwarves
  • Sword of the Stars II
  • Supreme Ruler: Cold War
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Crusader Kings II: Jade Dragon
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Art of War
  • Hearts of Iron II: Armageddon
  • 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
  • Darkest Hour
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II: Reapers Due
  • Europa Universalis III Complete
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Mount & Blade: Warband
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Holy Knight (pre-order)
  • 500k Club
  • Europa Universalis III Complete
Perhaps you could tell us, very specifically, what it is you're trying to do, so we could give more specific advice.
Well, it's more I'm trying to understand how to code, which is why I'm using generic examples so I have to do it myself, rather than just posting the exact code and having others do it for me.

But back on the topic of finding characters, is know comparative conditions (relative_power, attribute_diff, opinion_diff) normally have you use specific variables (ROOT and FROM) to determine the targets of the comparison. But would it be possible to replace ROOT or FROM with a targeted search like "{any_realm_character = { has_character_flag = whatever } }"?

For example, taking the standard

Code:
relative_power = { who = FROM power = 2.0 }
and turning it into

Code:
relative_power = { who = {any_realm_character = { has_character_flag = whatever } } power = 2.0 }
is something like that possible, or can you not change variables like that?
 

Silversweeeper

Lawful Evil Overlord
55 Badges
Aug 24, 2012
3.345
1.864
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Europa Universalis IV: Common Sense
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Imperator: Rome Deluxe Edition
  • Stellaris: Ancient Relics
  • Imperator: Rome Sign Up
  • Crusader Kings II: Way of Life
  • Magicka: Wizard Wars Founder Wizard
  • Europa Universalis IV: El Dorado
  • 500k Club
  • Europa Universalis III Complete
  • Pillars of Eternity
  • Europa Universalis III Complete
  • Stellaris: Lithoids
  • 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
  • Europa Universalis III
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
Can saved event targets be used in dynamic flags? So if I save a certain scope as an event target variable, can I use it in a dynamic flag by appending @ and the name of my scope saved as the event target variable? I didn't find any information about this particular combination on the wiki.
I don't think so.

Is it possible to make a merchant republic hold a new election every set number of years rather than on the death of its doge?
It might be possible to recreate everything except the campaign fund contributions with events, but it might get messy. Not sure if the logic behind the election is visible somewhere or not.
 

Omniscient

Major
30 Badges
Oct 31, 2006
712
8
  • Crusader Kings II: Conclave
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Stellaris: Megacorp
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Crusader Kings II: Jade Dragon
  • Stellaris: Synthetic Dawn
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II: Monks and Mystics
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Crusader Kings II: Reapers Due
  • Stellaris
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Way of Life
  • Victoria 2
  • Europa Universalis IV: Res Publica
  • Hearts of Iron III
  • Europa Universalis IV: Wealth of Nations
  • Crusader Kings II: Sword of Islam
  • 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
Well, it's more I'm trying to understand how to code, which is why I'm using generic examples so I have to do it myself, rather than just posting the exact code and having others do it for me.

But back on the topic of finding characters, is know comparative conditions (relative_power, attribute_diff, opinion_diff) normally have you use specific variables (ROOT and FROM) to determine the targets of the comparison. But would it be possible to replace ROOT or FROM with a targeted search like "{any_realm_character = { has_character_flag = whatever } }"?

For example, taking the standard

Code:
relative_power = { who = FROM power = 2.0 }
and turning it into

Code:
relative_power = { who = {any_realm_character = { has_character_flag = whatever } } power = 2.0 }
is something like that possible, or can you not change variables like that?
No, but you could use PREV to check the previous scope in a scope chain. ((PREVPREV will scope back two, and so on, up to four back) https://ck2.paradoxwikis.com/Scripting#Scope_chain

You can also (and this is probably what you need to do) use dynamic event targets. https://ck2.paradoxwikis.com/Scripting#Event_targets Note that event targets usually cannot be accessed outside of an event chain.
 

Undecided

First Lieutenant
77 Badges
Apr 27, 2008
290
3
  • Semper Fi
  • Europa Universalis IV: Wealth of Nations
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Leviathan: Warships
  • Majesty 2 Collection
  • March of the Eagles
  • Europa Universalis IV: Res Publica
  • A Game of Dwarves
  • Sword of the Stars II
  • Supreme Ruler: Cold War
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Crusader Kings II: Jade Dragon
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Art of War
  • Hearts of Iron II: Armageddon
  • 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
  • Darkest Hour
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II: Reapers Due
  • Europa Universalis III Complete
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Mount & Blade: Warband
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Holy Knight (pre-order)
  • 500k Club
  • Europa Universalis III Complete
So, I tried out the validator, but whenever I run it, it scans the game itself and every single mod in the mod directory, and just dumps a huge list of errors from all of them in one spot. Which is just a giant mess.

Is there any way I can get the validator to scan a specific text file for formatting, or barring that, just a single mod directory? Or do I have to create an entire second game install or move all the mods I don't want scanned?
 

loup99

Godogost of Armorica
78 Badges
Jan 22, 2013
16.157
4.334
  • Crusader Kings III
  • Warlock 2: The Exiled
  • 500k Club
  • Pride of Nations
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Crusader Kings Complete
  • Imperator: Rome Deluxe Edition
  • Victoria 2
  • Arsenal of Democracy
  • Cities in Motion
  • Crusader Kings II
  • Darkest Hour
  • Europa Universalis III: Chronicles
  • For The Glory
  • Hearts of Iron III
  • March of the Eagles
  • Rome Gold
  • Sengoku
  • Victoria 2: A House Divided
  • Victoria: Revolutions
  • Cities: Skylines
  • Europa Universalis IV: Pre-order

Thezezeal

Captain
3 Badges
Dec 28, 2014
375
3
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Charlemagne
So, I tried out the validator, but whenever I run it, it scans the game itself and every single mod in the mod directory, and just dumps a huge list of errors from all of them in one spot. Which is just a giant mess.

Is there any way I can get the validator to scan a specific text file for formatting, or barring that, just a single mod directory? Or do I have to create an entire second game install or move all the mods I don't want scanned?
Unless it's been updated/changed, there should be a drop-down on the right near the top. By default it says "show all errors". You can change this to "show mod errors"

Below that is a Validation Options, which will let you limit it to certain types of file based on what is ticked.

Below the line containing the game directory path is another empty bar; clicking that, you can type in the file name of your Mod, and it will limit it to that mod.


Edit :
I have a problem with a decision. It's a high-priority, and it is recognised by the reminder icon at the top of the screen (if I hover over it, it says "the following important decisions are available: " and correctly lists my decision), but it does not actually appear in the Decisions tab, even if the potential is 'always = yes'. The Validator shows no errors with the decision.
 
Last edited:

Rydelfox

Lt. General
79 Badges
Oct 30, 2016
1.468
8
  • Sword of the Stars
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II: Jade Dragon
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: Mare Nostrum
  • Rome: Vae Victis
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Europa Universalis IV: Third Rome
  • Stellaris: Synthetic Dawn
  • Victoria: Revolutions
  • Europa Universalis IV: Res Publica
  • Majesty 2
  • Magicka
  • Knights of Pen and Paper +1 Edition
  • King Arthur II
  • Europa Universalis IV: Call to arms event
  • A Game of Dwarves
  • 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
  • Hearts of Iron III
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Dungeonland
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II: Sons of Abraham
  • Europa Universalis IV: Art of War
  • Crusader Kings III
  • Crusader Kings II: Monks and Mystics
  • Hearts of Iron IV: Together for Victory
  • Stellaris: Leviathans Story Pack
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Cadet
  • Stellaris: Galaxy Edition
  • Stellaris
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Pillars of Eternity
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • Europa Universalis IV: Mandate of Heaven
  • Victoria 2
Yes add "host = ROOT" after "prisoner = yes"
Or maybe "host = FROM"
This would still scope to other prisoners the character has as well. If this is part of an event chain, the easiest way is to save them as an event target. Otherwise, set a flag on them, and limit for that.

I'm having issues getting an event to fire, and would like someone to proofread the code to help me find where I went wrong. /QUOTE]

Have you run the code in the validator? I don't see anything offhand, except that extra } before your on_actions. If there something like mismatched braces earlier in the file, that could stop later events from firing


Also, does anyone know if there's an equivalent to targetted decisions for artifacts? destroy_artifact seems to be implemented as a regular decision and it probably doing something hard-coded behind the scenes, but I thought I should check to be sure.
 

loup99

Godogost of Armorica
78 Badges
Jan 22, 2013
16.157
4.334
  • Crusader Kings III
  • Warlock 2: The Exiled
  • 500k Club
  • Pride of Nations
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Crusader Kings Complete
  • Imperator: Rome Deluxe Edition
  • Victoria 2
  • Arsenal of Democracy
  • Cities in Motion
  • Crusader Kings II
  • Darkest Hour
  • Europa Universalis III: Chronicles
  • For The Glory
  • Hearts of Iron III
  • March of the Eagles
  • Rome Gold
  • Sengoku
  • Victoria 2: A House Divided
  • Victoria: Revolutions
  • Cities: Skylines
  • Europa Universalis IV: Pre-order

Auirus

First Lieutenant
67 Badges
Dec 10, 2016
217
1
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: The Republic
  • Crusader Kings III: Royal Edition
  • Crusader Kings II: Conclave
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Crusader Kings II: Horse Lords
  • Hearts of Iron IV: Death or Dishonor
  • Prison Architect
  • Cities: Skylines - Green Cities
  • Cities: Skylines - Parklife
  • Cities: Skylines - Parklife Pre-Order
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Warlock: Master of the Arcane
  • Imperator: Rome Deluxe Edition
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Common Sense
  • Victoria 2
  • Stellaris: Ancient Relics
  • Stellaris: Distant Stars
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Dharma
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Golden Century
  • Crusader Kings III
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Cossacks
This would still scope to other prisoners the character has as well. If this is part of an event chain, the easiest way is to save them as an event target. Otherwise, set a flag on them, and limit for that.
I'm assuming the quoting messed up and you have a question in the last part :p.
Sadly there are no targeted decisions for artifacts, best way is to use regular decisions that scopes to them.
 

Omniscient

Major
30 Badges
Oct 31, 2006
712
8
  • Crusader Kings II: Conclave
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Stellaris: Megacorp
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Crusader Kings II: Jade Dragon
  • Stellaris: Synthetic Dawn
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II: Monks and Mystics
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Crusader Kings II: Reapers Due
  • Stellaris
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Way of Life
  • Victoria 2
  • Europa Universalis IV: Res Publica
  • Hearts of Iron III
  • Europa Universalis IV: Wealth of Nations
  • Crusader Kings II: Sword of Islam
  • 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
I'm assuming the quoting messed up and you have a question in the last part :p.
Sadly there are no targeted decisions for artifacts, best way is to use regular decisions that scopes to them.
You should be able to do a third-party targeted decision that targets yourself, with the artifact as the third party. (Look at the code for the send artifact to china decision for guidance. Note that the Jade dragon decision is an offmap decision, and so doesn't need filter and ai_filter. A regular targeted decision would still need those)
 

NoobLord

Corporal
52 Badges
May 11, 2013
28
18
  • Crusader Kings II
  • Crusader Kings III
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: The Republic
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Rights of Man
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Cradle of Civilization
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Dharma
  • Europa Universalis IV: Golden Century
  • Stellaris
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Stellaris: Ancient Relics
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Together for Victory
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Expansion Pass
  • Imperator: Rome
How do you make traits show up in the ruler designer? I can't seem to figure it out, I've tried adding customizer = yes and a ruler_designer_cost = x but it just doesn't work. The traits themselves aren't broken though, I can assign those through the console just fine.
I have also just run into another weird bug with the traits, they remove themselves from the player character upon saving. This only happens to the player character, not other characters who have this trait, what could be causing this weird behaviour?