Warning: array_merge() [function.array-merge]: Argument #1 is not an array in [path]/archive/global.php(40) : eval()'d code on line 2
How to do a Quick Map Test - Local Server [Archive] - TF2Maps.net Forums

PDA

View Full Version : How to do a Quick Map Test - Local Server


DJive
03-26-2008, 12:31 AM
How to run a local server, TF2 - DJive

A few people asked tonight how to host a quick server on your personal PC.

STEP 1: Locate your Server.cfg here.
C:\Program Files\Steam\SteamApps\*name*\team fortress 2\tf\cfg\server.cfg

This is my server.cfg I use for doing map tests. Each line is pretty self explanatory. Feel free to change any of the settings you seem if. all my time limits are set HIGH. the reason is for testing a map nothing is more frustrating then it ending a round and changing to 2fort :p

STEP 2: Copy and paste everything BELOW PHP Code: into a server.cfg txt file. and save to the location mentioned above, or download my server.cfg at bottom.

// this is your server name as shown in the server list
hostname "TF2Maps.net Local Host"

sv_password ""
// your server password. a pair of double quotes means it is not set and anyone can join

// start rcon settings

rcon_password ""
// your rcon password to log into the dev rcon console or HLSW rcon console
sv_rcon_banpenalty 5
// Number of minutes to ban users who fail rcon authentication
sv_rcon_maxfailures 10
// Max number of times a user can fail rcon authentication before being banned

// end rcon settings

// start cvars for balancing un-even teams

mp_autoteambalance 0
// 0 is off and 1 is on. if 1 then should be used in conjunction with the following 3 commands
mp_autoteambalance_delay 60
// Time (in seconds) after the teams become unbalanced to attempt to switch players
mp_autoteambalance_warning_delay 30
// Time (in seconds) after the teams become unbalanced to print a balance warning
mp_teams_unbalance_limit 2
// Teams are unbalanced when one team has this many more players than the other (0 disables)

// end cvars for balancing un-even teams

// start cvars for round and game times

mp_enableroundwaittime 1
// Enable or disable timers to wait between rounds. 0 is off 1 is on
mp_bonusroundtime 20
// Time after round win until round restarts (in seconds)
mp_restartround 20
// Time the current round will restart (in seconds)
mp_stalemate_timelimit 120
// Timelimit (in seconds) of the stalemate round
mp_timelimit 30
// game time per map in minutes
mp_respawnwavetime 1
//

// end cvars for round and game times

// start cvars for win conditions

mp_maxrounds 40
// Max number of rounds to play before server changes maps
mp_winlimit 30
// Max number of rounds one team can win before a server changes maps

// end cvars for win conditions

// start client specific cvars

mp_forcecamera 0
// force dead clients to first person mode disabling freelook. 0 is off 1 is on
mp_allowspectators 1
// enable or disable spectators on the server. 0 is off 1 is on
mp_friendlyfire 0
// 0 is off and clients can do harm to team mates. 1 is on and players can kill or injure team mates
mp_footsteps 1
// footsteps on or off. 0 is off and 1 is on
sv_cheats 1
// allow cheats to be used by the client. 0 is off 1 is on
sv_timeout 300
// the amount of time in seconds that a client is booted for no input
sv_maxspeed 320
// the maximun speed a client can move at
sv_consistency 1
// Force clients to pass a consistency check for critical files before joining server. 0 is off 1 is on
decalfrequency 10
// the pause in seconds between a decal being sprayed

// end client specific cvars

// start cvars for communication

sv_voiceenable 1
// allow players to use a microphone. 0 is off 1 is on
sv_alltalk 1
// toggles whether both teams can hear each others voice comms or not. 0 is off 1 is on. recommend it being off
mp_chattime 10
// players can chat for this amount of time (in seconds) after a game is over

// end cvars for communication

// start download cvars

sv_allowupload 1
// allow custom decals to be uploaded. 0 is off 1 is on
sv_allowdownload 0
// allow files to be downloaded from the server. 0 is off 1 is on
net_maxfilesize 15
// Max download file size. Default is 15
sv_downloadurl "http://www.your_site_here.com"
//redirect download location

// end download cvars

// start bandwidth rates/settings

sv_minrate 20000
sv_maxrate 30000
decalfrequency 10
sv_maxupdaterate 100
sv_minupdaterate 66
sv_mincmdrate 66
sv_maxcmdrate 100

// end bandwidth rates/settings

// start server logging

log off
// enable or disable server logging. on is on off is off
sv_logbans 0
// Log server bans in the server logs
sv_logecho 1
// Echo log information to the console. 0 is off 1 is on
sv_logfile 0
// Log server information in the log file. 0 is off 1 is on
sv_log_onefile 0
// log everything in one file

// end server logging

// start cvars for general operation

