Jump to content

CK2 Modding Quick Question Thread


Recommended Posts

code

Something like that should work, it's off the top of my head but it -should- work. This way you can scope directly to the desired spouse via the event_target:secondary_spouse_1/2 so long as the event chain is unbroken (might need to make it a global event target if the chain is broken, in which case you'd want to limit who can get the events to avoid crossing targets, like making it player only for example).

 

< and > should work but might not, I can't remember if they've expanded the operators for those conditions yet.

 

 

Oh wow, thanks, I didn't think of event target. I thought I can just pick it from the. I can definitely make this work now!

 

For localisation you can define custom keys now.

 

In localisation\customizable_localisation create a new file (call it something like 00_a_mycustomloc.txt or whatever you want).

 

In there, do this;

code

All of this is untested and literally typed while I'm eating lunch   :angel:

 
You save my life, I didn't know you can do that. Thanks for the time you spent replying and hope you have a good lunch  :D

 

 

Link to comment

I've been a lurker for a long time here, enjoyed the mods here a great deal, and now I have finally mustered up the courage to ask...how does someone go about offering to write events for people to code into the game? Is there a need/demand for this sort of thing?

 

Basically, I have no experience with coding for CK2, but I can write just fine. I figure if there's a modder out there, new or old, that needs help with writing their content or has ideas but can't put pen to paper, I would be happy to volunteer.

 

In case someone is interested and wants to see an example of my work, I can PM them an event I've (roughly) written that's inspired by another mod here that triggers when invading someone, and you're given the option to enslave and rape the women after a siege.

Link to comment

I've been a lurker for a long time here, enjoyed the mods here a great deal, and now I have finally mustered up the courage to ask...how does someone go about offering to write events for people to code into the game? Is there a need/demand for this sort of thing?

 

Basically, I have no experience with coding for CK2, but I can write just fine. I figure if there's a modder out there, new or old, that needs help with writing their content or has ideas but can't put pen to paper, I would be happy to volunteer.

 

In case someone is interested and wants to see an example of my work, I can PM them an event I've (roughly) written that's inspired by another mod here that triggers when invading someone, and you're given the option to enslave and rape the women after a siege.

 

 it's definitely a great idea to have someone help writing event.

 

I'm very new at modding and I really wanted to finish what I'm working right now. I've been pretty busy lately and can't really work on my project as much, so it would be a really nice to have someone to work with. 

Link to comment

 

I've been a lurker for a long time here, enjoyed the mods here a great deal, and now I have finally mustered up the courage to ask...how does someone go about offering to write events for people to code into the game? Is there a need/demand for this sort of thing?

 

Basically, I have no experience with coding for CK2, but I can write just fine. I figure if there's a modder out there, new or old, that needs help with writing their content or has ideas but can't put pen to paper, I would be happy to volunteer.

 

In case someone is interested and wants to see an example of my work, I can PM them an event I've (roughly) written that's inspired by another mod here that triggers when invading someone, and you're given the option to enslave and rape the women after a siege.

 

 it's definitely a great idea to have someone help writing event.

 

I'm very new at modding and I really wanted to finish what I'm working right now. I've been pretty busy lately and can't really work on my project as much, so it would be a really nice to have someone to work with. 

 

 

If you want, you can tell me about your project through PM and I'll see if I can help. Just to be clear though, I'm not familiar with coding at all and can only offer writing the actual content for the event

 

Edit: I totally glanced over your thread earlier, so if you're talking about your marriage mod, I think I'm on board :lol: You can still send me a PM so we can hash out the details ;)

Link to comment

 

 

I've been a lurker for a long time here, enjoyed the mods here a great deal, and now I have finally mustered up the courage to ask...how does someone go about offering to write events for people to code into the game? Is there a need/demand for this sort of thing?

 

Basically, I have no experience with coding for CK2, but I can write just fine. I figure if there's a modder out there, new or old, that needs help with writing their content or has ideas but can't put pen to paper, I would be happy to volunteer.

 

In case someone is interested and wants to see an example of my work, I can PM them an event I've (roughly) written that's inspired by another mod here that triggers when invading someone, and you're given the option to enslave and rape the women after a siege.

 

 it's definitely a great idea to have someone help writing event.

 

