Author Topic: [TTT] Scoreboard Ranks for ULX - Version 1.2.0  (Read 71276 times)

0 Members and 2 Guests are viewing this topic.

Offline Decicus

  • Hero Member
  • *****
  • Posts: 552
  • Karma: 81
    • Alex Thomassen
[TTT] Scoreboard Ranks for ULX - Version 1.2.0
« on: May 28, 2015, 06:16:12 AM »
This is a project I started a while ago, but never got around to test and eventually forgot it. Saw it in my repos and decided I'd create a post for it on the forums.

The project aims to simplify adding custom ranks for both specific users and groups. You can style the ranks with RGB (Red, Green, Blue) color values or add a "rainbow" effect that cycles through the colors.

Commands:
The commands will be listed in the following format: "command" <parameters> -- Command description/explanation
The console commands have a "ulx " prefix, such as: "ulx command".
The chat commands have a "!" prefix, such as: "!command".

The commands will be listed by permissions. This is just by default and can be edited via ULX/XGUI as any other commands.

  • Admins:
           
    • "addrank" <player> <rank> <red> <green> <blue> -- Adds or changes rank for a player, with custom colors using RGB
    • "addrankid" <steam_id> <rank> <red> <green> <blue> -- Adds or changes rank of a Steam ID, with custom colors using RGB
    • "changerank" <player> <rank> <red> <green> <blue> -- See "addrank" - Only works for existing custom ranks.
    • "changerankid" <steam_id> <rank> <red> <green> <blue> -- See "addrankid" - Only works for existing custom ranks.
    • "removerank" <player> -- Removes someone's custom rank if it exists.
    • "removerankid" <steam_id> -- Removes someone's custom rank (using their Steam ID) if it exists.
    • "rainbowrank" <player> <rank> -- Adds/changes rank of a player and sets the color to cycle ("rainbow").
    • "rainbowrankid" <steam_id> <rank> -- Adds/changes rank of a Steam ID and sets the color to cycle ("rainbow").
       
  • Superadmins:
    • "addgrouprank" <group name> <rank> <red> <green> <blue> -- Adds or changes rank for a group, with custom colors using RGB
    • "removegrouprank" <group name> -- Removes a custom group rank.
    • "rainbowgrouprank" <group name> <rank> -- Adds/changes rank of a group and sets the color to cycle ("rainbow").
    • "columnname" <column name/title> -- Changes the column name/title that is displayed at the top of the scoreboard.
    • "defaultrank" <rank> -- Changes the default rank for players and groups that have no custom rank. This rank is by default RGB: 255, 255, 255 (white), but can be modified with "defaultcolor".
    • "defaultcolor" <red> <green> <blue> -- Changes the color of the default rank for players and groups that have no custom rank. Default is RGB: 255, 255, 255 (white).
    • "columnwidth" <width> -- Changes the column width in the scoreboard.
       

Default settings:
The default settings can be found here, just in case you would like to reset them back to default.
  • Default rank: Guest
  • Default column title: Rank
  • Default column width: 80

Screenshot:
This has the following settings:
  • Default rank: Guest (not displayed)
  • Column title: Title
  • Column width: 120


Installation:
  • Download and extract the zip file. You should get a file called "ttt-sb-ranks"
  • Upload it to your <garrysmod>/addons/ folder (on your server), so you have the folder structure: <garrysmod>/addons/ttt-sb-ranks
  • Change the map or restart the server

Source code:
The most up-to-date source code can be found on the GitHub repository: https://github.com/Decicus/TTT-Scoreboard-Ranks-for-ULX
I would not recommend using it from that page (unless you download via the "Releases" page), as it may be untested.

Download:
The latest, stable version will be available at the bottom of this post.
Please keep in mind you have to be registered and logged in to download it directly from this thread.

Changelog:
  • Version 1.2.0 - Released: 2019-01-13:
           
    • Adds "ulx defaultcolor" for modifying the color of the default rank.
       
  • Version 1.1.1:
           
    • Hotfixes a scoreboard issue with missing MIA and CD players.
       
  • Version 1.1:
           
    • Added the ability to add, modify, remove and "rainbow" someones rank using their Steam ID.
       
  • Version 1.0:
           
    • Added the ability to add, modify, remove and "rainbow" someones rank using their player name (has to be connected).
    • Added the ability to modify the default rank, width of column for ranks and name of said column.
    • Added the ability to add, modify, remove and "rainbow" ranks for groups.
       

