[Mod] Armor HUD bar [1.0.0] [hbarmor]

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

[Mod] Armor HUD bar [1.0.0] [hbarmor]

by Wuzzy » Post

This mod adds a HUD bar showing the current condition of your worn armor from the 3D Armor mod.

Screenshot of the armor bar:
Image

This HUD bar shows a percentage and will only be displayed if you wear at least one piece of armor. A percentage of 100% means your armor is in perfect or near-perfect condition, and 0% means your armor is completely destroyed (not displayed by default).
Also you need to wear at least 4 different pieces of armor to reach 100%.
Note the percentage only denotes the armor's condition, not its quality or strength.

This mod is a fork of the “Better HUD” [hud] mod by BlockMen version 1.4.0, but made to work to use the HUD bars mod instead, and all unneeded features stripped off.

This mod needs testing! If you experience any bugs or crashes or just error messages, please report them here.
While developing this mod, I had multiple issues with the armor bar not properly appearing when joining with a player who already wears armor. This issue seems to be gone, but I will apprecieate more testing here to be sure.

Download: https://repo.or.cz/minetest_hbarmor.git ... /1.0.0.zip

Version: 1.0.0
License of the armor icon: CC BY-SA 3.0, authored by Stu, modified by BlockMen
License for everything else: MIT License
Project page with Git repository: http://repo.or.cz/w/minetest_hbarmor.git


Dependencies:
  • [3d_armor] (core mod of the 3D Armor modpack, you don't need to activate the whole modpack if you don't want to)
  • HUD bars [hudbars], major version 2
This mod is incompatible with:
Attachments
hbarmor.png
(10.25 KiB) Downloaded 1 time
Last edited by Wuzzy on Fri May 03, 2019 12:21, edited 8 times in total.

User avatar
pilcrow
Member
Posts: 25
Joined: Thu Sep 12, 2013 09:10

Re: [Mod] Armor HUD bar [0.1.0] [hbarmor]

by pilcrow » Post

Great concept, but unfortunately this does the exact opposite of what I would want it for. armor wear doesn't matter much to me, as long as it's still there. I'm much more concerned with armor strength/coverage, and would love a mod that shows me how strong my armor is...

Martno
Member
Posts: 78
Joined: Thu May 28, 2015 07:09
Location: Hungary

Re: [Mod] Armor HUD bar [0.1.0] [hbarmor]

by Martno » Post

Wuzzy wrote: While developing this mod, I had multiple issues with the armor bar not properly appearing when joining with a player who already wears armor. This issue seems to be gone, but I will apprecieate more testing here to be sure.
I'm having this issue. Sometimes the bar doesn't appear properly (missing icon), sometimes it doesn't appear at all. It doesn't happen all the time, but pretty often. If I take off the armor and take back on, it appears again, or usually after 1 or 2 (or sometimes more) restart the bar appears properly.

User avatar
BrunoMine
Member
Posts: 1073
Joined: Thu Apr 25, 2013 17:29
GitHub: BrunoMine
Location: SP-Brasil
Contact:

Re: [Mod] Armor HUD bar [0.1.0] [hbarmor]

by BrunoMine » Post

I noticed a strange error message on my server believe it is related to this mod.

Code: Select all