I'm very new at modding and I really wanted to finish what I'm working right now. I've been pretty busy lately and can't really work on my project as much, so it would be a really nice to have someone to work with. 

 

 

If you want, you can tell me about your project through PM and I'll see if I can help. Just to be clear though, I'm not familiar with coding at all and can only offer writing the actual content for the event

 

Edit: I totally glanced over your thread earlier, so if you're talking about your marriage mod, I think I'm on board :lol: You can still send me a PM so we can hash out the details ;)

 

Awesome! Check your PM  :D

Link to comment

You could use "is_primary_heir"   Maybe do an any character search for "FROM = { is_primary_heir = ROOT }"

Does that help with what your trying to accomplish?

 

If not, what you could do is setup an on_action triggered event that would check each ruler upon death to see if that ruler's heir is of the same dynasty, and if not you can force the inherit to a character of your choosing.  (The on_action death events triggers on the character dying BEFORE death.  Which is nice because it gives you more control for who you may want to scope to from that character.)

I had to do something similar in Mercenary Commander to force the RedHand to always have a female leader.  In that solution though I simply generate a new random ruler to replace the old one.

Link to comment

Thanks! I think that could work. 

 

On different topics though, It's interesting though about the death event triggers before death. Does that mean that putting this code on_death

if (
   limit = {
     spouse = { 
        AND = {
            has_character_flag = succesful_plot_to_usurp_husbands_title
            NOT = { any_child = { is_primary_heir = yes }
        }
     }

   }
   spouse = {inherit = ROOT}
)

will make the wife inherit instead of the supposed new heir?

Link to comment

Thanks! I think that could work. 

 

On different topics though, It's interesting though about the death event triggers before death. Does that mean that putting this code on_death

if (
   limit = {
     spouse = { 
        AND = {
            has_character_flag = succesful_plot_to_usurp_husbands_title
            NOT = { any_child = { is_primary_heir = yes }
        }
     }

   }
   spouse = {inherit = ROOT}
)

will make the wife inherit instead of the supposed new heir?

 

Off hand I see no reason why it shouldn't.

Link to comment

on_death fires at the moment of death (so technically not "before death") but before inheritance takes place, it allows you to hijack any succession law really.

 

 

You can't really check if the heir is a random nobody but you can check if they're of a different dynasty;

current_heir = {
NOT = { dynasty = ROOT }
}

Edit: It cut off half my post, huh. The 2nd half said that it's harder to check the heir on all of a character's titles, a simplistic check would be

any_title = {
any_dynasty_member = { is_heir = no }
}

But that checks all titles and returns true if no dynastical heir exists for any held title, false if there's a dynastical heir to any held title (such as random barony in arse end of nowhere).

Link to comment

So basically I wanted to make a new holy war. But instead of taking all their land they get vassalized and get an event instead.


ROOT = {
   vassalize_or_take_under_title = {
      title = PREV
      enemy = FROM
      #same_religion = vassalize even if rulers not of my religion
      type = holy_war
   }
ROOT = {
   any_demesne_province = {
      limit = {
         location = { duchy = { title = PREV } } #<<<<<< how many prev do i need?
      }
      holder_scope = {
         character_event = { id = newholywar.15 }
      }
   }
}
 

how many PREV do i need?

Link to comment
  • 3 weeks later...

This may or may not go here, but can anyone tell me how to get mods to work with CK2? I downloaded some mods from here and made a "mods" folder to put them into. I extracted the mods from the zip files, and removed any mods that were inside folders and moved them to the main mods folder. But when I open the game launcher, none of the mods show up. I'm not really sure what I did wrong. My game is updated to the latest version and I have pretty much all of the DLC, if that helps.

Link to comment

This may or may not go here, but can anyone tell me how to get mods to work with CK2? I downloaded some mods from here and made a "mods" folder to put them into. I extracted the mods from the zip files, and removed any mods that were inside folders and moved them to the main mods folder. But when I open the game launcher, none of the mods show up. I'm not really sure what I did wrong. My game is updated to the latest version and I have pretty much all of the DLC, if that helps.

 

Try renaming the folder to "mod" (without 's'). Also make sure that every mod you place there is a pair of a .mod file and folder with the same name.

Link to comment

 

This may or may not go here, but can anyone tell me how to get mods to work with CK2? I downloaded some mods from here and made a "mods" folder to put them into. I extracted the mods from the zip files, and removed any mods that were inside folders and moved them to the main mods folder. But when I open the game launcher, none of the mods show up. I'm not really sure what I did wrong. My game is updated to the latest version and I have pretty much all of the DLC, if that helps.

 

Try renaming the folder to "mod" (without 's'). Also make sure that every mod you place there is a pair of a .mod file and folder with the same name.

 

 

That worked. Thank you. Now, time for a game filled with debauchery.

Link to comment

With no coding experience, i tried to make simple little mod that add 1 or 2 new traits (adding health, skills or opinions). I think folder structure is correct, all names and IDs shoud be unique and new. I even manage to get them into game, with icons and everything.

 

BUT...when i load previous save, DW traits (i think) go nuts. All custom portraits change to different one, all women have tiny tits, all men have tiny dicks (some tiny tits instead), exclusive hoe is cheap, ancient werewolf pope is fairie now...

 

Any help?

 

Edit: looks like renaming "mymod_traits" file to "traits" fixed the problem...still dont know why, other mods have unique file names too.

 

Anyway, going to create custom culture now...wish me luck xD

Link to comment

With no coding experience, i tried to make simple little mod that add 1 or 2 new traits (adding health, skills or opinions). I think folder structure is correct, all names and IDs shoud be unique and new. I even manage to get them into game, with icons and everything.

 

BUT...when i load previous save, DW traits (i think) go nuts. All custom portraits change to different one, all women have tiny tits, all men have tiny dicks (some tiny tits instead), exclusive hoe is cheap, ancient werewolf pope is fairie now...

 

Any help?

 

Edit: looks like renaming "mymod_traits" file to "traits" fixed the problem...still dont know why, other mods have unique file names too.

 

Anyway, going to create custom culture now...wish me luck xD

 

When adding new traits to on-going games, always putt them in the last (alphanumerically) file, at then end. The reason is that when a game is initiated, trait names are converted to positive numbers, so adding new traits in the middle will "displace" older traits in the table, thus screwing what traits characters have when loading a save.

 

Alternatively, always start a new game when adding/removing traits and/or activating/deactivating mods.

Link to comment

Is it possible to trigger window that allow editing childs name? One that shows up when new child of your dynasty in your court is born. I'm trying make "baby found on doorstep" create_character event, how do i allow player to edit his/her name?

 

Link to comment

Is it possible to trigger window that allow editing childs name? One that shows up when new child of your dynasty in your court is born. I'm trying make "baby found on doorstep" create_character event, how do i allow player to edit his/her name?

Sadly, you can't. Maybe you could make a normal event with options to give him the name of the parent, one of the grandparents, or a random name, e.g. making use of the set_name command, but that's about it.

Link to comment
On 8/17/2017 at 4:16 PM, bodiefrog said:

 

On 8/17/2017 at 2:24 PM, noxbestia said:

 

On 8/16/2017 at 7:02 AM, bodiefrog said:

I'm just getting my feet wet as far as modding goes.  So far I've added my own dick size trait and made it congenital.  Problem is that my daughters are being born with dicks.  What do I add to the code to make the dick traits only for males and the breast traits only for women?

 

This covers males and futas (assuming you are using Dark World) for dick traits:



potential = {
    OR = {

        is_female = no
        AND = {
            is_female = yes
            trait = futa
        }
    }
}

 

Thank you very much.  I'm going to take a guess that I should delete trait = futa completely and change is_female = no to is_male = no for preventing sons from having tits.

 

Reviving this. I'm trying to do the same thing (completely from scratch/vanilla) but even after adding is_female = no I'm still seeing girls born with dicks, though I've yet to see boys born with boobs -- I can't tell whether that's because of RNG or if is_female = yes works while the opposite doesn't for some reason. As a sidenote I included two sets of traits (breasts and ass) for women but they only ever seem to have one.

 

Here's my code. If anybody could please tell me if I'm doing anything wrong, or if my theory about there being a hardcoded block on gender-specific congenital traits that can only be bypassed by clever use of events is right, I'd appreciate it. I also made a copy of 00_traits.txt and deleted both Fair and Ugly if that might have anything to do with it.

EDIT: did some looking, turns out is_female is just for telling the difference between both genders' version of the event that gives the Seducer trait and doesn't actually do anything.

 

Quote

 

    big_cock = {

    potential = {

    is_female = no

    }

    opposites = {

    huge_cock

    horsecock

    small_cock

    tiny_cock

    microcock

    eunuch

    }

    birth = 6000

    inherit_chance = 100

    sex_appeal_opinion = 10

    fertility = 0.1

    diplomacy = 1

    }

 

Quote

 

    huge_tits = {

    potential = {

    is_female = yes

    }

    opposites = {

    big_tits

    cowtits

    small_tits

    tiny_tits

    flat_tits

    }

    birth = 3000

    inherit_chance = 100

    sex_appeal_opinion = 10

    fertility = 0.06

    diplomacy = 2

    }

 

Quote

 

    enormous_ass = {

    potential = {

    is_female = yes

    }

    opposites = {

    big_ass

    huge_ass

    small_ass

    tiny_ass

    boney_ass

    }

    birth = 1000

    inherit_chance = 100

    sex_appeal_opinion = 15

    fertility = 0.1

    diplomacy = 3

    }

Link to comment
  • 3 months later...

Hi fellow modders, I would like to ask several questions

1)I would like to put one AI char to another AI char's prison as part of quest chain. How can I make sure prisoner is safe and doesn't escape/is released/executed/maimed ect. until quest chain ends? Some immunity flag or modifier? OR other tricks / workarounds?

 

2)Is it possible to create CUSTOM LIST SELECTION?( or how the hell can i call it...)
Example: with right click on characters you get diplomatic decision like: option grand land offers LIST of land you own, option gift artifact offers LIST of your giftable artifacts, option grand title generate LIST of titles this person can hold and ect...
Goal : I would like to make target decision for country, option GRAND TO and generate LIST of my direct vassal ( thus making land handling for nomads not as much painfull ).

 

3)Artifact inheretance (oh boy). Theory: I create custom unique, one of a kind XXX artifact, and mark it as indestructible and ungiftable. Then spawn it on random non-player AI char at game start lets say at 769. Is there 100% certainty that, let's say 4 centuries later, item will still be on map in somebody's pocket?
OR does game tend to loose artifacts on random chaotic unlanded people/dynnasty ending inheretance, thus removing artifact from game? I could simply create that new artifact when actually needed, but then it wouldn't have unknow origin description i want. For that it needs to be spawn at start with -1 date.(if i understand it right).
Follow up: If indeed it's possible for game to loose artifact XXX completely, would "on_death event: if=has_artifact XXX-then trasfer_artifact XXX to another random_char" event bypass this problem?

 

