Jump to content

[mod] Physical Attributes


Recommended Posts

Physical Attributes


PLEASE NOTE: The variables needed to seed the attributes can't be seeded immediately upon loading your game. It will take around a year for everything to look right.

Credit to Jengus on the Carnalitas discord for the Chinese translations.

 

Patreon Link

I have a patreon. 
Some people in the past have offered to donate, so I figured I should look into what site to use.
Why Patreon? It allows adult content in it's terms.
Don't want to be patron, but just send a one time donation? You can just pick a membership tier and immediately unsubscribe.
What do you get? Absolutely nothing. It's totally optional, though I appreciate it. 

 

https://www.patreon.com/mangesmods


ALSO: This mod turns off some of the sliders in the ruler designer. This is necessary because I will need to overwrite whatever you do to those body parts for the mod to work. You can still customize your ruler by giving them traits. The body will change in ruler designer to be in the range of that trait, and I can use the trait to set the physical attributes variable in the range you want.

This mod makes it so that we can reference a character's appearance in game script. This means being able to add custom localization and events that are based on a character's appearance.

 

It turn's your characters appearance into a height and weight. It also seeds some traits that describe characters and allow you to search for characters that look a specific way. If you hover over these traits it will give you a numerical breakdown of the various things that make up that trait.

I've also changed how character genetics works, by seeding specific variables that are held and passed down and then determine how character's look and how future generations look. This system also moderates the more extreme sizes seen in CBO, making them less common. But also making it possible to breed a big titty empire if you wish. Kids will generally take after their parents, but don't be surprised to see things skipping generations.

 

All of these values can be edited by starting the game in debug mode, which will give you access to character interactions that allow you to edit how your characters look.


 

Edited by Mange2020
Link to comment
25 minutes ago, SamIAmHam said:

Gene strength is in the ethnicities.txt file in common/ethnicities and adjusting the morphs is in gfx/portraits/00_trait_modifiers.txt. 

 

Your mod idea sounds pretty good and can't wait to see where it goes.

So not exactly what I meant. This file actually uses the portrait modifiers file (which is basically the same) and my other mod modified the ethnicities file. But you can’t code something like scope:character.gene_bust (just a random example) and pull that characters breast size. This mod makes it so you can. In my code it would be scope:character.actual_breast_size.

 

This is also useful for making animations clip less.

Link to comment

That's a really interesting approach!  Can you use scope:character.gene_bust = { add = X } to change these values and thus the portraits?

 

As well, how feasible would it be to code a Game Rule or Decision that swapped between metric and imperial measurements?

Link to comment
36 minutes ago, Mange2020 said:

So not exactly what I meant. This file actually uses the portrait modifiers file (which is basically the same) and my other mod modified the ethnicities file. But you can’t code something like scope:character.gene_bust (just a random example) and pull that characters breast size. This mod makes it so you can. In my code it would be scope:character.actual_breast_size.

 

This is also useful for making animations clip less.

 

I was telling where the files were that controlled what you want. Last time I give you help.

Link to comment
2 hours ago, bobbily said:

That's a really interesting approach!  Can you use scope:character.gene_bust = { add = X } to change these values and thus the portraits?

 

As well, how feasible would it be to code a Game Rule or Decision that swapped between metric and imperial measurements?

As to question 1 absolutely. Although not in that way, they are coded into variables. So when I change breast size in code its. 

                change_variable = {
                    name = breast_size_genetic
                    add = x
                    }
                }

As to question 2 also absolutely yes. Changing weight is easy because metric conversion is just a formula itself. Height, breast size, and penis size would be more difficult but also very possible. It would just be able creating the custom localization. I'm just American and we use the admittedly worse imperial system so it was more natural for me when creating the formula based on BMI.

Link to comment
8 minutes ago, SamIAmHam said:

 

I was telling where the files were that controlled what you want. Last time I give you help.

I'm sorry, didn't mean to come off like a dick. I know that I can sometimes come off like an asshole when I just intend to be informative. So I apologize for that. I'm bad at tone in real life, on the internet, I'm kind of the worst haha.

