[Mod] Hide Name [hidename] (v1.1)

Post Reply
User avatar
AntumDeluge
Member
Posts: 213
Joined: Sun Aug 07, 2016 05:42
GitHub: AntumDeluge
IRC: AntumDeluge
Contact:

[Mod] Hide Name [hidename] (v1.1)

by AntumDeluge » Post

Hide Name (hidename)

Description:

A mod that allows players to hide their nametags from view.

Usage:

Chat commands:
  • /nametag [command]
    • Displays nametag info or sets visibility.
    • commands:
      • hide: Sets nametag hidden.
      • show: Sets nametag visible.
      • status: Prints the visible/hidden state of nametag (default).
  • /hidename
    • Alias for /nametag hide
  • /showname
    • Alias for /nametag show
Settings:
  • hidename.use_alpha
    • Use alpha color level to hide nametag instead of clearing text.
    • type: bool
    • default: false
Licensing:

MIT

Requirements:

Depends:
  • Required: none
  • Optional: non
Privileges:
  • Required: none
Links:
Last edited by AntumDeluge on Tue May 18, 2021 21:19, edited 13 times in total.

User avatar
Andrey01
Member
Posts: 2574
Joined: Wed Oct 19, 2016 15:18
GitHub: Andrey2470T
In-game: Andrey01
Location: Russia, Moscow

Re: [Mod] Hide Name [0.2] [hidename]

by Andrey01 » Post

Nice idea! It may be useful in some situations, especially on servers!

User avatar
AntumDeluge
Member
Posts: 213
Joined: Sun Aug 07, 2016 05:42
GitHub: AntumDeluge
IRC: AntumDeluge
Contact:

Re: [Mod] Hide Name [0.2] [hidename]

by AntumDeluge » Post

The idea came from some of my kids complaining that the other kids would follow them around just to torment.

There was a bug before where the nametags automatically became visible again for reasons unknown to me. I haven't done enough testing to see if the bug still persists.

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [Mod] Hide Name [0.2] [hidename]

by azekill_DIABLO » Post

+1 for this useful sneeki mod!
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
AntumDeluge
Member
Posts: 213
Joined: Sun Aug 07, 2016 05:42
GitHub: AntumDeluge
IRC: AntumDeluge
Contact:

Re: [Mod] Hide Name [0.2] [hidename]

by AntumDeluge » Post

Currently doesn't require any special privileges, but thought it may be a good idea. Any suggestions on which? Maybe a new permission, like hide or sneek? Though, maybe requiring a privilege shouldn't be necessary, as the main purpose of this mod is to prevent being bothered by others.

User avatar
BirgitLachner
Member
Posts: 393
Joined: Thu May 05, 2016 10:18
In-game: Bibs

Re: [Mod] Hide Name [0.2] [hidename]

by BirgitLachner » Post

Isn't there is mod where you can only see the nametag, if the person is close to you? It was on a server like that.

The advantage is, that you can't find someone who is far away, but you know the name if you see somebody directly.

User avatar
AntumDeluge
Member
Posts: 213
Joined: Sun Aug 07, 2016 05:42
GitHub: AntumDeluge
IRC: AntumDeluge
Contact:

Re: [Mod] Hide Name [0.2] [hidename]

by AntumDeluge » Post

BirgitLachner wrote:Isn't there is mod where you can only see the nametag, if the person is close to you? It was on a server like that.

The advantage is, that you can't find someone who is far away, but you know the name if you see somebody directly.
That would be nice.

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [Mod] Hide Name [0.2] [hidename]

by azekill_DIABLO » Post

wouldn't be too hard! a loop over all player ... wait ... it's hard.
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
GreenXenith
Member
Posts: 1356
Joined: Wed Oct 28, 2015 01:26
GitHub: GreenXenith
Location: UTC-8:00
Contact:

Re: [Mod] Hide Name [0.2] [hidename]

by GreenXenith » Post

BirgitLachner wrote:Isn't there is mod where you can only see the nametag, if the person is close to you? It was on a server like that.

The advantage is, that you can't find someone who is far away, but you know the name if you see somebody directly.
That is already part of default Minetest. I forget the setting, but it already exists.
YouTube | Mods | Patreon | Minetest Discord @greenxenith

