The subtractions are handled earlier in the code, it's bassed off of your entry. There's currently no configurable way to account for the chances of failure for eating raw foods. But thank you anyways, I'm currently reworking it a little but to add for further customization. Rest assured, this is something that is on my radar.
yea i noticed the vomiting section with actual subtraction but it was only for the pickles, right below the pickles was the section for raw food and it made you vomit but had no subtraction so you could puke like 40 times in a row and it wouldn't reduce your thirst or calories even though it applied the poison correctly.
like eating pickles and vomiting reduced the values correctly but for raw food there was nothing happening to thirst or calories
as for the chance code a basic one can be made by using math.random on a scale from 1 to 10 and for every chance integer you add the total value together as the argument that passes the vomit function, you'd only be able to increase it by integer of 10% but it would work, so 20% would be 3, (1+2) and 50% would be 15, (1+2+3+4+5)
idk there might be an easier way to do it but thats the most basic way iv written an rng chance code, i might be explaining it the wrong way cause its been a while since iv used anything that uses random chance
but really you could probably just find an example easy enough lol like i was able to when i was trying to double check if i had what i was thinking about right lol
https://stackoverflow.com/a/64522619/11087245
honestly you should be able to use the example in that script there but just for a single array but then again if