I'm in no hurry (obviously).
Viewing post in Editing Save and MC Questions
My bad, the line
if tag.find("custom_inherit_"): #example "custom_inherit_50" for 50%
was supposed to be
if tag.find("custom_inherit_") >= 0: #example "custom_inherit_50" for 50%
since find() returns a position not a boolean. Also, a minor note,
roll = 0
for "sexual" should be
continue
to cover the small case when traitinheritchance is 100.0, since that allows the "sexual" block to be bypassed. Though it should be noted that for the same reason "custom_inherit_100" would bypass the "sexual" block, not that the 2 tags would be present together.
Fixed it in the post above.