Link to comment

This reminds me that I would really like a mod that allows for True Breeding.

Namely, affect your Base Stats (AS Base Stats, that is independent of the Traits, which would come afterwards).

Kinda like making the Custom Character, but through genetics and applying to every character everywhere.

It may sound overpowered, but then we can CODE Traits to be able to switch between inheritable Traits and non-inheritable Modifiers.

Say, you get a Trait that gives you +10 of some Skill, raising it to the total of 30.

The CODE sees that you have >25 of that Skill, so it triggers and turns that Trait into a Modifier that gives you exactly the same +10 boost.

And when you have a child, he will inherit not the Trait (which is removed), but a +5 boost of that Skill WITHOUT the Trait OR the Modifier.

So, in effect, you could be slowly building up for a Super Human who is NATURALLY higher in that Skill (like +25 over many generations), yet is born without the Trait altogether.

Would make SELECTIVE breeding (for actual Skills, not just Traits) a much more fun game, mind you.

And also would make a difference WHEN you spawn a child, since some Traits (and especially Modifiers) actually come and go over time.

So it's a fun race with time to grab your wife the moment you get a +10 boost Modifier for a MONTH, lol.

If lucky, you might even get something out of it, hehehe.

Oh, and this should apply to ALL Stats, from baseline Skills to other abilities (including stuff related to troops and economy, lol).

ALL done through variables, of course.

I'd really like THAT, lol.

Link to comment
2 hours ago, HistoryNerd731 said:

Please do tell me if I'm being dense. How exactly do I see the measurements like in the screenshots? I'm seeing the modifiers but not the actual GUI.

You most likely are not. The problem with modifying GUIs is that if any two mods modify the same file they always overwrite each other and there is no easy way to merge. Chances are you have another mod that also modifies character window. What mods do you have on? If its Carnalitas that is overwriting then just changing the load order will fix it (I built my gui to be compatible with Carnalitas).

Link to comment
12 minutes ago, Mange2020 said:

You most likely are not. The problem with modifying GUIs is that if any two mods modify the same file they always overwrite each other and there is no easy way to merge. Chances are you have another mod that also modifies character window. What mods do you have on? If its Carnalitas that is overwriting then just changing the load order will fix it (I built my gui to be compatible with Carnalitas).

Ah hah! That was it. I just had to move your mod(s) down below Carnalitas and it fixed it. Probably shoulda tried that first, but hey at least if someone is having my same issue, they now know why. Preciate the help!

Link to comment

Awesome, I love where you're taking the game with your mods. Your mods are definitely a huge breakthrough for the CK3 modding community.

 

Here are some suggestions for this mod, I don't know whether you want to implement them or anyone else is going to do it (I myself could try it in the future if I have some time and interest), but it would be fun IMO:

-I don't know if it's possible, but it would be cool to add sorting by physical characteristics like height or weight.

-If that's not possible, then you could add a decision to search for a potential wife/husband with certain characteristics. Maybe something similar to the "tinder" event, but with options like "I want a taller guy" or "I want a girl with bigger boobs" and so on.

-From what I understood based on your description and looking into your code, inheritable variables can't be below or above those of your parents. How about adding a random mutation value, so that for example two people who have height 50 could have a kid who's 60 or 40? Basically a random addition of a number from -10 to 10 to simulate mutation. Otherwise you won't be able to breed really tall or really short people.

-Based on what I saw in your code, there's no genetic component for weght. Maybe it could be implemented, so that you could breed a family of skeletons or fatties?

-Adding religious stuff for what you implemented already. For example making a big ass a virtue or a sin and generally fine-tuning the beauty standards for both genders.

 

I know it's a huge undertaking, and what you have implemented is huge already. I wish you all the best, since right now your mods are the best for CK3 IMO. I hope other modders will adopt what you created into their own mods because it just makes things a lot more fun. Some people tried creating preference system, for example, but it wasn't possible to implement using only traits. With your mod it's entirely possible though.

Link to comment
On 3/25/2021 at 2:21 AM, Mange2020 said:

I'm sorry, didn't mean to come off like a dick. I know that I can sometimes come off like an asshole when I just intend to be informative. So I apologize for that. I'm bad at tone in real life, on the internet, I'm kind of the worst haha.

Your post was fine, this person doesn't understand what he's talking about. There is no way to reference appearance in the code. The way you implemented it is the only possible way. Hope you will keep it up.

 

I've played with your mod a little bit and have positive impressions. The only thing I didn't like is that most women have unrealistically huge breasts and butts (I also installed your other mod). Big boobs and butts are fine, but they should be way rarer than what we see in the game. Perhaps you could try changing the distribution of the parameters so that the values close to 50 are more common than the outliers.

Link to comment

 

Thanks for your work on this mod and others @Mange2020. The attributes concept here truly gives this mod (and others) some incredible potential.

 

I just wish there was a way to get it to play along better with the carnalitas traits. I am playing with the following mod order:

 

Spoiler

image.png.673cf62c21f56fdb26d524aca2f46530.png

 

And so far what I have seen is that breast/penis size depends only on the physical attribute value. Is that indeed what I should expect? I would like to have it so that the carnalitas traits are also taken into account. As it stands currently they don't mesh together very well, because you will have characters with the carnalitas trait "tits_big_3" yet the breast size attribute value is still random and may be very small. 

 

Ideally I would also like to have the carnalitas traits put limits on the range of attribute values. So for example, the default range of breast size attribute value would be from 40-60, and the level of the "tits_big_1/2/3" would set the minimum value to 70/80/90. And the opposite for the "tits_small_1/2/3" trait.

 

I would really appreciate if you have any thoughts on how to better integrate this mod with the carnalitas traits. I am not locked into using the carnalitas traits, but I like that they offer the ability to change size on the fly using the debug console. I am happy to work on modifying these traits myself, but I am not aware of what code would be necessary or if it is even possible.

 

On 3/24/2021 at 7:19 PM, Mange2020 said:

change_variable = {
                    name = breast_size_genetic
                    add = x
                    }
                }

 

I saw the code you mentioned above for changing breast size, but could you elaborate on how one would go about using it if they just want to change the size of a specific character?

 

 

 

 

Link to comment
On 3/27/2021 at 11:44 AM, hamimobe said:

Awesome, I love where you're taking the game with your mods. Your mods are definitely a huge breakthrough for the CK3 modding community.

 

Here are some suggestions for this mod, I don't know whether you want to implement them or anyone else is going to do it (I myself could try it in the future if I have some time and interest), but it would be fun IMO:

-I don't know if it's possible, but it would be cool to add sorting by physical characteristics like height or weight.

-If that's not possible, then you could add a decision to search for a potential wife/husband with certain characteristics. Maybe something similar to the "tinder" event, but with options like "I want a taller guy" or "I want a girl with bigger boobs" and so on.

-From what I understood based on your description and looking into your code, inheritable variables can't be below or above those of your parents. How about adding a random mutation value, so that for example two people who have height 50 could have a kid who's 60 or 40? Basically a random addition of a number from -10 to 10 to simulate mutation. Otherwise you won't be able to breed really tall or really short people.

-Based on what I saw in your code, there's no genetic component for weght. Maybe it could be implemented, so that you could breed a family of skeletons or fatties?

-Adding religious stuff for what you implemented already. For example making a big ass a virtue or a sin and generally fine-tuning the beauty standards for both genders.

 

I know it's a huge undertaking, and what you have implemented is huge already. I wish you all the best, since right now your mods are the best for CK3 IMO. I hope other modders will adopt what you created into their own mods because it just makes things a lot more fun. Some people tried creating preference system, for example, but it wasn't possible to implement using only traits. With your mod it's entirely possible though.

Thanks! Happy to see some other people interested in where I'm going.