Other notes:
Feel free to contact me either via this thread, a PM on this forum or by e-mail (alex@thomassen.xyz) if you have any questions.

Version history:
All older and current releases can be found here on the following mirrors:
« Last Edit: January 14, 2019, 01:02:18 PM by Decicus »
Contact information:
E-mail: alex@thomassen.xyz.
You can also send a PM.

Offline Decicus

  • Hero Member
  • *****
  • Posts: 552
  • Karma: 81
    • Alex Thomassen
Re: [TTT] Scoreboard Ranks for ULX
« Reply #1 on: August 18, 2015, 09:53:52 AM »
As I already wrote when I replied to your topic in the "Developers Corner", I would have no way of currently supporting that unless you edit the core gamemode files themselves. This is not possible as an addon.
Contact information:
E-mail: alex@thomassen.xyz.
You can also send a PM.

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: [TTT] Scoreboard Ranks for ULX
« Reply #2 on: August 27, 2015, 12:39:44 AM »
Looks really nice, I don't entirely understand it, but looks nice.
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline Luk | twitch.tv/doctorluk

  • Newbie
  • *
  • Posts: 40
  • Karma: 12
Re: [TTT] Scoreboard Ranks for ULX
« Reply #3 on: August 30, 2015, 03:42:49 PM »
We're having a bit of a problem with this addon.

It randomly causes players to not see "Missing in Action" or "Confirmed Dead" players.

Here is a screenshot of how it looks for me, and this is a screenshot how it looks for another player (note the missing players in the colums "Missing in Action" and "Confirmed Dead").

We're using the version linked in your first post and not from Github.
Host of Spielwiese der Erwachsenen, a German TTT Server for adults only.

Offline Decicus

  • Hero Member
  • *****
  • Posts: 552
  • Karma: 81
    • Alex Thomassen
Re: [TTT] Scoreboard Ranks for ULX
« Reply #4 on: September 02, 2015, 07:13:32 AM »
We're having a bit of a problem with this addon.

It randomly causes players to not see "Missing in Action" or "Confirmed Dead" players.

Here is a screenshot of how it looks for me, and this is a screenshot how it looks for another player (note the missing players in the colums "Missing in Action" and "Confirmed Dead").

We're using the version linked in your first post and not from Github.

Sorry for the late reply, I have been travelling for a few days.
This is an issue someone reported to me a little while back on Steam, but I never managed to find a fix for it. The only thing I do to edit the scoreboard, is to use TTT hooks, which makes me believe this is a TTT issue and not an addon issue, but I cannot confirm that 100%.

The other thing is, was that I wasn't able to fully reproduce this bug. At least not with just ULib, ULX and this addon running on TTT.
Contact information:
E-mail: alex@thomassen.xyz.
You can also send a PM.

Offline Bytewave

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 718
  • Karma: 116
  • :)
    • My Homepage
Re: [TTT] Scoreboard Ranks for ULX
« Reply #5 on: September 07, 2015, 08:42:57 AM »
I'm not sure how your data structure works right now, but if this could support it, is there any chance you could add adding ranks to users by SteamID and not name? It'd help if, say, I was migrating from another addon (which I plan on doing) and moving all my tags over without having everyone sign into the server.
Also, which takes the higher priority? User rank tags or group rank tags? Basically, if I have both set for one player, which one will show? Read the git repo, derp.
bw81@ulysses-forums ~ % whoami
Homepage

Offline Decicus

  • Hero Member
  • *****
  • Posts: 552
  • Karma: 81
    • Alex Thomassen
Re: [TTT] Scoreboard Ranks for ULX
« Reply #6 on: September 07, 2015, 12:39:17 PM »
I'm not sure how your data structure works right now, but if this could support it, is there any chance you could add adding ranks to users by SteamID and not name? It'd help if, say, I was migrating from another addon (which I plan on doing) and moving all my tags over without having everyone sign into the server.

It does actually use the Steam IDs to set the rank, but for some odd reason I never added the commands to do it via Steam ID only. I'll try to update it to support adding/removing via Steam ID by tomorrow.
Contact information:
E-mail: alex@thomassen.xyz.
You can also send a PM.

Offline Decicus

  • Hero Member
  • *****
  • Posts: 552
  • Karma: 81
    • Alex Thomassen
