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

User avatar
BrunoMine
Member
 
Posts: 902
Joined: Thu Apr 25, 2013 17:29
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:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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: 902
Joined: Thu Apr 25, 2013 17:29
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.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
hbhunger.register_food(name, hunger_change, replace_with_item, poisen, heal, sound)
 

User avatar
Wuzzy
Member
 
Posts: 2161
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)
I'm creating MineClone 2, a Minecraft clone for Minetest.
I made the Help modpack, adding in-game help to Minetest.
 

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 :

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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: 2161
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!
I'm creating MineClone 2, a Minecraft clone for Minetest.
I made the Help modpack, adding in-game help to Minetest.
 

User avatar
Wuzzy
Member
 
Posts: 2161
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
I'm creating MineClone 2, a Minecraft clone for Minetest.
I made the Help modpack, adding in-game help to Minetest.
 

User avatar
BrunoMine
Member
 
Posts: 902
Joined: Thu Apr 25, 2013 17:29
GitHub: BrunoMine

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

by BrunoMine » Sat Nov 12, 2016 19:42

Very good. Congratulations.
 

User avatar
maikerumine
Member
 
Posts: 946
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:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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: 2161
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.
I'm creating MineClone 2, a Minecraft clone for Minetest.
I made the Help modpack, adding in-game help to Minetest.
 

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

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

by maikerumine » Fri Nov 18, 2016 13:28

Commit:
https://github.com/maikerumine/aftermath/commit/edfce2249392567764b1044b99bd0d5dd56d83f2

I start from scratch.

When I get the error again I will explain here.
 

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: 2161
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.
I'm creating MineClone 2, a Minecraft clone for Minetest.
I made the Help modpack, adding in-game help to Minetest.
 

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:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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: 2161
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.
I'm creating MineClone 2, a Minecraft clone for Minetest.
I made the Help modpack, adding in-game help to Minetest.
 

Previous

Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 12 guests

cron