Viewing post in Aric's Expansion Rebred
"Passive" is the name of a function in the 'abilities.gd' file, which corresponds to a type of effect applied to combatants. Specifically it results from using the "Armor Breaker" weapon, as that weapon has incorrect data and code, causing it to generate errors and backfire against the person holding the weapon.
I believe that Slimes were changed so that they no longer get pregnant in the same way as other characters, as stated on the first page:
Currently, the only restriction on breeding is Slimes. Slimes can't currently breed or be bred by other races (there's some new functionality coming for them soon to match their lore and give a different breeding option).
It appears that there are some typos in that line of code. On line 1173 of globals.gd, it should probably be:
mother.preg.womb.append({id = father_id, unique = father_unique, semen = cumprod, virility = virility, day = 0,})
since this would use the substitute variables instead of trying to use indexes of the "father" argument. There could be other problems because I haven't tested it, just skimmed through the local code.
There are 2 problems here: the simple irrelevant one that causes the error message, and the more complex issues of string inequality and genetic sums.
Each of the lines like "father.dog" is missing ".genealogy", which is where the animal indexes are found. So "father.dog" should be "father.genealogy.dog". This also needs to be fixed for "bunny", "cow", "cat", "fox", "horse", and "raccoon".
However, just a couple lines later "set_genealogy" is called, which will attempt to re-assigns these same values. At least it would except that the virtual father has his race assigned to "dog", which does not decode to any expected race(the code looks for "Wolf"). So it should blow up at line 513 of constructor.gd. We can prevent this by adding "father.race = " followed by the string found in the "genealogy_decoder" function of constructor.gd that corresponds to each of the animals we fixed above, though it's a rough fix.
This brings us to the next issue, relatively minor, the "fertilize_egg" function in globals.gd is setting a single race's genetics to 100, but it never clears the rest of the percentages that are created for the virtual father. "set_genealogy" also never clears these extra percentages, and while it should equalize to 100 at the end there will likely be some percentage that remains a random race. To fix this, we would need to zero all percentages in the genealogy similar to "var genealogy" in person.gd instead of assigning 100 for each animal, which means deleting the lines that would have been fixed at the top. So copying "var genealogy" into the start of the "fertilize_egg" function and replacing each 100 assignment with "father.genealogy = genealogy" should fix this, again it's a rough fix.
Like Ank pointed out, the racial picker defaults to Human if there isn't a 50+ or 30+ for Halfkin races for the "actual" race. The bonuses are all given via the genetics themselves, but the game has to still have an assigned race for general compatibility. It wasn't the most immersive way of handling it, but it got it functional. I have a new calculation I'm bug-testing that will always try to pick the highest, rarest genetics and give that as the "assigned" race.