Jump to content

[mod] DWToska-CK3 for Tours & Tournaments (v1.9)


Recommended Posts

Rather than just a plain 50% chance of pregnancy, I think the base game has actually implemented something similar to the Dark World style "have sex" events with their math to calculate a chance of pregnancy. I've gotten events where one option says that I will lay with someone. You can take a look at events/scheme_events/seduce_scheme. In the ongoing events for example there's

        show_as_tooltip = {
            had_sex_with_effect = {
                CHARACTER = scope:owner
                PREGNANCY_CHANCE = seduce_pregnancy_chance
            }
        }

Or in the events/lifestyles/intrigue_lifestyle/intrigue_temptation_events you can see a whole bunch of the had_sex_with_effect

        had_sex_with_effect = {
            CHARACTER = scope:guest_lover
            PREGNANCY_CHANCE = pregnancy_chance
        }

You'd want to do a bit more digging around yourself, for which pregnancy chance is best, but you should definitely use the had_sex_with_effect here.

Link to comment
3 minutes ago, whateverdontcare said:

You'd want to do a bit more digging around yourself, for which pregnancy chance is best, but you should definitely use the had_sex_with_effect here.

Yeah, I played around with the 'had_sex_with_effect' stuff and couldn't get the pregnancy firing. I must have messed up the scopes somewhere. I'll give it another look.

Link to comment

Just a heads up, having an issue. Looks to be a descriptor path issue according to the launcher. 

Basically I loaded up the game, only other mod is the nude inspect mod, but the options aren't showing. Do I need to have the lustful trait or any specific trigger for the options to show? I'll try fixing the path issue mentioned above and see if that works while waiting for a response.

 

The error message on mouseover,

"A mod descriptor file is missing a path to directory containing the mod. Please verify it and try again."

 

Edit: or maybe I'm an idiot and this is to create a branch off of the mod. In any case, The options weren't showing, hence my little searching around for clues.

 

Edit 2: Okay not a complete idiot, I managed to fix it by adding the path in the DWToska.mod file. Add a new line at the bottom(without brackets), [ path="mod/DWToska" ]

 

Capture.PNG

Link to comment
5 hours ago, srx47 said:

DocToska

maybe you could find what shit blocks same sex marriage? >_>

can't do my glorious futa empire that way...

I heard its hardcoded, but i think you could try creating a new ethnicity/culture and put female meshes as males. You would need to adapt the clothes too.

Link to comment
10 hours ago, whateverdontcare said:

Rather than just a plain 50% chance of pregnancy, I think the base game has actually implemented something similar to the Dark World style "have sex" events with their math to calculate a chance of pregnancy. I've gotten events where one option says that I will lay with someone. You can take a look at events/scheme_events/seduce_scheme. In the ongoing events for example there's

        show_as_tooltip = {
            had_sex_with_effect = {
                CHARACTER = scope:owner
                PREGNANCY_CHANCE = seduce_pregnancy_chance
            }
        }

Or in the events/lifestyles/intrigue_lifestyle/intrigue_temptation_events you can see a whole bunch of the had_sex_with_effect

        had_sex_with_effect = {
            CHARACTER = scope:guest_lover
            PREGNANCY_CHANCE = pregnancy_chance
        }

You'd want to do a bit more digging around yourself, for which pregnancy chance is best, but you should definitely use the had_sex_with_effect here.

The chance is in the defines file along with a lot of the age pregnancy and enabling portrait section

So commons/defines/00_defines.txt

That and female chance are no longer hard coded.

 

    PORTRAIT_MALE_ADULT_AGE = 1    # The boy -> male portrait change happens at this age 
    PORTRAIT_FEMALE_ADULT_AGE = 1    # The girl -> female portrait change happens at this age

were set to 18 while nudity was possible at 16 caused a graphics glitch not changed

 

