Page 1 of 3
[Mod] Thirsty [thirsty] (WIP)

Posted:
Fri Apr 10, 2015 20:05
by Ben
Thirsty modThis mod adds a thirst mechanic to the game, similar to many hunger mods (but independent of them). Players will slowly get thirstier over time, and will need to drink or suffer damage.
The point of this mod is not to make the game more realistic, or harder. The point is to have another mechanic that rewards preparation and infrastructure. Players will now have an incentive to build their base next to water (or add some water to their base), and/or take some water with them when mining or exploring.
Current functionality:Tier 0: stand in water (running or standing) to slowly drink. You may not move during drinking (or you could cross an ocean without getting thirsty).
Tier 1: use a glass (currently all containers from `vessels` or an included bowl) on water to instantly fill your thirst bar.
Tier 2: craftable canteens: steel canteen holds two full thirst bars worth of water, bronze canteen three bars.
Tier 3: placeable drinking fountain / wash basin node: instantly fills your thirst bar when used.
Tier 4+: placeable fountain node(s) to fill the thirst bars of all players within range. Placing more nodes increases the range.
Tier 5: craftable trinkets/gadgets/amulets that constantly keep your thirst bar filled when in your inventory, solving your thirst problem once and for all.
API
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
thirsty.drink(player, amount, [max]) --thirsty.get_hydro(player) --thirsty.set_thirst_factor(player, factor) --thirsty.get_thirst_factor(player) --
"player" refers to a player object, i.e. with a get_player_name() method.
Future plans:None.
Wooden bowl:

Steel canteen:

Bronze canteen:
Version: 0.10.2
License: Code LGPL 2.1, Textures CC-BY-SA
Download:
Dependencies:- default (optional but needed for included components)
- bucket (optional but needed for included components)
- hudbars by Wuzzy (optional)
- hud by BlockMen (optional)
- vessels by VanessaE (optional)
See also (known other mods doing similar things):
Re: [Mod] Thirsty [thirsty] (WIP)

Posted:
Sat Apr 11, 2015 07:15
by Krock
How can I drink from a water bucket?
Sometimes it's just not possible to place a water node in a city.
Re: [Mod] Thirsty [thirsty] (WIP)

Posted:
Sat Apr 11, 2015 07:48
by Ben
The plan is not to allow you to drink from buckets; the plan is for the city to have drinking fountains on every block. If it's a nice and thoughtful city, that is ;-)
If it isn't, take water skins, and don't outstay your welcome, I'd guess.
Re: [Mod] Thirsty [thirsty] (WIP)

Posted:
Sat Apr 11, 2015 08:23
by Ben
Or, of course, if it's a rich city, they'd have a massive "Tier 4" fountain in the middle, so that anyone within city limits would be covered, drinking-wise. That's the "rewarding infrastructure" part of the mod, incidently.
Re: [Mod] Thirsty [thirsty] (WIP)

Posted:
Sat Apr 11, 2015 14:07
by TG-MyinaWD
You can store maybe water in the Vessels (cups and bottles) mod. hasn't been touch since a longtime. but look interesting this mod.
Re: [Mod] Thirsty [thirsty] (WIP)

Posted:
Sat Apr 11, 2015 19:40
by Ben
Thanks for the interest ;-)
Yes, I'm planning to at least use the cups for the "Tier 1" step: hold a cup in your hand and right-click some water, and your thirst bar gets filled all the way. The cup stays unchanged. (Or maybe left-click, since a cup is placeable? I'll have to see; I may not be able to use the existing cups after all. But I'll try!)
For the "Tier 2" step, I need a container I can fill with water, which you take along. One potential problem with the bottles from the Vessels mod is that they're stackable . I'm planning on using the bottle's durability to show and calculate the amount of water in it. That said, I'm not this far yet, I'll look at Vessels when I get there…
Re: [Mod] Thirsty [thirsty] (WIP)

Posted:
Sun Apr 12, 2015 20:19
by Ben
Version 0.2.0 is out
I finally finished the complete "Tier 0": players gradually get thirsty ("lose drink"? I never know what to call this :-P). Stand in water (and wait a bit) to drink. If the thirst meter drops to 0, you will start taking damage, about 1 HP every 10 seconds. Only if damage is enabled, of course.
Players are considered AFK after 2 minutes at the same coordinates. Nothing should happen to those players, at least not from this mod.
Re: [Mod] Thirsty [thirsty] (WIP)

