[Modpack] "Better HUD" and "hunger" [2.x.1] [hud][hunger]
-
- Member
- Posts: 55
- Joined: Fri Mar 06, 2015 00:50
- GitHub: poet-nohit
Re: [Modpack] Better HUD (and hunger) [2.0.1] [hud][hunger]
One more bug fix. Funny, but it was actually working better when it assumed show_hunger was a global.
https://github.com/poet-nohit/minetest- ... 0bad173762
https://github.com/poet-nohit/minetest- ... 0bad173762
-
- Member
- Posts: 940
- Joined: Tue Aug 05, 2014 14:09
- GitHub: MinetestForFun
- IRC: MinetestForFun
- In-game: MinetestForFun
- Location: On earth
- Contact:
Re: [Modpack] Better HUD (and hunger) [2.0.1] [hud][hunger]
Hi BlockMen,
We worked on the upgrade of hud mod 1.4 to 2.0, and we found this : https://github.com/minetest/minetest/issues/2615
Maybe it will interest you
We worked on the upgrade of hud mod 1.4 to 2.0, and we found this : https://github.com/minetest/minetest/issues/2615
Maybe it will interest you
MinetestForFun Team mods : [spidermob] [fishing]
---
Our Minetest servers :
MinetestForFun (Survival - PvP - Hardcore)[FR/EN]
MinetestForFun HUNGER GAMES
MinetestForFun SKYBLOCK
MinetestForFun CREATIVE
---
Our Minetest servers :
MinetestForFun (Survival - PvP - Hardcore)[FR/EN]
MinetestForFun HUNGER GAMES
MinetestForFun SKYBLOCK
MinetestForFun CREATIVE
Re: [Modpack] Better HUD (and hunger) [2.1] [hud][hunger]
Update Version 2.1
New: ItemWheel
Inspired by Voxelands new hotbar, I added the ItemWheel as experimental hotbar replacement.
It might cause lags on servers or at least slow them down the more users online, so I can only recommend using it on singleplayer. But if someone would test it on a server and post the results would be nice aswell :)
To use the ItemWheel add "hud_item_wheel = true" to minetest.conf.
Known issues:
Currently there is no stack counting or wearout level displayed (fxed in 2.1.1)
Changelog:
- Added "ItemWheel" (experimental)
- Fixed disapperaring hunger bar (reported by poet-nohit)
---
@Minetestforfun
Well, i guess if there is no easy/fast fix for that i should switch back to override the items on_use, since this bug breaks (sometimes) the whole system :\
New: ItemWheel
Inspired by Voxelands new hotbar, I added the ItemWheel as experimental hotbar replacement.
It might cause lags on servers or at least slow them down the more users online, so I can only recommend using it on singleplayer. But if someone would test it on a server and post the results would be nice aswell :)
To use the ItemWheel add "hud_item_wheel = true" to minetest.conf.
Known issues:
Currently there is no stack counting or wearout level displayed (fxed in 2.1.1)
Changelog:
- Added "ItemWheel" (experimental)
- Fixed disapperaring hunger bar (reported by poet-nohit)
---
@Minetestforfun
Well, i guess if there is no easy/fast fix for that i should switch back to override the items on_use, since this bug breaks (sometimes) the whole system :\
Last edited by BlockMen on Mon Apr 13, 2015 10:28, edited 1 time in total.
-
- Member
- Posts: 647
- Joined: Thu Feb 21, 2013 23:54
Re: [Modpack] Better HUD (and hunger) [2.1] [hud][hunger]
Trying to change this could also create a sort of war of escalation over which event handlers take precedence, can override each other, etc. However, with that caveat, here's an implementation of the Decorator pattern (mostly):BlockMen wrote:Well, i guess if there is no easy/fast fix for that i should switch back to override the items on_use, since this bug breaks (sometimes) the whole system :\
Code: Select all
--- Do whatever it is I want to do when eating food, after calling all other
-- on_item_eat() handlers.
--
-- @param otherReturn
-- The value returned by the other (normal) on_item_eat() handlers. Can be
-- taken into account and/or changed in my function.
--
local function myEater(hp_change, replace_with_item, itemstack, user, pointed_thing, otherReturn)
-- Whatever
end;
local oldEaters = minetest.registered_on_item_eats;
local function runOldEaters(...)
for _, e in ipairs(oldEaters) do
local val = e(...);
if val then
return val;
end;
end;
return nil;
end;
local function alwaysEat(...)
return myEater(..., runOldEaters(...));
end;
minetest.registered_on_item_eats = { alwaysEat };
Code: Select all
minetest.register_on_item_eat = function(handler) table.insert(oldEaters, handler); end;
Re: [Modpack] Better HUD (and hunger) [2.1.1] [hud][hunger]
Update Version 2.1.1
Changelog:
- Added itemcounting/wearout info
- Added support for hud scaling
- Fixed typo causing endless updating
- Fixed image scaling of some textures (like glass)
- Improved ItemWheel image
Screenshot:
----
@prestidigitator
thx, this is indeed worth testing before switching back ;)
Changelog:
- Added itemcounting/wearout info
- Added support for hud scaling
- Fixed typo causing endless updating
- Fixed image scaling of some textures (like glass)
- Improved ItemWheel image
Screenshot:
----
@prestidigitator
thx, this is indeed worth testing before switching back ;)
- Krock
- Developer
- Posts: 4650
- Joined: Thu Oct 03, 2013 07:48
- GitHub: SmallJoker
- Location: Switzerland
- Contact:
Re: [Modpack] Better HUD (and hunger) [2.1.1] [hud][hunger]
A 'yay!' for that new HUD, thank you!
Sadly, there's no way to see the other items in the hotbar.
EDIT: After setting "hud_item_wheel = true":
EDIT2: This was caused by a table value, default:torch.
Sadly, there's no way to see the other items in the hotbar.
EDIT: After setting "hud_item_wheel = true":
Code: Select all
ERROR[main]: ServerError: E:\Programme\minetest\bin\..\builtin\game\item.lua:20: attempt to call method 'gsub' (a nil value)
ERROR[main]: stack traceback:
ERROR[main]: E:\Programme\minetest\bin\..\builtin\game\item.lua:20: in function 'inventorycube'
ERROR[main]: E:\Programme\minetest\bin\..\mods\hud/itemwheel.lua:59: in function 'update_wheel'
ERROR[main]: E:\Programme\minetest\bin\..\mods\hud/itemwheel.lua:189: in function <E:\Programme\minetest\bin\..\mods\hud/itemwheel.lua:184>
ERROR[main]: E:\Programme\minetest\bin\..\builtin\game\register.lua:341: in function <E:\Programme\minetest\bin\..\builtin\game\register.lua:329>
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
Re: [Modpack] Better HUD (and hunger) [2.1.1] [hud][hunger]
EDIT: It's somewhat intentional for the "wheel" that you do not see every item. Else the "loop"/toogle-through would be kinda boring IMO; it would be just a "round" hotbar.Krock wrote:A 'yay!' for that new HUD, thank you!
Sadly, there's no way to see the other items in the hotbar.
-snip-
---
Update Version 2.1.2
Changelog:
- Fixed crash caused by animated nodes (reported by Krock)
- Fixed "freezing" of empty slots (reported by kilbith)
Also, kilbith brought to my attention that meshnodes are not displayed correct. Same goes for nodeboxes, such as stairs and slabs. Currently there is no way to draw those via Lua, so they are displayed as block currently :\
- Evergreen
- Member
- Posts: 2135
- Joined: Sun Jan 06, 2013 01:22
- GitHub: 4Evergreen4
- IRC: EvergreenTree
- In-game: Evergreen
- Location: A forest in the midwest
- Contact:
Re: [Modpack] Better HUD (and hunger) [2.1.2] [hud][hunger]
This is awesome! The only problem I encountered is the fact that it doesn't update when you add an item to the hotbar, but it does update when you change items.
Back from the dead!
- philipbenr
- Member
- Posts: 1897
- Joined: Fri Jun 14, 2013 01:56
- GitHub: philipbenr
- IRC: philipbenr
- In-game: robinspi
- Location: United States
Re: [Modpack] Better HUD (and hunger) [2.1.2] [hud][hunger]
That one looks awesome and probably would look good on Android version of Minetest for scrolling around...
-
- Member
- Posts: 940
- Joined: Tue Aug 05, 2014 14:09
- GitHub: MinetestForFun
- IRC: MinetestForFun
- In-game: MinetestForFun
- Location: On earth
- Contact:
Re: [Modpack] Better HUD (and hunger) [2.1.2] [hud][hunger]
i has tested the "Update Version 2.1.1" on my serveur "0.4.12-stable"
So i met a big issue, after a time between 30min and 2 hours, the hud met a BIG crashs, the server still online but we have no more hunger bar, and foods don't do sounds anymore...
With "verbose = 2" i see nothing in my logs for explain that issue
(PS : So we have been forced to revert the 1.4 -> 2.1.x update of your mod...)
So i met a big issue, after a time between 30min and 2 hours, the hud met a BIG crashs, the server still online but we have no more hunger bar, and foods don't do sounds anymore...
With "verbose = 2" i see nothing in my logs for explain that issue
(PS : So we have been forced to revert the 1.4 -> 2.1.x update of your mod...)
Last edited by Minetestforfun on Fri Apr 17, 2015 23:44, edited 3 times in total.
MinetestForFun Team mods : [spidermob] [fishing]
---
Our Minetest servers :
MinetestForFun (Survival - PvP - Hardcore)[FR/EN]
MinetestForFun HUNGER GAMES
MinetestForFun SKYBLOCK
MinetestForFun CREATIVE
---
Our Minetest servers :
MinetestForFun (Survival - PvP - Hardcore)[FR/EN]
MinetestForFun HUNGER GAMES
MinetestForFun SKYBLOCK
MinetestForFun CREATIVE
-
- Member
- Posts: 21
- Joined: Wed Apr 08, 2015 12:58
Re: [Modpack] Better HUD (and hunger) [2.1.2] [hud][hunger]
Eating cooked slice of blueberry pie sates 1/2 a hunger and brown mushroom essence sates 1 hunger, is there a functional reason for cooking vs eating an apple then?
Re: [Modpack] Better HUD (and hunger) [2.1.2] [hud][hunger]
Hi, I'm writing a mod which adds a new stat bar. I'm having a bit of trouble with the positioning: do I read it right that all bars are absolutely positioned, and that whoever installs all these mods together sorts out the positioning?
If so, what's the preferred way to let the mod user select the position? The hud.conf file contains a set of globals; would I define some new variables for my mod's stat bar in there?
If so, what's the preferred way to let the mod user select the position? The hud.conf file contains a set of globals; would I define some new variables for my mod's stat bar in there?
Re: [Modpack] Better HUD (and hunger) [2.1.2] [hud][hunger]
Could you add the following food item under the farming redo section of your hunger mod:
Code: Select all
overwrite("farming:beans", 1)
Re: [Modpack] Better HUD (and hunger) [2.1.2] [hud][hunger]
I'm seeing an intermittent crash when using Pipeworks to make an automatic tree-harvester. The harvester consists of a stack of five node-breakers and a deployer that are activated by a Mesecons sensor. I believe the crash is being caused by one of the node-breakers (which one varies from time to time).
After the crash, the first attempt to enter the game crashes with the following traceback:
Code: Select all
21:26:02: ERROR[main]: ServerError: ~/.minetest/mods/hud_hunger/hud/api.lua:91: attempt to call method 'hud_change' (a nil value)
21:26:02: ERROR[main]: stack traceback:
21:26:02: ERROR[main]: ~/.minetest/mods/hud_hunger/hud/api.lua:93: in function 'change_item'
21:26:02: ERROR[main]: ~/.minetest/mods/hud_hunger/hunger/functions.lua:57: in function 'update_hunger'
21:26:02: ERROR[main]: ~/.minetest/mods/hud_hunger/hunger/functions.lua:95: in function 'callback'
21:26:02: ERROR[main]: /usr/share/games/minetest/builtin/game/item.lua:467: in function </usr/share/games/minetest/builtin/game/item.lua:405>
21:26:02: ERROR[main]: (tail call): ?
21:26:02: ERROR[main]: /home/mark/.minetest/mods/pipeworks/wielder.lua:325: in function 'act'
21:26:02: ERROR[main]: ~/.minetest/mods/pipeworks/wielder.lua:109: in function 'wielder_on'
21:26:02: ERROR[main]: ~/.minetest/mods/pipeworks/wielder.lua:145: in function 'action_on'
21:26:02: ERROR[main]: ~/.minetest/mods/mesecons/mesecons/internal.lua:189: in function '?'
21:26:02: ERROR[main]: ~/.minetest/mods/mesecons/mesecons/actionqueue.lua:90: in function 'execute'
21:26:02: ERROR[main]: ~/.minetest/mods/mesecons/mesecons/actionqueue.lua:84: in function '?'
21:26:02: ERROR[main]: /usr/share/games/minetest/builtin/game/register.lua:341: in function </usr/share/games/minetest/builtin/game/register.lua:329>
Code: Select all
21:47:59: ERROR[main]: ServerError: ~/.minetest/mods/hud_hunger/hunger/functions.lua:68: attempt to index field '?' (a nil value)
21:47:59: ERROR[main]: stack traceback:
21:47:59: ERROR[main]: ~/.minetest/mods/hud_hunger/hunger/functions.lua:71: in function 'callback'
21:47:59: ERROR[main]: /usr/share/games/minetest/builtin/game/item.lua:299: in function </usr/share/games/minetest/builtin/game/item.lua:191>
21:47:59: ERROR[main]: (tail call): ?
21:47:59: ERROR[main]: (tail call): ?
21:47:59: ERROR[main]: ~/.minetest/mods/pipeworks/wielder.lua:379: in function 'act'
21:47:59: ERROR[main]: ~/.minetest/mods/pipeworks/wielder.lua:109: in function 'wielder_on'
21:47:59: ERROR[main]: ~/.minetest/mods/pipeworks/wielder.lua:145: in function 'action_on'
21:47:59: ERROR[main]: ~/.minetest/mods/mesecons/mesecons/internal.lua:189: in function '?'
21:47:59: ERROR[main]: ~/.minetest/mods/mesecons/mesecons/actionqueue.lua:90: in function 'execute'
21:47:59: ERROR[main]: ~/.minetest/mods/mesecons/mesecons/actionqueue.lua:84: in function '?'
21:47:59: ERROR[main]: /usr/share/games/minetest/builtin/game/register.lua:341: in function </usr/share/games/minetest/builtin/game/register.lua:329>
Re: [Modpack] Better HUD (and hunger) [2.1.2] [hud][hunger]
Technic drills icon image is oversized when usimg the wheel mode..
screenshot:
screenshot:
- linushsao
- Member
- Posts: 418
- Joined: Mon Jan 27, 2014 12:56
- IRC: linushsao
- In-game: linus
- Location: Taipei,Taiwan(R.O.C)
- Contact:
Re: [Modpack] Better HUD (and hunger) [2.1.2] [hud][hunger]
solved,It caused by other mods.
1.hunger mod enables falied because of moretree mod enabled failed.
2.moretree mod enabled failed because of plants_lib mod not enabled.
so,enabled plants_lib mod could solved this problem.
1.hunger mod enables falied because of moretree mod enabled failed.
2.moretree mod enabled failed because of plants_lib mod not enabled.
so,enabled plants_lib mod could solved this problem.
-
- Member
- Posts: 37
- Joined: Sun Jun 28, 2015 19:20
- In-game: Danny
Re: [Modpack] Better HUD (and hunger) [2.1.2] [hud][hunger]
Thanks for this Mod, it gives a more realistic feel when playing survival mode and the Hud looks nice in combination with the 3D armor mod since it shows that bar as wel ^_^
Re: [Modpack] Better HUD (and hunger) [2.1.2] [hud][hunger]
08:09:05: WARNING: Undeclared global variable "HUD_ENABLE_HUNGER" accessed at .../games/minetest_game/mods/hud_hunger/hud/builtin.lua:41
What i do wrong?
What i do wrong?
Re: [Modpack] Better HUD (and hunger) [2.1.3] [hud][hunger]
Update Version 2.1.3
HUD:
- Added hud.swap_statbar() and fix wrong behavior of previous workaround
- Fixed missing background of some statbars in multiplayer
hunger:
- Fixed healing after death
- Fixed healing while drowning
- Fixed crashed caused by Pipeworks mod
- Added wrapper for minetest.item_eat(). see Readme.txt for more informations
- Updated HUD-API usage
- Added beans of Farming Redo
Information for Modders:
If this mod is installed registered on_item_eat callbacks are called AFTER this mods actions, means the itemstack is already modified when passed. You can catch the original itemstack as 6th parameter and modifiy this mods actions aswell that way if wanted.
@amadin: nothing to worry about, its just a warning that is caused by legacy code. Just ignore it ;)
HUD:
- Added hud.swap_statbar() and fix wrong behavior of previous workaround
- Fixed missing background of some statbars in multiplayer
hunger:
- Fixed healing after death
- Fixed healing while drowning
- Fixed crashed caused by Pipeworks mod
- Added wrapper for minetest.item_eat(). see Readme.txt for more informations
- Updated HUD-API usage
- Added beans of Farming Redo
Information for Modders:
If this mod is installed registered on_item_eat callbacks are called AFTER this mods actions, means the itemstack is already modified when passed. You can catch the original itemstack as 6th parameter and modifiy this mods actions aswell that way if wanted.
@amadin: nothing to worry about, its just a warning that is caused by legacy code. Just ignore it ;)
Re: [Modpack] Better HUD (and hunger) [2.1.3] [hud][hunger]
Really glad to see you again, BlockMen ;)
Re: [Modpack] Better HUD (and hunger) [2.1.3] [hud][hunger]
BlockMen,
Ran into this error:
Damage was not enabled when this happened.
Ran into this error:
Code: Select all
-------------
Separator
-------------
14:05:29: WARNING: Undeclared global variable "HUD_ENABLE_HUNGER" accessed at .../bin/../games/basic_mine/mods/hud_hunger/hud/builtin.lua:41
2015-07-22 14:05:29: ACTION[main]: .__ __ __
2015-07-22 14:05:29: ACTION[main]: _____ |__| ____ _____/ |_ ____ _______/ |_
2015-07-22 14:05:29: ACTION[main]: / \| |/ \_/ __ \ __\/ __ \ / ___/\ __\
2015-07-22 14:05:29: ACTION[main]: | Y Y \ | | \ ___/| | \ ___/ \___ \ | |
2015-07-22 14:05:29: ACTION[main]: |__|_| /__|___| /\___ >__| \___ >____ > |__|
2015-07-22 14:05:29: ACTION[main]: \/ \/ \/ \/ \/
2015-07-22 14:05:29: ACTION[main]: World at [/home/fred/linuxgames/minetest0412/bin/../worlds/1basic]
2015-07-22 14:05:29: ACTION[main]: Server for gameid="basic_mine" listening on 0.0.0.0:50685.
2015-07-22 14:05:32: ACTION[main]: Irrlicht: PNG warning: Unknown iTXt compression type or method
2015-07-22 14:05:32: ACTION[main]: Irrlicht: PNG warning: Unknown iTXt compression type or method
2015-07-22 14:05:32: ACTION[main]: Irrlicht: PNG warning: Interlace handling should be turned on when using png_read_image
2015-07-22 14:05:33: ACTION[ServerThread]: singleplayer [127.0.0.1] joins game.
2015-07-22 14:05:33: ACTION[ServerThread]: singleplayer joins game. List of players: singleplayer
2015-07-22 14:05:34: ACTION[main]: Irrlicht: Could not open file of texture: character.png
2015-07-22 14:05:34: ACTION[main]: Irrlicht: Could not open file of texture: character.png
2015-07-22 14:05:37: ACTION[ServerThread]: singleplayer places node default:apple at (-53,2,224)
2015-07-22 14:05:38: ACTION[ServerThread]: singleplayer uses default:apple, pointing at [node under=-53,2,224 above=-53,2,225]
2015-07-22 14:05:38: ERROR[main]: ServerError: ...../games/basic_mine/mods/hud_hunger/hunger/functions.lua:226: attempt to index a nil value
2015-07-22 14:05:38: ERROR[main]: stack traceback:
2015-07-22 14:05:38: ERROR[main]: ...../games/basic_mine/mods/hud_hunger/hunger/functions.lua:226: in function 'eat'
2015-07-22 14:05:38: ERROR[main]: ...../games/basic_mine/mods/hud_hunger/hunger/functions.lua:200: in function <...../games/basic_mine/mods/hud_hunger/hunger/functions.lua:198>
2015-07-22 14:05:38: ACTION[ServerThread]: singleplayer leaves game. List of players:
Hidden saturation.
Hi there,
I don't quite understand why there is hidden saturation. Is there a way tho show all 30 saturation points?
I don't quite understand why there is hidden saturation. Is there a way tho show all 30 saturation points?
Trying to stay me.
Re: [Modpack] Better HUD (and hunger) [2.1.3] [hud][hunger]
I try to change backgroung with
player:hud_set_hotbar_image("gui_hotbar.png") and player:hud_set_hotbar_selected_image("gui_hotbar_selected.png") in minetest.register_on_joinplayer(function(player) but it not work, do you can help me?
player:hud_set_hotbar_image("gui_hotbar.png") and player:hud_set_hotbar_selected_image("gui_hotbar_selected.png") in minetest.register_on_joinplayer(function(player) but it not work, do you can help me?
Who is online
Users browsing this forum: No registered users and 2 guests