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.
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
.
In Garry's Mod:
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 mapCommand 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
ttt_traitor_pct
, ttt_zombie_pct
_chance
_chance
, _enabled
, and either _required_innos
or _required_traitors
.