Posted:
Sun Apr 12, 2015 23:38
by everamzah
Regarding the name, I suggest "hydration" as zero thirst means you're not thirsty, whereas zero hydration means that you are.
Re: [Mod] Thirsty [thirsty] (WIP)

Posted:
Mon Apr 13, 2015 00:21
by srifqi
Woah! Finally there is a friend for hunger.
Re: [Mod] Thirsty [thirsty] (WIP)

Posted:
Mon Apr 13, 2015 18:50
by Ben
everamzah wrote:Regarding the name, I suggest "hydration" as zero thirst means you're not thirsty, whereas zero hydration means that you are.
YES! Sold! "Hydration" it is! Thanks so much, I'll start using this right away ;-) As a bonus, we get to nickname the units "hydro points".
srifqi wrote:Woah! Finally there is a friend for hunger.
A friend, yes, but not the same. With hunger, generally, you need to scavenge or farm, and then carry food around with you. With this mod, you won't be carrying around a ton of water, but rather will be using natural resources more. Like looking for water in your mine, or searching for an oasis in the desert.
If the plan does not change too much, that is…
Re: [Mod] Thirsty [thirsty] (WIP)

Posted:
Mon Apr 13, 2015 20:00
by Ben
Version 0.2.1 out
Quick bugfix: AFK players should also no longer be damaged by thirst.
Re: [Mod] Thirsty [thirsty] (WIP)

Posted:
Wed Apr 15, 2015 21:58
by Ben
Version 0.3.0 is outThis version adds code to the containers from VanessaE's
vessels mod. Hold a drinking glass, glass bottle or steel bottle in your hand, left-click on water (not right-click, that still replaces the water with the node you're holding!) and instantly refill your hydration bar.
The point is to offer a faster, yet slightly more expensive, alternative to waiting in water.
"Why don't the bottles get filled with water?" Because those would be single-use, all-in-one-gulp items, which would most likely stack. Also, using them should return the empty bottle, and that gets complicated.
The main idea behind the Tier 2
game mechanic is a trade-off between inventory space and mobility. If you want to carry three water skins, you need three inventory slots. So stacking 99 bottles of water is too overpowered, I'd think.
Still, feedback welcome! I also need tuning on the timing, like how long you can move around without having to return to water.
Re: [Mod] Thirsty [thirsty] (WIP)

Posted:
Tue Apr 21, 2015 19:43
by Ben
Version 0.4.0 is outChanges:
- HUD: hudbars is now optional, Better HUD mod and builtin hud also supported.
- Drinking with a cup fills your hydration to 125% (was 100%)
- Dead players don't get thirsty, fill hydration on respawn
- Dependency vessels now optional
- Added a simple wooden bowl (no crafting recipe yet, use creative inventory to test)
Re: [Mod] Thirsty [thirsty] (WIP)

Posted:
Wed Apr 22, 2015 14:36
by mahmutelmas06
You should change hud position in betterhud mod. It overwrites drowning underwater icons.
Re: [Mod] Thirsty [thirsty] (WIP)

Posted:
Thu Apr 23, 2015 19:46
by Ben
mahmutelmas06 wrote:You should change hud position in betterhud mod. It overwrites drowning underwater icons.
Yes, the position in Better Hud is not ideal. You probably used it together with Hunger or a similar mod, am I right? Because then the hunger bar pushes the drowning bar up, to where I put the thirst bar. If you don't have any additional bars (say just minetest_game + hud + thirsty), then the drowning bar is next to the health bar, and therefore
under the thirst bar.
I think with Better Hud, someone needs to sort the bars by hand for each installation. However, I'll admit that at the moment, there is no way to change the thirst bar position without editing the code. I should change that, at least.
I'll try to find a solution. In the meanwhile, thanks for the feedback, and thanks for trying Thirsty :-D
Re: [Mod] Thirsty [thirsty] (WIP)

Posted:
Fri Apr 24, 2015 11:06
by mahmutelmas06
Hahh thanks to you for releasing such a mod :)
And yes i use better hud with hunger.
The logic is if someone is using thirsty, he is %100 using hunger too :D
Re: [Mod] Thirsty [thirsty] (WIP)

