Jump to content

Effect on Thirst of Inventory water sources


Claije

Recommended Posts

I recently made some containers for water that hold a gallon, and quart. Specifically a 9 pound and 2.5 pound container of water with 40 and 20 drainable uses.

 

While testing them I noticed that after the first drink from the gallon, I pretty much never got thirsty again (I've been setting pretty for a good 4 days now) I was wondering what determines how much thirst is replenished by a water source in your inventory? If it is based on the weight of the object being drank from, then I might have to rethink using realistic weights and a large number of delta drains.

Link to comment
Share on other sites

Hm, is your mod scripts-only or are you working with lua too? You could check the thirst of the char before and after drinking from your bottles. Could be a bug (just a guess) that allows negative numbers for thirst - you could then simply check when the thirst < 0 and reset it to 0 in those cases.

Link to comment
Share on other sites

The items are made in script, and the lua just dispenses them throughout the world.

I'm pretty new to lua, I've used fill-in-the-blank guidelines for everything.

I'll go look up how to check variables and what not, and see.

Link to comment
Share on other sites

so skimming the googs for how to check variables in lua I found "print(type())".
I figured I'd want to put that in an event, but I don't know the event triggers, so I looked at Turbotutone's reference sheet, the closest I saw to "when someone drinks" was a guess at Event.OnWaterAmountChange.

Stop me if I'm on the wrong track - but if that's right I'm just missing the name of the variable for the player's thirst, so I goog'd again and was wondering if this: http://stackoverflow.com/questions/2834579/print-all-local-variables-accessible-to-the-current-scope-in-lua would do me any good? I didn't see a list of variables used anywhere in the PZ files, I'm guessing it's locked somewhere deep in the javas, and I know nothing of coffee.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...