[Modpack] "Better HUD" and "hunger" [2.x.1] [hud][hunger]

User avatar
Johnyknowhow
Member
Posts: 358
Joined: Fri Sep 21, 2012 15:17
In-game: Minetestian
Location: Washington, USA

by Johnyknowhow » Post

So MT+ does have the drowning bar,
But I want it for MT 0.4.7 in MC if you hop in water
Bubbles will appear then they will go pop pop pop pop pop
And when I got the mod for MT it didn't appear,
My os for my PC is vista if that will help.
Last edited by Johnyknowhow on Sat Sep 07, 2013 21:24, edited 1 time in total.
I lost interest in Minetest for a couple of years and... I am still not really paying much attention. I rarely browse these forums anymore but it's nice to see old faces.

obligatory fancy signature goes here

User avatar
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:

by Evergreen » Post

Johnyknowhow wrote:So MT+ does have the drowning bar,
No, default minetest does. Just get the latest unstable build, and voila you have drowning.
Back from the dead!

User avatar
Johnyknowhow
Member
Posts: 358
Joined: Fri Sep 21, 2012 15:17
In-game: Minetestian
Location: Washington, USA

by Johnyknowhow » Post

Lol that jacked up


And when I had the wrong version of this mod
I saw the drowning bar!


When I got right version of this mod
I hopped in water 3 or 2 nodes deep
And I didn't see it (if that's a bug)
Last edited by Johnyknowhow on Sat Sep 07, 2013 21:41, edited 1 time in total.
I lost interest in Minetest for a couple of years and... I am still not really paying much attention. I rarely browse these forums anymore but it's nice to see old faces.

obligatory fancy signature goes here

User avatar
TenPlus1
Member
Posts: 2879
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

by TenPlus1 » Post

Note: sometimes when minetest is generating the world around you their is a pause in the drowning bar and it will not appear until it has finished...

User avatar
BlockMen
Developer
Posts: 768
Joined: Fri Mar 01, 2013 17:24
GitHub: BlockMen
Location: Germany

by BlockMen » Post

Update! Version 1.0 / 0.9 released

Changelog:
- hunger is reset after death
- health and hunger bar is shown correct on all screen resolutions now
- switched to changed native hotbar image support
- fixed revival of player when drown
- hunger bar is not shown anymore if hunger is disabled
- hunger can be disabled by minetest.conf ("hud_hunger_enable = false")


Important:
If you are using Minetest 0.4.7 stable use Version 0.9 of this mod.

Use Version 1.0 only with lastest dev/unstable builds. If you are using windows you can download my lastest build for windows from here.

User avatar
Johnyknowhow
Member
Posts: 358
Joined: Fri Sep 21, 2012 15:17
In-game: Minetestian
Location: Washington, USA

by Johnyknowhow » Post

BlockMen wrote:Update! Version 1.0 / 0.9 released

Changelog:
- hunger is reset after death
- health and hunger bar is shown correct on all screen resolutions now
- switched to changed native hotbar image support
- fixed revival of player when drown
- hunger bar is not shown anymore if hunger is disabled
- hunger can be disabled by minetest.conf ("hud_hunger_enable = false")


Important:
If you are using Minetest 0.4.7 stable use Version 0.9 of this mod.

Use Version 1.0 only with lastest dev/unstable builds. If you are using windows you can download my lastest build for windows from here.
Great! But where do I download update for 0.4.7?
Last edited by Johnyknowhow on Mon Sep 09, 2013 02:03, edited 1 time in total.
I lost interest in Minetest for a couple of years and... I am still not really paying much attention. I rarely browse these forums anymore but it's nice to see old faces.

obligatory fancy signature goes here

User avatar
ak399g
Member
Posts: 160
Joined: Tue Jul 30, 2013 02:36
In-game: SAFR
Contact:

by ak399g » Post

Interestingly enough, if you kill someone who has sufficient hunger as to autoheal, their hearts will begin to refill right after they die. Them hitting respawn simply revives them in the same place because, after all, their health isn't at 0 anymore.
aka SAFR

User avatar
BlockMen
Developer
Posts: 768
Joined: Fri Mar 01, 2013 17:24
GitHub: BlockMen
Location: Germany

