[Mod] Thirsty [thirsty] (WIP)
- programmingchicken
- Member
- Posts: 540
- Joined: Sat Apr 18, 2015 02:20
- GitHub: pchicken
- IRC: chicken pchicken
- Location: not here
- Contact:
Re: [Mod] Thirsty [thirsty] (WIP)
:3
Yes, maybe snow could be used?
Yes, maybe snow could be used?
<gamerdude> I apologize for the above content
Re: [Mod] Thirsty [thirsty] (WIP)
Neat ideas, but ultimately beyond the scope of this mod.
But have a look at Nathan's Survival mod. It makes use of Thirsty, but is already tackling the "water purification angle".
But have a look at Nathan's Survival mod. It makes use of Thirsty, but is already tackling the "water purification angle".
Re: [Mod] Thirsty [thirsty] (WIP)
Version 0.10.1 released
No new functionality. There were two points I had wanted to refactor before declaring this mod ready to release:
Warning: If you have configured this mod by copying the "thirsty.conf.example" file, then things should probably work by coincidence. But I would recommend copying the "thirsty.default.conf" anew, and recreating your local changes in it. Just remember to use a new, temporary file name for the new config file, so as not to clobber the very "thirsty.conf" whose changes you're trying to save.
No new functionality. There were two points I had wanted to refactor before declaring this mod ready to release:
Both of these have been achieved with this version. Please let me know if you find any problems.Ben wrote:
- A player's hydration level is saved by my attempt at a "shareable mixin", which I've since concluded is not worth it. It won't have any outward effect, but I'd like to get this refactored before declaring 1.0.0 .
- I'm not happy with the configuration. Ideally, I'd like to have a single, well-nested configuration file with all the defaults, and players / server admins can copy this file to configure stuff without their changes being clobbered by the next update. The mod code would then simply merge these by top-level key or something.
Warning: If you have configured this mod by copying the "thirsty.conf.example" file, then things should probably work by coincidence. But I would recommend copying the "thirsty.default.conf" anew, and recreating your local changes in it. Just remember to use a new, temporary file name for the new config file, so as not to clobber the very "thirsty.conf" whose changes you're trying to save.
- mahmutelmas06
- Member
- Posts: 367
- Joined: Mon Mar 02, 2015 13:10
- GitHub: mahmutelmas06
- IRC: mahmutelmas06
- In-game: masum
Re: [Mod] Thirsty [thirsty] (WIP)
Wow, looks very good! Nice :-D
- 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)
So I'm integrating this mod with the mymonths mod, integrating is probably the wrong word, anyway, I'm wondering does thirsty.set_thirst_factor 2 mean you get thirsty twice as fast or half as fast, I couldn't find anything that said.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course
Check out my website, and brand new Minetest Modding Course
Re: [Mod] Thirsty [thirsty] (WIP)
Good point, the docs are probably too thin on this. A factor of 2 makes you thirsty twice as fast; the relevant line is about here: https://github.com/bendeutsch/minetest- ... s.lua#L208Nathan.S wrote:So I'm integrating this mod with the mymonths mod, integrating is probably the wrong word, anyway, I'm wondering does thirsty.set_thirst_factor 2 mean you get thirsty twice as fast or half as fast, I couldn't find anything that said.
I've been out of the loop a bit; when I get back, though, I'd like to overhaul this system a bit. Instead of changing the factor or flatly adjusting hydration, I'd like to implement a kind of "thirst debt". Dig a block, incur 0.2 hydration debt. Craft an item: 0.3 debt. Cast a fireball: 1.5 debt. This "debt" is then repaid by getting thirsty twice as hard until it is paid off.
Another interesting mechanic: instead of a single factor, have a set of bonuses / maluses (or boni / mali). Sprinting? +30% thirst. Wearing Boots of Rain? -20% thirst. Together +10%, or 110% as opposed to the default 100%. And if you stop sprinting, the sprinting malus drops back to +0%, making the new total 100%-20%=80%. Yes, this can work, as long as I work out what happens at 0%, 100%, 200% etc.
- 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)
Thanks for the reply, I probably could have dug through the code myself, but just looked at the documentation.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course
Check out my website, and brand new Minetest Modding Course
Re: [Mod] Thirsty [thirsty] (WIP)
I've included your mod within my new Minesim subgame and corrected a typo that prevented the bar to be displayed with the correct size.
Re: [Mod] Thirsty [thirsty] (WIP)
Neat!Echoes91 wrote:I've included your mod within my new Minesim subgame
Oops! Thanks for catching that, merged (also sorry for the delay).Echoes91 wrote:and corrected a typo that prevented the bar to be displayed with the correct size.
- programmingchicken
- Member
- Posts: 540
- Joined: Sat Apr 18, 2015 02:20
- GitHub: pchicken
- IRC: chicken pchicken
- Location: not here
- Contact:
Re: [Mod] Thirsty [thirsty] (WIP)
I have an idea: Change thirst loss depending on what biome you're in (heat parameter).
If this hasn't been added already, can you add it? (not even sure if the heat parameter in biome settings is even accessible past worldgen)
If this hasn't been added already, can you add it? (not even sure if the heat parameter in biome settings is even accessible past worldgen)
<gamerdude> I apologize for the above content
- 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 detecting sand around for example!
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!
DMs are always open if you want to get in touch!
- Desour
- Member
- Posts: 1472
- Joined: Thu Jun 19, 2014 19:49
- GitHub: Desour
- IRC: Desour
- In-game: DS
- Location: I'm scared that if this is too exact, I will be unable to use my keyboard.
Re: [Mod] Thirsty [thirsty] (WIP)
sand is also generated in caves and not hot biomes and you can place it
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)
Re: [Mod] Thirsty [thirsty] (WIP)
You could make a companion mod that sets the thirst_factor (see above) according to the biome, but yes, this sounds like something that makes sense "by default".
I've been occasionally reading something about biomes and temperature maps – does anyone know how "official" this is?
I've been occasionally reading something about biomes and temperature maps – does anyone know how "official" this is?
Re: [Mod] Thirsty [thirsty] (WIP)
Version 0.10.2 released
Contains the bug fix by Echoes91, detailed above. Better late than never :-/
Contains the bug fix by Echoes91, detailed above. Better late than never :-/
Re: [Mod] Thirsty [thirsty] (WIP)
Knowing the different biomes is something I would love to be able to do. I know there was some talk about it. Lets hope it does happen. I check the nodes to get the biome but it is far from perfect.Ben wrote:You could make a companion mod that sets the thirst_factor (see above) according to the biome, but yes, this sounds like something that makes sense "by default".
I've been occasionally reading something about biomes and temperature maps – does anyone know how "official" this is?
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!
A list of my mods can be found here
A list of my mods can be found here
Re: [Mod] Thirsty [thirsty] (WIP)
I think part of the problem is that there is only a vague notion of "biomes", or whether biomes as such even exist at all. At least I can find no mention of "biome" or "temperature" in the Lua API.Don wrote:Knowing the different biomes is something I would love to be able to do. I know there was some talk about it. Lets hope it does happen. I check the nodes to get the biome but it is far from perfect.
I think that, like "ground height", the concept of biomes and temperature maps is something each map generator decides for itself, not something that can be globally queried.
- maikerumine
- Member
- Posts: 1420
- Joined: Mon Aug 04, 2014 14:27
- GitHub: maikerumine
- In-game: maikerumine
Re: [Mod] Thirsty [thirsty] (WIP)
Code: Select all
2016-11-13 09:30:04: ERROR[Main]: ServerError: Lua: Runtime error from mod 'thirsty' in callback on_dieplayer(): ...\aftermath\mods\thirsty/persistent_player_attributes.lua:109: attempt to index a nil value
2016-11-13 09:30:04: ERROR[Main]: stack traceback:
2016-11-13 09:30:04: ERROR[Main]: ...\aftermath\mods\thirsty/persistent_player_attributes.lua:109: in function 'set_value'
2016-11-13 09:30:04: ERROR[Main]: ...ALLOUT\bin\..\games\aftermath\mods\thirsty/functions.lua:40: in function <...ALLOUT\bin\..\games\aftermath\mods\thirsty/functions.lua:33>
2016-11-13 09:30:04: ERROR[Main]: D:\FALLOUT\bin\..\builtin\game\register.lua:407: in function <D:\FALLOUT\bin\..\builtin\game\register.lua:387>
Talamh Survival Minetest-->viewtopic.php?f=10&t=12959
- maikerumine
- Member
- Posts: 1420
- Joined: Mon Aug 04, 2014 14:27
- GitHub: maikerumine
- In-game: maikerumine
Re: [Mod] Thirsty [thirsty] (WIP)
It must be noted that if a player has a corrupted [during death] player file then when he/she relogs to server the server will crash. The only way to fix this was to delete the mod, or delete all player files, the latter I cannot do.
Talamh Survival Minetest-->viewtopic.php?f=10&t=12959
- maikerumine
- Member
- Posts: 1420
- Joined: Mon Aug 04, 2014 14:27
- GitHub: maikerumine
- In-game: maikerumine
Re: [Mod] Thirsty [thirsty] (WIP)
Bump
Is there any more Dev of this MOD?
Is there any more Dev of this MOD?
Talamh Survival Minetest-->viewtopic.php?f=10&t=12959
- Beerholder
- Member
- Posts: 199
- Joined: Wed Aug 03, 2016 20:23
- GitHub: evrooije
- In-game: Beerholder
Re: [Mod] Thirsty [thirsty] (WIP)
Hi maike, have you tried printing the values, or could you try put some print statements in persistent_player_attributes.lua? Like on 109 where it crashes and where it says:
PPA.read_cache[player_name][name] = value
Do:
print(player_name)
print(name)
print(PPA.read_cache[player_name])
print(PPA.read_cache[player_name][name])
print(value)
Maybe a reinitializing when one of these values is nil might be a hacky way to solve this problem for the time being? Better to have DB backed storage, so in case the server crashes because of another mod, at least a rollback is performed on the player persistent data .......
PPA.read_cache[player_name][name] = value
Do:
print(player_name)
print(name)
print(PPA.read_cache[player_name])
print(PPA.read_cache[player_name][name])
print(value)
Maybe a reinitializing when one of these values is nil might be a hacky way to solve this problem for the time being? Better to have DB backed storage, so in case the server crashes because of another mod, at least a rollback is performed on the player persistent data .......
Re: [Mod] Thirsty [thirsty] (WIP)
Maike, I had this problem last year, ... I am not absolutely sure to remember how I fix it but I think you must add an if to the thirsty.on_dieplayer function in file functions.lua (next is the version of my computer)
function thirsty.on_dieplayer(player)
local name = player:get_player_name()
local pl = thirsty.players[name]
-- reset after death
if pl ~= nil then
PPA.set_value(player, 'thirsty_hydro', 20)
pl.pending_dmg = 0.0
pl.thirst_factor = 1.0
end
end
function thirsty.on_dieplayer(player)
local name = player:get_player_name()
local pl = thirsty.players[name]
-- reset after death
if pl ~= nil then
PPA.set_value(player, 'thirsty_hydro', 20)
pl.pending_dmg = 0.0
pl.thirst_factor = 1.0
end
end
- maikerumine
- Member
- Posts: 1420
- Joined: Mon Aug 04, 2014 14:27
- GitHub: maikerumine
- In-game: maikerumine
Re: [Mod] Thirsty [thirsty] (WIP)
Thanks guys, sorry for long delay on reply. I am trying this now. :)Pablo.R wrote:Maike, I had this problem last year, ... I am not absolutely sure to remember how I fix it but I think you must add an if to the thirsty.on_dieplayer function in file functions.lua (next is the version of my computer)
function thirsty.on_dieplayer(player)
local name = player:get_player_name()
local pl = thirsty.players[name]
-- reset after death
if pl ~= nil then
PPA.set_value(player, 'thirsty_hydro', 20)
pl.pending_dmg = 0.0
pl.thirst_factor = 1.0
end
end
Talamh Survival Minetest-->viewtopic.php?f=10&t=12959
-
- Member
- Posts: 845
- Joined: Fri Jan 08, 2016 21:17
- In-game: Ghost
Re: [Mod] Thirsty [thirsty] (WIP)
I need some help in working out this mod like what the functions of the items other than the bowl, canteens and fountain those I worked out on my own but the other stuff not a clue
Re: [Mod] Thirsty [thirsty] (WIP)
Hey, I think like your Hunger mod, it should disable itself when damages are turned off.
Same can be said for Beware of the dark.
Same can be said for Beware of the dark.
Who is online
Users browsing this forum: No registered users and 19 guests