[Mod] Hunger with HUD bar [1.0.1] [hbhunger]

User avatar
Wuzzy
Member
 
Posts: 3624
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Re: [Mod] Hunger with HUD bar [0.3.2] [hbhunger]

by Wuzzy » Tue Aug 04, 2015 12:47

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.
 

User avatar
Clouds
Member
 
Posts: 102
Joined: Sat Aug 01, 2015 01:58
In-game: Cloud

Re: [Mod] Hunger with HUD bar [0.3.2] [hbhunger]

by Clouds » Wed Aug 05, 2015 03:45

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.
 

User avatar
benrob0329
Member
 
Posts: 1312
Joined: Thu Aug 06, 2015 22:39
Location: Michigan
GitHub: Benrob0329
IRC: benrob0329
In-game: benrob03

Re: [Mod] Hunger with HUD bar [0.3.2] [hbhunger]

by benrob0329 » Fri Feb 26, 2016 04:46

Could you please add support for the crops mod?

viewtopic.php?f=11&t=11795#p175593
Social: YouTube Peertube Matrix Room: #minetest:matrix.org | Games: The Infinite IKEA
 

User avatar
benrob0329
Member
 
Posts: 1312
Joined: Thu Aug 06, 2015 22:39
Location: Michigan
GitHub: Benrob0329
IRC: benrob0329
In-game: benrob03

Re: [Mod] Hunger with HUD bar [0.3.2] [hbhunger]

by benrob0329 » Wed Mar 09, 2016 21:28

Could you make it so that it replaced the eat function like Better Hud/Hinger does?
Social: YouTube Peertube Matrix Room: #minetest:matrix.org | Games: The Infinite IKEA
 

User avatar
Wuzzy
Member
 
Posts: 3624
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Re: [Mod] Hunger with HUD bar [0.3.2] [hbhunger]

by Wuzzy » Fri Aug 05, 2016 13:56

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)

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.

Rejected. Players just have to be a bit more careful not to waste stuff. :P


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.
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH
 

User avatar
BrunoMine
Member
 
Posts: 1048
Joined: Thu Apr 25, 2013 17:29
Location: SP-Brasil
GitHub: BrunoMine

Re: [Mod] Hunger with HUD bar [0.4.0] [hbhunger]

by BrunoMine » Wed Aug 17, 2016 20:12

I realized that does not have a API.md but to report an error.
About the method:
Code: Select all
hbhunger.register_food(name, hunger_change, replace_with_item, poisen, heal, sound)
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).
 

User avatar
BrunoMine
Member
 
Posts: 1048
Joined: Thu Apr 25, 2013 17:29
Location: SP-Brasil
GitHub: BrunoMine

Re: [Mod] Hunger with HUD bar [0.4.1] [hbhunger]

by BrunoMine » Wed Oct 12, 2016 21:22

The custom sound does not work.
Code: Select all
hbhunger.register_food(name, hunger_change, replace_with_item, poisen, heal, sound)
 

User avatar
Wuzzy
Member
 
Posts: 3624
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Version 0.5.0

by Wuzzy » Sat Oct 22, 2016 11:17

Small update: Version 0.5.0 released!

Changelog:
- Portuguese translation by BrunoMine
- Custom sound bug fixed (reported and fixed by BrunoMine)
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH
 

manawy
Member
 
Posts: 10
Joined: Sat May 28, 2016 20:14

Re: [Mod] Hunger with HUD bar [0.5.0] [hbhunger]

by manawy » Sun Oct 23, 2016 14:38

FYI : there is a slight incompatibility between this mod and pipeworks as described here : viewtopic.php?p=237375#p237375
 

manawy
Member
 
Posts: 10
Joined: Sat May 28, 2016 20:14

Re: [Mod] Hunger with HUD bar [0.5.0] [hbhunger]

by manawy » Sun Oct 23, 2016 15:49

Nore already gave the solution : viewtopic.php?p=237397#p237397

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


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.
 

User avatar
Wuzzy
Member
 
Posts: 3624
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Re: [Mod] Hunger with HUD bar [0.5.1] [hbhunger]

