[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.6.0] [hbhunger]
Version 0.6.0 released!
- Added Italian translation by Hamlet (thanks!)
- Texture license is now MIT License
@Lone_Wolf: This is a bug in the [hudbars] mod, it has nothing to do with [hbhunger].
- Added Italian translation by Hamlet (thanks!)
- Texture license is now MIT License
@Lone_Wolf: This is a bug in the [hudbars] mod, it has nothing to do with [hbhunger].
Re: [Mod] Hunger with HUD bar [0.6.0] [hbhunger]
@Wuzzy how do i add support for this to my mod, more_bread?
viewtopic.php?f=9&t=18508
viewtopic.php?f=9&t=18508
Hey, what can i say? I'm the bad guy.
- 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.6.0] [hbhunger]
Supported food:
All food items which use the standard minetest.item_eat function are automatically supported.
Re: [Mod] Hunger with HUD bar [0.6.0] [hbhunger]
wow! thats great!Wuzzy wrote:Supported food:
All food items which use the standard minetest.item_eat function are automatically supported.
Hey, what can i say? I'm the bad guy.
Re: [Mod] Hunger with HUD bar [0.6.0] [hbhunger]
excellent mod, love the support this offers for food and other mods
btw, I went to add some chat commands to this add ran into a minor issue that confused me for a moment, lines 119 to 129 need indented another tab
btw, I went to add some chat commands to this add ran into a minor issue that confused me for a moment, lines 119 to 129 need indented another tab
Re: [Mod] Hunger with HUD bar [0.6.0] [hbhunger]
Wuzzy,
The latest updates TenPlus1 made to mobs_redo seems to have broken hbhunger for me.
After pulling his newest updates from github I have received an error on startup of an existing survival world, singleplayer, with only non-hostile mobs enabled. It is a world that I have had for a month of two, if not three. It was created after updating to MT 0.4.16. Even though the error references hbhunger mod, I am also reported on the mobs_redo forum since it seems to be involved. -- all mods are current with their git repositories. The world shutdown on startup and play did not commence.
debug.txt
The hbhunger mod references mobs_redo at line 129 of hunger.lua, the code beginning at line 128
I am not sure where the fix is required or even that it is due to hbhunger.
I created a new world just now and 2017-10-11 04:21:33: ERROR[Main]: ModError: Failed to load and run script from /home/dawgdoc/.minetest/mods/hbhunger/init.lua:
2017-10-11 04:21:33: ERROR[Main]: /home/dawgdoc/.minetest/mods/hbhunger/hunger.lua:348: attempt to index global 'farming' (a nil value)
2017-10-11 04:21:33: ERROR[Main]: stack traceback:
2017-10-11 04:21:33: ERROR[Main]: /home/dawgdoc/.minetest/mods/hbhunger/hunger.lua:348: in main chunk
2017-10-11 04:21:33: ERROR[Main]: [C]: in function 'dofile'
2017-10-11 04:21:33: ERROR[Main]: /home/dawgdoc/.minetest/mods/hbhunger/init.lua:46: in main chunk
2017-10-11 04:21:33: ERROR[Main]: Check debug.txt for details.only enabled default, farming_redo, hbhunger, hudbars, mobs_redo, and mobs_animal. The same error was generated.
EDIT: In a new world if I enable the same mods as above excluding hbhunger, there are no error messages. Once I add hbhunger I get the same message as above. If I only enable hbhunger and hudbars I get this error
The latest updates TenPlus1 made to mobs_redo seems to have broken hbhunger for me.
After pulling his newest updates from github I have received an error on startup of an existing survival world, singleplayer, with only non-hostile mobs enabled. It is a world that I have had for a month of two, if not three. It was created after updating to MT 0.4.16. Even though the error references hbhunger mod, I am also reported on the mobs_redo forum since it seems to be involved. -- all mods are current with their git repositories. The world shutdown on startup and play did not commence.
debug.txt
Code: Select all
-------------
2017-10-11 03:24:59: ERROR[Main]: ModError: Failed to load and run script from /home/dawgdoc/.minetest/mods/hbhunger/init.lua:
2017-10-11 03:24:59: ERROR[Main]: /home/dawgdoc/.minetest/mods/hbhunger/hunger.lua:129: attempt to index global 'mobs' (a nil value)
2017-10-11 03:24:59: ERROR[Main]: stack traceback:
2017-10-11 03:24:59: ERROR[Main]: /home/dawgdoc/.minetest/mods/hbhunger/hunger.lua:129: in main chunk
2017-10-11 03:24:59: ERROR[Main]: [C]: in function 'dofile'
2017-10-11 03:24:59: ERROR[Main]: /home/dawgdoc/.minetest/mods/hbhunger/init.lua:46: in main chunk
2017-10-11 03:24:59: ERROR[Main]: Check debug.txt for details.
Code: Select all
if minetest.get_modpath("mobs") ~= nil then
if mobs.mod ~= nil and mobs.mod == "redo" then
hbhunger.register_food("mobs:cheese", 4)
hbhunger.register_food("mobs:meat", 8)
hbhunger.register_food("mobs:meat_raw", 4)
hbhunger.register_food("mobs:rat_cooked", 4)
hbhunger.register_food("mobs:honey", 2)
I created a new world just now and 2017-10-11 04:21:33: ERROR[Main]: ModError: Failed to load and run script from /home/dawgdoc/.minetest/mods/hbhunger/init.lua:
2017-10-11 04:21:33: ERROR[Main]: /home/dawgdoc/.minetest/mods/hbhunger/hunger.lua:348: attempt to index global 'farming' (a nil value)
2017-10-11 04:21:33: ERROR[Main]: stack traceback:
2017-10-11 04:21:33: ERROR[Main]: /home/dawgdoc/.minetest/mods/hbhunger/hunger.lua:348: in main chunk
2017-10-11 04:21:33: ERROR[Main]: [C]: in function 'dofile'
2017-10-11 04:21:33: ERROR[Main]: /home/dawgdoc/.minetest/mods/hbhunger/init.lua:46: in main chunk
2017-10-11 04:21:33: ERROR[Main]: Check debug.txt for details.only enabled default, farming_redo, hbhunger, hudbars, mobs_redo, and mobs_animal. The same error was generated.
EDIT: In a new world if I enable the same mods as above excluding hbhunger, there are no error messages. Once I add hbhunger I get the same message as above. If I only enable hbhunger and hudbars I get this error
Code: Select all
Give a man a fish, feed him for a day. Give a kid a fish, it's going to die.
Re: [Mod] Hunger with HUD bar [0.6.0] [hbhunger]
My apologies to you. I also posted in the mobs_redo thread and TP1 suggested I add farming? and mobs? to depends.txt. I went to follow his instructions and found that several files were missing from my hbhunger folder, one of them depends.txt. I corrected the file structure and on a cursory peek in my established world all seems well.
Give a man a fish, feed him for a day. Give a kid a fish, it's going to die.
- ManElevation
- Member
- Posts: 896
- Joined: Tue Aug 02, 2016 22:04
- GitHub: ManElevation
- IRC: ManElevation
- In-game: ManElevation
- Location: Madrid,Spain
Re: [Mod] Hunger with HUD bar [0.6.0] [hbhunger]
how do i enable the posion bar?
My Public Mods! Discord: Rottweiler Games#3368
- 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.6.0] [hbhunger]
ManElevation, I don't know what you mean. There's no poison bar here. Only a hunger bar. But the health bar can become green when you eat poisonous food, like a red mushroom, and you lose health for a few seconds. And that's it. The poison system in this mod is very simple.
- ManElevation
- Member
- Posts: 896
- Joined: Tue Aug 02, 2016 22:04
- GitHub: ManElevation
- IRC: ManElevation
- In-game: ManElevation
- Location: Madrid,Spain
Re: [Mod] Hunger with HUD bar [0.6.0] [hbhunger]
oh ok, my bad dint understand how it workedWuzzy wrote:ManElevation, I don't know what you mean. There's no poison bar here. Only a hunger bar. But the health bar can become green when you eat poisonous food, like a red mushroom, and you lose health for a few seconds. And that's it. The poison system in this mod is very simple.
My Public Mods! Discord: Rottweiler Games#3368
-
- Member
- Posts: 999
- Joined: Sat Aug 19, 2017 21:49
- GitHub: Chemguy99
- In-game: Chem Nyx
- Location: My Basement's Attic
Re: [Mod] Hunger with HUD bar [0.6.0] [hbhunger]
How would I tweak the code to make hunger come faster?
What is SCP-055?
- 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.6.0] [hbhunger]
Sadly, this is currently only possibly by editing the source code. Look into init.lua. Decrease the value of hbhunger.HUNGER_TICK. There are also other variables you could tinker with (read the comments).
- 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.7.0] [hbhunger]
I added a Malay translation in version 0.7.0 (thanks, muhdnurhidayat!).
- 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.7.1] [hbhunger]
Version 0.7.1 released!
This adds a sanity check in the eating code to (hopefully) prevent some crashes. One such crash happened “whenever someone was operating a node breaker with something edible inside the tool slot, and the operator player is absent”.
Thanks to gpcf for the find and bugfix.
This adds a sanity check in the eating code to (hopefully) prevent some crashes. One such crash happened “whenever someone was operating a node breaker with something edible inside the tool slot, and the operator player is absent”.
Thanks to gpcf for the find and bugfix.
- ExeterDad
- Member
- Posts: 1717
- Joined: Sun Jun 01, 2014 20:00
- In-game: ExeterDad
- Location: New Hampshire U.S.A
Re: [Mod] Hunger with HUD bar [0.7.1] [hbhunger]
I wouldn't of seen that coming either. Nice find :)Wuzzy wrote:Version 0.7.1 released!
This adds a sanity check in the eating code to (hopefully) prevent some crashes. One such crash happened “whenever someone was operating a node breaker with something edible inside the tool slot, and the operator player is absent”.
Thanks to gpcf for the find and bugfix.
Thanks for the update
HOMETOWN -Our little server. Keep the HOMETOWN chatter @ http://hometownserver.com - Our server map: http://media.hometownserver.com
Re: [Mod] Hunger with HUD bar [0.7.1] [hbhunger]
I modded your mod. :-) (New player, found a few mods I liked, tinkered... This is probably a common story!)
All simple stuff. Made a couple of variables to allow fine-tuning of the mechanism and incorporated them into the Settings section for users to play with. One nice side-effect is that the mod now exposes satiation capacity as a variable so that mods with optional dependency (like diet) can access it and thus changes are propagated appropriately. I have done a bit of testing in singleplayer and it seems (fingers crossed!) to be working as intended.
Hope it's of use, if not directly then at least as a start. I don't know whether / how you like pull requests, but here is the git pull request text in case it is of use.
All simple stuff. Made a couple of variables to allow fine-tuning of the mechanism and incorporated them into the Settings section for users to play with. One nice side-effect is that the mod now exposes satiation capacity as a variable so that mods with optional dependency (like diet) can access it and thus changes are propagated appropriately. I have done a bit of testing in singleplayer and it seems (fingers crossed!) to be working as intended.
Hope it's of use, if not directly then at least as a start. I don't know whether / how you like pull requests, but here is the git pull request text in case it is of use.
Code: Select all
The following changes since commit 7b10cdcb5bd89ee4b9ecc7ac696c04a3e6463ce3:
Mark changelog as old (2018-06-01 12:01:39 +0200)
are available in the Git repository at:
http://repo.or.cz/minetest_hbhunger/wooster.git
for you to fetch changes up to 6dd37c2658c573b1cca4d6a1be04c956bbbdc4a3:
Change global variables to more intuitive name. (2018-06-05 19:52:34 +0100)
----------------------------------------------------------------
Wooster (6):
Resolve conflict.
Modify starvation effect.
Set new player to 2/3 full stomach.
Add section in README explaining customisability.
Fix starting stomach for very first player.
Change global variables to more intuitive name.
WoosterUK (1):
Make hunger modifiable in settings.
README.md | 14 +++++++++++++-
hunger.lua | 4 ++--
init.lua | 37 +++++++++++++++++++++----------------
settingtypes.txt | 11 +++++++++++
4 files changed, 47 insertions(+), 19 deletions(-)
create mode 100644 settingtypes.txt
- 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.7.1] [hbhunger]
There are no pull requests, the usual way is just to publish a fork of the project anywhere and commit there, then just notify me. What you did is exactly that.
I don't think your changes in particular fit into the philosophy of my mod. Also, I'm a bit lazy.
I don't think your changes in particular fit into the philosophy of my mod. Also, I'm a bit lazy.
-
- Member
- Posts: 24
- Joined: Sun Jul 23, 2017 12:37
Re: [Mod] Hunger with HUD bar [0.6.0] [hbhunger]
[DELETED :( ]
Last edited by FlameFireling on Wed Jun 20, 2018 19:10, edited 1 time in total.
Telnet > IRC
- 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.7.1] [hbhunger]
The word “Starvation” is not used in the mod.
-
- Member
- Posts: 24
- Joined: Sun Jul 23, 2017 12:37
-
- New member
- Posts: 2
- Joined: Tue Aug 28, 2018 02:59
Re: [Mod] Hunger with HUD bar [0.7.1] [hbhunger]
i seem to be having issues down loading this the links seem to be broken for me ( im new and this could be me being a idiot )
- sorcerykid
- Member
- Posts: 1847
- Joined: Fri Aug 26, 2016 15:36
- GitHub: sorcerykid
- In-game: Nemo
- Location: Illinois, USA
Re: [Mod] Hunger with HUD bar [0.7.1] [hbhunger]
You may have better luck downloading the package from the Content DB:cristytgirl wrote:i seem to be having issues down loading this the links seem to be broken for me ( im new and this could be me being a idiot )
https://content.minetest.net/packages/Wuzzy/hbhunger/
Be sure to download and install the hudbars mod as well, since it's a dependency.
-
- New member
- Posts: 2
- Joined: Tue Aug 28, 2018 02:59
Re: [Mod] Hunger with HUD bar [0.7.1] [hbhunger]
thank you for the alternate link
Re: [Mod] Hunger with HUD bar [0.7.1] [hbhunger]
awesome thank you !
Re: [Mod] Hunger with HUD bar [0.7.1] [hbhunger]
Just get the mod working with minetest 5 dev trough the next hack:
Added 2 lines at the end of init.lua
Unsure if it is the right way :-/
Added 2 lines at the end of init.lua
Code: Select all
-- Remove builtin bars
core.hud_replace_builtin("health", {hud_elem_type ~= "statbar"})
core.hud_replace_builtin("breath", {hud_elem_type ~= "statbar"})
Who is online
Users browsing this forum: Bing [Bot] and 33 guests