You should not be able to read this message.

User avatar
BirgitLachner
Member
Posts: 393
Joined: Thu May 05, 2016 10:18
In-game: Bibs

Re: [Mod] Hide Name [0.2] [hidename]

by BirgitLachner » Post

GreenDimond wrote: That is already part of default Minetest. I forget the setting, but it already exists.
Good to know ... now I can search for it, may be :-)

User avatar
AntumDeluge
Member
Posts: 213
Joined: Sun Aug 07, 2016 05:42
GitHub: AntumDeluge
IRC: AntumDeluge
Contact:

Re: [Mod] Hide Name [0.2] [hidename]

by AntumDeluge » Post

GreenDimond wrote:That is already part of default Minetest. I forget the setting, but it already exists.
A search in the settings for "name" doesn't bring anything up. I'll keep looking. Maybe it isn't configured in settingtypes.txt.

User avatar
AntumDeluge
Member
Posts: 213
Joined: Sun Aug 07, 2016 05:42
GitHub: AntumDeluge
IRC: AntumDeluge
Contact:

Re: [Mod] Hide Name [0.2] [hidename]

by AntumDeluge » Post

These are the only settings that come up in the version of default that I have installed:

Code: Select all

$ grep -r "settings\:" ./mods/default/
./mods/default/functions.lua:if minetest.settings:get_bool("enable_lavacooling") ~= false then
I have default from minetest_game @ Git commit 3d1fc42.


--- Edit ---

Just updated to current commit (5d19fd6) & output is the same. The only setting is enable_lavacooling.

Here is the ouput for all mods in minetest_game:

Code: Select all

$ grep -r --exclude-dir=.git "settings\:" ./
./mods/default/functions.lua:if minetest.settings:get_bool("enable_lavacooling") ~= false then
./mods/beds/functions.lua:local enable_respawn = minetest.settings:get_bool("enable_bed_respawn")
./mods/beds/functions.lua:	local enable_night_skip = minetest.settings:get_bool("enable_bed_night_skip")
./mods/give_initial_stuff/init.lua:local stuff_string = minetest.settings:get("initial_stuff") or
./mods/give_initial_stuff/init.lua:if minetest.settings:get_bool("give_initial_stuff") then
./mods/stairs/init.lua:local replace = minetest.settings:get_bool("enable_stairs_replace_abm")
./mods/bones/init.lua:local share_bones_time = tonumber(minetest.settings:get("share_bones_time")) or 1200
./mods/bones/init.lua:local share_bones_time_early = tonumber(minetest.settings:get("share_bones_time_early")) or share_bones_time / 4
./mods/bones/init.lua:	local bones_mode = minetest.settings:get("bones_mode") or "bones"
./mods/fire/init.lua:local flame_sound = minetest.settings:get_bool("flame_sound")
./mods/fire/init.lua:local fire_enabled = minetest.settings:get_bool("enable_fire")
./mods/fire/init.lua:	local fire_disabled = minetest.settings:get_bool("disable_fire")
./mods/creative/init.lua:local creative_mode_cache = minetest.settings:get_bool("creative_mode")
./mods/killme/init.lua:			if minetest.settings:get_bool("enable_damage") then
./mods/tnt/init.lua:local enable_tnt = minetest.settings:get_bool("enable_tnt")
./mods/tnt/init.lua:local tnt_radius = tonumber(minetest.settings:get("tnt_radius") or 3)
I don't see anything in there that looks related.

Xanthin
Member
Posts: 126
Joined: Fri Mar 07, 2014 14:05
GitHub: Xanthin
IRC: Xanthin
In-game: Xanthin
Location: Germany

Re: [Mod] Hide Name [0.2] [hidename]

by Xanthin » Post

If I'm correct

Code: Select all

#    Whether players are shown to clients without any range limit.
#    Deprecated, use the setting player_transfer_distance instead.
#    type: bool
# unlimited_player_transfer_distance = true

#    Defines the maximal player transfer distance in blocks (0 = unlimited).
#    type: int
# player_transfer_distance = 0
is what you are looking for.

But he, such a mod can give players the individual choice whether they like to be unseen in the far or visible, independend from static server settings. :)

