lockeslylcrit Posted November 23, 2019 Posted November 23, 2019 2 hours ago, AlexWyrmin said: I tried to automate the handling of the check_for_stats character flag, but the event failed to fire. Am I missing something? character_event = { id = checkfordeath.0 hide_window = yes is_triggered_only = yes ai = no trigger = { is_liege = yes is_save_game = no # Only on new games } immediate = { any_vassal = { set_character_flag = check_for_stats } } } is_liege is not a valid condition. Use is_ruler instead 1
AlexWyrmin Posted November 23, 2019 Posted November 23, 2019 49 minutes ago, lockeslylcrit said: is_liege is not a valid condition. Use is_ruler instead Thanks. This way it does no longer matter who you choose as your starting character. Is is_heirless a valid condition? Oops, brain fart. I forgot about has_children.
lockeslylcrit Posted November 23, 2019 Posted November 23, 2019 1 hour ago, AlexWyrmin said: Thanks. This way it does no longer matter who you choose as your starting character. Is is_heirless a valid condition? Oops, brain fart. I forgot about has_children. any_child = { NOT = { is_primary_heir = ROOT } } or has_living_children = no or player_heir = { NOT = { dynasty = ROOT } } 2
dwjlien Posted November 24, 2019 Posted November 24, 2019 An actual quick question! As opposed to code troubleshooting! Is there anyway to call a trait name within a localization? A localization .csv file I mean? So not a custom_tooltip where: custom_tooltip = { text = trait_name } works just fine. But with the localisation for the "desc =" part of an event. Like you can use [GetBestName.From] is there a way to say "My liege is a [GetTraitName.trait_name] fool" = "My liege is a lustful fool"? I tried a dozen combinations and didn't stumble on anything that works. I did learn though that a single bracket { shows the little pile of gold coins icon?lol. It's not important I just wanted the flexibility in case anyone renamed the traits.
lockeslylcrit Posted November 24, 2019 Posted November 24, 2019 3 hours ago, dwjlien said: An actual quick question! As opposed to code troubleshooting! Is there anyway to call a trait name within a localization? A localization .csv file I mean? So not a custom_tooltip where: custom_tooltip = { text = trait_name } works just fine. But with the localisation for the "desc =" part of an event. Like you can use [GetBestName.From] is there a way to say "My liege is a [GetTraitName.trait_name] fool" = "My liege is a lustful fool"? I tried a dozen combinations and didn't stumble on anything that works. I did learn though that a single bracket { shows the little pile of gold coins iconlol. It's not important I just wanted the flexibility in case anyone renamed the traits. Sadly, there is no quick and dirty way of doing this, as you're still restricted to whatever the localisation code allows BUT that doesn't mean there isn't a way at all. You just need to write a customizable_localisation for the traits. defined_text = { name = GetTraitName text = { localisation_key = lustful # The exact name of the trait name code trigger = { trait = lustful } } text = { localisation_key = chaste trigger = { trait = chaste } } # # Repeat for as many traits as you want localisized. # } Then you can just call them whenever you want using [<scope>.GetTraitName] It will pick a valid trait from the list at random. If you want just the first valid trait, use use_first_valid = yes somewhere in the defined_text block
dwjlien Posted November 25, 2019 Posted November 25, 2019 Hmm. Created a religion with a religious head like the pope. The Pope equivalent is always male. How might one make it so the titular title is only for women please? Or randomly either. Edit, so I had to allow female temple holders in the religion lol. Ive put the following laws under the title, and I do occasionally get a female head. succession=seniority gender=true_cognatic law="true_cognatic_succession" law="status_of_women_4"
lockeslylcrit Posted November 25, 2019 Posted November 25, 2019 3 hours ago, dwjlien said: Hmm. Created a religion with a religious head like the pope. The Pope equivalent is always male. How might one make it so the titular title is only for women please? Or randomly either. Edit, so I had to allow female temple holders in the religion lol. Ive put the following laws under the title, and I do occasionally get a female head. succession=seniority gender=true_cognatic law="true_cognatic_succession" law="status_of_women_4" You'll want enatic, not absolute cognatic. 1
dwjlien Posted November 25, 2019 Posted November 25, 2019 On 11/16/2019 at 7:24 AM, dwjlien said: me dum
NickNozownik Posted November 26, 2019 Posted November 26, 2019 Is there a way to prevent custom portraits from being disabled by vanilla CK2 clothing/artifacts? I have DW Reborn and DW Tweaks, all custom portraits work as intended but they disappear when someone gets imprisoned, becomes a cardinal or wears one of the vanilla artifacts such as the HRE or Byzantine crown. Portraits appear again after being released from prison or taking off unique artifacts. Societies work fine, they don't override anything. I think it's caused by the Holy Fury DLC, but I'm not sure.
lockeslylcrit Posted November 26, 2019 Posted November 26, 2019 10 hours ago, NickNozownik said: Is there a way to prevent custom portraits from being disabled by vanilla CK2 clothing/artifacts? I have DW Reborn and DW Tweaks, all custom portraits work as intended but they disappear when someone gets imprisoned, becomes a cardinal or wears one of the vanilla artifacts such as the HRE or Byzantine crown. Portraits appear again after being released from prison or taking off unique artifacts. Societies work fine, they don't override anything. I think it's caused by the Holy Fury DLC, but I'm not sure. Absolutely there is, and it's what Luxuria Fantasia and House Irae does. Here is some of the code in the interface file of House Irae's portraits: Spoiler Spoiler portraitType = { name = "PORTRAIT_houseirae_others_static" effectFile = "gfx/FX/portrait.lua" weight = { additive_modifier = { value = 100000 portrait_clothing = yes OR = { portrait_has_trait = houseirae_others4 # Broken Waterlily portrait_has_trait = houseirae_others5 # Thicc Waterlily portrait_has_trait = houseirae_others6 # Vala Saen portrait_has_trait = houseirae_others7 # Rose Hemlock portrait_has_trait = houseirae_others8 # Custom mother } } } layer = { "GFX_empty:p0" "GFX_empty:c0" "GFX_empty:c2" "GFX_empty:c3" "GFX_empty:c1" "GFX_empty:c4" "GFX_empty:p1:h:y" "GFX_portrait_houseirae_others:c5" } allow_property_values = { 1 = { 0 = { always = yes } } 2 = { 0 = { always = yes } } 19 = { 0 = { always = yes } } 33 = { 0 = { always = yes } } 34 = { 0 = { always = yes } } 35 = { 0 = { always = yes } } 36 = { 0 = { always = yes } } 6 = { 0 = { always = yes } } 5 = { 0 = { portrait_has_trait = houseirae_others4 } 1 = { portrait_has_trait = houseirae_others5 } 2 = { portrait_has_trait = houseirae_others6 } 3 = { portrait_has_trait = houseirae_others7 } 4 = { portrait_has_trait = houseirae_others8 } } } } And here are the super relevant bits from it: Spoiler Spoiler allow_property_values = { 1 = { 0 = { always = yes } } 2 = { 0 = { always = yes } } 19 = { 0 = { always = yes } } 33 = { 0 = { always = yes } } 34 = { 0 = { always = yes } } 35 = { 0 = { always = yes } } 36 = { 0 = { always = yes } } 6 = { 0 = { always = yes } } 5 = { 0 = { portrait_has_trait = houseirae_others4 } 1 = { portrait_has_trait = houseirae_others5 } 2 = { portrait_has_trait = houseirae_others6 } 3 = { portrait_has_trait = houseirae_others7 } 4 = { portrait_has_trait = houseirae_others8 } } } The numbered blocks represent the layers as defined in 00_portrait_properties.txt, and the custom portraits use clothing layer 5. Notice how the rest of the layers have 0 = { always = yes }? That tells the code that frame 0 of that given layer must always be true. Since frame 0 is always going to be the "don't use this" condition in the 00_portrait_properties.txt file, we're telling the game that this given portrait layer absolutely must be disabled when a custom portrait is used. Why these specific layers? Because they all have the ability to disable layer 5 (again, our clothing layer we are using for the custom portraits). By disabling the layers, we eliminate any conflicts that might occur with the custom portraits. Also, stop using Dark World Tweaks. 1
NickNozownik Posted November 27, 2019 Posted November 27, 2019 2 hours ago, lockeslylcrit said: Absolutely there is, and it's what Luxuria Fantasia and House Irae does. Holy shit, thank you. It actually works. I replaced this: Spoiler 1 = { 0 = { always = yes } } 5 = { 0 = { always = no } 1 = { portrait_has_trait = portrait1 } 2 = { portrait_has_trait = portrait2 } 3 = { portrait_has_trait = portrait3 } 4 = { portrait_has_trait = portrait4 } 5 = { portrait_has_trait = portrait5 } 6 = { portrait_has_trait = portrait6 } 7 = { portrait_has_trait = portrait7 } 8 = { portrait_has_trait = portrait8 } 9 = { portrait_has_trait = portrait9 } 10 = { portrait_has_trait = portrait10 } 11 = { portrait_has_trait = portrait11 } 12 = { portrait_has_trait = portrait12 } 13 = { portrait_has_trait = portrait13 } 14 = { portrait_has_trait = portrait14 } 15 = { portrait_has_trait = portrait15 } 16 = { portrait_has_trait = portrait16 } 17 = { portrait_has_trait = portrait17 } 18 = { portrait_has_trait = portrait18 } 19 = { portrait_has_trait = portrait19 } 20 = { portrait_has_trait = portrait20 } 21 = { portrait_has_trait = portrait21 } 22 = { portrait_has_trait = portrait22 } 23 = { portrait_has_trait = portrait23 } 24 = { portrait_has_trait = portrait24 } 25 = { portrait_has_trait = portrait25 } 26 = { portrait_has_trait = portrait26 } With this: Spoiler 1 = { 0 = { always = yes } } 2 = { 0 = { always = yes } } 19 = { 0 = { always = yes } } 33 = { 0 = { always = yes } } 34 = { 0 = { always = yes } } 35 = { 0 = { always = yes } } 36 = { 0 = { always = yes } } 6 = { 0 = { always = yes } } 5 = { 1 = { portrait_has_trait = portrait1 } 2 = { portrait_has_trait = portrait2 } 3 = { portrait_has_trait = portrait3 } 4 = { portrait_has_trait = portrait4 } 5 = { portrait_has_trait = portrait5 } 6 = { portrait_has_trait = portrait6 } 7 = { portrait_has_trait = portrait7 } 8 = { portrait_has_trait = portrait8 } 9 = { portrait_has_trait = portrait9 } 10 = { portrait_has_trait = portrait10 } 11 = { portrait_has_trait = portrait11 } 12 = { portrait_has_trait = portrait12 } 13 = { portrait_has_trait = portrait13 } 14 = { portrait_has_trait = portrait14 } 15 = { portrait_has_trait = portrait15 } 16 = { portrait_has_trait = portrait16 } 17 = { portrait_has_trait = portrait17 } 18 = { portrait_has_trait = portrait18 } 19 = { portrait_has_trait = portrait19 } 20 = { portrait_has_trait = portrait20 } 21 = { portrait_has_trait = portrait21 } 22 = { portrait_has_trait = portrait22 } 23 = { portrait_has_trait = portrait23 } 24 = { portrait_has_trait = portrait24 } 25 = { portrait_has_trait = portrait25 } 26 = { portrait_has_trait = portrait26 } Now my guy won't suddenly turn into a balding neckbeard.
dwjlien Posted November 27, 2019 Posted November 27, 2019 I just want someone who knows what they're doing to give the religion modifiers a once over please, in that they're working in the right place, tax is taxing holdings and the global supply limit actually effects the army abroad: are these things in the right place? Within the religion file in common: character_modifier = { local_build_cost_modifier = -0.1 #Many Hands make light work tech_growth_modifier_military = -0.2 #Less committed to military global_supply_limit = -0.2 #Not supported on long war efforts castle_tax_modifier = -0.2 } Thats the stuff that shows up in the tootip when yo hover over a religion https://i.imgur.com/PesppDv.jpg And this is the stuff that show up on the religion F9 tab, when you hover over the little castle unit_modifier = { #MILITARY EVERYWHERE MODIFIERS global_movement_speed = 0.05 #unburdoned by the moralities of traditional Christian faith. key = "DEF_RELIGION" } unit_home_modifier = { #Militarty in home province modifiers levy_size = -0.2 #stay at home not go to war siege_defence = 0.1 #Resist the heathens, camradre from grp fucking levy_reinforce_rate = 0.15 #Breed well, understand need to defend beliefs garrison_size = 0.3 #Breed well, stay at home not go to war land_morale = 0.2 #The Devoted = comitted key = "DEF_RELIGION_HOME_TERRITORY" } It shows up in game, Im just worried that its only the tooltips are working, and the actual stuff is in the wrong sections. Pre-Thanks.
lockeslylcrit Posted November 27, 2019 Posted November 27, 2019 If you see the tooltips, it means everything is working. 1
kioo Posted November 27, 2019 Posted November 27, 2019 @lockeslylcrit I haven't asked a single question here but I learned so much from this thread. Just wanted to let you know how much appreciated are your explanations and help that you are giving here! 1
dwjlien Posted November 28, 2019 Posted November 28, 2019 I also have not asked him a single question. ?
kioo Posted November 28, 2019 Posted November 28, 2019 Ah, lemme ask one. Is there a way to reduce player's levy with by a certain number or a percentage after an event choice?
Darsel Posted November 28, 2019 Posted November 28, 2019 Whelp, I've finally decided to take the dive into PDS scripting/modding. The syntax is.. expectedly unnerving.. but I finally have a goal I'm willing to go through it for. For the most part, I've been able to glean solutions from searching and dissecting other people's work. However, there are a few things I haven't been able to find clean answers to so far: 1.) TGA vs DDS. Are there situations where one is preferred/required over the other? Specifically, TGA is ancient and I'm more familiar with it; are there situations where I'll need to use DDS? (I can tinker, but graphic design is not my specialty) 2.) How do you put a cooldown on (targetted) decisions? I was hoping to use a character modifier for its obvious visual feedback and built-in duration feature, but I suspect I am failing to directly reference it as a conditional. My next conjecture/fallback is to use character flags, but the maintenance seems like it would be a lot more messy by comparison. 3.) Potentially related(pardon the pun), I'm trying to fully grasp the purpose of the allow section of decisions. From what I can gather, it's primarily there to provide player-feedback when conditions are not satisfied? Or, is there a more nuanced purpose that isn't redundant with potential or from_potential?
dwjlien Posted November 28, 2019 Posted November 28, 2019 6 hours ago, kioo said: Ah, lemme ask one. Is there a way to reduce player's levy with by a certain number or a percentage after an event choice? I thought this would be easy, and it all looks good in game, but doesnt actually affect raisable troops in anyway that I can detect. I though you could have the event apply a modifier, From = { add_character_modifier = { modifier = modifier_levytest years = 1 } } common > event_modifiers modifier_levytest = { icon = 105 levy_size = -0.5 } Thats minus 50%, but the military screen doesnt show any change in numbers, so my dumb ass cant help you sorry, @lockeslylcrit care to chime in?
dwjlien Posted November 28, 2019 Posted November 28, 2019 1 hour ago, Darsel said: 1.) TGA vs DDS. 2.) I suspect I am failing to directly reference it as a conditional. 3.) is there a more nuanced purpose that isn't redundant with potential or from_potential? Im just a noob but I'll answer from my tinkering experience - not from knowledge or certainty. 1. Work exactly alike for me, for event pic, traits and decisions, no idea for portraits. and Ive always done flags as .tga 2. yeah these should work great for you allow = { Root = { not = { has_character_modifier = name_ofmodifier } } } That should work great... I use them a lot 3. Youve pretty much summed it up, stuff in potential is never shown to the player to save on screen clutter, allow is visible to the player. Maaaaybe allow might govern global conditions that arent applicable to From or Root, like maybe its winter or past 1066 or such. Once again just a noob offering help, not official answers. 1
Darsel Posted November 28, 2019 Posted November 28, 2019 28 minutes ago, dwjlien said: Im just a noob but I'll answer from my tinkering experience - not from knowledge or certainty. -SNIP- *liberally applies palm to forehead* Thank you. Of all the strings I tried, I somehow failed to try that one.. It worked like a charm.
lockeslylcrit Posted November 28, 2019 Posted November 28, 2019 5 hours ago, dwjlien said: @lockeslylcrit care to chime in? Change modifier = modifier_levytest to name = modifier_levytest 7 hours ago, Darsel said: 1.) TGA vs DDS. Are there situations where one is preferred/required over the other? Specifically, TGA is ancient and I'm more familiar with it; are there situations where I'll need to use DDS? (I can tinker, but graphic design is not my specialty) 2.) How do you put a cooldown on (targetted) decisions? I was hoping to use a character modifier for its obvious visual feedback and built-in duration feature, but I suspect I am failing to directly reference it as a conditional. My next conjecture/fallback is to use character flags, but the maintenance seems like it would be a lot more messy by comparison. 3.) Potentially related(pardon the pun), I'm trying to fully grasp the purpose of the allow section of decisions. From what I can gather, it's primarily there to provide player-feedback when conditions are not satisfied? Or, is there a more nuanced purpose that isn't redundant with potential or from_potential? 1. You should ALWAYS use DDS. It's the same quality, but roughly anywhere from half to a third of the file size. The only exception is that flag files only accept TGA. 2. (from_)potential = { NOT = { has_character_modifier = your_modifier } } 3. (from_)potential shows the decision if the conditions are met. allow are the conditions needed to execute the decision. You put the super obvious conditions in (from_)potential (things like ai = no, is_adult = yes. etc), and then you put the very specific conditions in allow (things that the player needs to know). If you were making an intrigue decision that required you to be at war and a commander, you would do it like this: decisions = { test_war_decision = { is_high_prio = yes # Turns the decision gold and gives you a flag notification potential = { ai = no # Only the player can do this war = yes # Only show the decision if you are at war religion - norse_pagan_reformed # Only show the decision if you are Germanic (Reformed) any_independent_ruler = { # Only show the decision if you are at war with someone who is Christian religion_group = christian war_with = ROOT } } allow = { in_command = yes # Can execute the decision if you are leading troops in_battle = yes # Can execute the decision if you are in battle } effect = { # Put commands here } } } (from_)potential is a way to limit decision spam by hiding the decision unless the conditions are met. 1
Darsel Posted November 28, 2019 Posted November 28, 2019 1 hour ago, lockeslylcrit said: -SNIP- 1. You should ALWAYS use DDS. It's the same quality, but roughly anywhere from half to a third of the file size. The only exception is that flag files only accept TGA. -SNIP- Ah, excellent. Thank you for the clarification, and the tip. I'm always down for reducing file size.
lockeslylcrit Posted November 28, 2019 Posted November 28, 2019 7 minutes ago, Darsel said: Ah, excellent. Thank you for the clarification, and the tip. I'm always down for reducing file size. I use paint.net, so a 475x475 picture saved to TGA is roughly 590kb. The same picture as DDS using the settings below is 110kb. A huge improvement. 1
AlexWyrmin Posted November 28, 2019 Posted November 28, 2019 I'm building a modpack for my next playthrough and I want to make Cannibal Kings work together with the EMF module of HIP. I know that there's no true compatibility problem between the two, but HIP has this in every bloodine: active = { culture = X religion = Y } What should I input to activate a cannibalized bloodline, both in the original man eater and in their descendants?
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