Yeah using traits and stuff was where I started too (before I uploaded things) but I was never able to get it to a good place. So I've already written the code toward getting subjective attraction values and the like, but my experience from before showed me that the game doesn't really have a great attraction system as it is. It's basically just a triggered opinion modifier for characters between certain ages with matching gender and sexuality. Even seduction and courting schemes don't use attraction (instead they add beauty traits as specific modifiers). So in order for these numbers to matter at all I have to build a system from the ground up. I'm relatively close to finishing this but I'm not gonna have much time for modding in the coming weeks. 

So I definitely want to add the ability to sort by all the size variables, especially in the matchmaker/concubine/marriage window (at least my failed attempts to get around the marriage hardblock taught me how haha) but in practice that might be difficult to add into the gui because of space limitations. At the very least I will make it able to sort by how attracted your characters are to each other.

So I could be misreading what you are saying in relation to the genetic variables. But I think that's not quite how they work. Two people with a height of 50 could totally have a kid with a height of 60 or 40 in this system right now. Everyone has a gene_1 and gene_2 for every variable.

So a person with a height of 50 could have gotten that height because they have a gene_1 of 50 and gene_2 of 70 or 40 and 60 etc. all we really know is that one of their genes is above 50 and the other is below 50.

So to use those numbers any child of parent 1 with the genes of 50 and 70 would have a 50 percent chance of getting a gene of 50 and a 50 percent chance of getting a gene of 70. Parent 2 would have a 50 percent chance of passing on their value of 40 and a 50 percent chance of passing on the value of 60. leaving us with 4 equally likely genotypes for the kids
Gene_1 50 Gene_2 40 which will randomly generate a height from 40-50
Gene_1 50 Gene_2 60 which will randomly generate a height from 50-60
Gene_1 70 Gene_2 40 which will randomly generate a height from 40-70
Gene_1 70 Gene_2 60 which will randomly generate a height from 60-70
I've considered adding a way to mutate one of these gene's a bit. But honestly this math is pretty conceptual for me. I know it vaguely does the sort of things I'm looking for but I don't know what will result from tweaking it, I may add it later once we have a better grasp of how this all works.

There isn't a genetic component for weight right now. Which of course isn't accurate as there is a genetic component to metabolism, its an interesting idea though, and will definitely consider how I would implement it. There is kind of a genetic component for weight via the base game, the poor physique trait makes you skinnier/fatter and the good version makes you more in between. Generally the things I want to add to effect muscle/fat are more cultural/religious. A thing I forgot to mention (because it's code that I've had since forever and just copy and pasted in) is that this mod makes hedonists gain weight as though they were all gluttonous, and makes it so being a zealous hedonist increases weight instead of decreases weight. So most of my plans around weight and muscle are similar. Right now women in male dominated faith have a modifier to reduce their muscles. If you become an equal faith that modifier goes away. If you become female dominated men lose muscle mass.

As to the genetic distribution I agree it could be more of a bell curve, that was basically the first thing I noticed. When making the shapes to start with I was basically trying to include the actual maximum values that people have. And did some research on what the average/max of people actually are. I came across some interesting things, like basically we don't know average breast size because it seems like women under report their breast size versus what bra sales data tells us because of negative cultural stereotypes (or women with big breasts buy A LOT more bras). But that doesn't help the distribution. I was gonna say I can't think of a way to change that without adding more math and possibly slowing down the game. But since gene_1 and gene_2 are seeded separately I could give them different max and min values. So the extreme values would occur at half the frequency. So I might try that.

Link to comment
16 hours ago, noirblanc1 said:

 

Thanks for your work on this mod and others @Mange2020. The attributes concept here truly gives this mod (and others) some incredible potential.

 

I just wish there was a way to get it to play along better with the carnalitas traits. I am playing with the following mod order:

 

  Reveal hidden contents

image.png.673cf62c21f56fdb26d524aca2f46530.png

 

And so far what I have seen is that breast/penis size depends only on the physical attribute value. Is that indeed what I should expect? I would like to have it so that the carnalitas traits are also taken into account. As it stands currently they don't mesh together very well, because you will have characters with the carnalitas trait "tits_big_3" yet the breast size attribute value is still random and may be very small. 

 

