Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

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.

Thanks for the reply.  I have a funny issue anyways:

Dark Elf father and Fairy mother rose a human child?

(1 edit) (+1)

The child did not qualify for any existing race, so it defaulted to Human. Generally, they need at least 50% a single race or at least 30% of some of the animal types for Halfkin. Edit: corrected conditions

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.