[Mod] Thirsty [thirsty] (WIP)

User avatar
Ben
Member
Posts: 160
Joined: Tue Mar 31, 2015 20:09

[Mod] Thirsty [thirsty] (WIP)

by Ben » Post

Thirsty mod

This 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
Spoiler

Code: Select all

thirsty.drink(player, amount, [max]) --// instantly drink a bit (up to a max value, default 20)
thirsty.get_hydro(player) --// returns the current hydration of a player
thirsty.set_thirst_factor(player, factor) --// how fast does the given player get thirsty (default is 1.0)
thirsty.get_thirst_factor(player) --// returns the current thirst factor of a player    
"player" refers to a player object, i.e. with a get_player_name() method.
Future plans:
None.
Spoiler
Wooden bowl:
Image

Steel canteen:
Image

Bronze canteen:
Image
Version: 0.10.2
License: Code LGPL 2.1, Textures CC-BY-SA

Download:
Spoiler
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):
Attachments
craft_bronze_canteen.png
craft_bronze_canteen.png (3.85 KiB) Viewed 3901 times
craft_steel_canteen.png
craft_steel_canteen.png (3.76 KiB) Viewed 3901 times
craft_wooden_bowl.png
craft_wooden_bowl.png (5.23 KiB) Viewed 3901 times
Last edited by Ben on Sat Jun 25, 2016 19:01, edited 16 times in total.

User avatar
Krock
Developer
Posts: 4648
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Mod] Thirsty [thirsty] (WIP)

by Krock » Post

How can I drink from a water bucket?
Sometimes it's just not possible to place a water node in a city.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
Ben
Member
Posts: 160
Joined: Tue Mar 31, 2015 20:09

Re: [Mod] Thirsty [thirsty] (WIP)

by Ben » Post

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.

User avatar
Ben
Member
Posts: 160
Joined: Tue Mar 31, 2015 20:09

Re: [Mod] Thirsty [thirsty] (WIP)

by Ben » Post

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.

TG-MyinaWD
Member
Posts: 356
Joined: Thu May 08, 2014 21:22
GitHub: Maddie-Myina
IRC: Maddie-Myina
In-game: .
Location: Far Eden

Re: [Mod] Thirsty [thirsty] (WIP)

by TG-MyinaWD » Post

You can store maybe water in the Vessels (cups and bottles) mod. hasn't been touch since a longtime. but look interesting this mod.
I'm a Transgender no shame about it.
I prefer to be considered as a "Girl/Lady/Miss/Madam/Female" for now on.

User avatar
Ben
Member
Posts: 160
Joined: Tue Mar 31, 2015 20:09

Re: [Mod] Thirsty [thirsty] (WIP)

by Ben » Post

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…

User avatar
Ben
Member
Posts: 160
Joined: Tue Mar 31, 2015 20:09

Re: [Mod] Thirsty [thirsty] (WIP)

by Ben » Post

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.

User avatar
everamzah
Member
Posts: 490
Joined: Thu Jan 29, 2015 00:47
GitHub: everamzah
IRC: everamzah
In-game: everamzah

Re: [Mod] Thirsty [thirsty] (WIP)

by everamzah » Post

Regarding the name, I suggest "hydration" as zero thirst means you're not thirsty, whereas zero hydration means that you are.

User avatar
srifqi
Member
Posts: 570
Joined: Sat Jun 28, 2014 04:31
GitHub: srifqi
IRC: srifqi
In-game: srifqi
Location: Indonesia

Re: [Mod] Thirsty [thirsty] (WIP)

by srifqi » Post

Woah! Finally there is a friend for hunger.
Saya dari Indonesia! · Terjemahkan Minetest! · my mods · My nickname in IPA: /es.rif.qi/

User avatar
Ben
Member
Posts: 160
Joined: Tue Mar 31, 2015 20:09

Re: [Mod] Thirsty [thirsty] (WIP)

by Ben » Post

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…

User avatar
Ben
Member
Posts: 160
Joined: Tue Mar 31, 2015 20:09

Re: [Mod] Thirsty [thirsty] (WIP)

by Ben » Post

Version 0.2.1 out

Quick bugfix: AFK players should also no longer be damaged by thirst.