by Wuzzy » Sat Oct 29, 2016 18:48

Version 0.5.1 released!

It fixes the compability problem with pipeworks. Thanks, manawy, for reporting!
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH
 

User avatar
Wuzzy
Member
 
Posts: 3624
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Bugfix release 0.5.2

by Wuzzy » Sat Nov 12, 2016 19:23

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
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH
 

User avatar
BrunoMine
Member
 
Posts: 1048
Joined: Thu Apr 25, 2013 17:29
Location: SP-Brasil
GitHub: BrunoMine
 

User avatar
maikerumine
Member
 
Posts: 1350
Joined: Mon Aug 04, 2014 14:27
GitHub: maikerumine
In-game: maikerumine

Re: [Mod] Hunger with HUD bar [0.5.2] [hbhunger]

by maikerumine » Wed Nov 16, 2016 14:15

I'm moving this here so it applies and discussion can be here as well.

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.

Thanks for the bug , I'll fix asap.

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>



Thirsty error:
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>



Don't forget itemwheel:
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>



Sigh... I don't know what to do. :/
 

User avatar
Wuzzy
Member
 
Posts: 3624
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Re: [Mod] Hunger with HUD bar [0.5.2] [hbhunger]

by Wuzzy » Thu Nov 17, 2016 17:31

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.
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH
 

User avatar
maikerumine
Member
 
Posts: 1350
Joined: Mon Aug 04, 2014 14:27
GitHub: maikerumine
In-game: maikerumine
 

Griiimon
Member
 
Posts: 11
Joined: Sun Jan 08, 2017 13:20
IRC: TelepathicVampire
In-game: Griiimon

Re: [Mod] Hunger with HUD bar [0.5.2] [hbhunger]

by Griiimon » Fri Jan 20, 2017 15:08

As far as i can see, the self-healing process doesn't lower satiation?
 

User avatar
Wuzzy
Member
 
Posts: 3624
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Re: [Mod] Hunger with HUD bar [0.5.2] [hbhunger]

by Wuzzy » Fri Jan 20, 2017 18:45

No, the self-healing process doesn't lower satiation.
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH
 

Griiimon
Member
 
Posts: 11
Joined: Sun Jan 08, 2017 13:20
IRC: TelepathicVampire
In-game: Griiimon

Re: [Mod] Hunger with HUD bar [0.5.2] [hbhunger]

by Griiimon » Sun Jan 22, 2017 12:37

by Wuzzy » Fri Jan 20, 2017 19:45
No, the self-healing process doesn't lower satiation.

While testing my mod it occured to me, that this should probably a feature.

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)


Ouput is only "Eaten". Does your mod interfere or am i using wrong?
 

User avatar
Wuzzy
Member
 
Posts: 3624
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Re: [Mod] Hunger with HUD bar [0.5.2] [hbhunger]

by Wuzzy » Sun Jan 22, 2017 15:20

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.
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH
 

User avatar
BrunoMine
Member
 
Posts: 1048
Joined: Thu Apr 25, 2013 17:29
Location: SP-Brasil
GitHub: BrunoMine

Re: [Mod] Hunger with HUD bar [0.5.2] [hbhunger]

by BrunoMine » Mon May 01, 2017 01:12

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.
 

User avatar
texmex
Member
 
Posts: 1588
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex
 

User avatar
Wuzzy
Member
 
Posts: 3624
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Version 0.5.3

by Wuzzy » Wed Jul 12, 2017 21:28

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
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH
 

User avatar
Lone_Wolf
Member
 
Posts: 2191
Joined: Sun Apr 09, 2017 05:50
Location: Hopefully very far from yours, snoop :P
GitHub: LoneWolfHT
IRC: Lone_Wolf
In-game: Lone_Wolf
 

User avatar
Hamlet
Member
 
Posts: 612
Joined: Sat Jul 29, 2017 21:09
Location: Lombardy, Italy
GitHub: h4ml3t
IRC: H4mlet
 

PreviousNext

Return to Mod Releases



Who is online

Users browsing this forum: No registered users and 4 guests