by BlockMen » Post

ak399g wrote:Interestingly enough, if you kill someone who has sufficient hunger as to autoheal, their hearts will begin to refill right after they die. Them hitting respawn simply revives them in the same place because, after all, their health isn't at 0 anymore.
Actually that is fixed in Version 0.9/1.0 now.

User avatar
ak399g
Member
Posts: 160
Joined: Tue Jul 30, 2013 02:36
In-game: SAFR
Contact:

by ak399g » Post

BlockMen wrote:
ak399g wrote:Interestingly enough, if you kill someone who has sufficient hunger as to autoheal, their hearts will begin to refill right after they die. Them hitting respawn simply revives them in the same place because, after all, their health isn't at 0 anymore.
Actually that is fixed in Version 0.9/1.0 now.
That would be the init.lua file? Because I've edited these somewhat, I want to know which lines specifically were affected.
aka SAFR

User avatar
BlockMen
Developer
Posts: 768
Joined: Fri Mar 01, 2013 17:24
GitHub: BlockMen
Location: Germany

by BlockMen » Post

ak399g wrote:
BlockMen wrote:
ak399g wrote:Interestingly enough, if you kill someone who has sufficient hunger as to autoheal, their hearts will begin to refill right after they die. Them hitting respawn simply revives them in the same place because, after all, their health isn't at 0 anymore.
Actually that is fixed in Version 0.9/1.0 now.
That would be the init.lua file? Because I've edited these somewhat, I want to know which lines specifically were affected.
Here you go: https://github.com/BlockMen/hud/commit/ ... fe28a22764

User avatar
ak399g
Member
Posts: 160
Joined: Tue Jul 30, 2013 02:36
In-game: SAFR
Contact:

by ak399g » Post

How come hud can't write the hunger of the character to the character file? Why does it have to create a whole 'nother "hud_[playername]_hunger" file?
aka SAFR

User avatar
BlockMen
Developer
Posts: 768
Joined: Fri Mar 01, 2013 17:24
GitHub: BlockMen
Location: Germany

by BlockMen » Post

ak399g wrote:How come hud can't write the hunger of the character to the character file? Why does it have to create a whole 'nother "hud_[playername]_hunger" file?
When i added data to player file it got corrupted and was not readable anymore. So i decided to make a seperate file.

User avatar
jojoa1997
Member
Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth

by jojoa1997 » Post

