[Mod] Thirsty [thirsty] (WIP)

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

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

by Ben » Post

Hello everyone, really sorry I haven't been active lately – I had some other issues besides Minetest, and then I got more into the C++ side of things, so any mod work ground to a halt…

Thirsty is one of my oldest mods, and my most complex by far. Too complex, actually. It will take me a while to get back into things, and to start working on it again. Long range plans are splitting it into two or more mods (base thirst and all the "tier" stuff) and using the in-engine player attributes. Short term: bug fixes, it seems ;-)

@Chibi ghost: check some of my posts on page 2 of this thread. The larger fountains need to be built somewhere and work when you are near them. The "amulet" thingies work by staying in your inventory, but you need a canteen or similar in there too for them to work. Unless of course they're bugged by now, in which case sorry :-(

@Lord_Vlad: the idea was that without damage turned on, these mods are pointless, I think, so that case is not deemed very important? I'd have to check, but I think that the effects are always considered (i.e. the attributes go up or down), but no damage is taken in any case. If it is, that's definitely a bug.

Chibi ghost
Member
Posts: 845
Joined: Fri Jan 08, 2016 21:17
In-game: Ghost

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

by Chibi ghost » Post

thank you

User avatar
Lord_Vlad
Member
Posts: 112
Joined: Thu Jul 20, 2017 07:58

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

by Lord_Vlad » Post

Ben wrote:@Lord_Vlad: the idea was that without damage turned on, these mods are pointless, I think, so that case is not deemed very important? I'd have to check, but I think that the effects are always considered (i.e. the attributes go up or down), but no damage is taken in any case. If it is, that's definitely a bug.
Ideed no damage are taken, it just looks messy to still have them there when they aren't useful. I'm a bit of a maniac I guess, sorry.

User avatar
ManElevation
Member
Posts: 896
Joined: Tue Aug 02, 2016 22:04
GitHub: ManElevation
IRC: ManElevation
In-game: ManElevation
Location: Madrid,Spain

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

by ManElevation » Post

I NEED WATER!
My Public Mods! Discord: Rottweiler Games#3368

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

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

by azekill_DIABLO » Post

i just got a water bottle (flip)
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

Chem871
Member
Posts: 999
Joined: Sat Aug 19, 2017 21:49
GitHub: Chemguy99
In-game: Chem Nyx
Location: My Basement's Attic

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

by Chem871 » Post

Would you make better canteens that last longer?
What is SCP-055?

User avatar
Hamlet
Member
Posts: 766
Joined: Sat Jul 29, 2017 21:09
IRC: H4mlet
In-game: Hamlet
Location: Lombardy, Italy

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

by Hamlet » Post

I'm using your mod in my game and I like it very much, however I just realized that has a flaw that can be exploited to cheat:

water fountains can be carried around like canteens, but they are an infinite water source
thus, instead of using canteens a cheater could simply craft a water fountain/wash basin and carry it around

Would it be possible to make them work like canteens?
Example: a wash basin could hold three times the water being hold by a canteen, when it's exhausted you have to replenish it by hitting it with a water bucket (which would be turned into an empty bucket).

What do you think?
My repositories: Codeberg.org | My ContentDB's page

minerdudetest
Member
Posts: 38
Joined: Mon Jul 02, 2018 17:16

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

by minerdudetest » Post

@Ben Hello! I have enhanced your mod with compatibility to Mineclone2 game by adding flexible detection-based recipes. Link to thread with my changes. Best!

Edit: pull request withdrawn due to errata
Last edited by minerdudetest on Mon Oct 15, 2018 08:23, edited 1 time in total.

minerdudetest
Member
Posts: 38
Joined: Mon Jul 02, 2018 17:16

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

by minerdudetest » Post

Hamlet wrote: What do you think?
I think "cheating" is in the head, but your direction may be worthy fixing.

I mean:
1. craft bucket
2. take water
3. fill it in any block and stand there until refreshed
4. pick up the water...

