Jump to content

[Resource] Modding Bust Size Blendshapes


Recommended Posts

Was curious how big you could make a character's bust/breast size using the vanilla meshes, and this is the largest I was able to come up with.

 

To do this in your own mod:

  • Add a new trait. We use this to decide if we should apply the new body morph
  • Add a new gene and gene template under common/genes that adds to the strength of the existing breast blend shapes / morphs
  • Add a new portrait modifier and group to gfx/portraits/portrait_modifiers where if the character has our trait, we apply our blend shape values

 

The trait doesn't have to be anything special. You could make a new one or just use an existing one. The only important thing is that we know the name of the trait. For this example, I'm going with the name my_trait .

 

In common/traits/my_trait.txt

my_trait = {
  # do whatever normal trait stuff you want here
}

 

The genes are where this gets interesting. We're going to make a visual only gene that when present causes the bust/breast sliders to max out. Here's how that works.

 

In common/genes/my_gene.txt

# special_genes are ones that are not saved to the character's dna, and are only applied via portrait modifiers

special_genes = {

  # Morph genes apply blend shapes/morphs to the character model. These get added after the base DNA morphs

  morph_genes = {

    # Name of your gene group. This is the name that shows up when you go to the Portrait Editor and select the Gene dropdown

    my_gene_group = {

      # Every gene group can have any number of templates which serve as the available options. Since our gene is a simple on/off, we only need to define the on case

      my_gene_template = {

        # Normally this is used for DNA storage. We just need a placeholder value here

        index = 0

        # We only apply this to female characters

        female = {

          # Settings are used for morphs. Alternatively, you can define decals which apply texture changes

          setting = {

            # Attribute is the name of the blend shape/morph we want to adjust. For this first one, we'll modify the base breast size

            # blend shape. You can find all of these in gfx\models\portraits\female_body\female_body.asset

            attribute = "bs_body_breast_size_max"

            # The value is how much of the blend shape you want to apply, going from -2 to 2, with 0 being no effect.

            # We are going to use a min and a max here because we want the character's age to adjust how much we apply.

            value = {

              min = 0.0

              max = 4.0 # So that if our base DNA value is -2 (flat chested), we'll go all the way to +2

            }

            # This applies a scaling to our value based on the character age, so our big breast effect doesn't fully kick in until after

            # puberty. Feel free to change this if you want infants to be born with big breasts

            age = age_preset_puberty

          }

          # We will use a similar setting for the second breast blend shape

          setting = { attribute = "bs_body_breast_size_2_max" value = { min = 0.0 max = 4.0 } age = age_preset_puberty }

          # We will use inverted values for the breast size min blend shape, as this causes the flat chested shape

          setting = { attribute = "bs_body_breast_size_min" value = { min = 0.0 max = -4.0 } age = age_preset_puberty }

        }

      }

    }

  }

}

 

Now to tie it all together. We'll make a portrait modifier so that if our character has our trait my_trait, their portrait has my_gene_template applied to it.

 

In gfx/portraits/portrait_modifiers/my_portrait_modifier.txt

# All modifiers are placed within a group

my_portrait_modifier_group = {

  # This tells the game that this modifier group is only applied via game effects

  usage = game

 

  # Next we define our only modifier, the one that gets applied if we have our trait

  my_portrait_modifier = {

    # This modifier is going to be applied on top of the character's base dna string

    dna_modifiers = {

      # We are going to apply a body morph

      morph = {

        # The name of the gene group to use

        gene = my_gene_group

        # Which specific gene template to apply

        template = my_gene_template

        # How much of the template to apply, from [0-1]

        value = 1

        # 'special genes' that are applied by the game can only be added on top of the base dna

        mode = add

      }

    }

    # How much of this morph to apply to any character

    weight = {

      # By default, characters should not have this morph applied

      base = 0

      # But if they have our trait, then apply all of this morph

      modifier = {

        # Pretty sure this is character scope if you wanted to do something fancy

        # For this example, we are just testing to see if we have the trait

        has_trait = my_trait

        # And if they do, max out this morph

        add = 100

      }

    }

  }

}

 

That's it! Save these files, start up the game, and add our trait to a character to see the effect. You can also find the new gene we defined in the Portrait Editor if you want to experiment with applying different strengths to see what it looks like.

 

Now you can make a "large breasts" trait and ensure the character portrait reflects that. Or turn it around and make a "flat chested" trait.

 