Posted:
Fri Apr 24, 2015 12:47
by prestidigitator
Ben wrote:However, I'll admit that at the moment, there is no way to change the thirst bar position without editing the code. I should change that, at least...I'll try to find a solution.
In
exertion, I load HUD details from Lua config files located in the mod and world directories. Take a look at
loadSettings.lua and
settings.lua. This makes it possible to customize the HUD location by changing the mod's config file or by creating a new config file in the world directory called exertion_settings.lua with, for example, just the following contents:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
-- lower-right corner of screen
fedHud.position = { x = 1.0, y = 1.0 };
fedHud.offset = { x = -26, y = -26 };
Re: [Mod] Thirsty [thirsty] (WIP)

Posted:
Fri Apr 24, 2015 18:56
by Ben
prestidigitator wrote:Take a look at loadSettings.lua and settings.lua. This makes it possible to customize the HUD location by changing the mod's config file or by creating a new config file in the world directory called exertion_settings.lua
Thanks, I'll definitely look into that. I'll need something later on to configure the mod, and this seems to fit the bill.
For the specific case of Better HUD, though, I've already got another solution: Better HUD has it's own HUD configuration file, "hud.conf", which sets global variables. I've got code in place that reacts to new hud.conf variables. I just need to put together two example files (one with the Hunger mod, one without), and I'll do a new release.
This also means I'll release the next version sooner than anticipated (I've noticed I've been spamming updates a bit :-P), but that just means more goodies ;-)
Re: [Mod] Thirsty [thirsty] (WIP)

