[0.9.087-PUBLIC#4457] MilkMultiplier is NaN

Status
Not open for further replies.

Theron

Well-Known Member
Nov 8, 2018
3,325
1,317
44
1. milkMultiplier is 'Null' or 'NaN' on starting characters (I'm getting conflicting results in the console).

2. Certain milk TFs do not work: eg. Bovinium, Milk Caramel Gushers. Even when set to 0 using the Console, these TFs reset it to NaN.
I suspect it has something to do with the Boost Lactation function.
 

Attachments

  • MilkTest.json
    611.1 KB · Views: 3
  • Like
Reactions: orange64

Jacques00

Administrator
Moderator
Aug 26, 2015
4,885
1,162
Hopefully fixed for the next release.

I'm not exactly sure what causes milkMultiplier to become null (even if it is boostLactation() I don't see any signs of it being used with a corrupted variable), but I added in some safety checks that should reset any related values that manipulate fluid multipliers as well as the multipliers themselves. So if this does occur again, it'll reset the multiplier to its default number.

This will auto-fix a character from a loaded save file with a bum value as well.
 
  • Like
Reactions: orange64 and Theron

Theron

Well-Known Member
Nov 8, 2018
3,325
1,317
44
I'm not exactly sure what causes milkMultiplier to become null...
Something in character creation, at the least. All the characters I created this patch had null milkMultiplier.

And now, when I try to pinpoint exactly when it happens, it doesn't seem to...
But Bovinium still turns 0 to NaN.
Lactaid correctly sets to 75 and Bovinium works correctly when used after Lactaid.
 
Last edited:

Jacques00

Administrator
Moderator
Aug 26, 2015
4,885
1,162
Something in character creation, at the least. All the characters I created this patch had null milkMultiplier.

And now, when I try to pinpoint exactly when it happens, it doesn't seem to...
But Bovinium still turns 0 to NaN.
Lactaid correctly sets to 75 and Bovinium works correctly when used after Lactaid.
Alright, I'll add in an extra check (around the part where the player selects a "Sexual Gift" perk) to reset the milkMultiplier if it is ever off. Again, this shouldn't happen, but that seems to be the case for some reason. By default the player character should have the milkMultiplier at 0 anyway, unless that value is somehow touched.
 
  • Like
Reactions: orange64 and Theron

Theron

Well-Known Member
Nov 8, 2018
3,325
1,317
44
Alright, I'll add in an extra check (around the part where the player selects a "Sexual Gift" perk) to reset the milkMultiplier if it is ever off. Again, this shouldn't happen, but that seems to be the case for some reason. By default the player character should have the milkMultiplier at 0 anyway, unless that value is somehow touched.
Update: It seems going back from the Main/Data/Masturbation/Wait/Inventory/Codex Menus sets it to NaN.
Entering doesn't change the value. It seems to be using the Back button specifically. But only if less than or equal to 49.
Or leaving by using an item? Sterilex does it, too. Inspect doesn't seem to cause it.
 
Last edited:

Jacques00

Administrator
Moderator
Aug 26, 2015
4,885
1,162
Update: It seems going back from the Main/Data/Masturbation/Wait/Inventory/Codex Menus sets it to NaN.
Entering doesn't change the value. It seems to be using the Back button specifically. But only if less than or equal to 49.
Or leaving by using an item? Sterilex does it, too. Inspect doesn't seem to cause it.
If this is the case, then it may be due to the "processTime(0)" that I've inserted into the code, which triggers around those places noted (it was mainly put into place to help with refreshing some time-dependent tooltips). This may (most likely) be a result of the awkward JavaScript math issues when dealing with decimal values. So something as simple as "0.1 + 0.2" might result in some extraneous, NaN or null value. In any case, in the character's script, I tried to wrap a lot of the math operations into the ones used from the calculator that should hopefully get past this issue. If this springs up again though, it may be another issue I'm not seeing.
 
Last edited:
  • Like
Reactions: Theron
Status
Not open for further replies.