Buzhidao Posted November 21, 2018 Posted November 21, 2018 11 minutes ago, lockeslylcrit said: [character scope] = { NOT = { num_of_consorts == [max consort value for the religion/culture] } } What if the value is dynamically set? EDIT: meaning it's not 3, like in vanilla.
lockeslylcrit Posted November 21, 2018 Posted November 21, 2018 3 minutes ago, Rascalov1337 said: Thanks. And one more question: if i want to replace just one specific event, i just need to create my own event with the same id as original, right? No need to copy entire events file, or something like that? Yes, you can. I tested this out with DWR's elf campaign start. I copied the event into a different file in another mod that used it (specifically Dark World Tweaks), and edited it. As you can see, my edits overwrite the original event, which only gives the trait, while still keeping the original file intact even though I'm using a completely different file name. The event id HAS to be the same though.
Buzhidao Posted November 21, 2018 Posted November 21, 2018 Speaking of consorts, how DO you check if a religion/government allows them? We can now set society ranks to allow consorts, so how do you check for that?
lockeslylcrit Posted November 21, 2018 Posted November 21, 2018 12 minutes ago, Buzhidao said: What if the value is dynamically set? EDIT: meaning it's not 3, like in vanilla. If it's from your own mod, then you can try set_variable when you change the number of max consorts. # Example set_max_consorts = 5 set_variable { which = my_consorts value = 5 } # [character_scope] = { NOT = { num_of_consorts == my_consorts } } I haven't played around much with dynamic variables, so YMMV
lockeslylcrit Posted November 21, 2018 Posted November 21, 2018 4 minutes ago, Buzhidao said: Speaking of consorts, how DO you check if a religion/government allows them? We can now set society ranks to allow consorts, so how do you check for that? has_concubinage = yes for the first question. The second question is beyond my tired mind at the moment. I'll check when I wake up. 1
Buzhidao Posted November 21, 2018 Posted November 21, 2018 1 minute ago, lockeslylcrit said: If it's from your own mod, then you can try set_variable when you change the number of max consorts. # Example set_max_consorts = 5 set_variable { which = my_consorts value = 5 } # [character_scope] = { NOT = { num_of_consorts = my_consorts } } I haven't played around much with dynamic variables, so YMMV I will just have to abandon hope of any elegant solution to this and just put the number 3 in there.
Rascalov1337 Posted November 21, 2018 Posted November 21, 2018 11 minutes ago, lockeslylcrit said: Yes, you can. I tested this out with DWR's elf campaign start. I copied the event into a different file in another mod that used it (specifically Dark World Tweaks), and edited it. As you can see, my edits overwrite the original event, which only gives the trait, while still keeping the original file intact even though I'm using a completely different file name. The event id HAS to be the same though. Oh, that's good. I assume there is same situation with traits, right? What about localization? I need to copy it too, or it can use original one, if same localization key is used?
lockeslylcrit Posted November 21, 2018 Posted November 21, 2018 1 minute ago, Rascalov1337 said: Oh, that's good. I assume there is same situation with traits, right? What about localization? I need to copy it too, or it can use original one, if same localization key is used? Yes and yes. As long as a dependency is set, you can overwrite anything as long as the original key or id is used. This allows other mods who use that dependency to not break, while still allowing you to make your own personal changes.
Rascalov1337 Posted November 21, 2018 Posted November 21, 2018 2 minutes ago, lockeslylcrit said: Yes and yes. As long as a dependency is set, you can overwrite anything as long as the original key or id is used. This allows other mods who use that dependency to not break, while still allowing you to make your own personal changes. Thanks. And last one for now: I am planning to change DWR Kitsune starting event, and your mod, DWTweaks, changes localization key in it to one from your mod. So, i just need to add DWTweaks in dependencies too, if i want to use your edit?
lockeslylcrit Posted November 21, 2018 Posted November 21, 2018 6 minutes ago, Rascalov1337 said: Thanks. And last one for now: I am planning to change DWR Kitsune starting event, and your mod, DWTweaks, changes localization key in it to one from your mod. So, i just need to add DWTweaks in dependencies too, if i want to use your edit? I've honestly never tried stacking dependencies. Your mileage may vary. Just so you don't run into any major problems, set just DWTweaks as a dependency ( "Dark World Tweaks" ) unless you want to change the kitsune trait itself. In that case, you will need to do dependencies = { "Dark World Reborn v1.68" "Dark World Tweaks" } Again, I've never attempted multi-tiered dependencies, so try just DWTweaks first, and if that doesn't work use both mods.
Rascalov1337 Posted November 21, 2018 Posted November 21, 2018 3 minutes ago, lockeslylcrit said: I've honestly never tried stacking dependencies. Your mileage may vary. Just so you don't run into any major problems, set just DWTweaks as a dependency ( "Dark World Tweaks" ) unless you want to change the kitsune trait itself. In that case, you will need to do dependencies = { "Dark World Reborn v1.68" "Dark World Tweaks" } Again, I've never attempted multi-tiered dependencies, so try just DWTweaks first, and if that doesn't work use both mods. Well, considering you change it by replacing file in DWR folder, and not by adding copy of event in your files, i will probably need both dependencies anyway. Thanks, i will check how it works now, and report back if something goes wrong
Buzhidao Posted November 21, 2018 Posted November 21, 2018 49 minutes ago, Rascalov1337 said: Oh, that's good. I assume there is same situation with traits, right? What about localization? I need to copy it too, or it can use original one, if same localization key is used? Honestly, I would avoid doing that with traits. The order in which the traits are defined is important, if you change it, you can break your save (should be okay with new games). Haven't tried it myself though. The option to overwrite events without copying the entire file first must be a really new addition. You definitely couldn't do that last year. I will have to try it myself.
Rascalov1337 Posted November 21, 2018 Posted November 21, 2018 42 minutes ago, lockeslylcrit said: I've honestly never tried stacking dependencies. Your mileage may vary. Just so you don't run into any major problems, set just DWTweaks as a dependency ( "Dark World Tweaks" ) unless you want to change the kitsune trait itself. In that case, you will need to do dependencies = { "Dark World Reborn v1.68" "Dark World Tweaks" } Again, I've never attempted multi-tiered dependencies, so try just DWTweaks first, and if that doesn't work use both mods. Added both dependencies and it worked, all localization in place, pictures is also here, not tried to add only one dependency, so don't know what will happen. I will keep DWTweaks dependency anyway, as i usually play with it anyway, and will need to hijack some events from it too. 11 minutes ago, Buzhidao said: Honestly, I would avoid doing that with traits. The order in which the traits are defined is important, if you change it, you can break your save (should be okay with new games). Haven't tried it myself though. The option to overwrite events without copying the entire file first must be a really new addition. You definitely couldn't do that last year. I will have to try it myself. Yes, i know about that trait order stuff, but i will probably still check it later, it's not like i risking anything by doing that 1
Buzhidao Posted November 22, 2018 Posted November 22, 2018 17 hours ago, lockeslylcrit said: Yes, you can. I tested this out with DWR's elf campaign start. I copied the event into a different file in another mod that used it (specifically Dark World Tweaks), and edited it. As you can see, my edits overwrite the original event, which only gives the trait, while still keeping the original file intact even though I'm using a completely different file name. The event id HAS to be the same though. I've tried overwriting a single vanilla event without copying the entire file in which it was located and just defining the event itself in a different file. The error log gave me a message: [eventmanager.cpp:221]: Event is defined more than once. Check if this is intentional: And when the event fired, it was just the same vanilla event without any of the changes I had made. So @Rascalov1337, I suggest you copy the entire event files where you want to make changes. As for the things that you can definitely edit without overwriting the entire files, those are: - landed titles (they give an error in the log, but they still work fine for me); - localisations; - event modifiers; - scripted triggers and effects; - etc You couldn't override decisions without copying the files before and I am pretty sure you still can't do it now.
AlexWyrmin Posted November 22, 2018 Posted November 22, 2018 Is there any way to have a ruler defeated in a subjugation war being imprisoned as if they were a subdued rebellious vassal, or not get released if they were caught while the war was still going on? P.S. I know I could just type "imprison <character ID>" in the console right after enforcing my demands.
Buzhidao Posted November 22, 2018 Posted November 22, 2018 11 minutes ago, AlexWyrmin said: Is there any way to have a ruler defeated in a subjugation war being imprisoned as if they were a subdued rebellious vassal, or not get released if they were caught while the war was still going on? P.S. I know I could just type "imprison <character ID>" in the console right after enforcing my demands. Open the Casus Belli file and for the appropriate cb you need to find the on_success block. There you just add "imprison = yes" into a FROM scope. If there is an "imprison = no" somewhere in there, you need to comment it out.
Rascalov1337 Posted November 22, 2018 Posted November 22, 2018 40 minutes ago, Buzhidao said: I've tried overwriting a single vanilla event without copying the entire file in which it was located and just defining the event itself in a different file. The error log gave me a message: [eventmanager.cpp:221]: Event is defined more than once. Check if this is intentional: And when the event fired, it was just the same vanilla event without any of the changes I had made. So @Rascalov1337, I suggest you copy the entire event files where you want to make changes. As for the things that you can definitely edit without overwriting the entire files, those are: - landed titles (they give an error in the log, but they still work fine for me); - localisations; - event modifiers; - scripted triggers and effects; - etc You couldn't override decisions without copying the files before and I am pretty sure you still can't do it now. I had same message in the error log, but because of how its worded, i think it's just a reminder in case copy is not intended. Event itself worked fine for me, with all my changes. I think it's that you can't overwrite vanilla stuff without copying files completely, but you can with mods.
AlexWyrmin Posted November 22, 2018 Posted November 22, 2018 16 minutes ago, Buzhidao said: Open the Casus Belli file and for the appropriate cb you need to find the on_success block. There you just add "imprison = yes" into a FROM scope. If there is an "imprison = no" somewhere in there, you need to comment it out. So, something like this: on_success = { ROOT = { piety = 100 participation_scaled_prestige = 100 } any_attacker = { limit = { NOT = { character = ROOT } } hidden_tooltip = { participation_scaled_prestige = 100 } } FROM = { piety = -100 prestige = -100 imprison = yes if = { limit = { is_reformed_religion = ROOT controls_religion = no } religion = ROOT # Reformed pagans are forced to convert back } custom_tooltip = { text = tribal_subjugation_tip } hidden_tooltip = { opinion = { modifier = opinion_subjugated who = ROOT } any_vassal = { opinion = { modifier = opinion_subjugated who = ROOT } } any_demesne_title = { limit = { higher_tier_than = ROOT } ROOT = { usurp_title = { target = PREV type = invasion } } add_pressed_claim = PREV } any_demesne_title = { limit = { tier = ROOT } ROOT = { usurp_title = { target = PREV type = invasion } } add_pressed_claim = PREV } set_defacto_liege = ROOT } } }
Buzhidao Posted November 22, 2018 Posted November 22, 2018 29 minutes ago, Rascalov1337 said: I had same message in the error log, but because of how its worded, i think it's just a reminder in case copy is not intended. Event itself worked fine for me, with all my changes. I think it's that you can't overwrite vanilla stuff without copying files completely, but you can with mods. Okay, that's good. Wish it could be done for vanilla though. Still, it's an important distinction, and there is no info about it anywhere. I might just take some time to add this to the wiki. 20 minutes ago, AlexWyrmin said: So, something like this: Yeah, should work.
AlexWyrmin Posted November 22, 2018 Posted November 22, 2018 1 hour ago, Buzhidao said: Yeah, should work. If it does, I'm posting the resulting mod here. Aside from making you money after a Great Blot or a Blood Moon Ritual, if you catch a heirless ruler, it'd also be a way to start cleaning up bordergore early and not have to deal with powerful incompetents in your council. It doesn't, unfortunately. So it's either that "imprison = yes" is in the wrong place, along with possible synthax errors, or you need to create a custom scripted effect triggered by winning a subjugation war, rather than mod that casus belli's consequences.
rutars Posted November 22, 2018 Posted November 22, 2018 I'm trying to disallow plotting to kill characters with the trait pure_arkan. I've added the condition NOT = { trait = pure_arkan } to player_allow, target_potential and allow under the plot_kill_character entry in the 00_plots file. Adding the condition under player_allow seems to disallow me as the player to plot to kill characters with the trait but when running in observe mode for a few years it seems the AI will kill some of those characters anyway. Am I implementing the condition erroneously here or are there perhaps other ways in which the AI can kill each other that I have to modify elsewhere? This is the section of 00_plots that I have modified: Spoiler # Target allow trigger for when players target a specific character in the GUI player_allow = { NOT = { is_child_of = FROM } # Not my own children is_within_diplo_range = FROM NOT = { has_blood_oath_with = FROM } NOT = { trait = pure_arkan } assassination_interaction_trigger = yes } target_potential = { NOT = { any_spouse = { character = FROM } } # This case is covered by another plot NOT = { trait = pure_arkan } } # Target character scope allow = { NOT = { is_child_of = FROM } # Not my own children OR = { NOT = { character = FROM } # Not against myself! (unself I am bonkers) trait = lunatic } NOT = { any_spouse = { character = FROM } } # This case is covered by another plot NOT = { has_blood_oath_with = FROM } NOT = { trait = pure_arkan } is_within_diplo_range = FROM # Don't kill my lovers, or their children
Buzhidao Posted November 22, 2018 Posted November 22, 2018 14 minutes ago, rutars said: I'm trying to disallow plotting to kill characters with the trait pure_arkan. I've added the condition NOT = { trait = pure_arkan } to player_allow, target_potential and allow under the plot_kill_character entry in the 00_plots file. Adding the condition under player_allow seems to disallow me as the player to plot to kill characters with the trait but when running in observe mode for a few years it seems the AI will kill some of those characters anyway. Am I implementing the condition erroneously here or are there perhaps other ways in which the AI can kill each other that I have to modify elsewhere? This is the section of 00_plots that I have modified: Reveal hidden contents # Target allow trigger for when players target a specific character in the GUI player_allow = { NOT = { is_child_of = FROM } # Not my own children is_within_diplo_range = FROM NOT = { has_blood_oath_with = FROM } NOT = { trait = pure_arkan } assassination_interaction_trigger = yes } target_potential = { NOT = { any_spouse = { character = FROM } } # This case is covered by another plot NOT = { trait = pure_arkan } } # Target character scope allow = { NOT = { is_child_of = FROM } # Not my own children OR = { NOT = { character = FROM } # Not against myself! (unself I am bonkers) trait = lunatic } NOT = { any_spouse = { character = FROM } } # This case is covered by another plot NOT = { has_blood_oath_with = FROM } NOT = { trait = pure_arkan } is_within_diplo_range = FROM # Don't kill my lovers, or their children There is an event for spymasters, where a plotter can kill the spymaster that is about to reveal their plot. You might want to modify that. Also, if I remember correctly, the intrigue focus gives you some events to kill your target. Maybe there is something else as well. Also, don't forget to modify the second plot that handles spouse murder.
Rascalov1337 Posted November 22, 2018 Posted November 22, 2018 Is there any documentation on how immortality and immortality modding works anywhere? For example: i want to make character immortal and make game think that this character recieved their immortality at, for example, age 16. Will this code work, and if yes, will it also restore portrait youth and fertility (and whatever immortality also stops from changing with age)? narrative_event = { id = tont_tails.9 desc = tont_tails_eventdesc_09 is_triggered_only = yes option = { #TODO: add nickname, send notification to all kitsunes, create bloodline, reset age to 16 if possible name = tont_addtail_last_confirm remove_trait = eight_tails add_trait = nine_tails add_trait = immortal immortal_age = 16 } } And another related question: any way to stop aging but keep chance to die from a disease, as if i recall correctly, immortality makes you immune to that (you get diseases, but can't die from them) Edit: So, validator says that "immortal_age" line is shit. I kinda expected that, will look for other way to do what i need, or do something with similar effect. Or just will give immortality much earlier, though i don't want to do that
TheHierarch Posted November 23, 2018 Posted November 23, 2018 13 hours ago, Rascalov1337 said: Is there any documentation on how immortality and immortality modding works anywhere? For example: i want to make character immortal and make game think that this character recieved their immortality at, for example, age 16. Will this code work, and if yes, will it also restore portrait youth and fertility (and whatever immortality also stops from changing with age)? narrative_event = { id = tont_tails.9 desc = tont_tails_eventdesc_09 is_triggered_only = yes option = { #TODO: add nickname, send notification to all kitsunes, create bloodline, reset age to 16 if possible name = tont_addtail_last_confirm remove_trait = eight_tails add_trait = nine_tails add_trait = immortal immortal_age = 16 } } And another related question: any way to stop aging but keep chance to die from a disease, as if i recall correctly, immortality makes you immune to that (you get diseases, but can't die from them) Edit: So, validator says that "immortal_age" line is shit. I kinda expected that, will look for other way to do what i need, or do something with similar effect. Or just will give immortality much earlier, though i don't want to do that I don't believe that there is such a thing as "immortal_age" as an event command, could be wrong tho. Immortality does indeed impede a character aging physically, but currently you are stuck with the physical appearance (young - adult - old) of the moment when you acquired the immortal trait, unless you modify your own age with console commands before getting the trait. Also, I do believe that immortality is triggered not by the "immortal" trait itself, but rather by the "immortal" flag that the trait itself has, so you could in theory add "immortal = yes" flag to the "nine_tails" trait and be done with it. What prevents people dying from diseases with immortality is that the trait "immortal" grants a whooping +10 to health, making the character almost immune to all conditions, though I've had characters dying still of the "plague+severely injured" for example. To make things neutral, you could create a hidden trait that gives a -10 health to the event that grants immortality, nullifying the health bonus of the immortality trait
Rascalov1337 Posted November 23, 2018 Posted November 23, 2018 3 hours ago, HierarchOfLies said: I don't believe that there is such a thing as "immortal_age" as an event command, could be wrong tho. Immortality does indeed impede a character aging physically, but currently you are stuck with the physical appearance (young - adult - old) of the moment when you acquired the immortal trait, unless you modify your own age with console commands before getting the trait. Also, I do believe that immortality is triggered not by the "immortal" trait itself, but rather by the "immortal" flag that the trait itself has, so you could in theory add "immortal = yes" flag to the "nine_tails" trait and be done with it. What prevents people dying from diseases with immortality is that the trait "immortal" grants a whooping +10 to health, making the character almost immune to all conditions, though I've had characters dying still of the "plague+severely injured" for example. To make things neutral, you could create a hidden trait that gives a -10 health to the event that grants immortality, nullifying the health bonus of the immortality trait "immortal_age" is a command from character creation in history files, so you can set the age when your preset character became immortal, just wanted to test if it works in events too. Still, there is a severe lack of any information about how exactly immortality works, at least other flags pretty self explanatory, there is no confusion about what, for example, "inherit_chance" or "cannot_marry" flags do. What happens on removing traits with "immortal = yes" flag, is character age resets to their actual age, or just starts from where it stopped? This flag exist for a several years and it seems like no one ever tried to test things with it, i can't find any useful info on it.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now