NChildbirth = {
    MIN_REPRODUCTION_AGE_IN_HISTORY_DB = 12 # If a historical parent is younger than this when their child is born, we log an error
    MIN_FEMALE_REPRODUCTION_AGE = 16
    MAX_FEMALE_REPRODUCTION_AGE = 55
    MIN_MALE_REPRODUCTION_AGE = 16
    BASE_NR_OF_CHILDREN_PER_COUPLE = { 1 1 2 3 5 5 } # Based on tier of character or parents; whichever is higher Unlanded, Baron, Count, ..., Emperor
    CHANCE_OF_LOWERED_CHILD_LIMIT = 0.5    # Chance that the child limit is lowered by 1
    EXTRA_CHILDREN_FOR_RULERS = 2 # If either character is a ruler, they get extra children
    CHARACTER_IN_POOL_CHILD_LIMIT = -1    # If in the pool, child limit is modified by this
    CHILD_BIRTH_TO_PREGNANCY_WAIT = 3
    MALE_FERTILITY_MULTIPLIER_LIMITS = { 70 60 50 40 35 } # Ages where fertility multiplier is applied 25 means up to 25, needs to be sorted in descending order
    MALE_FERTILITY_MULTIPLIER = { 0.5 0.6 0.7 0.8 0.9 1.0 } # Multiplier values based on age limits from FERTILITY_MULTIPLIER_LIMITS should have an extra value at the beginning for characters older than first limit
    FEMALE_FERTILITY_MULTIPLIER_LIMITS = { 45 40 35 30 25 } # Ages where fertility multiplier is applied 25 means up to 25, needs to be sorted in descending order
    FEMALE_FERTILITY_MULTIPLIER = { 0.1 0.33 0.5 0.7 0.8 0.9 } # Multiplier values based on age limits from FERTILITY_MULTIPLIER_LIMITS should have an extra value at the beginning for characters older than first limit
    MOTHER_FERTILITY_REDUCTION_PER_PREVIOUS_CHILD = 0.05
    LOW_FERTILITY = 0.1
    PRIMARY_SPOUSE_FERTILITY_MULTIPLIER = 3
    SECONDARY_SPOUSE_FERTILITY_MULTIPLIER = 1.5
    CONCUBINE_FERTILITY_MULTIPLIER = 1
    NOT_SPOUSE_FERTILITY_MULTIPLIER = 1
    NON_RULER_FERTILITY_MULTIPLIER = 0.85    # If neither parent is a ruler, resulting fertility gets multiplied by this
    FERTILITY_CHANCE_MULTIPLIER = 4.75 # Fertility is an average between the father and the mother (if the mother has 0.3 and the father 0.5, the average is 0.4), this number is then multiplied by this multiplier to produce the percentage chance of impregnation. Impregnation is checked every month.
    MIN_FERTILITY_CHANCE = 1
    MAX_FERTILITY_CHANCE = 25
    TWIN_BASE_CHANCE = 0.02
    TWIN_BONUS_MAX_AGE = 35
    TWIN_BONUS_MIN_AGE = 25
    TWIN_BONUS_CHANCE = 0.1
    TWIN_MOTHER_HAD_TWINS_BONUS = 0.25
    TWIN_GRANDMOTHER_HAD_TWINS_BONUS = 0.3
    IDENTICAL_TWIN_CHANCE = 0.25
    PREGNANCY_DAYS = 280
    DAYS_TO_PREGNANCY_REVEAL = 60
    FEMALE_CHANCE = 75
    NEWBORN_HEALTH_BASE = 4.5
    NEWBORN_HEALTH_SPAN = 0.5
    NEWBORN_HEALTH_FEMALE_BONUS = 2.5
    INHERIT_RECESSIVE_GENE_CHANCE = 0.25    # Probability of a recessive gene being picked as a child's dominant/recessive gene. Only used for portraits

    # Note that the recessive chance is checked only if inheriting it outright fails
    # Chances are in %. Values above 100% work and can make sense if there's modifiers that might reduce the chance
    ACTIVE_TRAIT_CHANCE_ACTIVE_ACTIVE = 80            # Chance of outright inheriting a genetic trait if both parents have it
    ACTIVE_TRAIT_CHANCE_ACTIVE_INACTIVE = 50        # Chance of outright inheriting a genetic trait if one parent has it, and one is carrying it recessively
    ACTIVE_TRAIT_CHANCE_ACTIVE_NONE = 25            # Chance of outright inheriting a genetic trait if one parent has it
    ACTIVE_TRAIT_CHANCE_INACTIVE_INACTIVE = 10        # Chance of outright inheriting a genetic trait if both parents are carrying it
    ACTIVE_TRAIT_CHANCE_INACTIVE_NONE = 2            # Chance of outright inheriting a genetic trait if one parent is carrying it
    INACTIVE_TRAIT_CHANCE_ACTIVE_ACTIVE = 150        # Chance of recessively inheriting a genetic trait if both parents have it. Deliberately over 100% so even if it is a bad trait, the modifiers to inheritance won't let you avoid it
    INACTIVE_TRAIT_CHANCE_ACTIVE_INACTIVE = 100        # Chance of recessively inheriting a genetic trait if one parent has it, and one is carrying it recessively
    INACTIVE_TRAIT_CHANCE_ACTIVE_NONE = 75                # Chance of recessively inheriting a genetic trait if one parent has it
    INACTIVE_TRAIT_CHANCE_INACTIVE_INACTIVE = 50    # Chance of recessively inheriting a genetic trait if both parents are carrying it
    INACTIVE_TRAIT_CHANCE_INACTIVE_NONE = 25        # Chance of recessively inheriting a genetic trait if one parent is carrying it

    # General logic for tiered trait inheritance:
    # 1. Start from highest trait
    # 2. Calc active chance. Lower tiers ( including inactive ) count as inactive of the tier. Each level down beyond the first multiplies chance by a define
    # 3. If active, use it; DONE
    # 4. Otherwise, go down a tier, if inactive pretend 1 more parent has that tier active, otherwise 1 more parent has it inactive.GOTO 2
    MATCHED_TRAIT_DIFFERENCE_MULT = 0.2                # When trying to inherit a tiered genetic trait, and the other person has one of lower tier, we pretend that means they've  got the higher tier one recessively, and reduce the chance of inheritance by this much per tier further down than 1 the other parent's trait is
    TIER_TRAIT_REDUCTION_MULT = 0.4                    # When going down a tier, add this chance
    
    FERTILITY_LEVELS = {
        0.0
        0.2
        0.6
        0.8 }    # The thresholds for each fertility level
        
    INBREEDING_ANCESTOR_GENERATIONS = 4                        # How many generations are checked for common ancestors of the both parents (including the parents) for the purposes of getting the inbreeding trait and the pure-blooded trait
    INBRED_CHANCE_ANCESTOR_COUNT_LEVELS = { 15 17 20 22 }    # Numbers of common ancestors defining different level of inbreeding chance (one extra level above the max value)
    INBRED_CHANCE_FACTOR_LEVELS = { 0.33 0.75 1 2 3 }        # Inbreeding chance factors for different level. The final chance in percent is given by the number of common ancestors X corresponding level factor X inbreeding chance modifier
    PUREBLOODED_CHANCE_ANCESTOR_COUNT_LEVELS = { 20 22 }    # Same as INBRED_CHANCE_ANCESTOR_COUNT_LEVELS, but for the "pure-blooded" trait.
    PUREBLOODED_CHANCE_FACTOR_LEVELS = { 0 0.15 0.3 }        # Same as INBRED_CHANCE_FACTOR_LEVELS, but for the "pure-blooded" trait.
    TRAIT_REINFORCEMENT_CHANCE = 0.5                        # The chance that a trait that gets inherited from both parents will get reinforced to a higher level.

    EXTRA_CHILDREN_FOR_PLAYERS = 50 # Num of extra children players can have before reaching living child limit
    EXTRA_CHILDREN_PER_EXTRA_SPOUSE = 3 # Num of extra children per spouse above one before reaching living child limit
    EXTRA_CHILDREN_PER_EXTRA_CONCUBINE = 3 # Num of extra children per concubine above one before reaching living child limit
    EXTRA_FERTILITY_FOR_FIRST_CHILD = 0.0 # Extra fertility if the couple are primary spouses and have no children together
    EXTRA_FERTILITY_FOR_FIRST_RULER_CHILD = 0.2 # Extra fertility if the couple are primary spouses and have no children together, and at least one of them is a ruler
    DIVINE_MARRIAGE_FERTILITY_MULTIPLIER = 5 # Multiplier if the couple is close or extended family and their faith allows divine marriage
    CLOSE_FAMILY_FERTILITY_MULTIPLIER = 2 # Multiplier if the couple is close family and their faith does not allow divine marriage
    EXTENDED_FAMILY_FERTILITY_MULTIPLIER = 2 # Multiplier if the couple is extended family and their faith does not allow divine marriage
    FERTILITY_IN_POOL_MULTIPLIER = 0.25    # Characters in the pool will have their fertility multiplied by this
}

 