4)Is there way to artificially create non-agression/defensive pacts? I think there is an event where another ruler that is also on your friendlist can ask you for it, but I can't find it.

 

5)Is 'on_yearly_pulse' less CPU heavy than '1 year MTTH'? ( before filtering chars with triggers, i probably formulated this poorly ).

 

6)As graphic noob, I tried to create my custom portrait set. Using GIMP it worked, but files ale 4x bigger than original. What should i do? There are compresion options in exporting, which to choose?(if any).

 

7)For modders who released their mod: Did you created all picture-arts yourself / have permission to use from author?. If I ever manage to create something playable, release it here, with shit-tone of "borrowed without permission for non-profit purpose" art from all over internet, specialy from hentai-foundry, will I get flak here from community / moderators ?

 

If you could point me to vanilla file/another mod that does what i ask, it would be probably better since as self-learn modder i probably wouldn't understand your explanation :D. It's easier for me to learn from copying and alterning....

 

Thanks for any help or opinion.

Link to comment
2 hours ago, jet41 said:

Hi fellow modders, I would like to ask several questions

1)I would like to put one AI char to another AI char's prison as part of quest chain. How can I make sure prisoner is safe and doesn't escape/is released/executed/maimed ect. until quest chain ends? Some immunity flag or modifier? OR other tricks / workarounds?

 

