Page 10 of 10

Re: [Mod] HUD bars [2.3.2] [hudbars]

Posted: Thu Oct 01, 2020 17:06
by FreeGamers
Wuzzy, don't get frustrated. It runs pretty well.

I initially reported that statbar_MODERN broke, not classic. (this was the one with the background templates).
However, I had to switch to the hudbar (the version in the last posted screenshot) since statbar_modern was broke. But the feedback from players was good. So i just stuck with hudbar/progress bar and will just try to remove the numbers from it when I can. (I think the numbers are not very fun, and the visual indicator is more interesting when its just an approximation or generalization).

Re: [Mod] HUD bars [2.3.2] [hudbars]

Posted: Thu Oct 29, 2020 04:35
by FreeGamers
Hi Wuzzy,

Could you help me add a settingstype to show/hide the bar numbers on progressbars (current value / max value) on each hudbar? Actually, just hide all text when this these values are hidden, including the label, just icons work well enough.

My train of thinking is this:
The bars are a representation of the values already and are not as definitive. Thus, they leave some level of uncertainty, which adds a bit of fun and are more immersive and less like a calculator.

I've tried this myself already once but am struggling and am out of time this evening.

Re: [Mod] HUD bars [2.3.2] [hudbars]

Posted: Thu Oct 29, 2020 04:41
by FreeGamers
In other words,
How can I just hide all the label text and values on the "progress_bar"

Re: [Mod] HUD bars [2.3.2] [hudbars]

Posted: Thu Oct 29, 2020 10:07
by Wuzzy
It's possible, but I'm too lazy to do it myself atm. I will probably accept patches, however.

Re: [Mod] HUD bars [2.3.2] [hudbars]

Posted: Mon Dec 21, 2020 19:37
by PetiAPocok
Hi guys!
TechnoWolf wrote:
Sat Sep 26, 2020 15:15
Hi, I'm running Minetest 5.3.0, Hudbars 2.3.3 along with various other mods, most importantly HBSprint and HungerNG. As of Minetest 5.3.0, my hud bars have an extra unfilled space at the end of the bar, even though I am at full health and satiation:

https://www.dropbox.com/s/3frdsgd7nelia ... d.jpg?dl=0
...
First, I would like to report that I "managed" to reproduce the problem.
Wuzzy wrote:
Sun Sep 27, 2020 14:22
What's your operating system?

BTW, I have heard many reports of people for which the HUD Bars are broken in some way. I have long given up in finding the source of the problem. I'm afraid I cannot help you. :-(
The interesting thing that till I used Manjaro with KDE I didn't have this kind of problem. Now I'm on Pop! OS with KDE and it appeared. The machine is the same. And the unfilled space's amount is affected by the game's hud scaling setting.
TechnoWolf wrote:
Sun Sep 27, 2020 15:41
... I've just now figured out what was causing it! ... I use Windows scaling on this monitor to 125%. I turned Windows scaling to 100% and launched the game and the hud bars appear as normal and expected. ...
I will check if I find any scaling related in the os settings.

Also appeared on my gf's Macbook Air.

Re: [Mod] HUD bars [2.3.2] [hudbars]

Posted: Mon Feb 15, 2021 15:53
by TechnoWolfTV
I'm using HUD bars in conjunction with hbsprint and Hunger NG. I'm not sure where the behavior I'll describe is originating so I'm posting here first. I'm running a Minetest 5.3.0 (server and client) VM Ubuntu survival mode server and have myself set as admin with all privs. When I run, I see no stamina bar appear, and running has no effect on my satiation. There is also no limit to being able to run. As a result, I'm able to run endlessly with no penalty. Other non-admin players say that stamina appears when running and functions as expected. When I load a single player world, stamina appears and functions as expected in my client. Would this be due to some priv or admin status on server? Would this be some issue in HUD bars, or hbsprint / Hunger NG? Thanks for any suggestions.

Re: [Mod] HUD bars [2.3.2] [hudbars]

Posted: Tue Feb 16, 2021 14:07
by FrostRanger
If you have the fast priv, stamina will not be applied to you, this is intended as far as I can tell

Re: [Mod] HUD bars [2.3.2] [hudbars]

Posted: Tue Feb 16, 2021 14:12
by TechnoWolfTV
That was it! Thanks, FrostRanger.

Re: [Mod] HUD bars [2.3.2] [hudbars]

