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

swampy111

Second Lieutenant
10 Badges
Apr 3, 2019
146
13
  • Cities: Skylines
  • Magicka 2
  • Cities: Skylines - Parklife
  • Shadowrun Returns
  • Prison Architect
  • Crusader Kings III
  • Crusader Kings II
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Sons of Abraham
  • Magicka
use a local variable, it will be accessible anywhere in the event chain.

e.g.
set_variable = { which = local_myvar value = 1 }
yes, but would it then be attached to a specific character? as in, will it behave like a character variable that clears itself after the event chain is over, or is it the equivalent of a global variable localized to a single event chain?
 

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
Is it possible use the PREV scope in localisations? as in, if I have [char1.char2.CustomCommand], can I use PREV in CustomCommand to refer to char1? Also, is there any way to store a variable to an event, instead of a character/province/title/whatever?

You can use Prev in customizable localisation and localisation commands, yes. I've successfully tested it myself.
 
  • 1Like
Reactions:

SRTX_999

Corporal
11 Badges
Sep 12, 2020
41
2
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: The Old Gods
  • Europa Universalis IV
  • Victoria 2
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Crusader Kings II: Holy Fury
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
I edited the governments and laws and removed everything muslim, hre and chinese related. The game loads to the character select and map, the game even loads, but when the welcome to CK2 screen appears, I can't click next, because it crashes. Maybe it's related to the edited laws and governments, but I suspect something wrong with cultures. The Validator only shows localisation errors, that shouldn't be a problem. But the weirdest thing is, that the game crashes, when I click on the cultures mapmode. Religions work fine and every other single mapmode, only cultures isn't. The error only says this, that I think is related.

Code:
[character.cpp:10839]: Failed to generate first name for a male of the noculture"

EDIT: I found out, that character groups had no color assigned. I corrected this issue, but I still have this. Religions work fine, and every province has the culture defined. So why am I seeing this?

image_2020-10-23_211833.png


EDIT2: I actually found out, that I shouldn't add color to culture group, only to cultures. But with removing it, I have a crash again, when I click on cultures mapmode.
 
Last edited:

SRTX_999

Corporal
11 Badges
Sep 12, 2020
41
2
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: The Old Gods
  • Europa Universalis IV
  • Victoria 2
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Crusader Kings II: Holy Fury
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
Still have no idea what causes the crash, when I click on culture map. And what causes noculture. Validator says nothing.

Code:
[character.cpp:10839]: Failed to generate first name for a male of the noculture"
 

swampy111

Second Lieutenant
10 Badges
Apr 3, 2019
146
13
  • Cities: Skylines
  • Magicka 2
  • Cities: Skylines - Parklife
  • Shadowrun Returns
  • Prison Architect
  • Crusader Kings III
  • Crusader Kings II
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Sons of Abraham
  • Magicka
can you invoke a custom localisation command in another custom localisation command? I one where the conditions are branching with two levels and i figured that instead of putting ~20 localisation keys into one custom command I could have a central command that routes to the other ones
 

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 you invoke a custom localisation command in another custom localisation command? I one where the conditions are branching with two levels and i figured that instead of putting ~20 localisation keys into one custom command I could have a central command that routes to the other ones

You can indeed, as of patch 2.7.
 
  • 2
Reactions:

Rockphed

Uncultured Barbarian
19 Badges
Jan 31, 2017
1.085
93
  • Crusader Kings II
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Holy Fury
  • Shadowrun Returns
  • Surviving Mars: Digital Deluxe Edition
  • Crusader Kings II: Jade Dragon
  • Surviving Mars
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • 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
I can't remember if I have already asked this: Is there a way to build a random building in a holding? I found the command to destroy a random building, and I was wondering if there was a way to reverse it.
 

Silversweeeper

Ichi no Hito
58 Badges
Aug 24, 2012
3.945
2.846
  • 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
can you compare two variables using check_variable or is_variable_equal, and if so, is the syntax check/set_variable = { which = var1 which = var2 }?

You can compare variables, yes, and check_variable can have "<", "<=" , "==" (equal to is_variable_equal), ">=" (equal to simply "="), and ">" in front of var2, similar to how it works if you compare var1 to a fixed value.
 

swampy111