minerdudetest
Member
Posts: 38
Joined: Mon Jul 02, 2018 17:16

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

by minerdudetest » Post

@All, massive changes to "Thristy" just pushed. I have made a pull request. See.
Edit: pull request withdrawn due to errata, third time.

User avatar
Lord_Vlad
Member
Posts: 112
Joined: Thu Jul 20, 2017 07:58

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

by Lord_Vlad » Post

Even bigger Mithril canteen would be enjoyed.

Also, compatibility with more food-related mods. Tons of fruits juice don't replenish thirst (though I may succeed in doing this myself in which case I'll provide the bits of code to change in an edit.)

User avatar
MCL
Member
Posts: 654
Joined: Mon Aug 20, 2018 00:44
GitHub: MCLx86
IRC: migdyn
In-game: singleplayer
Contact:

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

by MCL » Post

I get this error

Code: Select all

2019-02-19 22:35:07: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'main' in callback node_on_punch(): ...1/bin/../games/zombietest/mods/thirsty/functions.lua:260: attempt to call method 'get_player_name' (a nil value)
2019-02-19 22:35:07: ERROR[Main]: stack traceback:
2019-02-19 22:35:07: ERROR[Main]: 	...1/bin/../games/zombietest/mods/thirsty/functions.lua:260: in function 'drink_handler'
2019-02-19 22:35:07: ERROR[Main]: 	...1/bin/../games/zombietest/mods/thirsty/functions.lua:325: in function <...1/bin/../games/zombietest/mods/thirsty/functions.lua:319>
2014-02-14 - 2024-02-14 TEN YEARS OF MCL

User avatar
FreeGamers
Member
Posts: 650
Joined: Sat May 25, 2019 00:15
GitHub: is proprietary I use NotABug
Location: United States
Contact:

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

by FreeGamers » Post

This mod works great for its purpose. I like it for the survival game. I'd recommend the "drinks" mod to be used with this as well.

This mod generates a lot of server log messages in Minetest v5.0.1 such as:

2019-06-29 08:30:08: WARNING[Server]: WARNING: minetest.setting_* functions are deprecated. Use methods on the minetest.settings object. (at ...are/games/minetest/mods/lib_player/thirsty/functions.lua:220)

Besides that I have not ran into any issues at all with this mod over month or two I've been using it. My only criticisms are that I don't quite understand how the water fountain and blocks for it work, Also, I think the textures for the canteens are a bit low-res. If I find better ones I'll share them here.
FreeGamers.org has moved to MeseCraft.net | FreeGamers on this forum is now MeseCraft

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 just made a pull request to update the code for Minetest 5.0 and up. This will remove the deprecated function messages, and adds a mod.conf so the folder doesn't need to be renamed. Now to wait for the pull request to be merged. :)
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course

User avatar
FreeGamers
Member
Posts: 650
Joined: Sat May 25, 2019 00:15
GitHub: is proprietary I use NotABug
Location: United States
Contact:

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

by FreeGamers » Post

Thank god! You should see my server log!

To follow up on my other comments, I ended up disabling all of the other items apart from the canteen. For a survival server the water fountain was too OP. It could be quickly mined, picked up, and placed whenever a drink was needed.

So I decided to extend the canteen functionality to include tiered canteens that hold more water. Wood, Steel, Mithril, etc.

Redid the textures because the original canteens looks a bit ugly.

I've also added some sound effects to the canteen usage: sound on fill and a sound on drink. Its pretty good. I noticed some oddities like it still plays the sound effect even if the canteen is empty, but otherwise its been very nice so far. Since it was such a big aspect of the player, I thought it could use some polish.
FreeGamers.org has moved to MeseCraft.net | FreeGamers on this forum is now MeseCraft

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

You could probably check out the diff on the pull request and very easily copy the changes over. I think I only modified four or five lines of code.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course

User avatar
FreeGamers
Member
Posts: 650
Joined: Sat May 25, 2019 00:15
GitHub: is proprietary I use NotABug
Location: United States
Contact:

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

by FreeGamers » Post

