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.
I don't understand what you mean. Can you explain in more detail, or give an example?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?
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: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 }"
any_realm_character = {
has_character_flag = special_char_flag
trait = strong
}
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
}
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 }
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.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?
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
}
}
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.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?
Perhaps you could tell us, very specifically, what it is you're trying to do, so we could give more specific advice.
relative_power = { who = FROM power = 2.0 }
relative_power = { who = {any_realm_character = { has_character_flag = whatever } } power = 2.0 }
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.
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?
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?
Thank you for the reply! That is unfortunate, but then I will do without it.I don't think so.
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?
Yes add "host = ROOT" after "prisoner = yes"
Or maybe "host = FROM"
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.
Yes you can, we even use it in vanillaThank you for the reply! That is unfortunate, but then I will do without it.
Excellent! I guess my search through the vanilla files wasn't sufficiently thorough.Yes you can, we even use it in vanilla
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.
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)I'm assuming the quoting messed up and you have a question in the last part .
Sadly there are no targeted decisions for artifacts, best way is to use regular decisions that scopes to them.
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.