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

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

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

by Wuzzy » Mon Sep 18, 2017 14:52

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].
My creations. I gladly take any bitcoins you have lying around: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH
 

User avatar
Stix
Member
 
Posts: 1236
Joined: Fri Aug 04, 2017 14:19
Location: USA
IRC: Stix + Stix_
In-game: Stix

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

by Stix » Thu Sep 21, 2017 21:35

@Wuzzy how do i add support for this to my mod, more_bread?
viewtopic.php?f=9&t=18508
Hello, profile stalker...
Need to know something? "Google it" --GreenDimond
Next release of your favorite game? "Bugfixes" --Wuzzy
[OLD]The new Minetest-offtopic can be found here: https://minetestoftopic.createaforum.com/index.php
 

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

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

by Wuzzy » Fri Sep 22, 2017 12:06

Supported food:
All food items which use the standard minetest.item_eat function are automatically supported.

My creations. I gladly take any bitcoins you have lying around: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH
 

User avatar
Stix
Member
 
Posts: 1236
Joined: Fri Aug 04, 2017 14:19
Location: USA
IRC: Stix + Stix_
In-game: Stix

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

by Stix » Fri Sep 22, 2017 12:43

Wuzzy wrote:
Supported food:
All food items which use the standard minetest.item_eat function are automatically supported.


wow! thats great!
Hello, profile stalker...
Need to know something? "Google it" --GreenDimond
Next release of your favorite game? "Bugfixes" --Wuzzy
[OLD]The new Minetest-offtopic can be found here: https://minetestoftopic.createaforum.com/index.php
 

User avatar
Shnikety
New member
 
Posts: 2
Joined: Sun Jun 11, 2017 00:45

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

by Shnikety » Sun Sep 24, 2017 18:26

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
 

dawgdoc
Member
 
Posts: 216
Joined: Mon Feb 27, 2017 01:10
GitHub: dawgdoc

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

by dawgdoc » Wed Oct 11, 2017 09:01

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
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.


The hbhunger mod references mobs_redo at line 129 of hunger.lua, the code beginning at line 128
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 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
Code: Select all
 

dawgdoc
Member
 
Posts: 216
Joined: Mon Feb 27, 2017 01:10
GitHub: dawgdoc

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

by dawgdoc » Thu Oct 12, 2017 06:50

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.
 

User avatar
ManElevation
Member
 
Posts: 892
Joined: Tue Aug 02, 2016 22:04
Location: Madrid,Spain
GitHub: ManElevation
IRC: ManElevation
In-game: ManElevation
 

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

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

by Wuzzy » Sun Oct 22, 2017 17:18

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 creations. I gladly take any bitcoins you have lying around: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH
 

User avatar
ManElevation
Member
 
Posts: 892
Joined: Tue Aug 02, 2016 22:04
Location: Madrid,Spain
GitHub: ManElevation
IRC: ManElevation
In-game: ManElevation

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

by ManElevation » Sun Oct 22, 2017 18:02

Wuzzy 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.

oh ok, my bad dint understand how it worked
My Public Mods! Discord: Rottweiler Games#3368
 

Chem871
Member
 
Posts: 811
Joined: Sat Aug 19, 2017 21:49
Location: Ankh-Morpork, Sometimes the Nether
GitHub: Chemguy99
In-game: Chem Nyx
 

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

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

by Wuzzy » Fri Dec 15, 2017 01:10

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).
My creations. I gladly take any bitcoins you have lying around: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH
 

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

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

by Wuzzy » Mon Feb 05, 2018 20:32

I added a Malay translation in version 0.7.0 (thanks, muhdnurhidayat!).
My creations. I gladly take any bitcoins you have lying around: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH
 

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

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

by Wuzzy » Fri Jun 01, 2018 10:23

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.
My creations. I gladly take any bitcoins you have lying around: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH
 

User avatar
ExeterDad
Member
 
Posts: 1717
Joined: Sun Jun 01, 2014 20:00
Location: New Hampshire U.S.A
In-game: ExeterDad

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

by ExeterDad » Fri Jun 01, 2018 13:53

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.

I wouldn't of seen that coming either. Nice find :)
Thanks for the update
 

Wooster
New member
 
Posts: 4
Joined: Tue Jun 05, 2018 20:37
GitHub: WoosterUK

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

by Wooster » Tue Jun 05, 2018 21:35

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.

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
 

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

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

by Wuzzy » Fri Jun 08, 2018 11:16

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.
My creations. I gladly take any bitcoins you have lying around: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH
 

User avatar
FlameFireling
Member
 
Posts: 23
Joined: Sun Jul 23, 2017 12:37
Location: Poland
GitHub: FlameFireling
In-game: FlameFireling

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

by FlameFireling » Wed Jun 20, 2018 14:20

[DELETED :( ]
Last edited by FlameFireling on Wed Jun 20, 2018 19:10, edited 1 time in total.
 

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

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

by Wuzzy » Wed Jun 20, 2018 15:39

The word “Starvation” is not used in the mod.
My creations. I gladly take any bitcoins you have lying around: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH
 

User avatar
FlameFireling
Member
 
Posts: 23
Joined: Sun Jul 23, 2017 12:37
Location: Poland
GitHub: FlameFireling
In-game: FlameFireling
 

cristytgirl
New member
 
Posts: 2
Joined: Tue Aug 28, 2018 02:59

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

by cristytgirl » Tue Aug 28, 2018 03:40

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 )
 

User avatar
sorcerykid
Member
 
Posts: 845
Joined: Fri Aug 26, 2016 15:36
Location: Illinois, USA
GitHub: sorcerykid
In-game: Nemo

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

by sorcerykid » Tue Aug 28, 2018 04:00

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 )


You may have better luck downloading the package from the Content DB:

https://content.minetest.net/packages/Wuzzy/hbhunger/

Be sure to download and install the hudbars mod as well, since it's a dependency.
 

cristytgirl
New member
 
Posts: 2
Joined: Tue Aug 28, 2018 02:59
 

Previous

Return to Mod Releases



Who is online

Users browsing this forum: BuckarooBanzay, papou30 and 9 guests