[Mod] Thirsty [thirsty] (WIP)
- sirrobzeroone
- Member
- Posts: 593
- Joined: Mon Jul 16, 2018 07:56
- GitHub: sirrobzeroone
- Contact:
Re: [Mod] Thirsty [thirsty] (WIP)
I feel a bit bad with all the spam but I have a bit of time to work on this and need thirsty for my game so it has my focus at the moment.
Update,
I've removed the rest of the player data from the thirsty global table and stored it in player(meta). This was a bigger/tougher change than the hydro value so maybe a bug or two...I havent found any yet.
I've added the amulets of thirst which decrease the players thirst so you use hydration points slower. I have delibratly not included craft recieps, so these can only be given by admin or found as part of dungeon_loot on base MT-game. The idea being to try and encourage a bit of dungeon exploration, to use you have to hold in your inventory. Just noting it really so people know, for my own game which is more tech based these will be craftable :). Normal Thirst rate is 1 so the below are the initial rates but I may tweak these up by 0.05 yet:
Lesser Amulet of Thirst - 0.85
Amulet of Thirst - 0.70
Greater Amulet of Thirst - 0.55
I did some other cleanup, edited and made the sound file nicer and timed better, adjusted the standing in water drinking so the drinking sound didnt sound like a heart beat, cleaned up the texture folder, Cleaned up readme.MD markdown so its a bit nicer/easier to read.
Update,
I've removed the rest of the player data from the thirsty global table and stored it in player(meta). This was a bigger/tougher change than the hydro value so maybe a bug or two...I havent found any yet.
I've added the amulets of thirst which decrease the players thirst so you use hydration points slower. I have delibratly not included craft recieps, so these can only be given by admin or found as part of dungeon_loot on base MT-game. The idea being to try and encourage a bit of dungeon exploration, to use you have to hold in your inventory. Just noting it really so people know, for my own game which is more tech based these will be craftable :). Normal Thirst rate is 1 so the below are the initial rates but I may tweak these up by 0.05 yet:
Lesser Amulet of Thirst - 0.85
Amulet of Thirst - 0.70
Greater Amulet of Thirst - 0.55
I did some other cleanup, edited and made the sound file nicer and timed better, adjusted the standing in water drinking so the drinking sound didnt sound like a heart beat, cleaned up the texture folder, Cleaned up readme.MD markdown so its a bit nicer/easier to read.
- Attachments
-
- tamulets_of_thirst.png (18.78 KiB) Viewed 1504 times
- 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)
Is there any way for me to tell if somebody is using your fork of thirsty. I wouldn't want to change the drinks mod if that's going to break the functionality for anybody using the original code.
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
- sirrobzeroone
- Member
- Posts: 593
- Joined: Mon Jul 16, 2018 07:56
- GitHub: sirrobzeroone
- Contact:
Re: [Mod] Thirsty [thirsty] (WIP)
Good point Nathan...hmm ironically i've tried to keep all the settings the same for the same reason. I could do something like Tenplus1 did for "farming" (farming.mod == "redo") add a new global table value. thirsty.mod == "revive" or "redo" if Tenplus1 wouldnt mind us borrowing his term :).
The only other way I can think of is to see if thirsty.tobool or one of the other new functions exists soemthing like the below. I picked tobool function as very unlikely Im changing/renaming that :).
Code: Select all
local thirsty_ver = "old"
if type(thirsty.tobool) == "function" then
thirsty_ver = "new"
end
I'm happy to add a global table value or not :)
Edit
I just added a global var to hold version number thirsty.version = 0.103
- 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)
I'll have a look at the changes you've implemented, something with improved canteens wasn't it. Checking for a version number is great, and gives the possibility for future changes to keep backwards compat in my code as well.
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
-
- Member
- Posts: 307
- Joined: Wed Apr 21, 2021 03:05
- GitHub: tigercoding56
- In-game: bm5 or bemo5 also sell_her_on55
Re: [Mod] Thirsty [thirsty] (WIP)
pls add to contentdb
this is a signature not a place to post messages also if i could change my username i would change it to sell_her_on55
- kristovish
- Member
- Posts: 39
- Joined: Tue Jul 19, 2022 00:42
- GitHub: kristovish
- In-game: kristovish
Re: [Mod] Thirsty [thirsty] (WIP)
sirrobzeroone wrote: ↑Thu Sep 23, 2021 00:46I feel a bit bad with all the spam but I have a bit of time to work on this and need thirsty for my game so it has my focus at the moment.
Update,
I've removed the rest of the player data from the thirsty global table and stored it in player(meta). This was a bigger/tougher change than the hydro value so maybe a bug or two...I havent found any yet.
I've added the amulets of thirst which decrease the players thirst so you use hydration points slower. I have delibratly not included craft recieps, so these can only be given by admin or found as part of dungeon_loot on base MT-game. The idea being to try and encourage a bit of dungeon exploration, to use you have to hold in your inventory. Just noting it really so people know, for my own game which is more tech based these will be craftable :). Normal Thirst rate is 1 so the below are the initial rates but I may tweak these up by 0.05 yet:
Lesser Amulet of Thirst - 0.85
Amulet of Thirst - 0.70
Greater Amulet of Thirst - 0.55
I did some other cleanup, edited and made the sound file nicer and timed better, adjusted the standing in water drinking so the drinking sound didnt sound like a heart beat, cleaned up the texture folder, Cleaned up readme.MD markdown so its a bit nicer/easier to read.
hello! I have added your mod after testing it locally to my public server and everything was going great until someone discovered that when someone tried to use an empty bottle the server crashed giving the following error:
2022-08-25 07:19:16: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'vessels' in callback item_OnUse(): .../bin/../worlds/world/worldmods/thirsty/functions.lua:166: attempt to index local 'node' (a nil value)
2022-08-25 07:19:16: ERROR[Main]: stack traceback:
2022-08-25 07:19:16: ERROR[Main]: .../bin/../worlds/world/worldmods/thirsty/functions.lua:166: in function <.../bin/../worlds/world/worldmods/thirsty/functions.lua:159>
I don't know if this mod is still active at all but I leave it just in case. I personally don't know how to fix it.
- sirrobzeroone
- Member
- Posts: 593
- Joined: Mon Jul 16, 2018 07:56
- GitHub: sirrobzeroone
- Contact:
Re: [Mod] Thirsty [thirsty] (WIP)
I'll see if I can fix it upkristovish wrote: ↑Thu Aug 25, 2022 07:34I don't know if this mod is still active at all but I leave it just in case. I personally don't know how to fix it.
Edit: Fixed it, null node issue - added a check for node data so bug should be gone now, also crushed a few other bugs and updates needed while I was at it:
https://github.com/sirrobzeroone/thirsty
If any others crop up feel free to quote and I'll have a look :)
- kristovish
- Member
- Posts: 39
- Joined: Tue Jul 19, 2022 00:42
- GitHub: kristovish
- In-game: kristovish
Re: [Mod] Thirsty [thirsty] (WIP)
sirrobzeroone wrote: ↑Thu Aug 25, 2022 10:43I'll see if I can fix it upkristovish wrote: ↑Thu Aug 25, 2022 07:34I don't know if this mod is still active at all but I leave it just in case. I personally don't know how to fix it.
Edit: Fixed it, null node issue - added a check for node data so bug should be gone now, also crushed a few other bugs and updates needed while I was at it:
https://github.com/sirrobzeroone/thirsty
If any others crop up feel free to quote and I'll have a look :)
Thank you so much for your help! everthing is working fine for now! If we found another issue or something I will let you know! have a good day
- kristovish
- Member
- Posts: 39
- Joined: Tue Jul 19, 2022 00:42
- GitHub: kristovish
- In-game: kristovish
Re: [Mod] Thirsty [thirsty] (WIP)
I'm using sirrobzeroone's thristy mod along with your drinks mod on my public server. and both work without problems. when drinking the juices of your mod the characters are hydrated without problems so far
- csirolli
- Member
- Posts: 133
- Joined: Mon Jan 15, 2018 21:46
- GitHub: HeyITGuyFixIt
- IRC: CSirolli
- In-game: CSirolli
- Location: Florida, USA
- Contact:
Re: [Mod] Thirsty [thirsty] (WIP)
Would you mind turning "issues" on in your github?sirrobzeroone wrote: ↑Thu Aug 25, 2022 10:43I'll see if I can fix it upkristovish wrote: ↑Thu Aug 25, 2022 07:34I don't know if this mod is still active at all but I leave it just in case. I personally don't know how to fix it.
Edit: Fixed it, null node issue - added a check for node data so bug should be gone now, also crushed a few other bugs and updates needed while I was at it:
https://github.com/sirrobzeroone/thirsty
If any others crop up feel free to quote and I'll have a look :)
Code: Select all
2023-01-18 20:02:55: ERROR[Main]: ModError: Failed to load and run script from /.minetest/mods/thirsty-master/init.lua:
2023-01-18 20:02:55: ERROR[Main]: /usr/share/minetest/builtin/common/misc_helpers.lua:479: table index is nil
2023-01-18 20:02:55: ERROR[Main]: stack traceback:
2023-01-18 20:02:55: ERROR[Main]: /usr/share/minetest/builtin/common/misc_helpers.lua:479: in function 'copy'
2023-01-18 20:02:55: ERROR[Main]: /.minetest/mods/thirsty-master/interop_a_functions.lua:33: in function 'register_food_drink'
2023-01-18 20:02:55: ERROR[Main]: /.minetest/mods/thirsty-master/interop_ethereal.lua:17: in main chunk
2023-01-18 20:02:55: ERROR[Main]: [C]: in function 'dofile'
2023-01-18 20:02:55: ERROR[Main]: /.minetest/mods/thirsty-master/init.lua:167: in main chunk
2023-01-18 20:02:55: ERROR[Main]: Check debug.txt for details.
2023-01-18 20:02:55: ACTION[Main]: Server: Shutting down
Forgot my old username/email, it's been a number of years please bear with.
Stats: OS: Manjaro Linux; Using minetest-git via AUR
Stats: OS: Manjaro Linux; Using minetest-git via AUR
Re: [Mod] Thirsty [thirsty] (WIP)
So currently looking into it myself.
Line 17 in interop_ethereal.lua references Firethorn Jelly, but if I comment out the line it simply increments the line that it has a problem with.
Ethereal has installed just fine with many of the dependencies. Including farming, but sans intllib and lucky_block.
Thirsty has dungeon_loot, vessels, hunger_ng, hudbars, bucket, farming and of course default. It doesn't have hbhunger or mobs_animal.
The ethereal items appear in game.
I have no clue what the misc_helper table.copy is doing, because someone thought it would be a great idea to use single letter variable names *sigh*.
Line 33 is calling the table copy, minetest.registered_items[item_name]
Something seems slightly wrong here. As if we're missing an "end"). Should lines 51 (if def.type == "node" then") not be indented with an extra end on between the two ends at the end? (Dead end much). or maybe... since the local appears to be just a declaration does that mean there's an extra confusing indent?
Which is what made me question if the ethereal items existed. They do. Checking on the glass. Worth noting is that interop_ethereal calls E.glass_bottle. So I checked init.lua and then followed that to components_external_nodes_items.lua.
E.glass_bottle = "vessels:glass_bottle", I'm also checked the "ethereal:firethorn_jelly" and that's in the game too, though apparently in the ethereal code it's registered as a craftitem, I suspect this doesn't matter.
which means that exists. I'm not sure what the deal is.
Lemme check something... which Ethereal mod is being referenced?
Line 17 in interop_ethereal.lua references Firethorn Jelly, but if I comment out the line it simply increments the line that it has a problem with.
Ethereal has installed just fine with many of the dependencies. Including farming, but sans intllib and lucky_block.
Thirsty has dungeon_loot, vessels, hunger_ng, hudbars, bucket, farming and of course default. It doesn't have hbhunger or mobs_animal.
The ethereal items appear in game.
I have no clue what the misc_helper table.copy is doing, because someone thought it would be a great idea to use single letter variable names *sigh*.
Line 33 is calling the table copy, minetest.registered_items[item_name]
Code: Select all
local def = table.copy(minetest.registered_items[item_name])
def.on_use = function(itemstack,player,pointed_thing)
thirsty.drink(player,hyd_value,hyd_max,rtn_item_name)
if minetest.registered_items[item_name]._hunger_ng then
minetest.sound_play("hunger_ng_eat", {to_player = player:get_player_name(), gain = 2.0 })
hunger_ng.alter_hunger(player:get_player_name(), satiate_value, "from:thirsty-"..item_name)
player:set_hp(player:get_hp()+heal_value)
itemstack:take_item()
return itemstack
else
minetest.do_item_eat(satiate_value,nil, itemstack:take_item(), player, pointed_thing)
return itemstack
end
end
if def.type == "node" then
minetest.register_node(":"..item_name, def)
else
minetest.register_craftitem(":"..item_name, def)
end
end
Which is what made me question if the ethereal items existed. They do. Checking on the glass. Worth noting is that interop_ethereal calls E.glass_bottle. So I checked init.lua and then followed that to components_external_nodes_items.lua.
E.glass_bottle = "vessels:glass_bottle", I'm also checked the "ethereal:firethorn_jelly" and that's in the game too, though apparently in the ethereal code it's registered as a craftitem, I suspect this doesn't matter.
which means that exists. I'm not sure what the deal is.
Lemme check something... which Ethereal mod is being referenced?
Forgot my old username/email, it's been a number of years please bear with.
Stats: OS: Manjaro Linux; Using minetest-git via AUR
Stats: OS: Manjaro Linux; Using minetest-git via AUR
Re: [Mod] Thirsty [thirsty] (WIP)
Pull request submitted.sirrobzeroone wrote: ↑Thu Aug 25, 2022 10:43I'll see if I can fix it upkristovish wrote: ↑Thu Aug 25, 2022 07:34I don't know if this mod is still active at all but I leave it just in case. I personally don't know how to fix it.
Edit: Fixed it, null node issue - added a check for node data so bug should be gone now, also crushed a few other bugs and updates needed while I was at it:
https://github.com/sirrobzeroone/thirsty
If any others crop up feel free to quote and I'll have a look :)
You might also be interested in this one.Nathan.S wrote:
https://github.com/sirrobzeroone/thirsty/pull/1
Forgot my old username/email, it's been a number of years please bear with.
Stats: OS: Manjaro Linux; Using minetest-git via AUR
Stats: OS: Manjaro Linux; Using minetest-git via AUR
- sirrobzeroone
- Member
- Posts: 593
- Joined: Mon Jul 16, 2018 07:56
- GitHub: sirrobzeroone
- Contact:
Re: [Mod] Thirsty [thirsty] (WIP)
Thanks - works been way out of hand over the past few months....Peril wrote: ↑Sat Jan 21, 2023 16:56Pull request submitted.sirrobzeroone wrote: ↑Thu Aug 25, 2022 10:43I'll see if I can fix it upkristovish wrote: ↑Thu Aug 25, 2022 07:34I don't know if this mod is still active at all but I leave it just in case. I personally don't know how to fix it.
Edit: Fixed it, null node issue - added a check for node data so bug should be gone now, also crushed a few other bugs and updates needed while I was at it:
https://github.com/sirrobzeroone/thirsty
If any others crop up feel free to quote and I'll have a look :)
You might also be interested in this one.Nathan.S wrote:
https://github.com/sirrobzeroone/thirsty/pull/1
Re: [Mod] Thirsty [thirsty] (WIP)
I know this mod isn't complete yet and is in development, but I was wondering if I can add it to a modpack I'm making? , with some other mods, because that's the only mod that adds thirst :)
Who is online
Users browsing this forum: No registered users and 26 guests