A few final notes:

  • bs_body_breast_shape_2 is the blend shape that causes the nipples to point downwards. By default, all bust shape genes will start applying this blend shape starting at age 35 and increasing as the character gets older.
  • You could also max out the bs_body_breast_shape_1, _3, and _4 blend shapes. These are only noticeable if the character is naked, and can cause clipping with most outfits.
  • Theoretically, blend shapes could go past the max value of +2. I haven't been able to figure out if this is a restriction imposed by the engine, the mesh file, or defined somewhere in a file we can modify.
  • This technique could apply to any other body part that defines blend shapes. Maybe an artist modder can make a dick mesh with the appropriate blend shapes so we can drive its size based on traits too.

bustSizeBodyMorph.jpg

Link to comment
6 hours ago, hoover2701 said:

Great stuff! May I humbly ask if you could upload this as a mod which uses the existing Carnalitas bust size traits? The big breasts loving part of me would very much appreciate this! ;)

carnalities already uses this method to morph breasts shapes. just look at the mod files

Link to comment
25 minutes ago, luffyboy said:

carnalities already uses this method to morph breasts shapes. just look at the mod files

Hmmm, I know that Carnalitas morphes the breast shapes but I believe that the factor isn't 4 (or -2/2) as in the above example. The woman in the picture above definitely has bigger breasts than my voluptous Carnalitas-Duchesses! I have no experience in modding therefore this is just a visual observation... Maybe the OP can clarify this?

Link to comment
1 hour ago, luffyboy said:

carnalities already uses this method to morph breasts shapes. just look at the mod files

Sorta. The approach used by Carnalitas is to replace the character's existing bust gene with one that uses a vanilla gene at a specific value.

 

Let's take the default character from the portrait editor as an example. Here's the character without any modifications, using their default DNA value.

default.jpg.8f4e61e8d2bee6b43a84b1d60cf1fd19.jpg

 

The default character uses the bust_shape_full_1 gene template. Maxing that out results in this:

bust1Max.jpg.b7655f5b02d2870d76df2bbabbce04da.jpg

This is the approach used by Carnalitas. They define a bunch of genes for the various breast sizes, and use the 1.0 value for the tits_big_3 trait. Because there's no way to query which gene template the character currently has, Canalitas has the game randomly pick from the ones available.

 

Now if we add in our trait, which adds to the blend morph size, we get this:

bust1MaxMorph.jpg.01dac813cfc94a41bffc6ae4ab295ed9.jpg

A larger size. And as a bonus, we only needed to define a single gene.

 

This works for all of the other bust types too. So bust_shape_2_full, which has a droopy shape, looks like this when before and after we apply our trait

bust2Max.jpg.22acd38b3f57d4adae851af095ecf010.jpgbust2MaxMorph.jpg.bbf07c893535bf16c39b5893404a4d9f.jpg

 

This is why I think using an additive morph is the better approach. We keep the shape of the breast from the dna string, so characters from the same bloodline will typically have the same breast shape. We're just making it bigger by applying a morph "on top" of the existing size.

 

For completeness, here's the before and after when using bust_shape_3_full:

bust3Max.jpg.80f2348141897e14dc6fe8284dd34c99.jpgbust3MaxMorph.jpg.195c9046cd2d3f780d7d04ae1b1dddcd.jpg

 

And bust_shape_4_full:

bust4Max.jpg.f1bdf4e335519287724eb0f6bf93e51d.jpgbust4MaxMorph.jpg.b510c2daadf89422aa45a745fa7aae3e.jpg

Link to comment
18 minutes ago, joemann said:

I noticed that the nipples get bigger in parallel with the breasts. Are they part of the mesh file or are they generated by a separate file? Is it possible to have nipples independent from the breasts so that they may vary from one character to another?

The nipple texture is baked into the base diffuse texture for the female body mesh. The reason it gets bigger as we increase in size is because we are "stretching" the texture to cover a larger area.

 

You could get industrious and remove the nipple from the base texture and then apply it via a decal. That would allow you to use a different texture for different traits/genes.

Link to comment

Nice! That is some good info!

 

But would there be a problem with applying it to the Carn traits since this method seems to be additive? So say you want "Big Tits" not Huge or Gigantic, but the current DNA string already has a flat chest or is already very large. If this method is additive, it might not add enough to a flat chest, or add too much to an already large chest. Or am I completely off-base here?

 

