How to Host TTT

1. Download add-ons

2. Allow players to connect to your machine.

In your router's settings create a new port forwarding rule.

Forward TCP and UDP traffic on port 27015 to your computer.

Different routers have different user interfaces, so you may have to dig a little to find the options. The settings will likely be presented to you as a of external ports mapped to a range of internal ports. Unless you have to doing something special, you just want all those values to be 27015.

3. Get players to connect to your machine.

In your Steam profile settings, you should allow your friends to see your online activity. (View Profile -> Privacy Settings -> Game Details)

Other players should be able to see that you are in game in their friends list. And by right-clicking on you, they should be able to join your game once you have your server running.

This doesn't always seem to work, so you can allow players to connect directly with an IP address (or a domain name that points to your IP address). In that case, share your broadband IP address, which you can find in your router's settings.

To connect by IP, a player must open the console by pressing "`" (may require opening the options first or using the -console argument at start-up through Steam settings). Then they can connect with the command: connect ip.ad.re.ss.

4. Start a server.

In Garry's Mod:

  1. Click "Start New Game".
  2. Click the green drop-down in the top right to select a game size. Anything above your expected number of players will do.
  3. Click the "Peer-To-Peer" checkbox.
  4. Click "Start Game" in the bottom right corner.

5. Configure your game.

This will be easier if you are using TTT Custom Roles (T.Rich Version) because your settings are saved between map reloads.

Create a file called "server.cfg" in ".../steam/steamapps/common/GarrysMod/garrysmod/cfg" and fill it with the recommended config below. This config is a good starting point but will need tweaking based on the number of players you have.

When you enter a game for the first time, type exec server in the console to execute the "server.cfg" config file.

Useful commands:

  • ttt_traitor_pct [number 0-1]: Sets the percentage of players who should be traitors.
  • change_level [map name]: Changes the map

Command references:

Recommended initial config:

-- players required for a game to start
ttt_minimum_players 4
ttt_namechange_kick 0

ttt_firstpreptime 50
ttt_preptime_seconds 40
ttt_posttime_seconds 20

-- rounds before the map voting starts
ttt_round_limit 6
ttt_postround_dm 1

-- seconds of inactivity before a player gets kicked
ttt_idle_limit 300

-- karma

ttt_karma_persist 1

-- gameplay

ttt_allow_discomb_jump 1
ttt_independent_warning 0

-- traitors

ttt_credits_starting 2

ttt_traitor_max 4
ttt_traitor_pct 0.21

ttt_assassin_enabled 1
ttt_assassin_chance 0.1
ttt_assassin_required_traitors 2

ttt_vampire_enabled 1
ttt_vampire_chance 0.1
ttt_vampire_required_traitors 2

ttt_zombie_enabled 1
ttt_zombie_chance 0.05
ttt_zombie_pct 0.2

-- innocents

ttt_detective_max 1
ttt_detective_pct 0.1
ttt_detective_search_only 0
ttt_detective_min_players 9
ttt_det_credits_starting 1

ttt_glitch_enabled 1
ttt_glitch_chance 0.25
ttt_glitch_required_innos 6

ttt_mercenary_enabled 1
ttt_mercenary_chance 0.10
ttt_mer_credits_starting 2

-- third party

ttt_jester_enabled 1
ttt_jester_chance 0.1

ttt_swapper_enabled 1
ttt_swapper_chance 0.05

ttt_killer_enabled 1
ttt_killer_chance 0.1
ttt_killer_required_innos 7

-- unused roles

ttt_hypnotist_enabled 0
ttt_phantom_enabled 0

6. Have fun.

7. Gotchas.

  • Naming can be a little inconsistent:
    • These commands exist: ttt_traitor_pct, ttt_zombie_pct
    • Commands for the likelihood of every other role ends with _chance
  • Whether a role can be chosen depends on many commands: Those ending in _chance, _enabled, and either _required_innos or _required_traitors.
  • Percentages for some roles affect others:
    • The given chance for Hypnotist, Vampire, Assassin and Jester, Swapper, Killer are all between 0 and 1. If they are all set to 1, they are all actually 1/3rd. If they are all set to 0.5, they are all actually 1/6th and there is a 50% chance that none of them will be chosen.
    • After the special traitor roles have been considered, the game considers adding a Glitch if there is no special traitor role. Therefore the more likely Hypnotist, Vampire, and Assassin are, the less likely Glitch is. To guarantee a Glitch, all special roles should be disabled.
    • In non-T.Rich versions of the Custom Roles mod, these percentages make no sense.
  • Not all maps appear in the list of maps in the Garry's Mod UI because maps can be included in non-map add-ons. You should be able to switch to them in the console and the MapVote mod should be able to give them as an option so long as the file begins with "ttt_".

Comments

Popular posts from this blog

Fix Controller Input when a Game Doesn't Use Steam Input

VSC Vanishing Go Imports

Fix Inability to Move Files to Trash in VSC