User avatar
Ben
Member
Posts: 160
Joined: Tue Mar 31, 2015 20:09

Re: [Mod] Thirsty [thirsty] (WIP)

by Ben » Post

Version 0.3.0 is out

This 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.

User avatar
Ben
Member
Posts: 160
Joined: Tue Mar 31, 2015 20:09

Re: [Mod] Thirsty [thirsty] (WIP)

by Ben » Post

Version 0.4.0 is out

Changes:
  • 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)

User avatar
mahmutelmas06
Member
Posts: 367
Joined: Mon Mar 02, 2015 13:10
GitHub: mahmutelmas06
IRC: mahmutelmas06
In-game: masum

Re: [Mod] Thirsty [thirsty] (WIP)

by mahmutelmas06 » Post

You should change hud position in betterhud mod. It overwrites drowning underwater icons.
My Mods:

Beverage

User avatar
Ben
Member
Posts: 160
Joined: Tue Mar 31, 2015 20:09

Re: [Mod] Thirsty [thirsty] (WIP)

by Ben » Post

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

User avatar
mahmutelmas06
Member
Posts: 367
Joined: Mon Mar 02, 2015 13:10
GitHub: mahmutelmas06
IRC: mahmutelmas06
In-game: masum

Re: [Mod] Thirsty [thirsty] (WIP)

by mahmutelmas06 » Post

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
My Mods:

Beverage

prestidigitator
Member
Posts: 647
Joined: Thu Feb 21, 2013 23:54

Re: [Mod] Thirsty [thirsty] (WIP)

by prestidigitator » Post

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:

Code: Select all

-- lower-right corner of screen
fedHud.position = { x = 1.0, y = 1.0 };
fedHud.offset = { x = -26, y = -26 };

User avatar
Ben
Member
Posts: 160
Joined: Tue Mar 31, 2015 20:09

Re: [Mod] Thirsty [thirsty] (WIP)

by Ben » Post

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 ;-)

User avatar
Ben
Member
Posts: 160
Joined: Tue Mar 31, 2015 20:09

Re: [Mod] Thirsty [thirsty] (WIP)

by Ben » Post

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.

User avatar
Ben
Member
Posts: 160
Joined: Tue Mar 31, 2015 20:09

Re: [Mod] Thirsty [thirsty] (WIP)

by Ben » Post

Version 0.6.0 is out

This one actually adds two tiers at once: Tier 3, the "drinking fountain", and Tier 4+, the "water fountain" plus "water extenders".
Spoiler
Image
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
Spoiler
Water fountain:
Image
Water extender:
Image
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.
Attachments
craft_water_extender.png
craft_water_extender.png (2.4 KiB) Viewed 3901 times
craft_water_fountain.png
craft_water_fountain.png (3.43 KiB) Viewed 3901 times
craft_drinking_fountain.png
craft_drinking_fountain.png (6.63 KiB) Viewed 3901 times

User avatar
Nathan.S
Member
Posts: 1147
Joined: Wed Sep 24, 2014 17:47
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21
Location: Bigsby Texas
Contact:

Re: [Mod] Thirsty [thirsty] (WIP)

by Nathan.S » Post

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
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course

User avatar
Ben
Member
Posts: 160
Joined: Tue Mar 31, 2015 20:09

Re: [Mod] Thirsty [thirsty] (WIP)

by Ben » Post

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

User avatar
Ben
Member
Posts: 160
Joined: Tue Mar 31, 2015 20:09

Re: [Mod] Thirsty [thirsty] (WIP)

by Ben » Post

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 :-/

User avatar
Nathan.S
Member
Posts: 1147
Joined: Wed Sep 24, 2014 17:47
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21
Location: Bigsby Texas
Contact:

Re: [Mod] Thirsty [thirsty] (WIP)

by Nathan.S » Post

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.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course

prestidigitator
Member
Posts: 647
Joined: Thu Feb 21, 2013 23:54

Re: [Mod] Thirsty [thirsty] (WIP)

by prestidigitator » Post

Exertion reduces hydration at faster rates as you move, build, and dig. That might be what you were thinking of.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Majestic-12 [Bot], Trog and 10 guests