Second Lieutenant
10 Badges
Apr 3, 2019
146
13
  • Cities: Skylines
  • Magicka 2
  • Cities: Skylines - Parklife
  • Shadowrun Returns
  • Prison Architect
  • Crusader Kings III
  • Crusader Kings II
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Sons of Abraham
  • Magicka
You can compare variables, yes, and check_variable can have "<", "<=" , "==" (equal to is_variable_equal), ">=" (equal to simply "="), and ">" in front of var2, similar to how it works if you compare var1 to a fixed value.
So how would it look like?
check_variable = { var 1 >= var2 }
or
check_variable = { which = var 1 which >= var2 }
or would it be something else?
 

slothinator

Colonel
55 Badges
Oct 20, 2016
955
833
  • Stellaris: Humanoids Species Pack
  • Stellaris
  • 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
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Cradle of Civilization
  • Crusader Kings II: Jade Dragon
  • Europa Universalis IV: Mare Nostrum
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Stellaris: Distant Stars
  • Europa Universalis IV: Dharma
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Golden Century
  • Imperator: Rome
  • Imperator: Rome Sign Up
  • Stellaris: Ancient Relics
  • Stellaris: Federations
  • Imperator: Rome - Magna Graecia
  • Europa Universalis IV: Call to arms event
  • 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: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Crusader Kings II
  • Europa Universalis IV: Res Publica
  • Victoria 3 Sign Up
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
Hello everyone, I have a question about creating reformed religions.
Is there a way to enable a feature in a religion by command? i.e. can I give a religion access to haruspicy by event?
Thanks a lot!
 

swampy111

Second Lieutenant
10 Badges
Apr 3, 2019
146
13
  • Cities: Skylines
  • Magicka 2
  • Cities: Skylines - Parklife
  • Shadowrun Returns
  • Prison Architect
  • Crusader Kings III
  • Crusader Kings II
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Sons of Abraham
  • Magicka
Hello everyone, I have a question about creating reformed religions.
Is there a way to enable a feature in a religion by command? i.e. can I give a religion access to haruspicy by event?
Thanks a lot!
just ctrl-f religion

I know you can add features in through save files, so there shouldn't be any reason why you can't do that with commands
 

swampy111

Second Lieutenant
10 Badges
Apr 3, 2019
146
13
  • Cities: Skylines
  • Magicka 2
  • Cities: Skylines - Parklife
  • Shadowrun Returns
  • Prison Architect
  • Crusader Kings III
  • Crusader Kings II
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Sons of Abraham
  • Magicka
I know that if there are several texts whose conditions are true, than a random one is chosen; is there any way to define the odds of that happening through localisation (i know its' possible to achieve the same through random lists in the effects block, but that would make the code incredibly inwieldy considering what i hope to achieve)? And by that, i mean any method other than duplicating the texts?
 

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
Hello everyone, I have a question about creating reformed religions.
Is there a way to enable a feature in a religion by command? i.e. can I give a religion access to haruspicy by event?
Thanks a lot!
I'd like to quote a previous post as an answer, it's helpful and detailed.
That allows us to duplicate many religious features, but not all. For example we can't add Ancestor Veneration as all the effects specifically check whether the religion has the feature in question.

The features we could fully implement through script are: Warmongering, Unyielding, Peaceful, Dogmatic, Cosmopolitan, Divine Marriage, Polygamy, Meritocracy, Unrelenting, Sea Bound, Daring, Religious Tax

The features we can partially implement are: Proselytizing (can't replicate conversion bonus), Stability (can't use Mellorism stat boost decision), Monasticism (can't use forcing vows decision)

The features for which we can implement some effects, but not the main effect: Animism (can only implement morale bonus), Enatic Clans (can only add consorts and prohibit concubines), Equality (can only add consorts), Agnatic Clans (can only prohibit consorts for African and Bon)

The features we can't implement at all are: Ancestor Veneration, Syncreticism, Haruspicy, Bloodthirsty Gods

I'm unsure about leadership. Anyway, we can fully implement through script 5 out of 6 natures and 7 out of 17 doctrines. That still gives us 105 potential combinations, which is decent, but we could have hundreds more if there was a scripting command to add a religious feature.



Can you elaborate on what you mean by "A flag for the religion should be able to control basic functionality for that title"?
 
  • 1Like
  • 1
Reactions: