[Mod] Hunger with HUD bar [1.1.3] [hbhunger]
- Wuzzy
- Member
- Posts: 4786
- Joined: Mon Sep 24, 2012 15:01
- GitHub: Wuzzy2
- IRC: Wuzzy
- In-game: Wuzzy
- Contact:
Re: [Mod] Hunger with HUD bar [1.0.1] [hbhunger]
To be honest, I'm too lazy for this. Sorry.
- FreeGamers
- Member
- Posts: 650
- Joined: Sat May 25, 2019 00:15
- GitHub: is proprietary I use NotABug
- Location: United States
- Contact:
Re: [Mod] Hunger with HUD bar [1.0.1] [hbhunger]
lol, is that all?
I appreciate the honesty at least. :D
I appreciate the honesty at least. :D
FreeGamers.org has moved to MeseCraft.net | FreeGamers on this forum is now MeseCraft
Re: [Mod] Hunger with HUD bar [1.0.1] [hbhunger]
Is there a way to adjust how quickly health regenerates with this?
- Wuzzy
- Member
- Posts: 4786
- Joined: Mon Sep 24, 2012 15:01
- GitHub: Wuzzy2
- IRC: Wuzzy
- In-game: Wuzzy
- Contact:
Re: [Mod] Hunger with HUD bar [1.0.1] [hbhunger]
No.
The mod is fine as-is. It is working, and it is finished. I don't plan to add any features.
There are probably billions of ways you could implement hunger, and this mod is just one of them.
I'm afraid for a new hunger mechanic you need a new mod. But at least the “progress bar” is in a different mod, so if you're a coder, you don't have to start from zero.
The mod is fine as-is. It is working, and it is finished. I don't plan to add any features.
There are probably billions of ways you could implement hunger, and this mod is just one of them.
I'm afraid for a new hunger mechanic you need a new mod. But at least the “progress bar” is in a different mod, so if you're a coder, you don't have to start from zero.
- FreeGamers
- Member
- Posts: 650
- Joined: Sat May 25, 2019 00:15
- GitHub: is proprietary I use NotABug
- Location: United States
- Contact:
Re: [Mod] Hunger with HUD bar [1.0.1] [hbhunger]
Revulent, Why not try to make it add 2 HP points instead of 1, that would x2 the speed of healing wouldnt it?
Look at this section in the source code.
Look at this section in the source code.
Code: Select all
-- heal player by 1 hp if not dead and satiation is > 15 (of 30)
if h > 15 and hp > 0 and player:get_breath() > 0 then
player:set_hp(hp+1)
-- or damage player by 1 hp if satiation is < 2 (of 30)
elseif h <= 1 then
if hp-1 >= 0 then player:set_hp(hp-1) end
end
end
FreeGamers.org has moved to MeseCraft.net | FreeGamers on this forum is now MeseCraft
Re: [Mod] Hunger with HUD bar [1.0.1] [hbhunger]
Alternatively, he's done a great job establishing his constants at the beginning of init.lua.
Just search for "800" (the number of seconds to use 1 satiation point) and tweak the values in the constants in that and adjacent lines and see if you can make it work the way you like.
Since Wuzzy is not updating it, you won't have to put your changes back in very often. Maybe at a major minetest release, at most.
Just search for "800" (the number of seconds to use 1 satiation point) and tweak the values in the constants in that and adjacent lines and see if you can make it work the way you like.
Since Wuzzy is not updating it, you won't have to put your changes back in very often. Maybe at a major minetest release, at most.
Re: [Mod] Hunger with HUD bar [1.0.1] [hbhunger]
fyi the mod as a .bundle is not something that is obvious on how to extract it in linux, the work around is to download (this and HUD bars) using the "content" option in the game (but it would be great if the mod creator used a different format like zip or tar)
Re: [Mod] Hunger with HUD bar [1.0.1] [hbhunger]
Hi Wuzzy,
Would you please add this french translation?
Thanks!
Would you please add this french translation?
Code: Select all
# textdomain:hbhunger
Satiation=Satiété
- Wuzzy
- Member
- Posts: 4786
- Joined: Mon Sep 24, 2012 15:01
- GitHub: Wuzzy2
- IRC: Wuzzy
- In-game: Wuzzy
- Contact:
Version 1.1.0
Version 1.1.0 released!
- Add "/satiation" command to set satiation
- Add Russian locale by lmk
- Play sound at eater again
- Random sound pitch (slightly)
- Add MTG blueberries to food registrations
- Lots of code refactoring
- Wuzzy
- Member
- Posts: 4786
- Joined: Mon Sep 24, 2012 15:01
- GitHub: Wuzzy2
- IRC: Wuzzy
- In-game: Wuzzy
- Contact:
Re: [Mod] Hunger with HUD bar [1.1.1] [hbhunger]
Version 1.1.1 released!
- Added French translation by Duvalon
- Hearty Stew (from the Ethereal mod) no longer poisons you
Re: [Mod] Hunger with HUD bar [1.1.1] [hbhunger]
Hello! :)
Sorry for posting this here, but couldn't find an issue tracker elsewhere. I have crashes when players put edible foods into their node breakers.
I saw that Gabriel already fixed this issue in the past with 4e86216 but that fix got "obsoleted" by 37eaefa since now the object property is used in place of pos while calling minetest.sound_play() .
That property is required to be a valid ObjectRef, while pipeworks provides a fakeplayer in the form of a table instead. Indeed, here's the error I get:
I think it's worth to add a check to make it fallback to the old way, that is using the pos property, or just fail gracefully not playing any sound...
Sorry for posting this here, but couldn't find an issue tracker elsewhere. I have crashes when players put edible foods into their node breakers.
I saw that Gabriel already fixed this issue in the past with 4e86216 but that fix got "obsoleted" by 37eaefa since now the object property is used in place of pos while calling minetest.sound_play() .
That property is required to be a valid ObjectRef, while pipeworks provides a fakeplayer in the form of a table instead. Indeed, here's the error I get:
Spoiler
Code: Select all
2021-08-27 07:17:10: ERROR[Main]: ServerError: AsyncErr: environment_Step: Runtime error from mod 'biome_lib' in callback environment_Step(): ...kj/minetest/bin/../mods/minetest_hbhunger/hunger.lua:82: bad argument #-1 to 'sound_play' (userdata expected, got table)
2021-08-27 07:17:10: ERROR[Main]: stack traceback:
2021-08-27 07:17:10: ERROR[Main]: [C]: in function 'sound_play'
2021-08-27 07:17:10: ERROR[Main]: ...kj/minetest/bin/../mods/minetest_hbhunger/hunger.lua:82: in function <...kj/minetest/bin/../mods/minetest_hbhunger/hunger.lua:74>
2021-08-27 07:17:10: ERROR[Main]: (tail call): ?
2021-08-27 07:17:10: ERROR[Main]: ...kj/minetest/bin/../mods/minetest_hbhunger/hunger.lua:13: in function <...kj/minetest/bin/../mods/minetest_hbhunger/hunger.lua:11>
2021-08-27 07:17:10: ERROR[Main]: (tail call): ?
2021-08-27 07:17:10: ERROR[Main]: ...ome/hlqkj/minetest/bin/../mods/pipeworks/wielder.lua:328: in function 'act'
2021-08-27 07:17:10: ERROR[Main]: ...ome/hlqkj/minetest/bin/../mods/pipeworks/wielder.lua:111: in function 'wielder_on'
2021-08-27 07:17:10: ERROR[Main]: ...ome/hlqkj/minetest/bin/../mods/pipeworks/wielder.lua:147: in function 'action_on'
2021-08-27 07:17:10: ERROR[Main]: .../minetest/bin/../mods/mesecons/mesecons/internal.lua:192: in function '?'
2021-08-27 07:17:10: ERROR[Main]: ...netest/bin/../mods/mesecons/mesecons/actionqueue.lua:137: in function 'execute'
2021-08-27 07:17:10: ERROR[Main]: ...netest/bin/../mods/mesecons/mesecons/actionqueue.lua:111: in function '?'
2021-08-27 07:17:10: ERROR[Main]: ...home/hlqkj/minetest/bin/../builtin/game/register.lua:422: in function <...home/hlqkj/minetest/bin/../builtin/game/register.lua:406>
2021-08-27 07:17:10: ERROR[Main]: stack traceback:
Quando omni flunkus, moritati.
- Wuzzy
- Member
- Posts: 4786
- Joined: Mon Sep 24, 2012 15:01
- GitHub: Wuzzy2
- IRC: Wuzzy
- In-game: Wuzzy
- Contact:
Re: [Mod] Hunger with HUD bar [1.1.1] [hbhunger]
I added a crude check for "fake players". Please check the latest commit of hbhunger and tell me if it works now.
Re: [Mod] Hunger with HUD bar [1.1.1] [hbhunger]
That worked, thank you very much! I hope mod authors will soon have a standardized way to do such things properly.
Quando omni flunkus, moritati.
- Wuzzy
- Member
- Posts: 4786
- Joined: Mon Sep 24, 2012 15:01
- GitHub: Wuzzy2
- IRC: Wuzzy
- In-game: Wuzzy
- Contact:
Version 1.1.2!
Version 1.1.2 released! This fixes the aforementioned problem with fake players. There are no other changes.
Re: [Mod] Hunger with HUD bar [1.1.2] [hbhunger]
I know this is a mod you're not interested in working on anymore, so two things:
1) Mind if I use it in my mod pack (not sure the correct etiquette with including mods in mod packs)
2) How would I change the location of the HUD? I oddly can't find where that is set in the mod (I do see a mention of hbhunger.conf but I am not seeing that anywhere in the mod?)
1) Mind if I use it in my mod pack (not sure the correct etiquette with including mods in mod packs)
2) How would I change the location of the HUD? I oddly can't find where that is set in the mod (I do see a mention of hbhunger.conf but I am not seeing that anywhere in the mod?)
- Wuzzy
- Member
- Posts: 4786
- Joined: Mon Sep 24, 2012 15:01
- GitHub: Wuzzy2
- IRC: Wuzzy
- In-game: Wuzzy
- Contact:
Re: [Mod] Hunger with HUD bar [1.1.2] [hbhunger]
1) Yes, you can. This mod is free software, therefore you already have the permission. As long you keep the license file intact and don't outright plagiarize, you're gonna be fine.
2) You can change the location of the HUD with a setting in the hudbars mod. Read the hudbars mod README.
Also, I moved this mod to Codeberg.org today. https://codeberg.org/Wuzzy/minetest_hbhunger/
2) You can change the location of the HUD with a setting in the hudbars mod. Read the hudbars mod README.
Also, I moved this mod to Codeberg.org today. https://codeberg.org/Wuzzy/minetest_hbhunger/
- Wuzzy
- Member
- Posts: 4786
- Joined: Mon Sep 24, 2012 15:01
- GitHub: Wuzzy2
- IRC: Wuzzy
- In-game: Wuzzy
- Contact:
Version 1.1.3!
Version 1.1.3 released!
This version fixes a problem that the maximum player HP is always assumed to be 20. Now the mod takes the player object propertiy "hp_max" into account instead. This is important for mod development.
This version fixes a problem that the maximum player HP is always assumed to be 20. Now the mod takes the player object propertiy "hp_max" into account instead. This is important for mod development.
Who is online
Users browsing this forum: No registered users and 23 guests