Posted:
Fri Apr 24, 2015 20:09
by Ben
Version 0.5.1 (0.5.0 had a bug in it – the kind you always find after you've tagged and pushed :-P)
The .zip file now comes with two hud.conf files; one for use with the Hunger mod, one for without. If you already have a hud.conf, add the THIRST-specific keys and adjust as wanted. If you don't have one, copy one of thirsty's hud.conf.* files to hud.conf in the Better HUD mod directory to get started.
Also: canteens! A canteen is a portable drinking container, you drink with the "use" command (left mouse button). Steel canteens hold two full hydration bars, bronze canteens three bars. They start out empty, though, so fill (and re-fill) them at water. The durability bar shows how much water a canteen contains; it will not disappear when empty, you can refill them again.
Also, wooden bowls and canteens have crafting recipes (depending on [default] only). These may not be the best (in fact, I'm sure there are collisions with other bowls from other mods, at least), but they work. I'll try to get some screenshots of the recipes up.
Re: [Mod] Thirsty [thirsty] (WIP)

Posted:
Wed Apr 29, 2015 20:17
by Ben
Version 0.6.0 is outThis one actually adds two tiers at once: Tier 3, the "drinking fountain", and Tier 4+, the "water fountain" plus "water extenders".
The drinking fountain is a placeable node. Right-clicking it will instantly fill your hydration bar to 150%. As a bonus, if you click it with a canteen (or use a canteen on the fountain), the canteen will get filled as well. Yes, it looks more like a bird bath or kitchen sink; graphics are not my strong point :-P
Water fountain:

Water extender:
Water fountains are also placeable, but you don't use them. Instead, they constantly fill the hydration of all players within 5 nodes, as if they were standing in water. Water fountains need actual water (source or flowing) near them to work. You can extend the radius of water fountains with "water extenders", placeable nodes without any function of their own.
Specifically, a water fountain will check all the nodes in a 5-node-high pyramid starting one node
above itself. It will count all water nodes (source or flowing), and count all water fountains / water extenders. The smaller of these numbers is the "level" of the fountain, up to 20 (in other words, you need an equal amount of water and fountain blocks). Each level adds 5 more nodes to the working radius. A large fountain should cover a city block or two.
I'd recommend placing one water source above the "fountain" node, and arranging extenders under it, but the plan is to allow many working designs. If only the blocks looked better – I had a version with actual nodeboxes / meshes, but that did not improve things. Suggestions welcome!
Also, the crafting recipes are not set in stone – the goal is to form a certain progression through the tiers, and to have something worth working towards.
Re: [Mod] Thirsty [thirsty] (WIP)

Posted:
Wed Apr 29, 2015 21:02
by Nathan.S
Looking amazing.
Of course I just recorded a mod review video of this, before the new version was out. It will release on Monday, nothing I mentioned changed though. :D
Re: [Mod] Thirsty [thirsty] (WIP)

Posted:
Thu Apr 30, 2015 19:36
by Ben
Nathan.S wrote:Looking amazing.
Of course I just recorded a mod review video of this, before the new version was out. It will release on Monday, nothing I mentioned changed though. :D
Neat, thanks! Looking forward to it ;-D
Re: [Mod] Thirsty [thirsty] (WIP)

Posted:
Mon May 04, 2015 19:24
by Ben
Nathan.S wrote:Of course I just recorded a mod review video of this, before the new version was out.
Hey, just saw the video! Nice work :-D
You do give me too much credit though: thirst is not tied to activitiy, or to biomes – I wouldn't know how, at the moment :-D Even if I did, I don't think it would fit, to tell the truth.
The reason you didn't get thirsty until you had run into the desert is a bit simpler: a wooden bowl will hydrate you to 125%, i.e. "off the screen". It just took a while to run down again.
Interesting point about the water buckets and "cheating". Personally, I don't call it cheating; I'm fine with it and don't plan to counter it in any way. You're either carrying a bucket and twiddling your thumbs until you're rehydrated, or carrying a bucket and a container anyway. The goal of the mod is to reward preperation more than increase difficulty.
Unless, of course, players keep complaining that the mod only "works for them" if they force themselves not to use buckets :-/
Re: [Mod] Thirsty [thirsty] (WIP)

Posted:
Tue May 05, 2015 00:58
by Nathan.S
I thought I had seen you posting about loosing more thirst depending on location, maybe that was one of the mana threads, I'll have to note that in the video.
I'm planning on creating a survival subgame with my survival mod, and a bunch of other mods, this will probably end up in there, with some editing to make it fit with the purification part. Don't expect that for a while though.
Re: [Mod] Thirsty [thirsty] (WIP)

Posted:
Tue May 05, 2015 09:00
by prestidigitator
Exertion reduces hydration at faster rates as you move, build, and dig. That might be what you were thinking of.
Re: [Mod] Thirsty [thirsty] (WIP)

Posted:
Thu May 07, 2015 20:15
by Ben
Nathan.S wrote:I thought I had seen you posting about loosing more thirst depending on location, maybe that was one of the mana threads
Could be – I had talked about gaining and losing mana depending on location, but nothing is coded yet. And as prestidigitor said, some other thirst mods do just that.
Re: [Mod] Thirsty [thirsty] (WIP)

Posted:
Thu May 07, 2015 20:28
by Ben
Version 0.7.0 releasedThis one completes the tiers, so all features should be included.
Warning: the last tier is coded quite inefficiently; it might not work well in multiplayer. I'm working on it.
Here are the last two items:
The
water extractor
The
water injector
These two can work alone, though they work best together, of course (oh, and they have confusingly similar textures, at the moment :-P ). What happens is this: the water extractor gets water "out of nowhere", and fills a water container (i.e. a canteen) in your inventory. The water injector takes water from a canteen in your inventory, and… fills you up. Or drinks it for you. Into you. It's either magic, or high tech, or both.
If you have one of them, you either don't have to look for water anymore, or do not need to drink by yourself. If you have both (and a canteen!), thirst becomes a "solved problem".
It would have been much easier to code a single item that just keeps you hydrated. So why these two, and why do you still need a canteen? Firstly to drive up the cost, secondly to make it sensible to go half the way first, and thirdly so that you block
three inventory slots, one more than carrying a full water bucket and a wooden bowl. Whether this works remains to be seen.
Re: [Mod] Thirsty [thirsty] (WIP)

Posted:
Sun Jul 05, 2015 13:05
by Ben
Not dead, just resting :-P
I've released version 0.8.0. There is no real added functionality with this version, but now everything has been refactored and should now be configurable via user configuration (including disabling the built-in components like fountains and amulets or even the wooden bowl). Just copy the thirsty.conf.example file to thirsty.conf, edit away, and enjoy!
In theory, this should allow this mod to work much better / smoother with other mods or preexisting components. In practice, it probably won't matter much, because I haven't received many requests for this yet ;-)
I consider this version a "release candidate", by the way. If you do use it, and have any comments or suggestions, please let me know!
Re: [Mod] Thirsty [thirsty] (WIP)

Posted:
Tue Jul 07, 2015 16:23
by programmingchicken
Erm, for the fountain crafting recipes copper should be replaced with copper pipes.
and copper pipes should be craftable like this:
c c c
- - -
c c c
for one copper pipe
c=copper
- = nothing
that way it's not too easy to get your fountain.
Good mod, btw.
Re: [Mod] Thirsty [thirsty] (WIP)

Posted:
Wed Jul 08, 2015 09:46
by mahmutelmas06
how about adding drinking sound ?