Link to comment
11 minutes ago, MongoBongoArt said:

Nice! That is some good info!

 

But would there be a problem with applying it to the Carn traits since this method seems to be additive? So say you want "Big Tits" not Huge or Gigantic, but the current DNA string already has a flat chest or is already very large. If this method is additive, it might not add enough to a flat chest, or add too much to an already large chest. Or am I completely off-base here?

 

Your intuition is correct. The default bust genes typically use a scale from -1 to 1 (see 01_genes_morph.txt:6875). Our gene morph just adds a fixed amount to this value.

 

So lets say we have two traits, big_breasts_1 that adds 1 to the size and big_breasts_2 that adds 2. If the character normally has a breast scale of 1, either trait will "max out" the scale at 2 so you won't see a difference. But if the character was naturally at 0, you would see a difference.

 

That also means that a character who's natural bust scale was -1 and had our big_breasts_1 trait would appear to have smaller breasts than a character who naturally had a breast scale of 1 and didn't have our trait (-1 + 1 => 0, which is still smaller than 1).

 

To make something like breast size traits work, you'd have to modify the default genes so their scale was a more narrow range. That way when you apply the additive morph, you see a bigger effect. If the default range was between -0.2 and 0.2, then adding 0.5, 1, or 2 would have a more noticeable effect.

 

This also works the other way. If you wanted a small_breasts_1 trait that made characters have smaller breasts, you could make a gene template that added a negative amount to the blend shape size and the character would have smaller breasts than their default DNA values would display. 

Link to comment
13 hours ago, hoover2701 said:

Great stuff! May I humbly ask if you could upload this as a mod which uses the existing Carnalitas bust size traits? The big breasts loving part of me would very much appreciate this! ;)

Integrating this with Carnalitas would take some work. But here's a quick version of the mod that works with the game's vanilla Beauty traits. More beauty = bigger breasts:

 

Link to comment
12 hours ago, kincade said:

The nipple texture is baked into the base diffuse texture for the female body mesh. The reason it gets bigger as we increase in size is because we are "stretching" the texture to cover a larger area.

 

You could get industrious and remove the nipple from the base texture and then apply it via a decal. That would allow you to use a different texture for different traits/genes.

Thanks for the answer. I made a new female_body_diffuse file with different nipples (I did a cut paste ) and replaced the existing file. This works. I would like to have several different diffuse files each with different nipples. Which file connects the individual diffuse files to a model? In other words what determines which diffuse file is picked in a given situation?

 

In how far are decals  different from the base diffuse file and how do I apply them?

 

I am a complete noob as far as these 3D graphics is concerned.

Link to comment
19 hours ago, kincade said:

Sorta. The approach used by Carnalitas is to replace the character's existing bust gene with one that uses a vanilla gene at a specific value.

 

Let's take the default character from the portrait editor as an example. Here's the character without any modifications, using their default DNA value.

default.jpg.8f4e61e8d2bee6b43a84b1d60cf1fd19.jpg

 

The default character uses the bust_shape_full_1 gene template. Maxing that out results in this:

bust1Max.jpg.b7655f5b02d2870d76df2bbabbce04da.jpg

This is the approach used by Carnalitas. They define a bunch of genes for the various breast sizes, and use the 1.0 value for the tits_big_3 trait. Because there's no way to query which gene template the character currently has, Canalitas has the game randomly pick from the ones available.

 

Now if we add in our trait, which adds to the blend morph size, we get this:

bust1MaxMorph.jpg.01dac813cfc94a41bffc6ae4ab295ed9.jpg

A larger size. And as a bonus, we only needed to define a single gene.

 

This works for all of the other bust types too. So bust_shape_2_full, which has a droopy shape, looks like this when before and after we apply our trait

bust2Max.jpg.22acd38b3f57d4adae851af095ecf010.jpgbust2MaxMorph.jpg.bbf07c893535bf16c39b5893404a4d9f.jpg

 

This is why I think using an additive morph is the better approach. We keep the shape of the breast from the dna string, so characters from the same bloodline will typically have the same breast shape. We're just making it bigger by applying a morph "on top" of the existing size.

 

For completeness, here's the before and after when using bust_shape_3_full:

bust3Max.jpg.80f2348141897e14dc6fe8284dd34c99.jpgbust3MaxMorph.jpg.195c9046cd2d3f780d7d04ae1b1dddcd.jpg

 