2016-09-19 09:16:30: ACTION[Server]: Player niel punched by LuaEntitySAO at (10226.7,27.5,9549.46), damage 2 HP
2016-09-19 09:16:31: ACTION[Server]: meninoamigo digs default:stone at (10427,-119,9661)
2016-09-19 09:16:31: ACTION[Server]: niel punches object 1297: LuaEntitySAO at (10226.7,27.5,9549.46)
2016-09-19 09:16:31: ACTION[Server]: niel punches object 1297: LuaEntitySAO at (10226.7,27.5,9549.46)
2016-09-19 09:16:31: ACTION[Server]: niel punches object 1297: LuaEntitySAO at (10226.7,27.5,9549.46)
2016-09-19 09:16:31: ERROR[Server]: [hudbars] Bad call to hb.change_hudbar, identifier: “armor”, player name: “niel”. new_max_value (100) is smaller than new_value (146)!
2016-09-19 09:16:31: ERROR[Server]: [hudbars] Bad call to hb.change_hudbar, identifier: “armor”, player name: “niel”. new_max_value (100) is smaller than new_value (146)!
2016-09-19 09:16:31: ACTION[Server]: niel punches object 1297: LuaEntitySAO at (10226.7,27.75,9548.64)
2016-09-19 09:16:31: ERROR[Server]: [hudbars] Bad call to hb.change_hudbar, identifier: “armor”, player name: “niel”. new_max_value (100) is smaller than new_value (146)!
.........................
2016-09-19 09:26:42: ERROR[Server]: [hudbars] Bad call to hb.change_hudbar, identifier: “armor”, player name: “niel”. new_max_value (100) is smaller than new_value (146)!
2016-09-19 09:26:42: ERROR[Server]: [hudbars] Bad call to hb.change_hudbar, identifier: “armor”, player name: “niel”. new_max_value (100) is smaller than new_value (146)!
2016-09-19 09:26:42: ERROR[Server]: [hudbars] Bad call to hb.change_hudbar, identifier: “armor”, player name: “niel”. new_max_value (100) is smaller than new_value (146)!
2016-09-19 09:26:42: ERROR[Server]: [hudbars] Bad call to hb.change_hudbar, identifier: “armor”, player name: “niel”. new_max_value (100) is smaller than new_value (146)!
2016-09-19 09:26:42: ACTION[Server]: [brazutec_lunocartas] Salvando '/root/minetest/bin/../worlds/minemacro/brazutec_lunocartas.tbl'!!!
2016-09-19 09:26:42: ACTION[Server]: niel leaves game. List of players: 
This is serious? This caused no server crash, but it looks very bad.

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

Re: [Mod] Armor HUD bar [0.1.0] [hbarmor]

by Wuzzy » Post

Thanks for testing so far, but currently I am not really in “shape” to maintain this mod. Sorry. This may change in future.
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH

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

Version 0.2.0

by Wuzzy » Post

Version 0.2.0 released!

Changes:
- Support for intllib added
- German translation added
- Add background icon for “modern statbar” HUD bar style
- Fix hubbars error message spam when taking damage with 6 armors equipped.
- Add mod description, mod name (mod.conf) and screenshot
- Rewrite Readme, refactor code (a bit)

@BrunoMine: I think I have fixed your bug, but I am not sure. Can you please test again?
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH

User avatar
BrunoMine
Member
Posts: 1073
Joined: Thu Apr 25, 2013 17:29
GitHub: BrunoMine
Location: SP-Brasil
Contact:

Re: Version 0.2.0

by BrunoMine » Post

Wuzzy wrote:@BrunoMine: I think I have fixed your bug, but I am not sure. Can you please test again?
Certainly. I will upgrade my server.
If I find any error I'll let you know.

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

Version 0.3.0 released

by Wuzzy » Post

Version 0.3.0 released! Changes:

- The mod settings can now be change in Minetest's advanced settings menu
- (hopefully) fix possible scenario that displayed armor is outside of allowed bounds (fixes error message flood)
- Nothing else of interest.
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH

User avatar
Hamlet
Member
Posts: 716
Joined: Sat Jul 29, 2017 21:09
GitHub: h4ml3t
IRC: H4mlet
In-game: Hamlet
Location: Lombardy, Italy

Re: [Mod] Armor HUD bar [0.3.0] [hbarmor]

by Hamlet » Post

Italian locale:

Code: Select all

Armor = Armatura

# Format string for displaying the armor. E.g. "Armor: 100%"
%s: %d%% =
GitLab ContentDB VanessaE's Basic-plus Server (-1122.0, 19.5, -2438.0)

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

Re: [Mod] Armor HUD bar [0.4.0] [hbarmor]

by Wuzzy » Post

Version 0.4.0 released!

- Added Italian translation by Hamlet (thanks!)
- Main license is now MIT License
- Optimize PNGs
- Fix outdated Minetest settings API syntax
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests