genericlogin Posted April 1, 2017 Posted April 1, 2017 The most recent release of Christianity Mod has a change that I thought would be of interest to other CK2 modders. I replaced the old way of determining breast size traits, which was inherited from nadamod, with a new system. Now all characters, both male and female, have a breast_size variable. This is set at birth by averaging their parents' breast_size variables, and then applying some random variation from -2 to +3. Later, the value of that variable is used for female characters to look up the corresponsing breast size. This approach greatly simplifies the breast trait assignment code, and also makes it much easier to change breast sizes in events. Since nearly all CK2 adult mods share a common ancestry, the same approach would also work for them and simplify compatibility between mods. I've included the two events that drive this system below, so anyone interested can see them without digging through my whole mod: # Assign breast traits based on breast_size value character_event = { id = christ.31 is_triggered_only = yes hide_window = yes only_women = yes immediate = { if = { limit = { check_variable = { which = breast_size value = 7 } } add_trait = gigantic_tits break = yes } if = { limit = { check_variable = { which = breast_size value = 6 } } add_trait = enormous_tits break = yes } if = { limit = { check_variable = { which = breast_size value = 5 } } add_trait = huge_tits break = yes } if = { limit = { check_variable = { which = breast_size value = 4 } } add_trait = big_tits break = yes } if = { limit = { check_variable = { which = breast_size value = 3 } } add_trait = regular_tits break = yes } if = { limit = { check_variable = { which = breast_size value = 2 } } add_trait = small_tits break = yes } if = { limit = { check_variable = { which = breast_size value = 1 } } add_trait = tiny_tits break = yes } # It shouldn't be possible to get here, but just in case the event gets # called on a character with no breast_size set, we'll default to size # 3 and assign the trait.. set_variable = { which = breast_size value = 3 } add_trait = regular_tits } } # Determine breast size for a character based on mother's breast size. This will # be run at birth. Note that it will run for male characters too, so that I can # add support for inheriting breasts based on both sides of the family. character_event = { id = christ.32 is_triggered_only = yes hide_window = yes immediate = { # Get the mother's breast size mother_even_if_dead = { ROOT = { set_variable = { which = breast_size which = PREV } } } # If there was no breast_size from the mother, default to 3 if = { limit = { NOT = { check_variable = { which = breast_size value = 1 } } } set_variable = { which = breast_size value = 3 } } # Now get the father's breast size variable. This allows men to pass # along genes for breast size too. We'll need to use a temporary # variable here to work around the engine's limitations. set_variable = { which = temp_size which = breast_size } father_even_if_dead = { ROOT = { set_variable = { which = breast_size which = PREV } } } if = { limit = { NOT = { check_variable = { which = breast_size value = 1 } } } set_variable = { which = breast_size value = 3 } } # Now average the inherited sizes change_variable = { which = breast_size which = temp_size } divide_variable = { which = breast_size value = 2 } random_list = { 10 = { subtract_variable = { which = breast_size value = 2 } } 25 = { subtract_variable = { which = breast_size value = 1 } } 35 = {} # No change in breast size 20 = { change_variable = { which = breast_size value = 1 } } 15 = { change_variable = { which = breast_size value = 2 } } 5 = { change_variable = { which = breast_size value = 3 } } } # If the size is less than 1, just set it to 1 as that's the smallest # possible size. if = { limit = { NOT = { check_variable = { which = breast_size value = 1 } } } set_variable = { which = breast_size value = 1 } } # Realms were women live on cum have a boost to breast size if = { limit = { top_liege = { has_character_modifier = cumdrinking_women } } change_variable = { which = breast_size value = 1 } } # Set any breast size over the largest trait size to that maximum value. # This way breast sizes won't quickly grow to extreme values giving # everyone the largest size. if = { limit = { check_variable = { which = breast_size value = 7 } } set_variable = { which = breast_size value = 7 } } set_character_flag = christ_breast_size_set } }
ReMeDy Posted April 3, 2017 Posted April 3, 2017 Was there an update to Nadamod or something? My version has: gigantic, huge, large, average, small, tiny in that order. Was that something you introduced?
genericlogin Posted April 3, 2017 Author Posted April 3, 2017 Was there an update to Nadamod or something? My version has: gigantic, huge, large, average, small, tiny in that order. Was that something you introduced? No, the three additional sizes where added at various times later. The two larger sizes have been around for a while, and were added because someone here asked for larger sizes (it's been so long I've forgotten who). The smallest size was added to this version at dewguru's request for Dark World compatibility.
ngppgn Posted April 3, 2017 Posted April 3, 2017 The most recent release of Christianity Mod has a change that I thought would be of interest to other CK2 modders. I replaced the old way of determining breast size traits, which was inherited from nadamod, with a new system. Now all characters, both male and female, have a breast_size variable. This is set at birth by averaging their parents' breast_size variables, and then applying some random variation from -2 to +3. Later, the value of that variable is used for female characters to look up the corresponsing breast size. This approach greatly simplifies the breast trait assignment code, and also makes it much easier to change breast sizes in events. Since nearly all CK2 adult mods share a common ancestry, the same approach would also work for them and simplify compatibility between mods. I've included the two events that drive this system below, so anyone interested can see them without digging through my whole mod: # Assign breast traits based on breast_size value character_event = { id = christ.31 is_triggered_only = yes hide_window = yes only_women = yes immediate = { if = { limit = { check_variable = { which = breast_size value = 7 } } add_trait = gigantic_tits break = yes } if = { limit = { check_variable = { which = breast_size value = 6 } } add_trait = enormous_tits break = yes } if = { limit = { check_variable = { which = breast_size value = 5 } } add_trait = huge_tits break = yes } if = { limit = { check_variable = { which = breast_size value = 4 } } add_trait = big_tits break = yes } if = { limit = { check_variable = { which = breast_size value = 3 } } add_trait = regular_tits break = yes } if = { limit = { check_variable = { which = breast_size value = 2 } } add_trait = small_tits break = yes } if = { limit = { check_variable = { which = breast_size value = 1 } } add_trait = tiny_tits break = yes } # It shouldn't be possible to get here, but just in case the event gets # called on a character with no breast_size set, we'll default to size # 3 and assign the trait.. set_variable = { which = breast_size value = 3 } add_trait = regular_tits } } # Determine breast size for a character based on mother's breast size. This will # be run at birth. Note that it will run for male characters too, so that I can # add support for inheriting breasts based on both sides of the family. character_event = { id = christ.32 is_triggered_only = yes hide_window = yes immediate = { # Get the mother's breast size mother_even_if_dead = { ROOT = { set_variable = { which = breast_size which = PREV } } } # If there was no breast_size from the mother, default to 3 if = { limit = { NOT = { check_variable = { which = breast_size value = 1 } } } set_variable = { which = breast_size value = 3 } } # Now get the father's breast size variable. This allows men to pass # along genes for breast size too. We'll need to use a temporary # variable here to work around the engine's limitations. set_variable = { which = temp_size which = breast_size } father_even_if_dead = { ROOT = { set_variable = { which = breast_size which = PREV } } } if = { limit = { NOT = { check_variable = { which = breast_size value = 1 } } } set_variable = { which = breast_size value = 3 } } # Now average the inherited sizes change_variable = { which = breast_size which = temp_size } divide_variable = { which = breast_size value = 2 } random_list = { 10 = { subtract_variable = { which = breast_size value = 2 } } 25 = { subtract_variable = { which = breast_size value = 1 } } 35 = {} # No change in breast size 20 = { change_variable = { which = breast_size value = 1 } } 15 = { change_variable = { which = breast_size value = 2 } } 5 = { change_variable = { which = breast_size value = 3 } } } # If the size is less than 1, just set it to 1 as that's the smallest # possible size. if = { limit = { NOT = { check_variable = { which = breast_size value = 1 } } } set_variable = { which = breast_size value = 1 } } # Realms were women live on cum have a boost to breast size if = { limit = { top_liege = { has_character_modifier = cumdrinking_women } } change_variable = { which = breast_size value = 1 } } # Set any breast size over the largest trait size to that maximum value. # This way breast sizes won't quickly grow to extreme values giving # everyone the largest size. if = { limit = { check_variable = { which = breast_size value = 7 } } set_variable = { which = breast_size value = 7 } } set_character_flag = christ_breast_size_set } } Thanks for sharing! That's a quite clever solution (and more elegant than others I've seen elsewhere). May I suggest a couple of improvements to make the code of event .32 a bit more robust? With these modifications, it also cover the cases were mother or father didn't exist in the first place, and also considers that bastards should inherit from the real_father instead of the father. It also doesn't require the temp variable. # Determine breast size for a character based on mother's breast size. This will # be run at birth. Note that it will run for male characters too, so that I can # add support for inheriting breasts based on both sides of the family. character_event = { id = christ.32 is_triggered_only = yes hide_window = yes immediate = { # First we give ROOT the default values: +3 from the mother, and another +3 from father/real father. # THEN if nother or father had actual values different from 3, we correct the ROOT value # first we check if the mother has her breasts assigned, else ROOT gets the default 3 ROOT = { set_variable = { which = breast_size value = 6 } } if = { limit = { mother_even_if_dead = { has_character_flag = christ_breast_size_set } } mother_even_if_dead = { ROOT = { change_variable = { which = breast_size which = PREV } change_variable = { which = breast_size value = -3 } } } } # Now get the father's breast size variable. This allows men to pass # along genes for breast size too. We'll need to use a temporary # variable here to work around the engine's limitations. # BUT: bastards should not pick the father but the real_father instead. We use a trigger_switch for that. if = { limit = { OR = { father_even_if_dead = { has_character_flag = christ_breast_size_set } real_father_even_if_dead = { has_character_flag = christ_breast_size_set } } } trigger_switch = { on_trigger = is_father_real_father yes = { father_even_if_dead = { ROOT = { change_variable = { which = breast_size which = PREV } change_variable = { which = breast_size value = -3 } } } } no = { real_father_even_if_dead = { ROOT = { change_variable = { which = breast_size which = PREV } change_variable = { which = breast_size value = -3 } } } } } } # Now average the inherited sizes divide_variable = { which = breast_size value = 2 } random_list = { 10 = { subtract_variable = { which = breast_size value = 2 } } 25 = { subtract_variable = { which = breast_size value = 1 } } 35 = {} # No change in breast size 20 = { change_variable = { which = breast_size value = 1 } } 15 = { change_variable = { which = breast_size value = 2 } } 5 = { change_variable = { which = breast_size value = 3 } } } # If the size is less than 1, just set it to 1 as that's the smallest # possible size. if = { limit = { NOT = { check_variable = { which = breast_size value = 1 } } } set_variable = { which = breast_size value = 1 } } # Realms were women live on cum have a boost to breast size if = { limit = { top_liege = { has_character_modifier = cumdrinking_women } } change_variable = { which = breast_size value = 1 } } # Set any breast size over the largest trait size to that maximum value. # This way breast sizes won't quickly grow to extreme values giving # everyone the largest size. if = { limit = { check_variable = { which = breast_size value = 7 } } set_variable = { which = breast_size value = 7 } } set_character_flag = christ_breast_size_set } }
genericlogin Posted April 5, 2017 Author Posted April 5, 2017 Thanks for the suggestion! I'll test that for inclusion in the next release.
Abominus Posted January 1, 2018 Posted January 1, 2018 I took this and made it for dicks: ######################################################################### # Dicks ######################################################################### namespace = aloha_dicks ######################################################################### # with kind permission of genericlogin ==> https://www.loverslab.com/topic/75849-a-note-on-breast-sizes-for-other-ck2-modders/ # and dewguru ==> https://www.loverslab.com/topic/57549-ck2-dark-world-reborn/ ######################################################################### # Determine dick size for a character based on fathers's dick size. This will # be run at birth. Note that it will run for female characters too, so that I can # add support for inheriting dicks based on both sides of the family. character_event = { id = aloha_dicks.1000 is_triggered_only = yes hide_window = yes trigger = { NOT = { has_character_flag = dw_junk_checked has_character_flag = aloha_dick_size_set has_cock = yes } } immediate = { ROOT = { set_variable = { which = dick_size value = 7 } } # Fathers dick # BUT: bastards should not pick the father but the real_father instead. We use a trigger_switch for that. if = { limit = { OR = { father_even_if_dead = { has_character_flag = aloha_dick_size_set } real_father_even_if_dead = { has_character_flag = aloha_dick_size_set } } } trigger_switch = { on_trigger = is_father_real_father yes = { father_even_if_dead = { ROOT = { change_variable = { which = dick_size which = PREV } change_variable = { which = dick_size value = -2 } } } } no = { real_father_even_if_dead = { ROOT = { change_variable = { which = dick_size which = PREV } change_variable = { which = dick_size value = -2 } } } } } } #Mothers dick if = { limit = { mother_even_if_dead = { has_character_flag = aloha_dick_size_set } } mother_even_if_dead = { ROOT = { change_variable = { which = dick_size which = PREV } change_variable = { which = dick_size value = -3 } } } } # Now average the inherited sizes divide_variable = { which = dick_size value = 2 } random_list = { 10 = { subtract_variable = { which = dick_size value = 2 } } 25 = { subtract_variable = { which = dick_size value = 1 } } 35 = {} # No change in dick size 20 = { change_variable = { which = dick_size value = 1 } } 15 = { change_variable = { which = dick_size value = 2 } } 5 = { change_variable = { which = dick_size value = 3 } } } # If the size is less than 1, just set it to 1 as that's the tinyest # possible size. if = { limit = { NOT = { check_variable = { which = dick_size value = 1 } } } set_variable = { which = dick_size value = 1 } } # Set any dick size over the largest trait size to that maximum value. # This way dick sizes won't quickly grow to extreme values giving # everyone the largest size. if = { limit = { check_variable = { which = dick_size value = 7 } } set_variable = { which = dick_size value = 7 } } set_character_flag = aloha_dick_size_set set_character_flag = dw_junk_checked } } # Assign dick traits based on dick_size value character_event = { id = aloha_dicks.1001 is_triggered_only = yes hide_window = yes only_men = yes immediate = { if = { limit = { check_variable = { which = dick_size value = 7 } } add_trait = dick_horse remove_trait = dick_huge remove_trait = dick_large remove_trait = dick_average remove_trait = dick_small remove_trait = dick_tiny remove_trait = dick_micro break = yes } if = { limit = { check_variable = { which = dick_size value = 6 } } remove_trait = dick_horse add_trait = dick_huge remove_trait = dick_large remove_trait = dick_average remove_trait = dick_small remove_trait = dick_tiny remove_trait = dick_micro break = yes } if = { limit = { check_variable = { which = dick_size value = 5 } } remove_trait = dick_horse remove_trait = dick_huge add_trait = dick_large remove_trait = dick_average remove_trait = dick_small remove_trait = dick_tiny remove_trait = dick_micro break = yes } if = { limit = { check_variable = { which = dick_size value = 4 } } remove_trait = dick_horse remove_trait = dick_huge remove_trait = dick_large add_trait = dick_average remove_trait = dick_small remove_trait = dick_tiny remove_trait = dick_micro break = yes } if = { limit = { check_variable = { which = dick_size value = 3 } } remove_trait = dick_horse remove_trait = dick_huge remove_trait = dick_large remove_trait = dick_average add_trait = dick_small remove_trait = dick_tiny remove_trait = dick_micro break = yes } if = { limit = { check_variable = { which = dick_size value = 2 } } remove_trait = dick_horse remove_trait = dick_huge remove_trait = dick_large remove_trait = dick_average remove_trait = dick_small add_trait = dick_tiny remove_trait = dick_micro break = yes } if = { limit = { check_variable = { which = dick_size value = 1 } } remove_trait = dick_horse remove_trait = dick_huge remove_trait = dick_large remove_trait = dick_average remove_trait = dick_small remove_trait = dick_tiny add_trait = dick_micro break = yes } # It shouldn't be possible to get here, but just in case the event gets # called on a character with no dick_size set, we'll default to size # 4 and assign the trait.. set_variable = { which = dick_size value = 4 } remove_trait = dick_horse remove_trait = dick_huge remove_trait = dick_large add_trait = dick_average remove_trait = dick_small remove_trait = dick_tiny remove_trait = dick_micro } } ######################################################################### # Startevent ######################################################################### character_event = { id = aloha_dicks.1002 hide_window = yes is_triggered_only = yes immediate = { any_character = { limit = { is_female = no is_adult = yes } character_event = { id = aloha_dicks.1003 } } } } character_event = { id = aloha_dicks.1003 hide_window = yes is_triggered_only = yes only_men = yes immediate = { set_character_flag = dw_junk_checked set_character_flag = aloha_dick_size_set random_list = { 5 = { set_variable = { which = dick_size value = 1 } add_trait = dick_micro } 15 = { set_variable = { which = dick_size value = 2 } add_trait = dick_tiny } 30 = { set_variable = { which = dick_size value = 3 } add_trait = dick_small } 40 = { set_variable = { which = dick_size value = 4 } add_trait = dick_average } 30 = { set_variable = { which = dick_size value = 5 } add_trait = dick_large } 15 = { set_variable = { which = dick_size value = 6 } add_trait = dick_huge } 5 = { set_variable = { which = dick_size value = 7 } add_trait = dick_horse } } } } And on_action: # Fires when the game starts (not from saves) on_chronicle_start = { events = { aloha.2001 # Zu jung zum Heiraten aloha_tits.1002 # Titten-flags und -variable werden gesetzt //START! aloha_dicks.1002 # Schwanz-flags und -variable werden gesetzt //START! } } on_birth = { events = { aloha.2000 # Zu jung zum Heiraten aloha.2101 # Flagge setzen für Regel "birth_age_flag" aloha_tits.1000 # Titten-flags und -variable werden gesetzt aloha_dicks.1000 # Schwanz-flags und -variable werden gesetzt } } on_adulthood = { events = { aloha.2002 # Zu jung zum Heiraten zuende aloha.1000 # Harem gründen? aloha_tits.1000 # Titten-flags und -variable werden gesetzt ==> zur Sicherheit nochmal... aloha_dicks.1000 # Schwanz-flags und -variable werden gesetzt ==> zur Sicherheit nochmal... } } on_adolescence_pulse = { events = { aloha.2100 # Flagge setzen für Regel "adolescent_age_flag" aloha_tits.1000 # Titten-flags und -variable werden gesetzt ==> zur Sicherheit nochmal... aloha_dicks.1000 # Schwanz-flags und -variable werden gesetzt ==> zur Sicherheit nochmal... } } Seems to work for me :). Maybe I should make this for cojones as well...
NoxBestia Posted January 12, 2018 Posted January 12, 2018 I am not sure why I never saw this, but definitely like it. At one time I was playing around with something similar that went back 3 generations but that was probably overkill. I also was using a binary scare instead of a linear scale. That allowed for a lot of things to affect your size before going one category larger or smaller, but then i never wrote anything that actually did that. It also made the extremely large sizes hard to obtain. And... it never fully worked right. This is much cleaner.
NoxBestia Posted January 12, 2018 Posted January 12, 2018 I just checked and verified that DW ETOS also uses this kind of scoring system as well. So far, from what I can see, everyone is also using the same variables for any traits they assign (breast_size, balls_size, dick_size, and ass_size). So is it only @dewguru and I that don't use it this scoring method? EDIT: Since I am currently in the middle of reworking and repairing my MODs, I will be adding in code to check for and use this as well so I can try to be compatible with as many others as possible.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.