Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit)

Haven't been playing since I aint THAT into genealogy and resource accruement, but I'm a bit ocd so been revising a big ass portrait pack from many downloads to get rid of ones I didn't care for and or edit/replace ones with better version where I recognize them. Never mind that though part of my OCD bucket list of things to sort so I can put aside my obsessive nature is to find out if it can be made that sexual traits aren't inherited, and if regular traits could be excluded or have custom values for inheritance, farther more if you can set it to start the game with traits, since of course there isn't a field I can easily edit or copy there. You can get surprisingly far editing the save with little understanding if you just keep the format.

As contribution to the "war effort", here's a better image courtesy  of https://www.spriters-resource.com/pc_computer/kamidorialchemymeister/.

 

(7 edits)

Changing whether or not a trait is inherited is something that can be altered by changing the scripts, but it is not possible through save editing. The creation of a baby from its parents is handled in globals.gd in the "impregnation" function. The simplest way would be to filter traits by the "sexual" tag. A custom data field or custom tags could also be added to traits.gd and used as custom inheritance rates. A simple example of some possibilities:

for i in traitpool:
    var traitEntry = globals.origins.trait(i)
    if traitEntry == null || traitEntry.tags.has("never_inherit"):
        continue
    var roll = rand_range(0,100)
    var chance = variables.traitinheritchance
    for tag in traitEntry.tags:
        if tag.find("custom_inherit_") >= 0: #example "custom_inherit_50" for 50%
            chance = tag.replace("custom_inherit_","").to_int()
    if traitEntry.tags.has("always_inherit"):
        roll = 100
    elif traitEntry.tags.has("sexual"):
        continue
    elif traitEntry.tags.has("rarely_inherit"):
        roll /= 2.0
    elif traitEntry.tags.has("male_inherit"):
        roll = 100 if baby.sex == "male" else 0
    if roll >= 100 - chance:
        baby.add_trait(i)

I removed one tab from the beginning of each line for readability. The leading tabs are converted to spaces by the website, so it will not work if you simply copy and paste this code.

To add traits at the beginning of the game you would need to look at the end of mainmenu.gd in the function "_on_slaveconfirm_pressed".