I've changed a few things in there but that was basicly the limiter for fertilty and child amounts also setting how well traits inherit at base values

Link to comment
1 hour ago, Hemiger said:

The chance is in the defines file along with a lot of the age pregnancy and enabling portrait section

So commons/defines/00_defines.txt

That and female chance are no longer hard coded.

 

-snip-

 

I've changed a few things in there but that was basicly the limiter for fertilty and child amounts also setting how well traits inherit at base values

I think you're looking at the completely wrong thing here. That's the pregnancy chance for being married, or just passively in a relationship that might result in pregnancy. It very clearly says
    FERTILITY_CHANCE_MULTIPLIER = 4.75 # Fertility is an average between the father and the mother (if the mother has 0.3 and the father 0.5, the average is 0.4), this number is then multiplied by this multiplier to produce the percentage chance of impregnation. Impregnation is checked every month.

 

I'm looking at the had_sex_with_effect. I've been able to find it within scripted_effects/romance_effects and it has a lot of stuff about what to do with the had_sex_with_effect but the pregnancy chance is still just

                random = {
                    chance = $PREGNANCY_CHANCE$
                    make_pregnant = {
                        father = $CHARACTER$
                    }
                }

 

Which I'm pretty sure means it refers to our PREGNANCY_CHANCE = pregnancy_chance from earlier. Somewhere else is probably a definition of pregnancy_chance, and seduce_pregnancy_chance, but I haven't found it yet.