Ideally I would also like to have the carnalitas traits put limits on the range of attribute values. So for example, the default range of breast size attribute value would be from 40-60, and the level of the "tits_big_1/2/3" would set the minimum value to 70/80/90. And the opposite for the "tits_small_1/2/3" trait.

 

I would really appreciate if you have any thoughts on how to better integrate this mod with the carnalitas traits. I am not locked into using the carnalitas traits, but I like that they offer the ability to change size on the fly using the debug console. I am happy to work on modifying these traits myself, but I am not aware of what code would be necessary or if it is even possible.

 

 

I saw the code you mentioned above for changing breast size, but could you elaborate on how one would go about using it if they just want to change the size of a specific character?

 

 

 

 

Your welcome, glad you appreciate it.

TBH in terms of the code, I don't personally use the console much so I just kind of assumed that because there was a way to put it in the code that there would be a way to put it in the console. Turns out there isn't. I guess you would have to make a scripted effect and run it that way. I'll look into this when I get the time to update this mod.

This mod is kind of intended as a replacement to carnalitas traits, although right now this is a pretty stripped down version (until I get attraction fully up and running) you can do more with the carnalitas traits. But as hamimobe made me realize (with the question about virtues and sins) there are some things you can do with traits that you can only do with traits. So I may make a mod that reverses the causality, so having a high value gives you the trait rather than the trait giving you large breasts. I would want it to be separate for now though, because until the full attraction thing is up, I'm very concerned about minimizing the number of calculations that I'm asking from the system. Unfortunately I'm not sure when I'll have the time, but when I do have the time to spend on modding again I'll set that up.

Also just an interesting thing the value in the gui is designed to represent what you see, but not necessarily cause it. Which is a convoluted way of saying being pregnant increases breast size. Losing weight decreases breast/muscle/butt size separately of the genetics variable, same with giant/dwarf. So you should see those numbers change over time for individual characters.

Link to comment
5 hours ago, Mange2020 said:

So I could be misreading what you are saying in relation to the genetic variables. But I think that's not quite how they work. Two people with a height of 50 could totally have a kid with a height of 60 or 40 in this system right now. Everyone has a gene_1 and gene_2 for every variable.

Yes, I played a little bit and that's indeed what happens. But if I understand it correctly, you can't really breed a family that's taller than the maximum random value, because this gene will never be generated. So I kinda hope you do add a little bit of a mutation chance to your arithmetics, since IMO it's very fun to breed OP/outlier characters through generations of breeding. It doesn't seem to be very hard, you just add a random number to both of the genes after they have been calculated for the child based on the parents' genes.

 

5 hours ago, Mange2020 said:

I was gonna say I can't think of a way to change that without adding more math and possibly slowing down the game.

Instead of changing the distribution of the variables themselves, you could change the effect the values have on the appearance. So that, for example, 50-75 are average height, 75-90 are tallish, 90-95 are tall, 95-97 are very tall, 98-100 are giants. So basically changing the mapping of your coded variables to the resulting appearance. Otherwise I don't see a good way to simulate the bell curve. It could be simulated by tossing a coin 100 times, for example, but that's obviously not very good for performance.

 

5 hours ago, Mange2020 said:

This mod is kind of intended as a replacement to carnalitas traits, although right now this is a pretty stripped down version (until I get attraction fully up and running) you can do more with the carnalitas traits. But as hamimobe made me realize (with the question about virtues and sins) there are some things you can do with traits that you can only do with traits. So I may make a mod that reverses the causality, so having a high value gives you the trait rather than the trait giving you large breasts. I would want it to be separate for now though, because until the full attraction thing is up, I'm very concerned about minimizing the number of calculations that I'm asking from the system. Unfortunately I'm not sure when I'll have the time, but when I do have the time to spend on modding again I'll set that up.

