[Mod] Gauges [gauges]

User avatar
Calinou
Moderator
 
Posts: 3157
Joined: Mon Aug 01, 2011 14:26
Location: Troyes, France
GitHub: Calinou
IRC: Calinou
In-game: Calinou

[Mod] Gauges [gauges]

by Calinou » Wed Oct 01, 2014 15:58

Adds health and breath bars above players.

GitHub repository (includes issue tracker)

Download
Rename the directory to “gauges” after extracting the .zip file.

No dependencies.
License for code: MIT
License for textures: CC0 1.0 Universal

Settings



health_bars: whether to enable gauges. Gauges are always disabled when damage is disabled.[true]

Gauges do not appear above yourself in third person. The breath bar appears as an overlay of the health bar.
 

User avatar
Esteban
Member
 
Posts: 873
Joined: Sun Sep 08, 2013 13:26
Location: Somewhere in the Caribbean...
GitHub: Esteban-
IRC: Esteban
In-game: Esteban

Re: [Mod] Gauges [gauges]

by Esteban » Fri Oct 10, 2014 17:09

This an awesome mod!
Are there plans on adding a hunger bar if the "Better HUD" mod is enabled?
 

4aiman
Member
 
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

Re: [Mod] Gauges [gauges]

by 4aiman » Sat Oct 11, 2014 17:56

Oh, and I've thought it was mine gauges brought up to life one again :)
Screen shots, please! ;)
 

User avatar
Calinou
Moderator
 
Posts: 3157
Joined: Mon Aug 01, 2011 14:26
Location: Troyes, France
GitHub: Calinou
IRC: Calinou
In-game: Calinou

Re: [Mod] Gauges [gauges]

by Calinou » Sat Oct 18, 2014 18:01

Esteban wrote:This an awesome mod!
Are there plans on adding a hunger bar if the "Better HUD" mod is enabled?


I don't think so, but you can (or someone else) attempt doing it.

4aiman wrote:Oh, and I've thought it was mine gauges brought up to life one again :)
Screen shots, please! ;)


I'm not sure about the visual looks of the bars yet, I may redo them entirely.
 

4aiman
Member
 
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

Re: [Mod] Gauges [gauges]

by 4aiman » Sun Oct 19, 2014 10:13

No better hud, please. Its hunger is terrible.
I'm not against using its textures if it's enabled. I'm against the mechanics of the hunger there is. Can't understand why no one cares of their inferiority :(
 

User avatar
indriApollo
Member
 
Posts: 146
Joined: Fri Sep 26, 2014 11:34
Location: Belgium
GitHub: indriApollo
IRC: indriApollo
In-game: SudoAptGetPlay
 

User avatar
GreenDimond
Member
 
Posts: 1273
Joined: Wed Oct 28, 2015 01:26
Location: SCP-3008
GitHub: GreenXenith
IRC: GreenDimond
In-game: GreenDimond

Re: [Mod] Gauges [gauges]

by GreenDimond » Tue Apr 25, 2017 03:21

Hate to bump such an old topic, but I noticed the download link is out of date. So I got the mod from Carbone and put it here for anyone that needs it.
Attachments
gauges.zip
(9.08 KiB) Downloaded 53 times
Y▹uTube | Mods | Patre●n | Twitter | Minetest Discord | GreenDimond#3232

Hey, you. You're finally awake.
You were trying to view their profile, right? Found the rest of their signature, same as us, and that guest over there.
 

User avatar
Lejo
Member
 
Posts: 638
Joined: Mon Oct 19, 2015 16:32
GitHub: Lejo1
In-game: Lejo

Re: [Mod] Gauges [gauges]

by Lejo » Thu May 11, 2017 19:21

I get this Error after is use a vehicles
and then the server shut down. What is the Problem?
Image
I know that the mod money is there too.

Lejo
 

User avatar
niwla23
Member
 
Posts: 107
Joined: Sat Nov 17, 2018 17:40
In-game: Niwla
 

User avatar
FreeGamers
Member
 
Posts: 334
Joined: Sat May 25, 2019 00:15
Location: United States
GitHub: is proprietary I use NotABug

Re: [Mod] Gauges [gauges]

by FreeGamers » Fri Jul 19, 2019 04:12

niwla23 wrote:please update it to 5.0.0. it must be y=19 instead of y=10


If anyone else uses this mod at this point, edit line 51 to be

Code: Select all
                ent:set_attach(player, "", {x = 0, y = 19, z = 0}, {x = 0, y = 0, z = 0})


Then the gauge will be in the proper position.
 

User avatar
FreeGamers
Member
 
Posts: 334
Joined: Sat May 25, 2019 00:15
Location: United States
GitHub: is proprietary I use NotABug

Re: [Mod] Gauges [gauges]

by FreeGamers » Thu Nov 21, 2019 22:57

Can somebody help me understand what is happening with this mod and my server? I get fatal crashes when certain clients/players join or leave the game with multiple players on. I'm using the latest version. It seems maybe its not detected the player names for some reason?

Code: Select all
2019-11-21 16:48:38: ERROR[Main]: ServerError: AsyncErr: environment_Step: Runtime error from mod 'gauges' in callback environment_Step(): /usr/share/games/minetest/mods/lib_player/gauges/init.lua:47: attempt to index local 'player' (a nil value)
2019-11-21 16:48:38: ERROR[Main]: stack traceback:
2019-11-21 16:48:38: ERROR[Main]:       /usr/share/games/minetest/mods/lib_player/gauges/init.lua:47: in function 'func'
2019-11-21 16:48:38: ERROR[Main]:       /usr/share/games/minetest/builtin/common/after.lua:18: in function </usr/share/games/minetest/builtin/common/after.lua:4>
2019-11-21 16:48:38: ERROR[Main]:       /usr/share/games/minetest/builtin/game/register.lua:419: in function </usr/share/games/minetest/builtin/game/register.lua:399>
2019-11-21 16:48:38: ERROR[Main]: stack traceback:


The function that is crashing is this:
Code: Select all
local function add_HP_gauge(name)
        local player = minetest.get_player_by_name(name)
        local pos = player:get_pos()
        local ent = minetest.add_entity(pos, "gauges:hp_bar")

        if ent ~= nil then
                ent:set_attach(player, "", {x = 0, y = 19, z = 0}, {x = 0, y = 0, z = 0})
                ent = ent:get_luaentity()
                ent.wielder = player:get_player_name()
        end
end


I wonder if something like

Code: Select all
        if ent ~= nil then
                ent:set_attach(player, "", {x = 0, y = 19, z = 0}, {x = 0, y = 0, z = 0})
                ent = ent:get_luaentity()
                ent.wielder = player:get_player_name()
       else
                return
       end
end

Would resolve this? I'm going to add this and try to resolve this fatal crash on my server...
 

User avatar
FreeGamers
Member
 
Posts: 334
Joined: Sat May 25, 2019 00:15
Location: United States
GitHub: is proprietary I use NotABug

Re: [Mod] Gauges [gauges]

by FreeGamers » Fri Nov 22, 2019 00:25

Actually, I'm not sure that will resolve this because it looks like the crash comes from the fact that there is no string to pass onto the local variable "player".

How can I prevent this from crashing the game?
 


Return to Mod Releases



Who is online

Users browsing this forum: BuckarooBanzay and 5 guests