Link to comment
2 hours ago, LueRV said:

Is it still compatible with 1.0.3?

Yes, it is. But I also just uploaded DWToska-1.0.1 with the following fixes:

  • CK3 supported_version=1.0.3
  • Missing path set in DWToska.mod
  • Pregnancy chance is now determined by using CK3's stock 'had_sex_with_effect' function. Thanks to @whateverdontcare for encouraging me to do it the right way. ?
Link to comment
1 hour ago, justaclonbro said:

About pregnancy,you only get a chance of getting her pregnant or she gets pregnant 100% if you are amale and she a female?I didnt understand that part

The way it is now in DWToska-1.0.1 it uses CK3's native 'had_sex_with_effect' function. That's part of game\common\scripted_effects\00_romance_effects.txt

 

Let's look at how I use it in a code fragment. This example is simplified, cutting out everything irrelavant but the "act":

 

    on_accept = {
        scope:recipient = {
            show_as_tooltip = {
                if = {
                    limit = { 
                        is_female = yes 
                        is_pregnant = no
                    }
                    had_sex_with_effect = {
                        CHARACTER = scope:actor
                        PREGNANCY_CHANCE = seduce_pregnancy_chance
                    }
                }
            }
        }

        scope:actor = {
            show_as_tooltip = {
                if = {
                    limit = { 
                        is_female = yes 
                        is_pregnant = no
                    }
                    had_sex_with_effect = {
                        CHARACTER = scope:recipient
                        PREGNANCY_CHANCE = seduce_pregnancy_chance
                    }
                }
            }
        }

This still is a bit over the top, as I wouldn't need to make the 'is_female' and 'is_pregnant' checks, because the native CK3 function "had_sex_with_effect" does some checks in that regards on its own.

 

The native CK3 function "had_sex_with_effect" only needs to be fed with a couple of parameters. The minimum being WHO the involved character had sex with. That function has currently 254 lines of code and calculates stress loss/gain for all involved parties, traits, gender, age fertility of participants and if there are any secrets or scandals involved (incest, etc.).

 

So at the end of the day pregancy involved a fertile man and fertile woman and only the woman then has a chance of getting pregnant.

 

If you are a female and rape a courtier or prisoner and you both are fertile, then the usual base chance for pregnancy kicks in as well and the female raper can get pregnant. Likewise: A male liege raping a female courtier or prisoner has a chance of making her pregnant.

 

Link to comment
6 hours ago, jipad said:

I heard its hardcoded, but i think you could try creating a new ethnicity/culture and put female meshes as males. You would need to adapt the clothes too.

According to a Q&A session, marriage is no longer hard coded. There is supposed to be a way now to set-up a marriage to be possible if certain conditions are met. So a mod could have a marriage take place between the same sex.

 

I just started looking at the code aspects today, so I can't say exactly how it's done yet. Just that the developer that did the Q&A indicated it was indeed possible now.

Link to comment
16 minutes ago, dewguru said:

According to a Q&A session, marriage is no longer hard coded. There is supposed to be a way now to set-up a marriage to be possible if certain conditions are met. So a mod could have a marriage take place between the same sex.

 

I just started looking at the code aspects today, so I can't say exactly how it's done yet. Just that the developer that did the Q&A indicated it was indeed possible now.

in a certain way the marriage still IS hardcoced trough arrange_marriage_interaction that does some unaccessible magic
"Q: What does the special interaction type arrange_marriage_interaction do?"
"A: special_interaction = arrange_marriage_interaction will add extra marriage info to the interaction, this info makes the game show the special marriage interfaces when setting up an interaction or replying to it. It's also used by the ai in knowing which interaction to use when setting up marriages. It automatically marries/betroths the secondary participants and sets up alliances and hands out prestige."

Link to comment

Btw toska, just a question? (or suggestion?) about one thing, why do you set nakedness in the interaction

add_character_flag = {
	flag = is_naked
	days = 1
}

and then in the event you have

right_portrait = {
	character = scope:recipient
	animation = prisondungeon # fear
	remove_default_outfit = yes
}

when you could set the nakedness right in the event

right_portrait = {
	character = scope:recipient
	animation = prisondungeon # fear
	triggered_outfit = {
		remove_default_outfit = yes
		outfit_tags = { no_clothes }
	}
}

(I noticed this when searching trough base game events)

Link to comment
1 hour ago, rhipeen said:

Btw toska, just a question? (or suggestion?) about one thing, why do you set nakedness in the interaction


add_character_flag = {
	flag = is_naked
	days = 1
}

and then in the event you have


right_portrait = {
	character = scope:recipient
	animation = prisondungeon # fear
	remove_default_outfit = yes
}

when you could set the nakedness right in the event


right_portrait = {
	character = scope:recipient
	animation = prisondungeon # fear
	triggered_outfit = {
		remove_default_outfit = yes
		outfit_tags = { no_clothes }
	}
}

(I noticed this when searching trough base game events)

 

When I played around with it I noticed that the behaviour for "is_naked" and "remove_default_outfit" is slightly different. The funny part is also that neither seems to work in certain circumstances. Very old or very young people won't get naked. But also adults with the correct age will not be stripped naked if they are wearing at least one specific outfit that I know of. There may be more.

 

For that reason I added both methods. I could have combined them into the same call, though. That is true.

 

There is a game file that defines the outfits depending on culture/race, gender and age, so I'm fairly certain that this can be modded according to our needs.

Link to comment
1 minute ago, justaclonbro said:

Are you able to rape somone after kidnaping her?I havent kidnaped anyone so i dont know if when you kindap somone she counts as a prisioner or no

I think kindnapped people count as prisoners. So yeah. That should work. Provided they are of the opposite gender and adults.

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