[Mod] Hunger with HUD bar [1.1.4] [hbhunger]
- Wuzzy
- Member
- Posts: 4803
- Joined: Mon Sep 24, 2012 15:01
- GitHub: Wuzzy2
- IRC: Wuzzy
- In-game: Wuzzy
- Contact:
Re: [Mod] Hunger with HUD bar [0.3.2] [hbhunger]
Sorry, I don't get much smarter by reading your commit list on your modified hbhunger mods.
Most commits just seem to tweak some server-related values. Most of the other commits which actually fix bugs are already included.
I don't understand this commit:
“Prevent hbhunger from searching exhaustion value of random items”—Why? / What was the bug?
If you have found a particular bug not in 0.3.2, please report it here so I can fix it. Patches are welcome, of course.
Most commits just seem to tweak some server-related values. Most of the other commits which actually fix bugs are already included.
I don't understand this commit:
“Prevent hbhunger from searching exhaustion value of random items”—Why? / What was the bug?
If you have found a particular bug not in 0.3.2, please report it here so I can fix it. Patches are welcome, of course.
Re: [Mod] Hunger with HUD bar [0.3.2] [hbhunger]
I suggest making it so if hunger is full then no longer able to eat other wise people can waste food by eating and getting nothing from it.
- benrob0329
- Member
- Posts: 1341
- Joined: Thu Aug 06, 2015 22:39
- GitHub: Benrob0329
- IRC: benrob0329
- In-game: benrob03
- Location: Michigan
- Contact:
- benrob0329
- Member
- Posts: 1341
- Joined: Thu Aug 06, 2015 22:39
- GitHub: Benrob0329
- IRC: benrob0329
- In-game: benrob03
- Location: Michigan
- Contact:
Re: [Mod] Hunger with HUD bar [0.3.2] [hbhunger]
Could you make it so that it replaced the eat function like Better Hud/Hinger does?
- Wuzzy
- Member
- Posts: 4803
- Joined: Mon Sep 24, 2012 15:01
- GitHub: Wuzzy2
- IRC: Wuzzy
- In-game: Wuzzy
- Contact:
Re: [Mod] Hunger with HUD bar [0.3.2] [hbhunger]
Version 0.4.0 released!
It was about time for this update, the mod was very outdated and it was missing support for a lot of foods.
This mod supports now overwrites the eat function like in the hunger mod, as suggested by benrob0329. This also means the crops mod is automatically supported.
Full changelog:
- Generic eating functionality, items using the minetest.item_eat are now automatically supported
- Change health bar and icon when poisoned
- Special support for red and brown mushroom from Minetest Game [flowers]
- Special support for [pizza]
- Special support for beans from Farming Redo [farming]
- Fix crash when poisoned player leaves server (Bug from original hunger mod, read more here)
- Changed license to LGPL v2.1 (because I pulled in newer code from BlockMen's hunger mod)
PS: If you find any food in any mod which, for some reason, does NOT work or does not work as it should (e.g. no satiation bonus, or no poisoning where poisoning is to be expected, etc.), please report it in this thread.
It was about time for this update, the mod was very outdated and it was missing support for a lot of foods.
This mod supports now overwrites the eat function like in the hunger mod, as suggested by benrob0329. This also means the crops mod is automatically supported.
Full changelog:
- Generic eating functionality, items using the minetest.item_eat are now automatically supported
- Change health bar and icon when poisoned
- Special support for red and brown mushroom from Minetest Game [flowers]
- Special support for [pizza]
- Special support for beans from Farming Redo [farming]
- Fix crash when poisoned player leaves server (Bug from original hunger mod, read more here)
- Changed license to LGPL v2.1 (because I pulled in newer code from BlockMen's hunger mod)
Rejected. Players just have to be a bit more careful not to waste stuff. :PI suggest making it so if hunger is full then no longer able to eat other wise people can waste food by eating and getting nothing from it.
PS: If you find any food in any mod which, for some reason, does NOT work or does not work as it should (e.g. no satiation bonus, or no poisoning where poisoning is to be expected, etc.), please report it in this thread.
- BrunoMine
- Member
- Posts: 1082
- Joined: Thu Apr 25, 2013 17:29
- GitHub: BrunoMine
- Location: SP-Brasil
- Contact:
Re: [Mod] Hunger with HUD bar [0.4.0] [hbhunger]
I realized that does not have a API.md but to report an error.
About the method:Apparently the specified sound is not being played. Instead, a generic sound is played. I will continue using this method, but waiting for the error correction to function properly in the future.
Taking advantage of the opportunity.
Congratulations for the good work. I'm upgrading my server, replacing hud_hunger by hbhunger. I will help you in what i can (feedback, bugtester, commits).
About the method:
Code: Select all
hbhunger.register_food(name, hunger_change, replace_with_item, poisen, heal, sound)
Taking advantage of the opportunity.
Congratulations for the good work. I'm upgrading my server, replacing hud_hunger by hbhunger. I will help you in what i can (feedback, bugtester, commits).
- BrunoMine
- Member
- Posts: 1082
- Joined: Thu Apr 25, 2013 17:29
- GitHub: BrunoMine
- Location: SP-Brasil
- Contact:
Re: [Mod] Hunger with HUD bar [0.4.1] [hbhunger]
The custom sound does not work.
Code: Select all
hbhunger.register_food(name, hunger_change, replace_with_item, poisen, heal, sound)
- Wuzzy
- Member
- Posts: 4803
- Joined: Mon Sep 24, 2012 15:01
- GitHub: Wuzzy2
- IRC: Wuzzy
- In-game: Wuzzy
- Contact:
Version 0.5.0
Small update: Version 0.5.0 released!
Changelog:
- Portuguese translation by BrunoMine
- Custom sound bug fixed (reported and fixed by BrunoMine)
Changelog:
- Portuguese translation by BrunoMine
- Custom sound bug fixed (reported and fixed by BrunoMine)
Re: [Mod] Hunger with HUD bar [0.5.0] [hbhunger]
FYI : there is a slight incompatibility between this mod and pipeworks as described here : viewtopic.php?p=237375#p237375
Re: [Mod] Hunger with HUD bar [0.5.0] [hbhunger]
Nore already gave the solution : viewtopic.php?p=237397#p237397
If we correct the exshaution function by :
I don't know lua well enough to be sure that this correction is 100% correct and will not cause problem, so be careful, but it seems to work for me.
If we correct the exshaution function by :
Code: Select all
function hbhunger.handle_node_actions(pos, oldnode, player, ext)
if not player or not player:is_player() or player.is_fake_player == true then
return
end
local name = player:get_player_name()
-- the same
- Wuzzy
- Member
- Posts: 4803
- Joined: Mon Sep 24, 2012 15:01
- GitHub: Wuzzy2
- IRC: Wuzzy
- In-game: Wuzzy
- Contact:
Re: [Mod] Hunger with HUD bar [0.5.1] [hbhunger]
Version 0.5.1 released!
It fixes the compability problem with pipeworks. Thanks, manawy, for reporting!
It fixes the compability problem with pipeworks. Thanks, manawy, for reporting!
- Wuzzy
- Member
- Posts: 4803
- Joined: Mon Sep 24, 2012 15:01
- GitHub: Wuzzy2
- IRC: Wuzzy
- In-game: Wuzzy
- Contact:
Bugfix release 0.5.2
Version 0.5.2 released! Changes:
- Fix mod not working when both intllib and mod security are enabled
- Add missing screenshot
- Rewrite README and use Markdown format
- Fix mod not working when both intllib and mod security are enabled
- Add missing screenshot
- Rewrite README and use Markdown format
- BrunoMine
- Member
- Posts: 1082
- Joined: Thu Apr 25, 2013 17:29
- GitHub: BrunoMine
- Location: SP-Brasil
- Contact:
Re: [Mod] Hunger with HUD bar [0.5.2] [hbhunger]
Very good. Congratulations.
- maikerumine
- Member
- Posts: 1420
- Joined: Mon Aug 04, 2014 14:27
- GitHub: maikerumine
- In-game: maikerumine
Re: [Mod] Hunger with HUD bar [0.5.2] [hbhunger]
I'm moving this here so it applies and discussion can be here as well.
Here are the debugs for the hud:
Thirsty error:
hud_hunger as well:
And sprinting:
Don't forget itemwheel:
Sigh... I don't know what to do. :/
Thanks for the bug , I'll fix asap.Wuzzy wrote:Can you give me the relevant error message? Just copy the relevant stuff from debug.txt, please. It bugs me that my mod apparently has a bug. XD
PS: Placing a toxic water bucket crashes the game.
Here are the debugs for the hud:
Code: Select all
2016-11-13 01:02:36: ERROR[Main]: ServerError: Runtime error from mod 'hudbars' in callback environment_Step(): D:\FALLOUT\bin\..\games\aftermath\mods\hudbars\init.lua:406: attempt to index a nil value
2016-11-13 01:02:36: ERROR[Main]: stack traceback:
2016-11-13 01:02:36: ERROR[Main]: D:\FALLOUT\bin\..\games\aftermath\mods\hudbars\init.lua:406: in function 'unhide_hudbar'
2016-11-13 01:02:36: ERROR[Main]: D:\FALLOUT\bin\..\games\aftermath\mods\hudbars\init.lua:473: in function 'update_hud'
2016-11-13 01:02:36: ERROR[Main]: D:\FALLOUT\bin\..\games\aftermath\mods\hudbars\init.lua:514: in function <D:\FALLOUT\bin\..\games\aftermath\mods\hudbars\init.lua:505>
2016-11-13 01:02:36: ERROR[Main]: D:\FALLOUT\bin\..\builtin\game\register.lua:407: in function <D:\FALLOUT\bin\..\builtin\game\register.lua:387>
Code: Select all
2016-11-13 02:05:56: 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 02:05:56: ERROR[Main]: stack traceback:
2016-11-13 02:05:56: ERROR[Main]: ...\aftermath\mods\thirsty/persistent_player_attributes.lua:109: in function 'set_value'
2016-11-13 02:05:56: 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 02:05:56: ERROR[Main]: D:\FALLOUT\bin\..\builtin\game\register.lua:407: in function <D:\FALLOUT\bin\..\builtin\game\register.lua:387>
hud_hunger as well:
Code: Select all
2016-11-15 10:38:46: ERROR[Main]: ServerError: Runtime error from mod 'hunger' in callback environment_Step(): ...\..\games\aftermath\mods\hud_hunger\hunger/functions.lua:271: attempt to index local 'player' (a nil value)
2016-11-15 10:38:46: ERROR[Main]: stack traceback:
2016-11-15 10:38:46: ERROR[Main]: ...\..\games\aftermath\mods\hud_hunger\hunger/functions.lua:271: in function 'setSprinting'
2016-11-15 10:38:46: ERROR[Main]: ...\..\games\aftermath\mods\hud_hunger\hunger/functions.lua:233: in function <...\..\games\aftermath\mods\hud_hunger\hunger/functions.lua:121>
2016-11-15 10:38:46: ERROR[Main]: D:\FALLOUT\bin\..\builtin\game\register.lua:407: in function <D:\FALLOUT\bin\..\builtin\game\register.lua:387>
And sprinting:
Code: Select all
2016-11-15 12:52:43: ERROR[Main]: ServerError: Runtime error from mod 'hunger' in callback environment_Step(): ...\..\games\aftermath\mods\hud_hunger\hunger/functions.lua:271: attempt to index local 'player' (a nil value)
2016-11-15 12:52:43: ERROR[Main]: stack traceback:
2016-11-15 12:52:43: ERROR[Main]: ...\..\games\aftermath\mods\hud_hunger\hunger/functions.lua:271: in function 'setSprinting'
2016-11-15 12:52:43: ERROR[Main]: ...\..\games\aftermath\mods\hud_hunger\hunger/functions.lua:233: in function <...\..\games\aftermath\mods\hud_hunger\hunger/functions.lua:121>
2016-11-15 12:52:43: ERROR[Main]: D:\FALLOUT\bin\..\builtin\game\register.lua:407: in function <D:\FALLOUT\bin\..\builtin\game\register.lua:387>
Code: Select all
2016-11-15 19:34:36: ERROR[Main]: ServerError: Lua: Runtime error from mod 'default' in callback luaentity_Step(): ...bin\..\games\aftermath\mods\hud_hunger\hud/itemwheel.lua:172: attempt to index local 'player' (a nil value)
2016-11-15 19:34:36: ERROR[Main]: stack traceback:
2016-11-15 19:34:36: ERROR[Main]: ...bin\..\games\aftermath\mods\hud_hunger\hud/itemwheel.lua:172: in function 'callback'
2016-11-15 19:34:36: ERROR[Main]: D:\FALLOUT\bin\..\builtin\game\falling.lua:92: in function <D:\FALLOUT\bin\..\builtin\game\falling.lua:43>
Talamh Survival Minetest-->viewtopic.php?f=10&t=12959
- Wuzzy
- Member
- Posts: 4803
- Joined: Mon Sep 24, 2012 15:01
- GitHub: Wuzzy2
- IRC: Wuzzy
- In-game: Wuzzy
- Contact:
Re: [Mod] Hunger with HUD bar [0.5.2] [hbhunger]
Hmm, only the first debug output actually mentions HUD Bars directly, and without context, I can't really find your post useful.
Especially I need to know when the crash occours.
Can you also please give me the commit ID of your aftermath game where these crashes occour (and under which conditions), so that I can try to debug this one, too?
I am not sure if the bug is really HUD Bars' fault or lies somewhere else.
Especially I need to know when the crash occours.
Can you also please give me the commit ID of your aftermath game where these crashes occour (and under which conditions), so that I can try to debug this one, too?
I am not sure if the bug is really HUD Bars' fault or lies somewhere else.
- maikerumine
- Member
- Posts: 1420
- Joined: Mon Aug 04, 2014 14:27
- GitHub: maikerumine
- In-game: maikerumine
Re: [Mod] Hunger with HUD bar [0.5.2] [hbhunger]
Commit:
https://github.com/maikerumine/aftermat ... 5dd56d83f2
I start from scratch.
When I get the error again I will explain here.
https://github.com/maikerumine/aftermat ... 5dd56d83f2
I start from scratch.
When I get the error again I will explain here.
Talamh Survival Minetest-->viewtopic.php?f=10&t=12959
Re: [Mod] Hunger with HUD bar [0.5.2] [hbhunger]
As far as i can see, the self-healing process doesn't lower satiation?
- Wuzzy
- Member
- Posts: 4803
- Joined: Mon Sep 24, 2012 15:01
- GitHub: Wuzzy2
- IRC: Wuzzy
- In-game: Wuzzy
- Contact:
Re: [Mod] Hunger with HUD bar [0.5.2] [hbhunger]
No, the self-healing process doesn't lower satiation.
Re: [Mod] Hunger with HUD bar [0.5.2] [hbhunger]
While testing my mod it occured to me, that this should probably a feature.by Wuzzy » Fri Jan 20, 2017 19:45
No, the self-healing process doesn't lower satiation.
I'm penalising the player by dealing a small amount of damage at a low frequency and as long as his satiation is high enough and he is not moving or working he is able to regenerate infinetly. It just doesn't feel right. From a game mechanic viewpoint there should be some kind of cost for self-regenerating.
And in real life, your metabolism would also need extra energy.
I just wanted to let you know because i thought you might not have considered this yet, and it is easy to include into your architecture.
Also i'm having trouble with this code:
Code: Select all
minetest.register_on_item_eat(function(hp_change, replace_with_item, itemstack, user, pointed_thing)
local name= user:get_player_name()
local item= itemstack:get_name()
minetest.chat_send_player(name, "Eaten "..item)
end)
- Wuzzy
- Member
- Posts: 4803
- Joined: Mon Sep 24, 2012 15:01
- GitHub: Wuzzy2
- IRC: Wuzzy
- In-game: Wuzzy
- Contact:
Re: [Mod] Hunger with HUD bar [0.5.2] [hbhunger]
I don't know; I can't help you. Better ask in IRC or post in Modding Discussion, along with more details.
I agree that the suggested game mechanic is a good idea.
I agree that the suggested game mechanic is a good idea.
- BrunoMine
- Member
- Posts: 1082
- Joined: Thu Apr 25, 2013 17:29
- GitHub: BrunoMine
- Location: SP-Brasil
- Contact:
Re: [Mod] Hunger with HUD bar [0.5.2] [hbhunger]
There is a problem with `replace_with_item` of food items. If the inventory is full, the item disappears.
I suggest you create a drop of the remaining item.
I suggest you create a drop of the remaining item.
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: [Mod] Hunger with HUD bar [0.5.2] [hbhunger]
New sprint mod supporting hbhunger: hbsprint.
- Wuzzy
- Member
- Posts: 4803
- Joined: Mon Sep 24, 2012 15:01
- GitHub: Wuzzy2
- IRC: Wuzzy
- In-game: Wuzzy
- Contact:
Version 0.5.3
Version 0.5.3 released!
Changes:
- Minimum required Minetest version: 0.4.16
- Fix item being destroyed if it uses replace_with_item and the inventory was full. Instead, the new item drops on the ground
- Remove deprecated Minetest settings syntax
Changes:
- Minimum required Minetest version: 0.4.16
- Fix item being destroyed if it uses replace_with_item and the inventory was full. Instead, the new item drops on the ground
- Remove deprecated Minetest settings syntax
- Lone_Wolf
- Member
- Posts: 2578
- Joined: Sun Apr 09, 2017 05:50
- GitHub: LoneWolfHT
- IRC: LandarVargan
- In-game: LandarVargan
Re: [Mod] Hunger with HUD bar [0.5.3] [hbhunger]
Any way to fix this?
- Hamlet
- Member
- Posts: 766
- Joined: Sat Jul 29, 2017 21:09
- IRC: H4mlet
- In-game: Hamlet
- Location: Lombardy, Italy
Re: [Mod] Hunger with HUD bar [0.5.3] [hbhunger]
Italian locale:
Code: Select all
Satiation = Sazietà
My repositories: Codeberg.org | My ContentDB's page
Who is online
Users browsing this forum: No registered users and 71 guests