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