2)Is it possible to create CUSTOM LIST SELECTION?( or how the hell can i call it...)
Example: with right click on characters you get diplomatic decision like: option grand land offers LIST of land you own, option gift artifact offers LIST of your giftable artifacts, option grand title generate LIST of titles this person can hold and ect...
Goal : I would like to make target decision for country, option GRAND TO and generate LIST of my direct vassal ( thus making land handling for nomads not as much painfull ).

 

3)Artifact inheretance (oh boy). Theory: I create custom unique, one of a kind XXX artifact, and mark it as indestructible and ungiftable. Then spawn it on random non-player AI char at game start lets say at 769. Is there 100% certainty that, let's say 4 centuries later, item will still be on map in somebody's pocket?
OR does game tend to loose artifacts on random chaotic unlanded people/dynnasty ending inheretance, thus removing artifact from game? I could simply create that new artifact when actually needed, but then it wouldn't have unknow origin description i want. For that it needs to be spawn at start with -1 date.(if i understand it right).
Follow up: If indeed it's possible for game to loose artifact XXX completely, would "on_death event: if=has_artifact XXX-then trasfer_artifact XXX to another random_char" event bypass this problem?

 

4)Is there way to artificially create non-agression/defensive pacts? I think there is an event where another ruler that is also on your friendlist can ask you for it, but I can't find it.

 