sv_lan 0
// is this an internet or LAN server. 0 is internet 1 is LAN
sv_region 0
// server location. -1 is the world, 0 is USA east coast, 1 is USA west coast, 3 europesv_contact blah@blah.com
// contact email for sysop
sv_pausable 0
// enables or disables whether the server can be paused. 0 is off 1 is on
sv_pure 1
// forces all clients on the server to use content that matches what is on the server. 0 is off 1 is on
sv_pure_kick_clients 1
// kicks clients that do not have content that matches what is on the server

// end cvars for general operation

// start execute ban files

exec banned_user.cfg
exec banned_ip.cfg


Awsome. Now. To change your server name look to the first line and change the RED text to a name you choose.

// this is your server name as shown in the server list
hostname "TF2Maps.net Local Host"

Also pay attention to these.
// start download cvars
sv_allowupload 1
// allow custom decals to be uploaded. 0 is off 1 is on
sv_allowdownload 0
// allow files to be downloaded from the server. 0 is off 1 is on
net_maxfilesize 15
// Max download file size. Default is 15
sv_downloadurl "http://your_map_hosting_site.com"
//redirect download location

IF you have a fast download server hosting your file, place the web address here. IF you do not have a fast web map hosting site, change the "0" into a "1" to allow people to download from your server.
Note: http://tf2maps.net offer fast map hosting with a donation.

STEP 3: After you save your server.cfg to "C:\Program Files\Steam\SteamApps\*name*\team fortress 2\tf\cfg" folder start up Team Fortress 2.

Step 4: Bring down console using "~" Key and type ""exec server.cfg""

Step 5: Type in ""map mymapname"" to start your map and server.

Step 6: Now all you need is your IP, which you can grab from here. http://tools.whois.net/yourip/ and add your port onto it. For Example US based mine is 27015 sooo... 12.345.6.78:27015 should be the IP i tell people to connect to.

Step 7: Have fun with the friends.
---

Now this does not cover port forwarding which if you have a router, you will need to do.

R3dRuM
03-26-2008, 03:45 PM
Thanks djive! Even though you already taught me how :)

l3eeron
03-26-2008, 03:56 PM
So, with this I can play from and host the server on the same machine... and other people not on my LAN can join too?

DJive
03-26-2008, 04:18 PM
So, with this I can play from and host the server on the same machine... and other people not on my LAN can join too?

Yep.


Doing exactly as listed me and about 7 others from the chat room did a mini game day heh

l3eeron
03-26-2008, 04:32 PM
:D lol

So many people told me you cant do this....

I always knew they were wrong! Thanks for this little gem, I'll try not to abuse it.

DJive
03-26-2008, 04:38 PM
Unless you do step 6 *grab your IP* Steam always will broadcast your masked IP. 192.168.0.1 or something like. Which will cause an error when people try to connect *most times*

So if you get your IP people can connect that way, all the time =)

Paria
03-26-2008, 05:14 PM
when i was testing my map i always had it broadcasting on the server list , i set it un-secure - then yo'ull find a nice little community of vac banned players looking for somewhere to play :blushing: , and who else is better at testing your maps than a known cheat :d

Koei
03-26-2008, 08:44 PM
This isn't dedicated right? Might be nice to setup a dedicated one in the background. That way people can join while you aren't playing yourself. It's not much harder to setup.

DJive
03-26-2008, 09:07 PM
Nope, this is for Local/Listen server.

For dedicated just download "Team Fortress 2 Dedicated Server" and save the same config to "C:\Program Files\Steam\SteamApps\*name*\source 2007 dedicated server\tf\cfg"

drpepper
03-26-2008, 09:54 PM
when i was testing my map i always had it broadcasting on the server list , i set it un-secure - then yo'ull find a nice little community of vac banned players looking for somewhere to play :blushing: , and who else is better at testing your maps than a known cheat :d

heh nice

Brandished
03-27-2008, 04:29 AM
Thanks for this list and more detailed explanations.

You should also add this one in the list since this is disabled by default and people have asked about it before:

mp_stalemate_enable 1
This is set to 0 by default. Setting this to 1 will switch the game to sudden death mode when the game timer reaches zero.


I just myself made a big list of cvars available through the TF2 Dedicated Server earlier, lol. Anyways, for all interested, I've put the list up here:
http://pastebin.com/m2492d59b

taotd
04-06-2008, 09:43 PM
So this is probably a stupid question: Let's say I hit "Create Server," and give out my IP address. Then people can connect to the server I'm on, right?

Brandished
04-07-2008, 01:05 AM
Assuming you had your server set-up correctly (ports forwarded, sv_lan 0, etc.), yes.

You send someone you IP address and port, IP . ADDRESS : PORT, (eg, 8.12.19.105:27015) and they would open up there console window and type "connect 8.12.19.105:27015" (without the quotes).