Jump to content

[Help/Advice] Infinite Fertility & Child Cap Unlock Trait


Recommended Posts

Posted

Hi all.

 

I was wondering if anyone could help me with the issue in the title please. What I'm trying to do or see if its even possible is make a trait that extends the fertility years of the character who has it as well as increase their child cap.

 

Basically, on the workshop are 2 mods that remove the 15 max child cap. One for players only and one for all the AI as well but neither do what I'm after completely. Also, on LL and on the workshop there are extended fertility mods. I looked at the one by M4rocks that's here on LL.

 

Is the above possible or is the game just not coded to work that way?

 

I am not a coder at all. It's very much monkey see monkey do but looking at the code from the 2 mods I get this from M4rocks fertility mod

 

fertile = {
    index = 427
    
    attraction_opinion = 10
    vassal_opinion = 5
    same_opinion = 10
    
    ruler_designer_cost = 0
    
    genetic = no
    inherit_chance = 0
    inherit_from_real_father = no
    years_of_fertility = 300

    
    desc = {
        first_valid = {
            triggered_desc = {
                trigger = {
                NOT = { exists = this}
            }
            desc = trait_brave_desc
        }
        desc = trait_brave_character_desc
    }
}

    ai_energy = low_positive_ai_value
    ai_boldness = dominant_positive_ai_value
    ai_rationality = low_negative_ai_value
    ai_sociability = low_positive_ai_value
    
    #portrait_pose = {
    #    name = "test_pose_brave"
    #    score = 10
    #}
    }
}

 

and this from the no child cap for AI mod.

 

NChildbirth = {
    BASE_NR_OF_CHILDREN_PER_COUPLE = { 999 999 999 999 999 999 } # Based on tier of character or parents; whichever is higher Unlanded, Baron, Count, ..., Emperor
}

 

If I combine the 2 codes into the below structure would it work like what I'm after? Would that make a character with the trait fertile for 300 years and have a high child cap?

 

fertile = {
    index = 427
    
    attraction_opinion = 10
    vassal_opinion = 5
    same_opinion = 10
    
    ruler_designer_cost = 0
    
    genetic = no
    inherit_chance = 0
    inherit_from_real_father = no
    years_of_fertility = 300

    
    desc = {
        first_valid = {
            triggered_desc = {
                trigger = {
                NOT = { exists = this}
            }
            desc = trait_brave_desc
        }
        desc = trait_brave_character_desc
    }
}

    ai_energy = low_positive_ai_value
    ai_boldness = dominant_positive_ai_value
    ai_rationality = low_negative_ai_value
    ai_sociability = low_positive_ai_value
    
    #portrait_pose = {
    #    name = "test_pose_brave"
    #    score = 10
    #}
    }
}

 

NChildbirth = {
    BASE_NR_OF_CHILDREN_PER_COUPLE = { 999 999 999 999 999 999 } # Based on tier of character or parents; whichever is higher Unlanded, Baron, Count, ..., Emperor
}

 

My gut says no it wont work as one is from a trait and the other is from the defines but I hope someone more knowledgeable can help.

 

Also, does anyone have any idea which stat is the primary stat for when the AI checks for a couple to have a child? Is it energy, boldness or sociability?

 

I apologise if posting other peoples code is bad manners. I did look at messaging M4rocks but they have not been active in a while.

 

Many thanks for everyone's time.

 

Cheers

Posted (edited)
7 minutes ago, torill said:

My gut says no it wont work as one is from a trait and the other is from the defines but I hope someone more knowledgeable can help.

I apologise if posting other peoples code is bad manners.

Your gut is right, both come from different parts and can't be combined.

 

Regarding posting code I suggest you use the code widget to make it more readable.

Like this

 

Edited by LordDGP
Posted
1 minute ago, LordDGP said:

Your gut is right, both come from different parts and can't be combined.

Thank you. Not what I wanted to hear but certainly not surprising ?

Posted
10 minutes ago, torill said:

Basically, on the workshop are 2 mods that remove the 15 max child cap. One for players only and one for all the AI as well but neither do what I'm after completely.

Does the mod for players only achieve this differently compared to the AI mod which touches defines?

Posted
19 minutes ago, LordDGP said:

Does the mod for players only achieve this differently compared to the AI mod which touches defines?

No. They both edit the defines file. There's one line that governs the player cap and another line that governs the AI cap. They just change the values to alter the cap.

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...