Garry's Mod

Garry's Mod

Not enough ratings
Player Class Configuration (How To Get More Detectives)
By Loch-Boch
How to change how many Innocents, Traitors and Detectives there are with some simple commands.
   
Award
Favorite
Favorited
Unfavorite
The Defaults and What They Mean
The people who made Trouble in Terrorist Town have put in some handy commands that are quite unfamiliar to most Garry's Mod players. These commands are changable by admins and are usually only usuable when 'sv_cheats' is set to '1'. Here are the commands we need and their defaults:
ttt_detective_pct (0.13)
ttt_traitor_pct (0.25)
ttt_detective_min_players (10)

Most of these defaults disallow there to be many or even any detectives which inspired me to make this. The default for 'ttt_detective_min_players' tells us that at least 10 people need to be able to play before a detective can be possible to exist which I didn't like considering I only play with about 3 or 4 other people when I play TTT. Now on to 'ttt_detective_pct' and 'ttt_traitor_pct'. The 'pct' in the command I believe would suggest percentage. The defaults of these commands mean this: 62% of people are innocent, 25% of people are traitors and a measly 13% of people are detectives. This is why there aren't any detectives in your game.
What I Recommend You Should Set These Commands To
My preferences for these commands go as follows:
ttt_detective_pct 0.25
ttt_traitor_pct 0.25
ttt_detective_min_players 4

This means when you play with 3 of your friends (4 in total) there will be 1 Traitor, 1 Detective and 2 Innocents. But be warned when there is only 3 people and you have set ttt_detective_min_players to 1, then the 1 Singular Innocent can work out who the Traitor is because the Detective will be a Detective if it says they are and if you are Innocent then the other person must be the 1 Traitor. Any player total above 3 will ensure a fair and fun round.
Using the Commands
Choose your preference of commands and follow these simple steps.
Awkward Way:
Go into your console by pressing ` and then type in those commands individually (not every command next to each other). Then everytime you rejoin, re-type the commands.
Less Awkward Way:
Go to C:\Program Files (x86)\Steam\SteamApps\common\GarrysMod\garrysmod\cfg or something like that and find listenserver.cfg or if you have a real server with files and stuff go to YourServer\garrysmod\cfg and find server.cfg. Open the cfg file with Notepad or something like that and put in the commands on seperate lines there. Now everytime you enter your Dedicated or Listen Server these commands have been automatically set up. Thanks for reading and help me improve this guide with any improvements you have and type them in the comments.
2 Comments
Loch-Boch  [author] Jan 26, 2015 @ 10:17pm 
Try using the command: "exec listenserver" or "exec server" in the console, depending on which type of server you are using and see if it works. If it does, all the commands are right and there is a problem with initialising the cfg. If that is the case move the commands to autoexec.cfg if it is a listen server. Unfortunately, I don't know of a way to fix a dedicated server initialising the cfg wrong. If the commands I just listed did not affect the amount of detectives then go into the cfg and copy the commands exactly into the console, one at a time. If they do not work, there is something wrong with the sintax of the commands and hopefully the console may list how. If this does not help, send me your cfg so I can see what the problem is and hopefully fix it.
Tally Jan 26, 2015 @ 9:41pm 
Hey thanks for the help but I am still having a problem. We play with 6 - 7 People and no one ever gets detective. I have copied the layout you generally have but it doesn't work.