And bust_shape_4_full:

bust4Max.jpg.f1bdf4e335519287724eb0f6bf93e51d.jpgbust4MaxMorph.jpg.b510c2daadf89422aa45a745fa7aae3e.jpg


Thanks for the really good and detailed explanation.

I fiddled around with your concept mod and was trying to see whether it was possible to overcome the clipping. 

why exactly does your mod cause clipping in clothes? is it beacuse it touches on bs_body_breast_size while carn only touches on the shape genes?

Link to comment
11 hours ago, joemann said:

Thanks for the answer. I made a new female_body_diffuse file with different nipples (I did a cut paste ) and replaced the existing file. This works. I would like to have several different diffuse files each with different nipples. Which file connects the individual diffuse files to a model? In other words what determines which diffuse file is picked in a given situation?

 

In how far are decals  different from the base diffuse file and how do I apply them?

 

I am a complete noob as far as these 3D graphics is concerned.

That's in the female_body.asset file, located at gfx\models\portraits\female_body\female_body.asset. There's a section called meshsetings which defines what textures to use for the asset.

 

meshsettings = {
    name = "female_bodyShape"
    index = 0
    texture_diffuse = "female_body_diffuse.dds"
    texture_normal = "female_body_normal.dds"
    texture_specular = "female_body_properties.dds"
    shader = "portrait_skin"
    shader_file = "gfx/FX/jomini/portrait.shader"
 
}
 
But this is what gets applied to all characters by default. Instead, a better approach might be to create textures that we could "overlay" on top of this body texture that will be just the nipples. That way we could control which overlay to use with a gene. The game calls these overlay textures decals.
 
When you define a gene, you can specify settings, which are blend shape morphs you want to apply to model, and decals which are images you want to overlay on the model's texture. So using our example from before, we could make our gene template define a decal in addition to the blend shape setting. That would look like:
 

In common/genes/my_gene.txt

