[Modpack] "Better HUD" and "hunger" [2.x.1] [hud][hunger]
- LodeRunner
- Member
- Posts: 25
- Joined: Mon Nov 17, 2014 03:14
- Location: Random Desert Biome
Re: [Mod] Better HUD (and hunger) [1.4] [hud]
N,
Hmmm...I hadn't noticed this when I did my testing. I may have to backtrack and try a few things.
Thanks for the tip. I'll see what happens.
Hmmm...I hadn't noticed this when I did my testing. I may have to backtrack and try a few things.
Thanks for the tip. I'll see what happens.
LodeRunner
Wait...didn't I just explore this cavern?
Wait...didn't I just explore this cavern?
-
- New member
- Posts: 5
- Joined: Tue Jun 24, 2014 15:13
Re: [Mod] Better HUD (and hunger) [1.4] [hud]
What's about HUD_HUNGER_EXHAUST_MOVE*2 on jump event?
Thanks in advance.
And what ext stands for? Can't understand from where it's value passed to handle_node_actions()?function hud.handle_node_actions(pos, oldnode, player, ext)
Thanks in advance.
- rubenwardy
- Moderator
- Posts: 6972
- Joined: Tue Jun 12, 2012 18:11
- GitHub: rubenwardy
- IRC: rubenwardy
- In-game: rubenwardy
- Location: Bristol, United Kingdom
- Contact:
Re: [Mod] Better HUD (and hunger) [1.4] [hud]
Are you aware of minetest.register_on_item_eat? You can override the default eat action.
Re: [Mod] Better HUD (and hunger) [1.4] [hud]
ruberwardy: the hunger.lua file has an overwrite function that replaces the default eat/heart feature and adds healing as well as additional features like hunger and poison...
- rubenwardy
- Moderator
- Posts: 6972
- Joined: Tue Jun 12, 2012 18:11
- GitHub: rubenwardy
- IRC: rubenwardy
- In-game: rubenwardy
- Location: Bristol, United Kingdom
- Contact:
Re: [Mod] Better HUD (and hunger) [1.4] [hud]
I am aware of that TenPlus, but using the register_on_item_eat will stop you having to have a list of foods. There are very little poisons supported, these could be handled in the override way rather than overriding every food.
Re: [Mod] Better HUD (and hunger) [1.4] [hud]
The register_on_item_eat adds a callback AFTER the item has been eaten so the hunger.lua still needs to override the initial values for each food item supported otherwise you eat say an apple and it will add 2 hearts instead of 2 hunger...
- rubenwardy
- Moderator
- Posts: 6972
- Joined: Tue Jun 12, 2012 18:11
- GitHub: rubenwardy
- IRC: rubenwardy
- In-game: rubenwardy
- Location: Bristol, United Kingdom
- Contact:
Re: [Mod] Better HUD (and hunger) [1.4] [hud]
You are mistaken. I wrote that callback. You can return non-nil to cancel the default action.TenPlus1 wrote:The register_on_item_eat adds a callback AFTER the item has been eaten so the hunger.lua still needs to override the initial values for each food item supported otherwise you eat say an apple and it will add 2 hearts instead of 2 hunger...
Re: [Mod] Better HUD (and hunger) [1.4] [hud]
Apologies, I misread the guide on that particular command, it looked like it was called after the fact...
Re: [Mod] Better HUD (and hunger) [1.4] [hud]
can anyone help me?
when i try to start the server it says :"ERROR:ModError:Failed to load and run
..........\mods\hunger\init.lua
Cheack debug.txt for details
i also dont have all the mods listed in depends.
when i try to start the server it says :"ERROR:ModError:Failed to load and run
..........\mods\hunger\init.lua
Cheack debug.txt for details
i also dont have all the mods listed in depends.
- ExeterDad
- Member
- Posts: 1717
- Joined: Sun Jun 01, 2014 20:00
- In-game: ExeterDad
- Location: New Hampshire U.S.A
Re: [Mod] Better HUD (and hunger) [1.4] [hud]
Without more output from debug.txt it's hard to see whats going on. If I were to guess, I'd say you answered your own question. A mod needs those deps for a reason. They "depend" on them to work as intended.
HOMETOWN -Our little server. Keep the HOMETOWN chatter @ http://hometownserver.com - Our server map: http://media.hometownserver.com
Re: [Mod] Better HUD (and hunger) [1.4] [hud]
21:22:48: ERROR[main]: ========== ERROR FROM LUA ===========ExeterDad wrote:Without more output from debug.txt it's hard to see whats going on. If I were to guess, I'd say you answered your own question. A mod needs those deps for a reason. They "depend" on them to work as intended.
21:22:48: ERROR[main]: Failed to load and run script from
21:22:48: ERROR[main]: D:\Minetest\minetest-0.4.10-64bit\bin\..\mods\hunger\init.lua:
21:22:48: ERROR[main]: ...netest\minetest-0.4.10-64bit\bin\..\mods\hunger\init.lua:71: attempt to concatenate a nil value
21:22:48: ERROR[main]: stack traceback:
21:22:48: ERROR[main]: ...netest\minetest-0.4.10-64bit\bin\..\mods\hunger\init.lua:71: in main chunk
21:22:48: ERROR[main]: ======= END OF ERROR FROM LUA ========
21:22:48: ERROR[main]: Server: Failed to load and run D:\Minetest\minetest-0.4.10-64bit\bin\..\mods\hunger\init.lua
21:22:48: ERROR[main]: ModError: ModError: Failed to load and run D:\Minetest\minetest-0.4.10-64bit\bin\..\mods\hunger\init.lua
but i think u are right...i think i need all the depend mods
- Napiophelios
- Member
- Posts: 1035
- Joined: Mon Jul 07, 2014 01:14
- GitHub: Napiophelios
- IRC: Nappi
- In-game: Nappi
Re: [Mod] Better HUD (and hunger) [1.4] [hud]
you dont need every mod listed in the depends text
the mods listed with "?" at the end are soft dependancies (supported mods)
default is the only mandatory dependancy.
with all the various error messages you have posted in different topics
I would think you have a something else going on...like the mod folder's name
rename the folder to: hud (not hunger)
the mods listed with "?" at the end are soft dependancies (supported mods)
default is the only mandatory dependancy.
with all the various error messages you have posted in different topics
I would think you have a something else going on...like the mod folder's name
rename the folder to: hud (not hunger)
Re: [Mod] Better HUD (and hunger) [1.4] [hud]
u are helping me on every single topic :) thank you!Napiophelios wrote:you dont need every mod listed in the depends text
the mods listed with "?" at the end are soft dependancies (supported mods)
default is the only mandatory dependancy.
with all the various error messages you have posted in different topics
I would think you have a something else going on...like the mod folder's name
rename the folder to: hud (not hunger)
Re: [Mod] Better HUD (and hunger) [1.4] [hud]
Good job! This works great and it's the closest thing to a unified hunger system for all those mobs related to food, farming and animal stuff. May I ask why support for "Mobs Redo" has not been implemented yet? That's a common, simple but good and funny mob set, it has already proposed hunger values in its tread and i see that there's already a pull request for them.
I'll upload my own configuration which i use because i find it more rational for a laptop widescreen, expecially for us who didn't play MC and have no need to match its layout :)
I'll upload my own configuration which i use because i find it more rational for a laptop widescreen, expecially for us who didn't play MC and have no need to match its layout :)
Code: Select all
--
-- health bar
--
HUD_HEALTH_POS = {x=0,y=1} --min 0, max 1
HUD_HEALTH_OFFSET = {x=10,y=-30} --offset in pixel
--
-- armor bar
--
HUD_ARMOR_POS = {x=0,y=1}
HUD_ARMOR_OFFSET = {x=10, y=-60}
--
-- hunger bar
--
HUD_HUNGER_POS = {x=1,y=1} --min 0, max 1
HUD_HUNGER_OFFSET = {x=-250,y=-30} --offset in pixel
--
-- breath bar
--
HUD_AIR_POS = {x=1,y=1} --min 0, max 1
HUD_AIR_OFFSET = {x=-250,y=-60} --offset in pixel
- Attachments
-
- My hud layout
- screenshot_3081800049.png (724.26 KiB) Viewed 1059 times
- Wuzzy
- Member
- Posts: 4786
- Joined: Mon Sep 24, 2012 15:01
- GitHub: Wuzzy2
- IRC: Wuzzy
- In-game: Wuzzy
- Contact:
Re: [Mod] Better HUD (and hunger) [1.4.1] [hud]
Please fix the dependencies:
- Add optional dependency to 3d_armor, because you use this mod
- Make dependency on default optional (I see no reason why this is a mandatory dependency)
- Napiophelios
- Member
- Posts: 1035
- Joined: Mon Jul 07, 2014 01:14
- GitHub: Napiophelios
- IRC: Nappi
- In-game: Nappi
Re: [Mod] Better HUD (and hunger) [1.4.1] [hud]
My armor bar doesnt show above the hotbar till I get hurt or adjust/view armor via the inventory;
is this delay normal?
is this delay normal?
Re: [Mod] Better HUD (and hunger) [1.4.1] [hud]
Could you please add a stamina bar and support for the sprint mod?
- mtmodder148
- Member
- Posts: 132
- Joined: Wed May 14, 2014 13:44
- GitHub: MT-Modder
- In-game: mtmodder148
Re: [Mod] Better HUD (and hunger) [1.4.1] [hud]
@Napiophelios, this happened to me until I wrote a patch for it here: https://github.com/BlockMen/hud/pull/13
Blockmen says it's unconfirmed.
Blockmen says it's unconfirmed.
Re: [Mod] Better HUD (and hunger) [1.4.1] [hud]
I can confirm it happened to me toomtmodder148 wrote:@Napiophelios, this happened to me until I wrote a patch for it here: https://github.com/BlockMen/hud/pull/13
Blockmen says it's unconfirmed.
Re: [Mod] Better HUD (and hunger) [1.4.1] [hud]
Missingfor full ethereal support.
Code: Select all
overwrite("ethereal:orange", 2)
-
- Member
- Posts: 55
- Joined: Fri Mar 06, 2015 00:50
- GitHub: poet-nohit
Re: [Mod] Better HUD (and hunger) [1.4.1] [hud]
@mtmodder148: tried your fix and that seems to work. Thanks. :D
- mtmodder148
- Member
- Posts: 132
- Joined: Wed May 14, 2014 13:44
- GitHub: MT-Modder
- In-game: mtmodder148
Re: [Mod] Better HUD (and hunger) [1.4.1] [hud]
Np. Glad to help.
Re: [Mod] Better HUD (and hunger) [2.0] [hud]
Update! Version 2.0 released.
I kinda rewrote the mod completely, now HUD is (mainly) an API.
But the changes step by step:
- I seperated the HUD and the hunger mechanics to clean up the current code mess. But since already many people are using this mod and search for this mod when they want add Hunger to Minetest I will release this Mod as Modpack, including hud and hunger.
Changes to "hud":
- Added an API (that is currently limited to statbars, should be extended soon(tm))
- Provides "reserved" statbars for armor and hunger which can be used by mods even more easily.
- Armor statbar now show your current protection level, not the "health" of the armor
Changes to "hunger":
- Added API to add food (hunger.register_food())
- Works with every food now (but registering is recommended for better balance/behavior)
- Eating sound added and hungerbar gets differend color if poisend
- Using minetest.register_on_item_eat() instead overriding the function completly
Summerizing:
If you download the Modpack there should no difference for you, except (hopefully) less problems. All problems mentioned in posts above should be fixed.
Also, all mods that are depending on this mod should also still work as before, i added a couple legacy functions for that.
Anyway, it would be nice if you could report anything you notice and report bugs if found. For the hunger related issues or request, please do that here: https://github.com/BlockMen/hunger
I kinda rewrote the mod completely, now HUD is (mainly) an API.
But the changes step by step:
- I seperated the HUD and the hunger mechanics to clean up the current code mess. But since already many people are using this mod and search for this mod when they want add Hunger to Minetest I will release this Mod as Modpack, including hud and hunger.
Changes to "hud":
- Added an API (that is currently limited to statbars, should be extended soon(tm))
- Provides "reserved" statbars for armor and hunger which can be used by mods even more easily.
- Armor statbar now show your current protection level, not the "health" of the armor
Changes to "hunger":
- Added API to add food (hunger.register_food())
- Works with every food now (but registering is recommended for better balance/behavior)
- Eating sound added and hungerbar gets differend color if poisend
- Using minetest.register_on_item_eat() instead overriding the function completly
Summerizing:
If you download the Modpack there should no difference for you, except (hopefully) less problems. All problems mentioned in posts above should be fixed.
Also, all mods that are depending on this mod should also still work as before, i added a couple legacy functions for that.
Anyway, it would be nice if you could report anything you notice and report bugs if found. For the hunger related issues or request, please do that here: https://github.com/BlockMen/hunger
-
- Member
- Posts: 55
- Joined: Fri Mar 06, 2015 00:50
- GitHub: poet-nohit
Re: [Modpack] Better HUD (and hunger) [2.0] [hud][hunger]
No problems here, so far.
Okay, just a few things. Beds now remove your hotbar when you get up in the morning. Plus a few minor details:
Okay, just a few things. Beds now remove your hotbar when you get up in the morning. Plus a few minor details:
Code: Select all
12:54:11: WARNING: Undeclared global variable "show_hunger" accessed at ...minetest-0.4.12/bin/../games/spiffy/mods/hud/builtin.lua:83
12:54:43: WARNING: Undeclared global variable "HUD_ENABLE_HUNGER" accessed at ...minetest-0.4.12/bin/../games/spiffy/mods/hud/builtin.lua:22
Who is online
Users browsing this forum: No registered users and 4 guests