use a local variable, it will be accessible anywhere in the event chain.Also, is there any way to store a variable to an event,
e.g.
set_variable = { which = local_myvar value = 1 }
use a local variable, it will be accessible anywhere in the event chain.Also, is there any way to store a variable to an event,
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?use a local variable, it will be accessible anywhere in the event chain.
e.g.
set_variable = { which = local_myvar value = 1 }
yesor is it the equivalent of a global variable localized to a single event chain?
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?
thanks! it opens up so many new possibilitiesYou can use Prev in customizable localisation and localisation commands, yes. I've successfully tested it myself.
[character.cpp:10839]: Failed to generate first name for a male of the noculture"
[character.cpp:10839]: Failed to generate first name for a male of the noculture"
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
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.
random_list is probably your best bet.So there isn't an inverse of "destroy_random_building"? Ah, well. There goes the easy way to future proof my mod.random_listis probably your best bet.
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 }?
So how would it look like?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?
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.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!
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"?