Re: [TTT] Scoreboard Ranks for ULX - Version 1.1
« Reply #7 on: September 08, 2015, 10:35:15 AM »
Updated to 1.1 to support Steam IDs in commands on both the GitHub and the original post. I did test it, but let me know if you stumble upon any issues I may have missed.
Contact information:
E-mail: alex@thomassen.xyz.
You can also send a PM.

Offline Isaac.game

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Re: [TTT] Scoreboard Ranks for ULX
« Reply #8 on: October 05, 2015, 06:35:23 PM »
Sorry for the late reply, I have been travelling for a few days.
This is an issue someone reported to me a little while back on Steam, but I never managed to find a fix for it. The only thing I do to edit the scoreboard, is to use TTT hooks, which makes me believe this is a TTT issue and not an addon issue, but I cannot confirm that 100%.

The other thing is, was that I wasn't able to fully reproduce this bug. At least not with just ULib, ULX and this addon running on TTT.
I get this problem too on my TTT server and to fix it I always have to do ulx refreshranks command. maybe make it so it force's it to refresh every 20 seconds
« Last Edit: October 05, 2015, 06:37:09 PM by Isaac.game »

Offline Decicus

  • Hero Member
  • *****
  • Posts: 552
  • Karma: 81
    • Alex Thomassen
Re: [TTT] Scoreboard Ranks for ULX - Version 1.1
« Reply #9 on: October 06, 2015, 05:55:28 AM »
I get this problem too on my TTT server and to fix it I always have to do ulx refreshranks command. maybe make it so it force's it to refresh every 20 seconds
That's good to know. As I said, I haven't been able to reproduce it, which makes it hard to fix. By default, "refreshranks" is essentially called every time someone joins/rejoins the server (On a mapchange, this would then occur multiple times in a short timespan due to it counting everyone as joining).

20 seconds would be a bit too often in my opinion, if I decide to make it auto-refresh, but we'll see if I can figure out how to combat this issue.
Contact information:
E-mail: alex@thomassen.xyz.
You can also send a PM.

Offline Vilobion

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
Re: [TTT] Scoreboard Ranks for ULX - Version 1.1
« Reply #10 on: December 01, 2015, 09:12:13 PM »
Just wanted to say that this is great, although I'm experiencing the random disappearing of MIA/Dead/All players issue. Will chime in later if I notice any patterns.

Offline Decicus

  • Hero Member
  • *****
  • Posts: 552
  • Karma: 81
    • Alex Thomassen
Re: [TTT] Scoreboard Ranks for ULX - Version 1.1
« Reply #11 on: December 01, 2015, 09:58:02 PM »
Just wanted to say that this is great, although I'm experiencing the random disappearing of MIA/Dead/All players issue. Will chime in later if I notice any patterns.

It sucks that it's an issue, because I still haven't figured out what's causing it. Any more info on it would be great.

I have been working on a version 1.2 that will add a few more features, and heck, maybe the other changes I did to support those features fixes that issue, but I haven't been available enough to finish the release yet.
Contact information:
E-mail: alex@thomassen.xyz.
You can also send a PM.

Offline Vilobion

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
Re: [TTT] Scoreboard Ranks for ULX - Version 1.1
« Reply #12 on: December 03, 2015, 10:46:45 AM »
My gut is saying that it has to do with making changes to ranks/titles while mid-round. I've only had 3 concurrent players on my server thus far while I build it out so it's not a very good sample size.

Offline Decicus

  • Hero Member
  • *****
  • Posts: 552
  • Karma: 81
    • Alex Thomassen
Re: [TTT] Scoreboard Ranks for ULX - Version 1.1
« Reply #13 on: December 03, 2015, 10:52:24 AM »
My gut is saying that it has to do with making changes to ranks/titles while mid-round. I've only had 3 concurrent players on my server thus far while I build it out so it's not a very good sample size.

People have stated that running a "ulx refreshranks" when it occurs seems to fix it (but once again, I haven't been able to reproduce the bug so I can't confirm or deny it actually works). Although the ranks are refreshed every time a rank is modified in any way, so it's weird if that would help. For now, you could try that whenever it happens, but of course I don't want that to be the 'permanent fix'.
Contact information:
E-mail: alex@thomassen.xyz.
You can also send a PM.

Offline GenericDerek

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
Re: [TTT] Scoreboard Ranks for ULX - Version 1.1
« Reply #14 on: December 10, 2015, 09:07:49 AM »
I just wanted to add my input, when this happened to me, refreshing the ranks showed the MIA and KIA sections, but it wasn't moving some players into them when they were killed.