[Mod] Better Nametags [better_nametags]
- Piezo_
- Member
- Posts: 219
- Joined: Fri Jul 20, 2018 21:36
- GitHub: is proprietary I use NotABug
- Location: (x,y,z)
[Mod] Better Nametags [better_nametags]
Hey, you!
(Yes, you! I can see your nametag from all the way across the server!)
Are you, a server admin, tired of players being given essentially endless-range Player-ESP by default?
Are you looking for a mod that also Hides players' names when sneaking?
Then you need the Better Nametags Mod!
This mod simply sets the player transfer distance to always be equal to the entity transfer distance. That way, no one sees a player's nametag unless their client has loaded that player, but you still get all the features included with a default nametag, such as toggling visibility with F1, easy color-configuration, and the ability to see names through blocks!
"But wait," you ask, "how am I supposed to know who's online if I can't look around and see their name?!"
Never fear! Download now, and you'll also get our latest cutting edge technology: The "/players" command! "/players" not only lists the name of every player online, it also tells you how many players are online, so you don't have to count!
Better Nametags also features fully customizable nametag text and colors, so you can have players' nametag be based on any condition you can imagine, whether that be privilege-based, health-based, or even based on whether or not the player is standing on top of a block of cheese!
What are you waiting for?!
Put the Better Nametags mod on your server today!
(Read in really fast voice) The better nametags mod is licensed under the GNU General Public License, either Version 3 of the license, or, at your option, any later version. See LICENSE.txt for details.
(Yes, you! I can see your nametag from all the way across the server!)
Are you, a server admin, tired of players being given essentially endless-range Player-ESP by default?
Are you looking for a mod that also Hides players' names when sneaking?
Then you need the Better Nametags Mod!
This mod simply sets the player transfer distance to always be equal to the entity transfer distance. That way, no one sees a player's nametag unless their client has loaded that player, but you still get all the features included with a default nametag, such as toggling visibility with F1, easy color-configuration, and the ability to see names through blocks!
"But wait," you ask, "how am I supposed to know who's online if I can't look around and see their name?!"
Never fear! Download now, and you'll also get our latest cutting edge technology: The "/players" command! "/players" not only lists the name of every player online, it also tells you how many players are online, so you don't have to count!
Better Nametags also features fully customizable nametag text and colors, so you can have players' nametag be based on any condition you can imagine, whether that be privilege-based, health-based, or even based on whether or not the player is standing on top of a block of cheese!
What are you waiting for?!
Put the Better Nametags mod on your server today!
(Read in really fast voice) The better nametags mod is licensed under the GNU General Public License, either Version 3 of the license, or, at your option, any later version. See LICENSE.txt for details.
Last edited by Piezo_ on Fri Feb 22, 2019 09:48, edited 7 times in total.
while (true) { suffer(); }
- StarNinjas
- Member
- Posts: 411
- Joined: Wed Mar 14, 2018 00:32
- GitHub: starninjas
- IRC: StarNinjas
- In-game: J1
- Location: Terrarca
- Contact:
Re: [Mod] Better Nametags [better_nametags]
Nice
Don't go to bed tonight, without knowing what would happen if you died. https://thegospelfilm.org/
Re: [Mod] Better Nametags [better_nametags]
/status also shows who's online. But you have to count :-)
- Piezo_
- Member
- Posts: 219
- Joined: Fri Jul 20, 2018 21:36
- GitHub: is proprietary I use NotABug
- Location: (x,y,z)
Re: [Mod] Better Nametags [better_nametags]
But /players could technically have something like "/vanish" implimented, or even listing ranks/prefixes.Ruggila wrote:/status also shows who's online. But you have to count :-)
Also, who the hell is gonna know what "/status" does from a glance, honestly?
while (true) { suffer(); }
- ChimneySwift
- Member
- Posts: 320
- Joined: Fri Sep 22, 2017 06:46
- GitHub: ChimneySwift
- IRC: ChimneySwift
- In-game: ChimneySwift
- Location: 127.0.0.1
Re: [Mod] Better Nametags [better_nametags]
You can achieve not showing the nametags of unloaded players with the player_tranfer_distance configuration setting IIRC.
Colors are cool tho, although could be achieved without separate entities.
Colors are cool tho, although could be achieved without separate entities.
A spoon is basically a tiny bowl with a stick on it
- Piezo_
- Member
- Posts: 219
- Joined: Fri Jul 20, 2018 21:36
- GitHub: is proprietary I use NotABug
- Location: (x,y,z)
Re: [Mod] Better Nametags [better_nametags]
Well, there goes most of my reason for making this mod. Why wasn't this anywhere on the wiki?ChimneySwift wrote:You can achieve not showing the nametags of unloaded players with the player_tranfer_distance configuration setting IIRC.
Last edited by Piezo_ on Tue Sep 04, 2018 02:18, edited 1 time in total.
while (true) { suffer(); }
Re: [Mod] Better Nametags [better_nametags]
in my minetest.conf I have
which more or less limits nametag to LOS (with my settings etc, YMMV)
I use it together with a modified version of this chat transfer distance mod (I don't bother with the payment, just the location/distance restriction on chat and "hearing range"):
viewtopic.php?t=12560
(I would give an arm and a leg for a mod with area/local, global, and custom chat "channels" in a neat tabbed chat interface)
to give some sense of "locality" on my server. It doesn't do anything with sneaking though AFAIK, so that's still a very valid reason for your mod if you're into the whole cloak and dagger thing :)
Code: Select all
player_transfer_distance = 5
unlimited_player_transfer_distance = false
I use it together with a modified version of this chat transfer distance mod (I don't bother with the payment, just the location/distance restriction on chat and "hearing range"):
viewtopic.php?t=12560
(I would give an arm and a leg for a mod with area/local, global, and custom chat "channels" in a neat tabbed chat interface)
to give some sense of "locality" on my server. It doesn't do anything with sneaking though AFAIK, so that's still a very valid reason for your mod if you're into the whole cloak and dagger thing :)
- Piezo_
- Member
- Posts: 219
- Joined: Fri Jul 20, 2018 21:36
- GitHub: is proprietary I use NotABug
- Location: (x,y,z)
Re: [Mod] Better Nametags [better_nametags]
What should I do at this point? Should I turn this into a "sneaking and colors mod", or just make another separate one?
while (true) { suffer(); }
- sorcerykid
- Member
- Posts: 1847
- Joined: Fri Aug 26, 2016 15:36
- GitHub: sorcerykid
- In-game: Nemo
- Location: Illinois, USA
Re: [Mod] Better Nametags [better_nametags]
Actually you can make a nametag invisible just by setting alpha to 0. The nametag can be revealed by restoring alpha to 255. I used this technique to dynamically hide nametags on the JT2 server depending on whether players were wearing a Halloween costume.acidzebra wrote: to give some sense of "locality" on my server. It doesn't do anything with sneaking though AFAIK, so that's still a very valid reason for your mod if you're into the whole cloak and dagger thing :)
I still like the concept of this mod. Maybe you could adapt it for something other than just colored player names, allowing any customized data to appear above the player (including stats, vitals, etc.). That would still be in fitting with the name of the mod.
- Piezo_
- Member
- Posts: 219
- Joined: Fri Jul 20, 2018 21:36
- GitHub: is proprietary I use NotABug
- Location: (x,y,z)
Re: [Mod] Better Nametags [better_nametags]
What I was thinking I might do (if I took it further) would be to switch it back to the default nametag, but keep the sneak feature (which would basically just be setting the player's nametag to an empty string), and possibly rely on player_transfer_distance to handle the endless range issue.sorcerykid wrote:
Actually you can make a nametag invisible just by setting alpha to 0. The nametag can be revealed by restoring alpha to 255. I used this technique to dynamically hide nametags on the JT2 server depending on whether players were wearing a Halloween costume.
I still like the concept of this mod. Maybe you could adapt it for something other than just colored player names, allowing any customized data to appear above the player (including stats, vitals, etc.). That would still be in fitting with the name of the mod.
while (true) { suffer(); }
- Pyrollo
- Developer
- Posts: 385
- Joined: Mon Jan 08, 2018 15:14
- GitHub: pyrollo
- In-game: Naj
- Location: Paris
Re: [Mod] Better Nametags [better_nametags]
[ Display Modpack ] - [ Digiterms ] - [ Crater MG ] - [ LATE ]
- Piezo_
- Member
- Posts: 219
- Joined: Fri Jul 20, 2018 21:36
- GitHub: is proprietary I use NotABug
- Location: (x,y,z)
Re: [Mod] Better Nametags [better_nametags]
From a glance, it seems like that mod throws the good of the default nametags (lightweight, visible through blocks, colorable) out with the bad (visible from all over the map)
while (true) { suffer(); }
Re: [Mod] Better Nametags [better_nametags]
Nope, the nametags in that mod are only visible if the player is visible.Piezo_ wrote:From a glance, it seems like that mod throws the good of the default nametags (lightweight, visible through blocks, colorable) out with the bad (visible from all over the map)
Hey, what can i say? I'm the bad guy.
- Piezo_
- Member
- Posts: 219
- Joined: Fri Jul 20, 2018 21:36
- GitHub: is proprietary I use NotABug
- Location: (x,y,z)
Re: [Mod] Better Nametags [better_nametags]
That's... what I said.Stix wrote:Nope, the nametags in that mod are only visible if the player is visible.
They solved the problem of names being visible everywhere, but created the problem of names not being visible through blocks
while (true) { suffer(); }
Re: [Mod] Better Nametags [better_nametags]
Ah, sorry, i see i misunderstood you.Piezo_ wrote:That's... what I said.Stix wrote:Nope, the nametags in that mod are only visible if the player is visible.
They solved the problem of names being visible everywhere, but created the problem of names not being visible through blocks
Hey, what can i say? I'm the bad guy.
- Piezo_
- Member
- Posts: 219
- Joined: Fri Jul 20, 2018 21:36
- GitHub: is proprietary I use NotABug
- Location: (x,y,z)
Re: [Mod] Better Nametags [better_nametags]
For those of you who are wondering, I have done some experimentation with unlimited_player_transfer_distance and player_transfer_distance on my server, and found them to be very unreliable (Often failing to limit the player's nametag view distance for no clear reason).
Whether or not this is a bug in all Minetest clients, I am not sure, but I will continue to keep this mod as a solution for people in my situation.
Whether or not this is a bug in all Minetest clients, I am not sure, but I will continue to keep this mod as a solution for people in my situation.
while (true) { suffer(); }
- Desour
- Member
- Posts: 1473
- Joined: Thu Jun 19, 2014 19:49
- GitHub: Desour
- IRC: Desour
- In-game: DS
- Location: I'm scared that if this is too exact, I will be unable to use my keyboard.
Re: [Mod] Better Nametags [better_nametags]
Piezo_ wrote:Are you looking for a mod that also Hides players' names when sneaking?
Piezo_ wrote:This mod replaces the default nametag with an entity that has a nametag of its own. That way, no one sees a player's nametag unless their client has loaded that player, but you still get all the features included with a default nametag, such as toggling visibility with F1, easy color-configuration, and the ability to see names through blocks!
You can see it through nodes? So, you attach an entity to the player object and give this entity a nametag?Piezo_ wrote:Better Nametags also features fully customizable nametag colors, so you can have players' nametag colors be based on any condition you can imagine, whether that be privilege-based, health-based, or even based on whether or not the player is standing on top of a block of cheese!
Why don't you set the nametag directly of the player? (https://github.com/minetest/minetest/bl ... .txt#L5047)
You could even set alpha. (https://github.com/minetest/minetest/bl ... .txt#L2286)
What do you think about making a PR to minetest_game? You could add alpha to the nametag color when sneaking here.
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)
- Piezo_
- Member
- Posts: 219
- Joined: Fri Jul 20, 2018 21:36
- GitHub: is proprietary I use NotABug
- Location: (x,y,z)
Re: [Mod] Better Nametags [better_nametags]
Yep. Sometimes, that's a good thing.DS-minetest wrote:You can see it through nodes?
Literally my previous reply in this thread.DS-minetest wrote:So, you attach an entity to the player object and give this entity a nametag?
Why don't you set the nametag directly of the player?
Some clients don't support nametag alpha. Also, if you looked at the source code, you'd see that this mod both sets the alpha of the player's actual default nametag to 0, AND sets its text to a single whitespace character, meaning that unless something very stupid happens, the default nametag is GONE when we need it to be.DS-minetest wrote:You could even set alpha. You could add alpha to the nametag color when sneaking
EDIT: Empty string = not good. Changed that
Last edited by Piezo_ on Sat Sep 08, 2018 05:20, edited 2 times in total.
while (true) { suffer(); }
- Desour
- Member
- Posts: 1473
- Joined: Thu Jun 19, 2014 19:49
- GitHub: Desour
- IRC: Desour
- In-game: DS
- Location: I'm scared that if this is too exact, I will be unable to use my keyboard.
Re: [Mod] Better Nametags [better_nametags]
Sorry, I haven't seen your previous post. Seems like it took me longer than 14 minutes to write mine.Piezo_ wrote:Literally my previous reply in this thread.DS-minetest wrote:So, you attach an entity to the player object and give this entity a nametag?
Why don't you set the nametag directly of the player?
Do you refer to clients with old minetest versions? I meant nametags being half transparent when sneaking.Piezo_ wrote:Some clients don't support nametag alpha. Also, if you looked at the source code, you'd see that this mod both sets the alpha of the player's actual default nametag to 0, AND sets its text to an empty string, meaning that unless something very stupid happens, the default nametag is GONE when we need it to be.DS-minetest wrote:You could even set alpha. You could add alpha to the nametag color when sneaking
Btw. looking at your code, in the on_step callback self.object:get_luaentity() doesn't make much sense because self is already the luaentity. (https://github.com/minetest/minetest/bl ... .txt#L3301)
Also you don't need to set the position of your nametag object on_step, use object attachment.
This might also be of interest. (not in 0.4)
Your code could probably be more efficient, try doing less on step.
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)
- Piezo_
- Member
- Posts: 219
- Joined: Fri Jul 20, 2018 21:36
- GitHub: is proprietary I use NotABug
- Location: (x,y,z)
Re: [Mod] Better Nametags [better_nametags]
Thanks! I'll fix that.DS-minetest wrote: self.object:get_luaentity() doesn't make much sense because self is already the luaentity.
I did, in fact try this. It resulted in a weird glitch, where the entity's nametag would appear disembodied to the attached player at (0,0,0), or the lowest coordinate currently loaded.DS-minetest wrote:Also you don't need to set the position of your nametag object on_step, use object attachment.
Also good to know, but since set_attach doesn't work properly with nametags, and I need to keep track of the tag, but also have nametags move smoothly, the on_steps are my last and only choice.DS-minetest wrote:This might also be of interest. (not in 0.4)
Your code could probably be more efficient, try doing less on step.
Also, I've tested this mod on my server, I've had players die, leave and join the game, and use an in-development portal mod to travel over 10000 blocks, and their nametag entity still manages itself properly.
while (true) { suffer(); }
- ManElevation
- Member
- Posts: 896
- Joined: Tue Aug 02, 2016 22:04
- GitHub: ManElevation
- IRC: ManElevation
- In-game: ManElevation
- Location: Madrid,Spain
Re: [Mod] Better Nametags [better_nametags]
looks goods
My Public Mods! Discord: Rottweiler Games#3368
- Piezo_
- Member
- Posts: 219
- Joined: Fri Jul 20, 2018 21:36
- GitHub: is proprietary I use NotABug
- Location: (x,y,z)
Re: [Mod] Better Nametags [better_nametags]
Update:
Several improvements, including
Several improvements, including
- Sneak-hiding is no longer hard-coded into the nametag system, and can be disabled.
- better_nametags now agressively hides the player's actual nametag, in case some other mod messes with it.
- Nametag updating is now handled by the nametag itself, instead of global step, eliminating the old, clunky system that had trouble keeping track of itself.
- The game can now tell if your nametag has "died" (left the world with static_save off), and will make a new one for you.
- I tried using set_attach(), but I'm sorry, it just doesn't work right. I think it's because the parent bone is missing in first person view, but it could be something even weirder. What I have now works just fine, and I'm sticking with that until minetest's devs fix their crap.
while (true) { suffer(); }
- Piezo_
- Member
- Posts: 219
- Joined: Fri Jul 20, 2018 21:36
- GitHub: is proprietary I use NotABug
- Location: (x,y,z)
Re: [Mod] Better Nametags [better_nametags]
A small update to support the Witchcraft mod's invisibility potion.
while (true) { suffer(); }
- Piezo_
- Member
- Posts: 219
- Joined: Fri Jul 20, 2018 21:36
- GitHub: is proprietary I use NotABug
- Location: (x,y,z)
Re: [Mod] Better Nametags [better_nametags]
Update
A not-so-small update to the first mod I ever made, the mod no longer uses the clunky entity hack, fixing a whole heap of bugs.
There's finally a reason for /players to exist now: It shows players' nametags instead of just their names.
Also, the screenshot has been updated, and you can find the nametags I use on my server commented out at the top of tag_types.lua.
Oh, by the way, minetest_systemd support has been added.
A not-so-small update to the first mod I ever made, the mod no longer uses the clunky entity hack, fixing a whole heap of bugs.
There's finally a reason for /players to exist now: It shows players' nametags instead of just their names.
Also, the screenshot has been updated, and you can find the nametags I use on my server commented out at the top of tag_types.lua.
Oh, by the way, minetest_systemd support has been added.
while (true) { suffer(); }
Who is online
Users browsing this forum: No registered users and 28 guests