Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(2 edits)

I only skimmed through your code for issues so there may be other things I missed.

First mod:

Your code uses the interpersonal relationship score dict to search for grandparents, which requires that they must either be a parent or sibling to the child or have met the just conceived baby. Given that the latter is impossible, it seems that you assumed that the game considers grandparents to be related to the child, but that is not vanilla behavior and I see no indication that it was added by anyone. Rather than searching blindly for them, it seems like it would be better to simply ask relativesdata who the grandparents are; this code adds a function to achieve this. Note, the forum converts tabs to spaces, so you will need to convert them back if you copy this code (also, check for typos, I haven't smoke tested it).

# attempts to get person's relative, else returns the person
# way only supports 'mother' or 'father'
func getRelative(person, way):
    var entry = globals.state.relativesdata.get(person.id)
    if entry && entry[way] != -1:
        var temp = globals.state.findslave(entry[way])
        if temp:
            return temp
    return person
var mothersMother = getRelative(mother, 'mother')
var mothersFather = getRelative(mother, 'father')
var fathersMother = getRelative(father, 'mother')
var fathersFather = getRelative(father, 'father')

Your standard deviation calculations are wrong, and may not work if right. It is missing a + so the result is only the last race. The results do not exclude zero genes so it will be biased with a higher SD such that every gene will tend to be within 1 or 2 SD.  The most important issue is that genMedian will tend to be quite low in most cases as the genes are biased towards many smaller genes and few larger genes, thus even if you remove genes further than just 1xSD it will rarely make any changes. People with small gene counts greater than or equal to their larger gene counts will never be affected. This has the interesting effects of purging small genes from people with several larger genes and never purging small genes from nearly purebloods. It's not a bad idea, but I'm not sure it was quite the right approach.

Minor nitpicks: 

Large unchanging reference variables like mutationPerGenealogy can be declared in the file scope(outside of a function) to greatly improve the speed of a function (saves a couple microseconds), but more importantly it greatly reduces the size of the function.

For simplicity if you want to limit both the max and min of a value, use clamp(). It changes 5 lines to 1 line in each case, saving 16 lines total. Though currently this appears unnecessary as the values should only vary by up to 22.5 from 50 (27.5 to 72.5), safety is fine.

var mutationWomb = clamp( rand_range(mutationMin, mutationMax), 0, 100 )

genSD can be calculated faster and simpler with the power function.

genSD += pow( person.genealogy[race] - genMedian, 2)

Calculating maxGen and foundMax in separate loops doesn't make much sense as they are used for the same thing, so it is basically repeating the same calculation. Either calculate both for everyone or only for atavism.

"+ -" appears twice more than it should. Though harmless, it looks weird.

Second mod:

This mod has a significant chance of producing errors incorrect results when growing tits, penises, or balls as sizearray and genitaliaarray only contain vanilla sizes and not the aric's mod sizes. Use titssizearray and penissizearray instead. For height it will not break since heightarrayexp adds "tiny", which when not found is -1, plus 1 is zero resulting in "petite" in heightarray, and for asses this will not break since sizearray is identical to asssizearray, but both of these may not be a safe assumptions. Also, spelling out the last items in the size arrays is not as safe as using array.back(), though I don't expect them to change.

The relative check for spontaneous futa transistion would also benefit from using relativedata to find the parents over searching relations for matches. Especially since relatedCheck(person1, person2) only returns 'mother' or 'father' when person1 is the parent of person2, which is the opposite of how you are using it.

Minor nitpicks: 

endMutiplayerPerGenealogy is a large unchanging reference variable like mutationPerGenealogy, see above.

toMatture is using 0 and 1 where false and true would be far simpler to understand.

findslave() calls findnpc() if it doesn't find a person, so calling it yourself immediately afterwards is redundant.

Besides the fact that the spontaneous futa transition seems like something that should require a bit of toxicity, it is also lackluster as it does not account for possible penis types by race nor the possibility of futa balls.

(1 edit)

I redesigned both mods based on your tips and implemented a trial solution for using youth potion. Now the mod does not look at the total possession time of slave but additional timer for current age.

The first mod looks good. The standard deviation part still does nothing because the races will always be within 3 SD of the median, but it won't do any harm either.

The second mod still has a couple issues.

Not sure if this is intentional or not, but your custom person age variable only updates once a person has exceeded the grow up time for their age, and it doesn't track days that they are away for any reason (i.e. passing out drunk prevents maturing).

While the current functionality of updating lastAge works fine for most cases, if the player uses a potion to revert a person's age during the day after they mature, then they will be able to mature again at the end of the day (depending on RNG). Since the new age from maturing is only registered during the end of the next day, reverting the age before then will retain the daysInAge. Given few people will use this mod and want their slaves to stay young, this is unlikely to be an issue, but I wanted to point that out just in case.

On line 97 you compare height with the end of the hair length array, allowing an index out of bounds.

if rand_range(1,10) > 5 && _person.height != globals.hairlengtharray.back():

In the penis growing section, you setup to use the chance variable again, but never use it in the comparison on line 121.

if rand_range(1,10) > 3 && _person.penis != globals.penissizearray.back():

Due to the fact that the balls growing section is after the penis section, someone that has just grown balls when becoming a futa will be able to have those balls grow larger, which is not a huge issue but the previous text about the size will be wrong.

Just a nitpick, but the check for being an adult on line 80 should be near the start of the function as an early return condition, since there isn't any point to calculating anything for an adult.

if (toMatture == 1) && (_person.age != 'adult'):

For SD it only arbitrary put to 3 without testing, if 2 or something between is better i can easily change. This applies to all constants. Especially for endMutiplayerPerGenealogy , mutationPerGenealogy , atavismChance , minGenMutation , sexParentBias

For maturing:

Moved _person.agging  update to beginning and added setting it again after maturing.

Moved ball growing section  before penis.

changed not edited check's.