User avatar
AntumDeluge
Member
Posts: 213
Joined: Sun Aug 07, 2016 05:42
GitHub: AntumDeluge
IRC: AntumDeluge
Contact:

Re: [Mod] Hide Name [0.2] [hidename]

by AntumDeluge » Post

Ah, I see. They are built into the server core. Thank you Xanthin, that's very helpful.


--- Edit ---

I wonder if those settings would affect this mod. I had an issue before where the players' nametags would become visible again without calling the command to do so. The bug seems to have since been fixed, but I'm not sure how.

User avatar
AntumDeluge
Member
Posts: 213
Joined: Sun Aug 07, 2016 05:42
GitHub: AntumDeluge
IRC: AntumDeluge
Contact:

Re: [Mod] Hide Name [0.2] [hidename]

by AntumDeluge » Post

Update! Added nametag chat command.

Usage:
  • /nametag hide
    • Equivalent to /hidename.
  • /nametag show
    • Equivalent to /showname.
  • /nametag status
    • Displays nametag text & visible state in chat (same as if /nametag is invoked without any parameters).
hidename @ Git commit f83cb7d

User avatar
AntumDeluge
Member
Posts: 213
Joined: Sun Aug 07, 2016 05:42
GitHub: AntumDeluge
IRC: AntumDeluge
Contact:

Re: [Mod] Hide Name [1.0] [hidename]

by AntumDeluge » Post

Changed default to clear nametag text instead of use alpha coloring.

hidename @ Git commit 3f4cc3c

Released version 1.0

User avatar
BirgitLachner
Member
Posts: 393
Joined: Thu May 05, 2016 10:18
In-game: Bibs

Re: [Mod] Hide Name [0.2] [hidename]

by BirgitLachner » Post

Xanthin wrote:If I'm correct

Code: Select all

#    Whether players are shown to clients without any range limit.
#    Deprecated, use the setting player_transfer_distance instead.
#    type: bool
# unlimited_player_transfer_distance = true

#    Defines the maximal player transfer distance in blocks (0 = unlimited).
#    type: int
# player_transfer_distance = 0
is what you are looking for.

But he, such a mod can give players the individual choice whether they like to be unseen in the far or visible, independend from static server settings. :)
Thanks for that information!

xfleblon
New member
Posts: 7
Joined: Thu Sep 14, 2017 07:33

Re: [Mod] Hide Name [1.0] [hidename]

by xfleblon » Post

Hello,

I'm new user in this forum and a beginner with Minetest. I've installed it for my kids.

I'm very interested by this mod, because my kids like to play "hide and seek" with minetest ... but it's not funny with visible nametag !
I've installed and activated HideName mod (stable and 1.0).
It seems to be OK : issued command = "Nametag is now hidden" or "Nametag is already hidden" ....; but nametag is not hidden.
I've tried with several maps and without any other mods to prevent conflict. Same result.
I use Minetest 0.4.16 under Windows 10.

Thanks for help !

User avatar
AntumDeluge
Member
Posts: 213
Joined: Sun Aug 07, 2016 05:42
GitHub: AntumDeluge
IRC: AntumDeluge
Contact:

Re: [Mod] Hide Name [1.0] [hidename]

by AntumDeluge » Post

@xfleblon

What happens if you first issue command /showname, then /hidename?

Does it work if you set hidename.use_alpha to true in minetest.conf file?

Code: Select all

# minetest.conf example
hidename.use_alpha = true

xfleblon
New member
Posts: 7
Joined: Thu Sep 14, 2017 07:33

Re: [Mod] Hide Name [1.0] [hidename]

by xfleblon » Post

@AntumDeluge
First of all, thanks for your quick answer.
Secondly, thanks for the good solution ;-)
The solution was adding "hidename.use_alpha" key with "true" value.
This key doesn't exist in my default "minetest.conf" file.

/showname command before /hidename doesn't change anything for me.

Great ! My kids will be very happy !

User avatar
ManElevation
Member
Posts: 896
Joined: Tue Aug 02, 2016 22:04
GitHub: ManElevation
IRC: ManElevation
In-game: ManElevation
Location: Madrid,Spain

Re: [Mod] Hide Name [1.0] [hidename]

by ManElevation » Post

how to hide name from status?
My Public Mods! Discord: Rottweiler Games#3368

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 23 guests