Could you add a setting where you get the food eaten thingy from the eat(#) thingy. Also maybe you could add food saturation also. Finally can I use this for my Overcraft Origins game. It is minecraft like
Coding;
1X coding
3X debugging
12X tweaking to be just right

User avatar
rubenwardy
Moderator
Posts: 6289
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: United Kingdom
Contact:

by rubenwardy » Post

jojoa1997 wrote:Could you add a setting where you get the food eaten thingy from the eat(#) thingy. Also maybe you could add food saturation also. Finally can I use this for my Overcraft Origins game. It is minecraft like
You are not making much sense to me, I hope you make more sense to him.

Do you mean minetest.item_eat(amount)?

To do that, all he needs to do is

minetest.item_eat = hud.item_eat before any foods are registered.

PS: I have added BetterHUD support to Food 2.0, which is out soon.

User avatar
BlockMen
Developer
Posts: 768
Joined: Fri Mar 01, 2013 17:24
GitHub: BlockMen
Location: Germany

by BlockMen » Post

jojoa1997 wrote:Could you add a setting where you get the food eaten thingy from the eat(#) thingy. Also maybe you could add food saturation also. Finally can I use this for my Overcraft Origins game. It is minecraft like
Im also not sure what he means. The supported items have a saturation and the saturation of the player/hunger can always be read out.

I'm replacing the on_use=() of the items instead of overwriting minetest.item_eat() if you mean that.

To you game: WTFPL->"Do What The Fuck You Want To" includes using in a game ;)

rubenwardy wrote:PS: I have added BetterHUD support to Food 2.0, which is out soon.
Sounds good ;)
Last edited by BlockMen on Fri Sep 13, 2013 11:47, edited 1 time in total.

User avatar
jojoa1997
Member
Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth

by jojoa1997 » Post

https://github.com/minetest/minetest_ga ... .lua#L1152
Get the number for the on use and use that as the number. I mean instead of setting it manually you code to find the number and then replace it or what ever you do. That way new food can be used.
Coding;
1X coding
3X debugging
12X tweaking to be just right

User avatar
BlockMen
Developer
Posts: 768
Joined: Fri Mar 01, 2013 17:24
GitHub: BlockMen
Location: Germany

by BlockMen » Post

jojoa1997 wrote:https://github.com/minetest/minetest_ga ... .lua#L1152
Get the number for the on use and use that as the number. I mean instead of setting it manually you code to find the number and then replace it or what ever you do. That way new food can be used.
That you mean, ok.

No, its not that practical. The number of healthpoints is (ofc) lower than saturation of the item. So if reading out sometimes doubeling the nuber would be ok, sometimes it would be too low or to high. So defining it is better here.

User avatar
rubenwardy
Moderator
Posts: 6289
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: United Kingdom
Contact:

by rubenwardy » Post

That is what I said.

All he does to add hunger support for other mods, is go into minetest.registered_items and replace minetest.item_eat with hud.item_eat

If you want to replace minetest.item_eat with hud.item_eat, which I think is what you mean, then I think he will not do this, you have to do this yourself.

Do it yourself

Add this to 0Item_Eat/init.lua

Code: Select all

minetest.item_eat = hud.item_eat
and add this to 0Item_Eat/depends.txt

Code: Select all

hud
this assumes that minetest.item_eat is part of builtin or the cpp lua, not default game.

User avatar
BlockMen
Developer
Posts: 768
Joined: Fri Mar 01, 2013 17:24
GitHub: BlockMen
Location: Germany

by BlockMen » Post

Update! Version 1.1 released

Changelog:
- added support for stu's 3darmor mod (needs lastest version of armor mod)
- restructured and cleaned up code
- added support for poisen food (damages player, but does not kill)


Important:

New features will only be available for lastest dev/unstable builds of Minetest.

If you are using Minetest 0.4.7 stable use Version 0.9 of this mod. (no drowning, no armor support)

User avatar
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:

by Evergreen » Post

BlockMen wrote:Update! Version 1.1 released

Changelog:
- added support for stu's 3darmor mod (needs lastest version of armor mod)
- restructured and cleaned up code
- added support for poisen food (damages player, but does not kill)


Important:

New features will only be available for lastest dev/unstable builds of Minetest.

If you are using Minetest 0.4.7 stable use Version 0.9 of this mod. (no drowning, no armor support)
That looks awesome! Great work BlockMen.
Back from the dead!

User avatar
stu
Member
Posts: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

by stu » Post

BlockMen wrote:Update! Version 1.1 released

Changelog:
- added support for stu's 3darmor mod (needs lastest version of armor mod)
- restructured and cleaned up code
- added support for poisen food (damages player, but does not kill)


Important:

New features will only be available for lastest dev/unstable builds of Minetest.

If you are using Minetest 0.4.7 stable use Version 0.9 of this mod. (no drowning, no armor support)
Nice job! I would just like to point out that you will need the current-git version of 3d armor, not the current stable version 0.3.1

User avatar
rubenwardy
Moderator
Posts: 6289
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: United Kingdom
Contact:

by rubenwardy » Post

Awesome!

User avatar
viv100
Member
Posts: 80
Joined: Sat Aug 10, 2013 16:36

by viv100 » Post

1,1 do not work can you help me

User avatar
BlockMen
Developer
Posts: 768
Joined: Fri Mar 01, 2013 17:24
GitHub: BlockMen
Location: Germany

by BlockMen » Post

viv100 wrote:1,1 do not work can you help me
Could you be more precisely? Please post the error message.

My suggestion: Check if the folder is named correct ("~/mods/hud")

User avatar
viv100
Member
Posts: 80
Joined: Sat Aug 10, 2013 16:36

by viv100 » Post

worldmods / hud / init.lua. 48

Locked

Who is online

Users browsing this forum: No registered users and 4 guests