That was pretty simple! Thanks.
FreeGamers.org has moved to MeseCraft.net | FreeGamers on this forum is now MeseCraft

Merak
Member
Posts: 116
Joined: Sat Nov 05, 2016 20:34

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

by Merak » Post

Can the user configure the speed at which the player becomes thirsty? I did not see it in the conf.

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

Check out the thirsty.default.conf file. It contains instructions on how to change the speed players get thirsty at.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course

timsoft
Member
Posts: 58
Joined: Sat Jun 04, 2016 20:38
GitHub: timsoftgit

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

by timsoft » Post

is there a way to add thirst quenching for drinks from farming redo, such as milk, coffee, mint tea using Thirsty?

Nordal
Member
Posts: 157
Joined: Mon Jul 30, 2018 15:46
GitHub: Nordall

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

by Nordal » Post

While playing minetest v5.4.0 it's constantly writing this warning into terminal and debug.txt:

WARNING: minetest.setting_* functions are deprecated. Use methods on the minetest.settings object. (at ...inetest-5.4.0/minetest/bin/../mods/thirsty/functions.lua:220)

I think it's meant to change

Code: Select all

if minetest.setting_getbool("enable_damage") then
into

Code: Select all

if minetest.settings:get_bool("enable_damage") then
But since you have no settings.txt but thirsty.conf I think another solution is needed.
It would be very nice, if you made this really ennoying warning turn off.
CFS - still widely unknown

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

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

by sirrobzeroone » Post

I've been hunting around and I think this is the only thirst mod out there?

Just wanted to check if theres another or a fork of this I've missed?

A little concerned about the code age is all, I'm more than happy to update some bits and pieces of code but dont want to do so if someone else already has another updated version of this mod somewhere :).

Edit: I took a fork of Nathans version above, I've converted it across to use player meta and removed better huds support as that mod is no longer being worked on/supported. I confirmed hudbars still works ok with the latest version of hudbars, I'm going to have a look at an easier way to register drinking vessels some sort of api i hope.

https://github.com/sirrobzeroone/minetest-thirsty

Edit2 Thought someone else may find this useful to know, as its not clear from the post way back but beverages actually supports thirsty in the code, its just not listed in the depends as an option - just add thirsty? to end of the beverage depends.lua.
avaliable here:
https://github.com/minetest-mods/beverage

downside I now need to be more careful playing around with thirsty
mahmutelmas06 wrote:
Fri Nov 27, 2015 21:51
I have released a mod as a main purpose of this mod.
viewtopic.php?f=9&t=13601

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

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

by sirrobzeroone » Post

Just added a cleaned up a bit of stuff.

Tried to clarify and Improve the doco for Tiers 0 through to Tiers 2, havent looked much at fountains etc yet.

I added a couple of new functions, all in the readme with some simple examples, the below is just a summary I included and clarified some other functions as well:

register a new hydrating node (ie new water type that you can stand in and hydrate from)

Code: Select all

thirsty.register_hydrate_node(node_name,also_drinkable_with_cup,regen_rate_per_second)
The above function also trigegrs this one if also_drinkable_with_cup == true, but in case you have another node that can be drunk from you can register it here without it being a stand in node eg drinking fountain.

Code: Select all

thirsty.register_drinkable_node(node_name)
This one already existsed just documented it, eg vessels:drinking_glass

Code: Select all

*thirsty.augment_item_for_drinking(item_name, max_hydration)
Register a canteen/bottle type object, were empty items dont need to stack eg thirsty.register_canteen("thirsty:bronze_canteen",60,25)

Code: Select all

thirsty.register_canteen(item_name,hydrate_capacity,max_hydration,on_use)
last one, adds a canteen/bottle type object were the empty items need to stack eg vessels:steel_bottle and vessels:glass_bottle

Code: Select all

thirsty.register_canteen_complex(item/node_name,hydrate_capacity,max_hydration,full_image)
Assuming I havent introduced any horrible bugs it should all be working but please treat as WIP as I'm still working through all the Tiers of items but would be happy if someone wants to give it a whirl.

