[Mod] Coloured Nametags [coloured_nametags]

Post Reply
Amaz
Member
Posts: 354
Joined: Wed May 08, 2013 08:26
GitHub: Amaz1
IRC: Amaz
In-game: Amaz

[Mod] Coloured Nametags [coloured_nametags]

by Amaz » Post

This is a mod that allows players to set their nametag to a colour of their choice, so long as it is on of the 8 colours (9 if you count white, the default)! (I am hoping to expand this at a later date.)

It uses an api function (Is that the right word?) added on the 15th of May, so a (recent) dev build is necessary.
It has no point in singleplayer, as your nametag can't be viewed there, so this is a purely multiplayer mod!

Using this mod is simple:
The player types in the command /nametag and is presented with this formspec:
Image
Then, it is as simple as it looks! The player presses a button, and his nametag is set to that colour!
This is a video showing the mod in action (I'm cycling through the colours on another (off-screen) client! Also, it doesn't have orange, and black, because I added those after I made the video...): https://imgrush.com/H1Tv2EryC1Wz

I still need to find a way of saving the colours when the player leaves, as now, the player has to chose the colour every time s/he joins.

Download: https://github.com/Amaz1/coloured_namet ... master.zip
Github link (Can be clicked on or cloned): https://github.com/Amaz1/coloured_nametag.git

ToDo:
  • Make the nametag colours preserve over reboot.
    Make the mod more customisable.
    Maybe make the formspec a little more colourful.
    Maybe make a second page of colours?
License: MIT
Last edited by Amaz on Fri Sep 02, 2016 21:42, edited 1 time in total.

User avatar
ExeterDad
Member
Posts: 1717
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad
Location: New Hampshire U.S.A

Re: [Mod] Coloured Nametags [coloured_nametags]

by ExeterDad » Post

Thanks for the demo. I was pretty excited when I saw the devs were working on this. It could be useful for identifying server admins or moderators.

Or in pvp. Red for low health, yellow for moderate, green for full health.
It will be interesting to see what ideas pop up in the future.

Niebieski
Member
Posts: 24
Joined: Fri Oct 17, 2014 18:53
GitHub: Snipie
IRC: Niebieski
In-game: Niebieski

Re: [Mod] Coloured Nametags [coloured_nametags]

by Niebieski » Post

Thanks for the contribution Amaz.
Sure it will be of a good use.

User avatar
Don
Member
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: [Mod] Coloured Nametags [coloured_nametags]

by Don » Post

Nice. I think a lot of players will like these.
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here

Amaz
Member
Posts: 354
Joined: Wed May 08, 2013 08:26
GitHub: Amaz1
IRC: Amaz
In-game: Amaz

Re: [Mod] Coloured Nametags [coloured_nametags]

by Amaz » Post

Thanks all!
ExeterDad, I really liked your pvp idea, so, I went ahead and made it!
https://gist.github.com/Amaz1/e98c2e5810ce4c05f307 (Should I make a github repo and a separate topic for it?)

User avatar
ExeterDad
Member
Posts: 1717
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad
Location: New Hampshire U.S.A

Re: [Mod] Coloured Nametags [coloured_nametags]

by ExeterDad » Post

Amaz wrote:I really liked your pvp idea, so, I went ahead and made it!
https://gist.github.com/Amaz1/e98c2e5810ce4c05f307 (Should I make a github repo and a separate topic for it?)
Absolutely! It would be a shame for your code to get lost in the forum topics. Making it a mod for those wanting a quick solution is sensible to me. And those that want to use the code for more advanced mod ideas will know where to find a example.

User avatar
Don
Member
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: [Mod] Coloured Nametags [coloured_nametags]

by Don » Post

ExeterDad wrote:
Amaz wrote:I really liked your pvp idea, so, I went ahead and made it!
https://gist.github.com/Amaz1/e98c2e5810ce4c05f307 (Should I make a github repo and a separate topic for it?)
Absolutely! It would be a shame for your code to get lost in the forum topics. Making it a mod for those wanting a quick solution is sensible to me. And those that want to use the code for more advanced mod ideas will know where to find a example.
I totally agree. This is something people will want. The only issue I can see is confusing between the different colored nametags mods.
Can I suggest that you have a separate repo but add it to the first post of this thread. That way people can see both at the same time. Then they can decide which one they want.
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here

Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests