Garry's Mod

Garry's Mod

Not enough ratings
[TTT2] Role Debugger
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Server content
Addon Tags: Roleplay
File Size
Posted
Updated
1.244 MB
21 Mar, 2021 @ 12:04pm
19 Jan @ 8:50am
11 Change Notes ( view )

Subscribe to download
[TTT2] Role Debugger

In 3 collections by DevilsThumb
LDTNE - TTT Server - Roles
49 items
Testing 2
32 items
LDTNE - minimal TTT2 Server - Admin
20 items
Description
Overview
This modification aims to simplify the debugging of roles in TTT2. Only the TTT2 (Base) is needed to run this mod, whereas ULX is not necessary.

This works only if you are an admin or superadmin on the server! Also, the functionalities are started only after the menu has been opened. It can be manually deactivated inside the menu panel.

The source code can be find on GitHub[github.com].


Description
The addon introduces an additional panel in the F1 menu of TTT2.
This makes it possible to adjust the roles of all players and bots. It also makes it much easier to set the number of bots. At the moment the following features are included:
  • The roles of each teammate and bot can be set individually. These can be applied either in the same round or in the next round.
  • The number of bots can easily be increased or decreased.
  • Roles can be locked per player for the following rounds.
  • A permanent overhead display of player roles during the round can be activated.


Usage
The "Debugging" menu can be found in the F1 menu of TTT2. At the moment, only the administration of roles is implemented here.

The players and bots on the server are displayed in two separate lists. The dropdown menu allows you to select a role for each player. By default, this is set to random, whereby the game decides on the role of the player. If something else is selected, this role is automatically taken over in the next round. (This functionality can be switched off in the settings). The Apply Now button allows the selected roles to be changed in the same round. The roles set to Random will not be changed.

The number of bots can be changed using the slider. These will also be spawned in the next round or removed again. With the Apply now button, the change takes effect directly.
It is already possible to select the roles.

The update buttons select the current roles of the players. The Reset buttons, on the other hand, reset the selection to random. In the settings, it is possible to have the update carried out when the menu is opened.

A lock button is available for each player, which makes it possible to keep the same role in all subsequent rounds. Otherwise, the role is randomly selected again in the next round or the round after that.

There is also a button to start a new round directly.

In the settings, you can determine whether the roles of the players are displayed by means of overhead icons during the round.


Configuration
At the moment there are the following convars (all of those can be changed in the addon itself):
ttt_rolemanager_overhead_icons 1 // [0/1] (def.: 1) Show overhead role icons during round. ttt_rolemanager_auto_apply 1 // [0/1] (def.: 1) Automatically activates the roles on the next round if a value is changed. ttt_rolemanager_auto_refresh 0 // [0/1] (def.: 0) Automatically updates the roles, if the debug menu is opened.


Planed features:
  • Class debugging: Basically the same with classes, like with the roles.
  • Weapon debugging: Panel to give each player a certain Weapon
  • Bot functionality: Enable Bots to do some basic things like attaking a certain Bot or Player.
    Spawn Bots near the player.
  • ...


Credits:
DevilsThumb: Creator of this addon.
Mineotopia + The TTT2 Team: For some parts of the interface that I adapted.
14 Comments
cooocki 7 Aug, 2023 @ 12:35pm 
For some reason I cant see the bots role above their head when I spawn them in. Only sometimes this works. Its like theyre in a bugged state where they dont exist to get a role applied to but still spawn in.
DevilsThumb  [author] 3 Aug, 2023 @ 1:30pm 
@SeitenSifir

Hey, I just looked into my code and it looks like I did not implement an option to disable this for non admin-players. I am not completly sure, why I didn't set it as an admin menu. (It was probably it fitted in more nicely in the non-admin category). But non-admin users should definetly not be able to use the tool. In case they can, this is a bug and I need to look into this. Normal users should be presented with a basic menu layout, however they are not allowed to receive information from the server. This means the server will not give them a list of current player roles and of cause it will not accept any commands from a non-admin user.
SeitenSifir 23 Jul, 2023 @ 6:39am 
In my server everyone, also de user group can use the Menu on F1. How can i change that that only admins can use?
Tim | Mineotopia 13 May, 2022 @ 4:00am 
@Crumpetitive: This is a TTT2 issue that is fixed by either resetting your convars or changing the traitor credits in the F1 menu -> roles -> traitor
Crumpetitive 5 May, 2022 @ 5:59pm 
For some reason I traitors have zero credits upon start unlike they should. The config setting is still set to starting credits being 2 so I don't know why its not working.
Blechkanne 1 May, 2022 @ 7:48am 
Would love some buttons for giving credits to players and changing debug_prevent_win. Me and my colleagues use this to code and test a lot
KillerfoxyLP 22 Oct, 2021 @ 6:26am 
thats kinda funny being able to controll players and sure tell me if its done and ty!
DevilsThumb  [author] 22 Oct, 2021 @ 5:37am 
Beyond assigning a role to them you can't. Yet.
I was working on a separate addon, that should in theory allow you to control bots and other players. But the controls are really laggy. And I couldn't test it to the extend needed to get it running smoothly.

But since it works quite well with bots on its own I might release a first version for bots only. I will post a comment to let you know, if you are subscribe to the comments of this addon.
KillerfoxyLP 21 Oct, 2021 @ 5:28am 
how can u controll bots?
DevilsThumb  [author] 4 May, 2021 @ 2:56pm 
Thank you very much for the notice. I have already taken care of it. The problem should be solved now.