5)Is 'on_yearly_pulse' less CPU heavy than '1 year MTTH'? ( before filtering chars with triggers, i probably formulated this poorly ).

 

6)As graphic noob, I tried to create my custom portrait set. Using GIMP it worked, but files ale 4x bigger than original. What should i do? There are compresion options in exporting, which to choose?(if any).

 

7)For modders who released their mod: Did you created all picture-arts yourself / have permission to use from author?. If I ever manage to create something playable, release it here, with shit-tone of "borrowed without permission for non-profit purpose" art from all over internet, specialy from hentai-foundry, will I get flak here from community / moderators ?

 

If you could point me to vanilla file/another mod that does what i ask, it would be probably better since as self-learn modder i probably wouldn't understand your explanation :D. It's easier for me to learn from copying and alterning....

 

Thanks for any help or opinion.

That's one huge amount of questions.

 

1) you probably would need to modify the triggers/potential of the events/decisions related with prisoner stuff.

 

2)The term you're looking for is targeted decisions. And no, there's no way to make a targeted decision that prompts a titles list, sadly, nor make title decisions display a list of characters.

 

3) artifacts can be marked as indestructible, and I *think* the liege inherits the artifacts of landless courtuers, not sure though. Non-indestructible artifacts have a chance of being destroyed on succession. You can always make an on_death event as a failsafe.

 

4) Yes, there's a flag you can use in opinion_modifier definitions that create a NAP as long as the opinion modifier applies. Not sure what the syntax is, probably non_aggression_pact = yes or similar. Look at the vanilla file to make sure.

 

5)Ansolutely yes. The triggers for mtth events are evaluated 1/20 of all days for rulers and 1/50 of all days for courtiers, the mtth value only affects the likelyhood of the event firing in case the triggers succeed. Events on the yearly pulse obvious are checked 1/365 of all days, so its ~6xx more efficient for xourtiers and 18x more efficient for rulers.

 

6) I think they use DTX5 compression with mipmaps. Not entirely sure though. Graphics are outside my expertise.

Link to comment

I'm trying to get a grip on removing some opinion modifiers.  I apply these opinion modifiers through the course of some events, and this event will eventually remove them should the player reach this point.. 

In the option of the event below, the trait is getting assigned, as well as the first opinion, but the subsequent remove_opinion's aren't working.  Any insight?

 

Quote

narrative_event = {
    id = TTContentTorture.4500
    desc = TTContentTorture4500
    title = TTContentPainslutsuccess
    picture = pain_success2
    hide_from = yes
    is_triggered_only = yes
    
    option = {
        name = TTContentTorture4500a
        add_trait = painslut
        opinion = {
                modifier = opinion_tt_ima_painslut
                who = event_target:TT_torture_assailant
            }
        remove_opinion = {
                modifier = opinion_TT_ttstocks_me
                who = event_target:TT_torture_assailant
            }
        remove_opinion = {
                modifier = opinion_TT_ttwhipped_me
                who = event_target:TT_torture_assailant
            }
        remove_opinion = {
                modifier = opinion_TT_ttrack_me
                who = event_target:TT_torture_assailant
            }
        }
    }

 

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use