It's not necessary to use traits in order to get the desired effect, since you'll have to write the events from scratch anyway (I don't think the vanilla virtue ones are good enough to describe beauty standards) and you could use your own variables to implement this. But your idea is even better, it would indeed be cool to give the traits based on your variables.

 

Speaking about the number of calculations, yeah, that could be a problem. But I don't really see another way to implement all these systems without that.

Link to comment
3 hours ago, hamimobe said:

Yes, I played a little bit and that's indeed what happens. But if I understand it correctly, you can't really breed a family that's taller than the maximum random value, because this gene will never be generated. So I kinda hope you do add a little bit of a mutation chance to your arithmetics, since IMO it's very fun to breed OP/outlier characters through generations of breeding. It doesn't seem to be very hard, you just add a random number to both of the genes after they have been calculated for the child based on the parents' genes.

 

Instead of changing the distribution of the variables themselves, you could change the effect the values have on the appearance. So that, for example, 50-75 are average height, 75-90 are tallish, 90-95 are tall, 95-97 are very tall, 98-100 are giants. So basically changing the mapping of your coded variables to the resulting appearance. Otherwise I don't see a good way to simulate the bell curve. It could be simulated by tossing a coin 100 times, for example, but that's obviously not very good for performance.

 

It's not necessary to use traits in order to get the desired effect, since you'll have to write the events from scratch anyway (I don't think the vanilla virtue ones are good enough to describe beauty standards) and you could use your own variables to implement this. But your idea is even better, it would indeed be cool to give the traits based on your variables.

 

Speaking about the number of calculations, yeah, that could be a problem. But I don't really see another way to implement all these systems without that.

So just fyi I actually realized that I had to add another expression to the gene seeding to get it to work at all. Apparently real_father doesn't work if the child is legitimate. So I added another expression in the update.

Link to comment

I take this mod is not save compatibility friendly since it made everybody very short, it made my character 5'6 and he had max height, also trying to edit DNA height wise doesn't seem to do anything for any character.

Link to comment
54 minutes ago, Blai said:

I take this mod is not save compatibility friendly since it made everybody very short, it made my character 5'6 and he had max height, also trying to edit DNA height wise doesn't seem to do anything for any character.

It's save compatibility friendly in that you can start playing and it will totally work. But it also doesn't care about your character's height before the mod starts. Just completely replaces that value (which can't be reference) with a new value (that can). But I just finished my real life project that I spent all weekend on, so now I can just script an event real fast, allowing you to manipulate the genes from the console. 

Link to comment

Thank you for the mod, it surely looks interesting and Id love to use it in my game! I have a question tho:

 

Quote

I've also totally changed the muscularity works. In the base game your muscles are entirely determined based on prowess. Instead I've made it so that muscles are determined based on your traits (and some other factors) and being muscular increases your prowess, instead of the other way around. So now its entirely possible to have skinny characters that are good at fighting and muscular characters who are incompetent in a fight. Since height/muscularity now effect prowess by themselves I've also removed the prowess modifiers from Dwarf/Giant/Physique. These traits still help/hurt your prowess indirectly through their effects on your height/muscles.

 

Is there any ways where I can manually modify muscles in the game to my liking?

Link to comment
44 minutes ago, buxxuc said:

Thank you for the mod, it surely looks interesting and Id love to use it in my game! I have a question tho:

 

 

Is there any ways where I can manually modify muscles in the game to my liking?

Yes, there is a debug event to manually move muscularity. But the characters will still always trend towards whatever their target value is. But given your issue on the other mod thread, I think this will be fine for you. Most female characters have lower muscularity. And its totally disconnected from prowess.

Link to comment

Just an FYI, for those that don't want a hulk of nature when they get a bunch of skill/traits, I've attached a modified muscularity.txt that changes the max from 1 to 0.75. Drop it in Documents\Paradox Interactive\Crusader Kings III\mod\physical_attributes\gfx\portraits\portrait_modifiers. I spend like 4 hours trying to figure out how to stop my characters from hulking out, and be able to copy in DNA without the characters looking like flesh skeletons. Therefore, I thought I'd share and hopefully keep others from wasting time not playing the game.

 

This is what the musculature should be look like at the capped max:

 

image.thumb.png.1ad6aef60da27fe692956565b11ff526.png

muscularity.txt

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