Quick question: how to apply character_modifier from buildings to liege instead of to holder?
Tried to fix known bug with lessee and temple holdings without success.
Tried to fix known bug with lessee and temple holdings without success.
if = {
limit = {
scope:rbdiviner_type = flag:oracle
NOT = {
is_alive = scope:rboracle_char
}
}
create_character = {
age = { 25 50 }
gender_female_chance = 100
dynasty = none
trait = education_learning_3
trait = zealous
trait = rbancient_oracle_trait
diplomacy = { 10 14 }
martial = 5
stewardship = 6
intrigue = { 6 8 }
learning = { 8 10 }
random_traits_list = {
count = 2
gregarious = {}
deceitful = {}
humble = {}
arrogant = {}
temperate = {}
gluttonous = {}
}
random_traits = yes
faith = root.faith
culture = root.culture
save_scope_as = rboracle_char
}
}
Is there a way to store a character flag or variable after death?
Any chance you'd be willing to hit me up on discord to discuss this in greater detail? My ID is Five#9838, and I'm also in the CK3 Mod COop Discord.The only way I've found is to set an individual global variable for that character, which is obviously not useful for most purposes. I'm not sure if lists maintain members after death; if they do, you could use a global list likewise, which would be more practicable, but I'm not sure of their behavior, so that's more a suggestion for testing than anything.
So I made a function to create a character to hang out and look cool in a character event, and it works fine. But this being triggered from a decision on a 3 year cooldown I'd like it to re-use the same character from before, providing they're still alive. Only it's not doing that, and creating a new character each time.
Unfortunately I neither have nor use Discord, but I detailed it a bit for my particular use case (of customizing a character's appearance) in this post, which should be able to be easily adapted in terms of setting and checking the global variable. If you've any further questions, you can feel free to send me a message and I'll provide as much detail and assistance as I can in response!Any chance you'd be willing to hit me up on discord to discuss this in greater detail? My ID is Five#9838, and I'm also in the CK3 Mod COop Discord.
Unfortunately I neither have nor use Discord, but I detailed it a bit for my particular use case (of customizing a character's appearance) in this post, which should be able to be easily adapted in terms of setting and checking the global variable. If you've any further questions, you can feel free to send me a message and I'll provide as much detail and assistance as I can in response!
I actually saw your post a little bit ago. The problem with the solution you presented is that it's very manual. This needs to occur dynamically for a very very large amount of characters in the game. Is there maybe a way that a global variable could be created for the character with their character ID automatically plugged into it? That way it's globally unique. Over the course of the game there will likely be 10s of thousands of characters that will need variables to persist on death. Maybe even more...
I also need to call it in localization somehow (the variable I'm saving is a character-specific scope).
I am bit curious aboud modding in CK3. But I have to ask if its best to start with CK3 right away or earn my spurs, so to say, with modding in perhaps the more stabile (as in no ongoing patching and stuff) CK2?
Actually the thing about location and employer gave me a good idea, and @Aregodas gave a couple of other clues that led me to a solution (though I'm greedy and now want to complicate matters further). Thanks both!I know it has nothing to do with your question, but I am curious about this so thought i would ask anyway. I thought when I created a character in an event I had to either include a line specifying the employer or the location to either recruit to court or set as a wanderer. I see you have done neither so am I wrong and I could leave this out?
if = {
limit = {
any_courtier_or_guest = {
has_trait = rbancient_oracle_trait
}
}
random_courtier_or_guest = {
limit = {
has_trait = rbancient_oracle_trait
}
save_scope_as = rboracle_char
}
}
else = {
create_character = {
age = { 25 50 }
gender_female_chance = 100
dynasty = none
trait = education_learning_3
trait = zealous
trait = rbancient_oracle_trait
trait = devoted
diplomacy = { 10 14 }
martial = 5
stewardship = 6
intrigue = { 6 8 }
learning = { 8 10 }
random_traits_list = {
count = 2
gregarious = {}
deceitful = {}
humble = {}
arrogant = {}
temperate = {}
gluttonous = {}
}
random_traits = yes
location = root.capital_province
employer = root
faith = root.faith
culture = root.culture
save_scope_as = rboracle_char
}
}
While you could certainly use it for that purpose (though your syntax is incorrect; the region must be specified as theI'm reading the triggers wiki and trying to work out what this particular trigger allows: is "any_county_in_region = custom_west_slavia" (for example) permitted as a trigger? Meaning, a decision will appear for any ruler who owns a county in the West Slavia geographical region.
region parameter inside the any_county_in_region block), that particular trigger is more useful to, say, ensure that one or more counties in a region meet some other trigger, like having a specific culture or religion. To simply match everyone who owns at least one county in West Slavia, I'd use this instead:any_sub_realm_county = {
title_province = { geographical_region = custom_west_slavia }
}
trigger block, it won't cause the event to trigger for anyone—it only prevents it from triggering for those who don't meet the trigger criteria once it's already called. That could be useful if you're calling it from yearly_playable_pulse or something, but if you're firing the event from your own on action or event script, you'll probably want to use that in a limit block instead, something like…every_ruler = {
limit = {
any_sub_realm_county = {
title_province = { geographical_region = custom_west_slavia }
}
}
trigger_event = custom_event.0001
}
option = { #sweet money2
name = tyrannical_greed.0001.b
tyrannical_greed_decision_effects2 = yes
add_opinion = {
modifier = extorted_vassals_modifier
years = 5
target = {
is_councillor_of = root
has_council_position = councillor_steward
}
}
}
option = { #sweet money2
name = tyrannical_greed.0001.b
tyrannical_greed_decision_effects2 = yes
add_opinion = {
modifier = extorted_vassals_modifier
years = 5
target = cp:councillor_steward
}
}
Hi guys. See if you can help me with this small issue. I'm trying to include to one event option that my own Steward loses 10 opinion of me. I've tried several ways but something scapes me. I'm certain it has to do with scopes or the like but I don't know how to make use of them yet.
This just disables the option entirely.Code:option = { #sweet money2 name = tyrannical_greed.0001.b tyrannical_greed_decision_effects2 = yes add_opinion = { modifier = extorted_vassals_modifier years = 5 target = { is_councillor_of = root has_council_position = councillor_steward } } }
And this one makes my character gain 0 opinion of my Steward instead. Any idea how should I go on about this?Code:option = { #sweet money2 name = tyrannical_greed.0001.b tyrannical_greed_decision_effects2 = yes add_opinion = { modifier = extorted_vassals_modifier years = 5 target = cp:councillor_steward } }
extorted_vassals_modifier is a character modifier, not an opinion modifier. You could define your own opinion modifier and then apply it with reverse_add_opinion, to reverse the direction.# common/opinion_modifiers/custom_opinions.txt
extorted_vassals_opinion = {
opinion = -10
decaying = yes # or no, whatever you want
years = 5
}
# localization/english/opinions/custom_opinions_l_english.yml
# I just copied the name of the extorted vassals modifier
# You could probably use this same format with other languages to avoid having to do your own translations
l_english:
extorted_me_opinion:0 "$extorted_vassals_modifier$"
# your event option
option = { #sweet money2
name = tyrannical_greed.0001.b
tyrannical_greed_decision_effects2 = yes
reverse_add_opinion = {
modifier = extorted_vassals_opinion
target = cp:councillor_steward
}
}