special_genes = {

  morph_genes = {

    my_gene_group = {

      my_gene_template = {

        index = 0

        female = {

          # Makes the breast mesh bigger

          setting = { attribute = "bs_body_breast_size_max" value = { min = 0.0 max = 4.0 } age = age_preset_puberty }

          setting = { attribute = "bs_body_breast_size_2_max" value = { min = 0.0 max = 4.0 } age = age_preset_puberty }

          setting = { attribute = "bs_body_breast_size_min" value = { min = 0.0 max = -4.0 } age = age_preset_puberty }

 

          # Applies our nipple decal

          decal = {

            body_part = torso # Apply this to the body mesh

            textures = {

              # The 'diffuse' texture defines the color of the model, and should point to our custom nipple texture

              diffuse = "gfx/models/portraits/decals/my_texture.dds"

            }

            blend_modes = {

              # How should this texture be mixed with the base one

              # Options are 'overlay', 'replace', 'hard-light', and 'multiply'

              # Might want to experiment to see what works best for your texture and use-case

              diffuse = overlay # draw our texture on top of the base

            }

            priority = 10 # Rendering priority, 10 seems to be the default

        }

      }

    }

  }

}

 

If I get some time this week I can try to mock up a prototype. Hopefully this is enough of start to get you going in the right direction.

Link to comment
4 hours ago, luffyboy said:


Thanks for the really good and detailed explanation.

I fiddled around with your concept mod and was trying to see whether it was possible to overcome the clipping. 

why exactly does your mod cause clipping in clothes? is it beacuse it touches on bs_body_breast_size while carn only touches on the shape genes?

Wait, you don't want the breasts poking through the outfits? I thought it was a feature. ?

 

I thought Paradox wasn't drawing the full body mesh when it was just going to cover it with clothing. That's a common practice in games to help prevent clipping issues like this. But I can see why they might want to do this as some of the outfits are more revealing, and trying to bake that into the clothing mesh in such a way that it also picks up on the character's skin color is kinda tricky.

 

Looking at the clothing assets, they only define blend shapes for the breast_min and breast_max attributes. I think I can address the clipping problem by splitting this into two separate gene templates. One that only applies scaling via these two attributes and is used if the character is wearing clothes, and a second that uses breast_size_2_max and the related shape attributes if the character is naked. I'll try to work on that later today and post an updated version of the mod.

Link to comment
11 hours ago, kincade said:

That's in the female_body.asset file, located at gfx\models\portraits\female_body\female_body.asset. There's a section called meshsetings which defines what textures to use for the asset.

 

meshsettings = {
    name = "female_bodyShape"
    index = 0
    texture_diffuse = "female_body_diffuse.dds"
    texture_normal = "female_body_normal.dds"
    texture_specular = "female_body_properties.dds"
    shader = "portrait_skin"
    shader_file = "gfx/FX/jomini/portrait.shader"
 
}
 
But this is what gets applied to all characters by default. Instead, a better approach might be to create textures that we could "overlay" on top of this body texture that will be just the nipples. That way we could control which overlay to use with a gene. The game calls these overlay textures decals.
 
When you define a gene, you can specify settings, which are blend shape morphs you want to apply to model, and decals which are images you want to overlay on the model's texture. So using our example from before, we could make our gene template define a decal in addition to the blend shape setting. That would look like:
 

In common/genes/my_gene.txt

special_genes = {

  morph_genes = {

    my_gene_group = {

      my_gene_template = {

        index = 0

        female = {

          # Makes the breast mesh bigger

          setting = { attribute = "bs_body_breast_size_max" value = { min = 0.0 max = 4.0 } age = age_preset_puberty }

          setting = { attribute = "bs_body_breast_size_2_max" value = { min = 0.0 max = 4.0 } age = age_preset_puberty }

          setting = { attribute = "bs_body_breast_size_min" value = { min = 0.0 max = -4.0 } age = age_preset_puberty }

 

          # Applies our nipple decal

          decal = {

            body_part = torso # Apply this to the body mesh

            textures = {put

              # The 'diffuse' texture defines the color of the model, and should point to our custom nipple texture

              diffuse = "gfx/models/portraits/decals/my_texture.dds"

            }

            blend_modes = {

              # How should this texture be mixed with the base one

              # Options are 'overlay', 'replace', 'hard-light', and 'multiply'

              # Might want to experiment to see what works best for your texture and use-case

              diffuse = overlay # draw our texture on top of the base

            }

            priority = 10 # Rendering priority, 10 seems to be the default

        }

      }

    }

  }

}

 

If I get some time this week I can try to mock up a prototype. Hopefully this is enough of start to get you going in the right direction.

Thank you for your very clear explication. I  got it working without any problems. I have a couple of follow on questions:

 

I had made a couple of diffuse_files. This consists of the basic diffuse file in which I had replaced the nipples ( having first "cut" out the existing ones and "pasting in" new ones).

In this case, because it is a "complete" body file, the correct blend mode would probably be <replace > although <overlay> works fine.

My question is, if this works is there any advantage in making diffuse files with only nipples which overlay the existing nipples in the base file. It seems more complicated because you would need to "fit" the nipples in exactly the right position to avoid partial overlaps.

 

My second question is, if I have several diffuse_files with nipples, do I put all of them in the texture block as follows

Spoiler

textures = {put

              # The 'diffuse' texture defines the color of the model, and should point to our custom nipple texture

              diffuse = "gfx/models/portraits/decals/my_texture_1.dds"

                               diffuse = "gfx/models/portraits/decals/my_texture_2.dds"

              diffuse = "gfx/models/portraits/decals/my_texture_3.dds"

 

               etc

 

            }

and if yes, how do the different texture files get allocated to the model. Could you do this randomly, for example by using random = { with modifiers in the gene file?

Maybe the priority setting has an impact?

 

Link to comment

I think I was a bit optimistic. I am not sure it works. The only thing I am sure of is that if you replace the "female_body_diffuse.dds"  in the assets file, you can change the nipples.

That is not what I want. I would like the nipples to vary from one model to another. For example, a pregnant character should have different nipples. In that case it would be trait related.

Otherwise I would like the nipples to vary from one character to another.

 

In the example you gave, there are three attributes "bs_body_breast_size_max" ,"bs_body_breast_size_2_max" and bs_body_breast_size_min". In this example would the template be linked with "bs_body_breast_size_2_max" ?

Link to comment

Just published an update to the "Beauty Scales Breasts" mod that adds an optional "Extra Milky" addon mod. This modifies the female_body.mesh file to add a "second dose" of the breast scaling blendshapes, so we can push the breast sizes even bigger.

 

So here's the progression from a default character, to the Rank 3 size boost from "Beauty Scales Breasts", to the even bigger size boost from "Extra Milky".

milkyDefault.jpg.14878c4f880afeefd2bfde264f27a8f2.jpgmilkyStandard.jpg.c4fde4ff1049ceb40e49ae0ae8bcb156.jpgmilkyExtraMilky.jpg.a488ae81709d5145a9d08ba0ba1a8252.jpg

 

This does cause clipping with the vanilla animations. So you'll get stuff like this:

milkyClipping.jpg.bd6526ba30bea8138df9c7a8d4f78a7c.jpg

 

I think that's a fine tradeoff. But maybe you don't. So I made the "Extra Milky" mod optional.

 

Next I'll try adding those "second dose" of blendshapes to the clothing meshes as well. Not sure how well that's going to work. It will really depend on how the meshes were made.

 

That also means this mod is now changing vanilla files instead of adding new things on top of them. That presents compatibility issues with other mods. Something to keep in mind if you were planning on using this technique for your own mods.

Link to comment

I tried applying @kincade "ExtraMilky" method to female height. The result is...interesting.

This kind of achieves the purpose of increasing your character's height, but the game becomes unplayable. Your character's head in the left corner of the screen becomes huge, and you can't see your face when you open the character screen. Well, it's not surprising, I predicted it would happen. So without some GUI/camera tricks, it's not possible to make really giant characters. Would work for most other body parts, though.

2020_10_28_1.png

 

Edit: making them smaller is fine, though, to a certain limit. Thanks, @kincade!

Link to comment

Yeah, pushing the blendshapes to extreme values is going to have issues when it comes to animations and UI. The vanilla game has to do a bunch of extra work defining custom animations to deal with Giant and Dwarf characters.

 

Your approach of combining larger Giantess with smaller Tiny characters seems like the way to go.

Link to comment

Seeing you are the breast expert on this forum ? maybe you can help me out with the following.

I  noticed that pregnant characters only get a big belly when pregnant but that the breasts stay the same. I have tried to modify the pregnancy files to also add increasing breast size.

However, the changes I made to two vanilla files result in the breasts growing but no longer the belly. I modified the vanilla weight_file (which contains the pregnancy portrait modifiers

and the special visual traits_file in the genes_folder. The code is as follows. Can you tell me where I am going wrong?

 

This is the portrait_modifier

Spoiler

pregnancy = {

    usage = game

    pregnant = {
        ignore_outfit_tags = yes
        dna_modifiers = {
            morph = {
                mode = add
                gene = gene_bs_pregnant
                template = pregnant
                value = {
                    value = 1
                    if = {
                        # Overweight females should have less visible pregnancy, so we change the 100% pregnant value
                        limit = { current_weight > overweight_threshold }
                        value = current_weight_for_portrait # An absolute and normalized value derived from character body weight
                        multiply = -1.0
                        add = 2
                        max = 1.0
                    }
                    multiply = {
                        add = pregnancy_days
                        # Only change every 10 days
                        divide = 10
                        round = yes
                        multiply = 10
                        divide = 250 # PREGNANCY_DAYS is 280; we want 1 month at 100%
                        max = 1.5
                    }
                }
            }
            morph = {
                mode = add
                gene = gene_bs_bust
                template = bust_pregnant
                value = {
                    value = 1
                    if = {
                        # Overweight females should have less visible pregnancy, so we change the 100% pregnant value
                        limit = { current_weight > overweight_threshold }
                        value = current_weight_for_portrait # An absolute and normalized value derived from character body weight
                        multiply = -1.0
                        add = 2
                        max = 1.0
                    }
                    multiply = {
                        add = pregnancy_days
                        # Only change every 10 days
                        divide = 10
                        round = yes
                        multiply = 10
                        divide = 250 # PREGNANCY_DAYS is 280; we want 1 month at 100%
                        max = 1.5
                    }
                }
            }
        }
        
            
    
        weight = {
            base = 0
            modifier = {
                add = 100
                has_trait = pregnant
            }            
        }
    }    
}

and this is the gene file

Spoiler

special_genes = {
    morph_genes = {

        gene_bs_pregnant = {


            pregnant = {
                index = 0
                female = {
                    setting = {
                            attribute = "bs_body_pregnant_1" value = { min = 1.0 max = 2.0 }  
                            attribute = "bs_body_breast_size_min" value = { min = 1.0 max = 0.0 }
                            attribute = "bs_body_breast_size_max" value = { min = 1.0 max = 2.0 }
                    }
                }
            }

        }
    }
}   

In a second stage, I would like to add a special nipple decal with a modified diffuse_file. Where should I add this in?

 

Thanks for any help you can give.

Link to comment

I managed to get it working . You can't use the pregnancy gene to increase both belly and bust_size. It's one or the other. So I had to use a separate gene_bust _pregnant along the lines of Kinkade's mod. So now pregnant women also get increased breast size. I'm still working on the nipple_decal.

 

For anyone interested:

The first file goes in the portrait_modifiers folder

 

Spoiler

additional_pregnancy_effects = {
                            usage = game
                            bust_pregnancy = {
                                        ignore_outfit_tags = yes
                                        dna_modifiers = {
                                                        morph = {
                                                            mode = add
                                                            gene = gene_bust_pregnant
                                                            template = bust_pregnancy
                                                            value = {
                                                                value = 1
                                                                if = {
                                                                    # Overweight females should have less visible pregnancy, so we change the 100% pregnant value
                                                                    limit = { current_weight > overweight_threshold }
                                                                    value = current_weight_for_portrait # An absolute and normalized value derived from character body weight
                                                                    multiply = -1.0
                                                                    add = 2
                                                                    max = 1.0
                                                                }
                                                                multiply = {
                                                                    add = pregnancy_days
                                                                    # Only change every 10 days
                                                                    divide = 10
                                                                    round = yes
                                                                    multiply = 10
                                                                    divide = 250 # PREGNANCY_DAYS is 280; we want 1 month at 100%
                                                                    max = 1.5
                                                                }
                                                            }
                                                        }
                                        }                
                                                        weight = {
                                                            base = 0
                                                            modifier = {
                                                                    add = 100
                                                                    has_trait = pregnant
                                                            }            
                                                        }
                            }                
                                
    }   

The second one in the genes folder

Spoiler

special_genes = {
                morph_genes = {
                            gene_bs_pregnant = {
                                            pregnant = {
                                                    index = 0
                                                    female = {
                                                            setting = {
                                                                    attribute = "bs_body_pregnant_1" value = { min = 1.0 max = 2.0 }  
                                                            }
                                                    }
                                            }
                            }
                }
                morph_genes = {
                
                            gene_bust_pregnant = {
                                                    # Because character skin meshes are still drawn under clothing, we should only scale the breast
                                                    # blend shapes that have corrosponding clothing blendshapes. Otherwise the breasts clip through
                                                    # the clothing.
                                        bust_pregnancy = {
                                                    index = 0
                                                    female = {
                                                            setting = { attribute = "bs_body_breast_size_min" value = { min = 0.0 max = -2.0 } age = age_preset_puberty  }
                                                            setting = { attribute = "bs_body_breast_size_max" value = { min = 0.0 max = 2.0 } age = age_preset_puberty }
                                                            # These are two extra blendshapes added to the female body and clothing to allow for some
                                                            # extra scaling
                                                            setting = { attribute = "test__bs_body_breast_size_max" value = { min = 0.0 max = 1.0 } age = age_preset_puberty  }
                                                            setting = { attribute = "test_bs_body_breast_size_max_extra" value = { min = 0.0 max = 1.0 } age = age_preset_puberty  }
                                                            decal = {                                           
                                                                body_part = torso
                                                                textures = {
                                                                    diffuse = "gfx/models/portraits/decals/female_body/decal_female_nip_dark_diffuse.dds"
                                                                }
                                                                alpha_curve = {              #controls decal alpha relative to gene strength. Will give a linear interpolation if left unspecified
                                                                    #character age%, decal alpha
                                                                    { 0.0  0.0 }
                                                                    { 1.0   1.0 }
                                                                }
                                                                blend_modes = {              #overlay/replace/hard_light/multiply
                                                                    diffuse = multiply
                                                                    normal = replace
                                                                    # properties =
                                                                }
                                                                priority = 0
                                                        }
                                                    }
                                        }
                            }
                }        
        
    
}   

I'm not sure the decal part works yet. You also need to add the last two <settings> to the female_asset file.

Link to comment
  • 1 month later...

The whole idea of multiple overlays on the body texture would make for fantastic options.  It seems this would be under the same mechanism as body hair.  It would allow for different pubic hair, body freckles, tattoos, brands, scars, etc. as well as different areola colors and sizes.  If you're able to get a working mod going that can be riffed upon by others, this could be HUGE!  Pun fully intended.  Eager to see what develops with your project.

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