Posted: Wed May 19, 2021 21:48
by sangeet
Hey there. I know the mod is for 5.3.0, still decided to post this here. I use 5.4.1 and have the following:

2021-05-20 00:39:13: WARNING[Server]: Deprecated usage of statbar without size! (at .minetest/mods/mod-hudbars/init.lua:232)

Re: [Mod] HUD bars [2.3.2] [hudbars]

Posted: Thu Jul 08, 2021 04:32
by luk3yx
I found an issue in hudbars (version 2.1.0 but I don't see any changes which could have fixed it).

Clients get flooded with HUD update packets from the (un)hide_hudbar calls at https://repo.or.cz/minetest_hudbars.git ... t.lua#l505. The issue seems to go away if I add checks to ensure the HUD hasn't already been hidden/shown to (un)hide_hudbar (such as if hudtable.hudstate[name].hidden then return true end in hide_hudbar).

Re: [Mod] HUD bars [2.3.2] [hudbars]

Posted: Thu Jul 08, 2021 08:39
by Merak
How would it be to make hudbars a client side mod? Or split it into 2 parts: 1 server side, 1 client side. That should solve the update packet problem also.

Re: [Mod] HUD bars [2.3.3] [hudbars]

Posted: Thu Jul 08, 2021 13:51
by Wuzzy
Version 2.3.3 is released!
This fixes a bug causing massive spam of hud_change events, reported by luk3yx. Thanks!

@sangeet: I'm sorry, but this is actually intentional. I keep this code there due to past previous issues with displacement of the HUD bar on other OSes when size is specified explicitly. I don't know if this problem is fixed in Minetest yet. If you can verify a fix, that would be great, I would gladly remove this ugly code. But until I know for sure, I keep this code.

BTW: This is what I wrote in the code:

Code: Select all

                 if hb.settings.bar_type == "progress_bar" then
                         bar_image = textures.bar
                         -- NOTE: Intentionally set to nil. For some reason, on some systems,
                         -- the progress bar is displaced when the bar_size is set explicitly here.
                         -- On the other hand, setting this to nil is deprecated in MT 5.0.0 due to
                         -- a debug log warning, but nothing is explained in lua_api.txt.
                         -- This section is a potential bug magnet, please watch with care!
                         -- The size of the bar image is expected to be exactly 2×16 pixels.
                         bar_size = nil

Re: [Mod] HUD bars [2.3.3] [hudbars]

Posted: Tue Apr 12, 2022 08:30
by juli
Hi can you add

Code: Select all

if hudtable == nil then return false end
in init.lua L.303 in function change_hudbar ?
That line is also in hide and unhide_hudbar. This would make it possible
to unregister a hudbar. Because else the line

Code: Select all

 if not hudtable.hudstate[name] 
will raise an index error.

In my case i have to disable breathbar, because i write a mod which has to completely remove it. But by default the breathbar is shown again also if i hide it, because in on_step it is un-hidden again.

Only possble workaround at moment is to force default breathbar and healthbar and then register a custom health and breathbar

Re: [Mod] HUD bars [2.3.3] [hudbars]

Posted: Thu Apr 14, 2022 20:09
by Wuzzy
Can anyone confirm this?

Re: [Mod] HUD bars [2.3.3] [hudbars]

Posted: Sat Jul 02, 2022 14:44
by Nik09
Does anyone else also have the problem that the Hudbars are never full? (I have the problem only on Windows. Everything works under Linux.)

Image

Re: [Mod] HUD bars [2.3.3] [hudbars]

Posted: Mon Aug 01, 2022 12:13
by Wuzzy
This mod's source code is now hosted on Codeberg.org:
https://codeberg.org/Wuzzy/minetest_hudbars
With issue tracker!

Re: [Mod] HUD bars [1.7.1] [hudbars]

Posted: Thu Nov 10, 2022 21:36
by SurviveX
Out`Of`Control wrote:
Tue Mar 07, 2017 22:14
Yes, for now it happen only to one player. Player rejoin game, again logs get flooded

Code: Select all

ERROR[Server]: [hudbars] Bad call to hb.change_hudbar, identifier: “armor”, player name: “XXXX”. new_value (-43) is smaller than 0!
Found a similar problem (The current version is 2.3.3.):

Code: Select all

ACTION[Server]: XXX joins game. List of players: XXX 
WARNING[Server]: Deprecated usage of statbar without size! (at ...e/xxx/testWorld/worldmods/minetest_hudbars/init.lua:299)
WARNING[Server]: Deprecated usage of statbar without size! (at ...e/xxx/testWorld/worldmods/minetest_hudbars/init.lua:299)
WARNING[Server]: Deprecated usage of statbar without size! (at ...e/xxx/testWorld/worldmods/minetest_hudbars/init.lua:299)
WARNING[Server]: Deprecated usage of statbar without size! (at /usr/share/games/minetest/builtin/game/register.lua:429)
WARNING[Server]: Deprecated usage of statbar without size! (at /usr/share/games/minetest/builtin/game/register.lua:429)
ERROR[Server]: [hudbars] Bad call to hb.change_hudbar, identifier: “health”, player name: “XXX”. new_max_value (20) is smaller than new_value (26)!
ERROR[Server]: [hudbars] Bad call to hb.change_hudbar, identifier: “health”, player name: “XXX”. new_max_value (20) is smaller than new_value (26)!
ERROR[Server]: [hudbars] Bad call to hb.change_hudbar, identifier: “health”, player name: “XXX”. new_max_value (20) is smaller than new_value (26)!
I just add this condition on first line in function hb.change_hudbar

Code: Select all

if (new_value > new_max_value) then new_max_value=new_value end

Re: [Mod] HUD bars [2.3.3] [hudbars]

Posted: Fri Nov 11, 2022 21:50
by Wuzzy
Thanks, noted.

HUD Bars 2.3.4 released!

Posted: Thu Mar 09, 2023 12:09
by Wuzzy
Version 2.3.4 released!
This version fixes the problem reported by SurviveX before.

Note: I currently only accept bug reports for this mod, not feature requests. Please post all bugs here (or in this thread):

https://codeberg.org/Wuzzy/minetest_hudbars/issues

If there is any bug I've overlooked/forgotten/ignored, please just post it again.

Sadly, I still have not figured out how to fix the scaling bugs on some OSes. I am aware of minetest.get_player_window_information(), a new function in the upcoming 5.7.0 release but I am not sure if it will actually help me. An important MT bug that seems to block progress for HUD Bars is this: https://github.com/minetest/minetest/issues/6296

I might be wrong tho and I might still try to look into a real bufix.

Version 2.3.5 released!

Posted: Mon Jul 24, 2023 11:32
by Wuzzy
Version 2.3.5 released!

This fixes a possible crash and a buggy translation check found. Thanks to mckaygerhard and flux for their contributions!



This mod is starting to annoy me. My longterm goal with this mod is to discontinue it. Ideally, progress bars should become a native Minetest HUD element instead, making this mod mostly obsolete. The way this mod implemented the "progress bars" was always kind of hacky to begin with.

I am not discontinuing this mod immediately; I am not going to ignore crash bugs, for instance.

Re: [Mod] HUD Bars [2.3.5] [hudbars]

Posted: Tue Jul 25, 2023 10:33
by Walker
yeah ... minetest needs a better way for this kind of stuff

until then: thank you very much ... i love this mod ;)

Re: Version 2.3.5 released!

Posted: Tue Jul 25, 2023 15:16
by Blockhead
Wuzzy wrote:
Mon Jul 24, 2023 11:32
This mod is starting to annoy me. My longterm goal with this mod is to discontinue it. Ideally, progress bars should become a native Minetest HUD element instead, making this mod mostly obsolete. The way this mod implemented the "progress bars" was always kind of hacky to begin with.
For the hypothetical, let's call this HUD element type a "meter".

I'm thinking that in the ideal scenario, you should be able to make this mod version agnostic. Although there is presently no detection for client versions. I would have liked client detection for rotating entity selection boxes for instance, but alas. Hopefully in future we have it for rotating entity selection boxes and for features like "HUD type meter" and so on. That information would be per-player.

Now in a newer version of hudbars, one written on versions of Minetest that add that new HUD element type, hudbars mod can use the native HUD element type. Newer versions of mods that depend on hudbars can then eventually transition away from using hudbars. But to continue to allow mods to work on older clients, hudbars would use client detection and in case support for "meter" HUD elements isn't present, use the old API.

Of course, you're under no obligation to help people transition or support older clients this way. It would be nice though as I think hudbars is fairly widely used as library. I thought it was a neat concept to repurpose the mod for legacy support basically.