Thirsty is a tough little nut to deal with as you have nodes that hydrate, items that can be drunk from and items that can be used to store and carry water - Ben did a really good job setting a solid base for the mod.

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

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

by sirrobzeroone » Post

Still working, although can see I'm almost at the end now for updating and tidy up.

A couple of new images for the amulets and I renamed them to Amulet of Moisture and Amulet of Hydration (scaled up 4x for forums:
Image Image

I played around with the drinking fountain from the feedback Hamlet provided and yes it is a bit more of an exploit than carrying a bucket of water around, mainly as the drink fountain also lets you over-hydrate to 30. So I have changed the drink fountain. When you construct it now you will get an empty bucket back (yay). However if you place the drink fountain and then try to mine it you will only recieve back the 4 stone used to create the drink fountain unfortunatly the water will disappear into the surronding ground and you'll need to re-craft it using a new bucket of water and the 4 stone. Hopefully that fixes the pickup and put down drink fountain issue.

I've moved all settings to to a settingtypes.txt so you can change these via All Settings>>Mods>Thirsty then there are 4 catagories: General, Water Fountain, Thirsty Mod Items and Other Mods.

Ive also added support for Glass of Milk from mobs_animal. A glass of milk will restore 2 hydration points and 1 health point....sorry havent made it hunger_ng compatable yet.....need to do that as not sure what will happen with the glass of milk but it was more a proof of concept of a mixed food/drink type. I'll tinker with it more to support hunger.

I added a sort of external node/item names configuration file, so if you update that file with whatever the node names need to be for your game it should be much easier to integrate thirsty into a non-MTG based game. I need this myself but havent tested it out expect it'll need more changes and updates eg mod_name aliasing as well :).

I think thats everything for the latest git upload.

Edit: Add Link for easy getting if you want it :)
https://github.com/sirrobzeroone/minetest-thirsty
Attachments
thirsty_amulet_moisture_cc0.png
thirsty_amulet_moisture_cc0.png (10.71 KiB) Viewed 1402 times
thirsty_amulet_hydration_cc0.png
thirsty_amulet_hydration_cc0.png (11.39 KiB) Viewed 1402 times

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

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

by sirrobzeroone » Post

Another Update, this one might make using it a bit easier as in download and go :)

Summary from Repo:

Code: Select all

Supports hbhunger
Supports hunger_ng
Code Change to make non-MTG use easier
Addition of drinking sound
Farming Redo Support Added
Mobs_Animal Support Added
Ethereal Support Added
New Thirst Icon
New Canteen Icon
New Bowl icon
Ethereal golden apples will restore 10 Hydration, Don't eat raw chili unless you want to get really thirsty :). I'm hoping Nathan will accept changes to "drinks" as it would be good to convert the bottle's of stuff to canteen type items.

With the hunger mods I went through there config files and did my best to find drinking/liquid items, they had listed for farming redo, mobs animal and ethereal and essentially added hydration value to the side. For some items I lowered the satiate for others eg soups satiate stays the same but added a small hydration amount. Theres a rather ugly function inside interop_a_functions.lua -

Code: Select all

thirsty.register_hb_hng_drink(item_name,satiate_value,heal_value,hyd_value,hyd_max,rtn_item_name)
which can be used to register an item for hbhunger, hunger_ng and thirsty. I say ugly as its incomplete and will need some refinement so I haven't added it to the readme.md yet as its unfinished. Only use it if you need to register an item as a food and a drink, thirsty handles item return.

for hbhunger - with combined items you get both the eating and drinking sound effect, not sure I like this.
for hunger_ng - you will just get the drink sound effect.

One refinement of thirsty.register_hb_hng_drink() that would be nice is the ability to specify that for a food item use drink or eat sound :)

As always hopefully I havent introduced any bugs but appreciate anyone giving it a test :)

Image
Attachments
Preview.png
Preview.png (4.31 KiB) Viewed 1402 times

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests