View Single Post
Old 08-16-2012, 08:59 AM   #1
fefobiz
 
Join Date: Nov 2010
Reputation: 137
Posts: 731
How to set up your MvM server. updated

IF YOU DON'T HAVE A 32 SLOTS DEDICATED SERVER, YOUR SERVER WILL NO LONGER WORK BECAUSE OF THE 8/17/2012 UPDATE:

Quote:
- Updated the dedicated server to exit when attempting to start a Mann vs. Machine map with less than 32 maxplayers


Seriously, Valve?
Given the right configuration, servers were running great with less than 32 slots. It's a shame you guys did that.
Anyways...

Okay.

So, I run a major TF2 server here in Brazil and we're usually a 28 slots pub.

Obviously, I pay monthly for the server and I only pay for 28 slots and I'm not planning to pay extra and make it 32 just for MvM mode.



MAJOR PROBLEM: SLOTS
The first problem most people would notice is extra players in spectator taking up bot slots in the server.
So, how to overcome that?

SOLUTION
The first thing I did was to set up a reserved slots plugin on my server and set it to 22 reserved slots (28 total - 22 reserved = 6

public slots), this way only 6 player slots show up to the crowd on the server browser.
The MvM mode is best played in a server with 32 SLOTS. (6 PLAYERS + 26 BOTS)
But you CAN play it in a server with lesser slots.
Just remember though that, the lesser the slots, the less bots will come at the same time and the less difficult it will be to beat the

game. (from 32 slots to 28 is a decrease in difficulty of approximately 10%)

I also found useful to set mp_allowspectators to "0".

What I did WORKS. But there are minor flaws.

If a player leaves in the middle of the game, a bot will take up his slot in the server and no one will be able to fill his place unless

the map changes or the game restarts. (making all bots leave)

ALTERNATIVE SOLUTION
An alternative solution to the problem might be turning sv_visiblemaxplayers to "6", although I haven't tested it and I think it would

worsen the problem about people joining a game that's already started because there would be 28/6 players in the server.

UPDATE REGARDING sv_visiblemaxplayers "6";
I was testing with sv_visiblemaxplayers "6" and players reported that the waves suddenly just stopped coming at some point. No more info

regarding this, still looking into it.

UPDATE OF THE UPDATE REGARDING sv_visiblemaxplayers "6";
I am no longer using this command. But rather using only the Reserved Slots plugin.





CREATING A QUICK SERVER:
If you are looking for the homemade quick and easy way to host a server, follow these steps on the console:
Code:
maxplayers "32"
sv_lan "0"
sv_password "YOURPASSWORDHERE"
heartbeat
map mvm_mannworks
Then just send the IP (EXAMPLE: xxx.xx.xxx.xx:27015) and password to your friends.
If you don't know your IP, just google whats my ip.

IF YOU WANT TO PLAY BY YOURSELF OR WITH LESS THAN 6 PLAYERS, USE THIS COMMAND:
tf_mvm_min_players_to_start "1" - makes bot spawn with just one player.

*NOTE THAT IF YOU USE A ROUTER YOU MIGHT NEED TO OPEN YOUR PORTS (27015 to 27020 should be enough). GOOGLE IT, AS EVERY ROUTER HAS IT'S

OWN WAY TO DO IT.

**ALSO NOTE that it's not actually forwarding the port 27015 to the port 27020, but rather the ports FROM 27015 TO

27020, in case 27015 is already taken, it'll choose 27016, that's why we forward at least 6 of them. Like that:
Quote:
27015 -> 27015
27016 -> 27016
27017 -> 27017
27018 -> 27018
27019 -> 27019
27020 -> 27020

CHANGING DIFFICULTY:
To change difficulty, you have to execute the appropriate difficulty file through this command:
Code:
tf_mvm_popfile "FILENAMEHERE"

It goes like this:
Code:
tf_mvm_popfile "mvm_mannworks"             //Manouvers (invasion, easy)
tf_mvm_popfile "mvm_mannworks_advanced"    //Machine Massacre (invasion, normal)
tf_mvm_popfile "mvm_mannworks_ironman"     //Mech Mutilation (endurance, expert)
tf_mvm_popfile "mvm_coaltown"              //Crash Course (invasion, easy)
tf_mvm_popfile "mvm_coaltown_advanced"     //Ctrl+Alt+Destruction (invasion, normal)
tf_mvm_popfile "mvm_coaltown_advanced2"    //CPU Slaughter (invasion, advanced)
tf_mvm_popfile "mvm_decoy"                 //Doe's Drill (invasion, easy)
tf_mvm_popfile "mvm_decoy_advanced"        //Disk Deletion (invasion, advanced)
tf_mvm_popfile "mvm_decoy_advanced2"       //Data Demolition (invasion, advanced)


MAKING YOUR SERVER DIFFICULTY SPECIFIC
Not a common request but I am using this technique on my server to make it hard mode only.

The first thing you need to do is create a .cfg file for all 3 MvM maps on your (or your server's) cfg folder, the names of the files are going to be:

Quote:
mvm_coaltown.cfg
mvm_decoy.cfg
mvm_mannworks.cfg
Once you have all those three files created, you're going to have to put stuff on them.
Because these files have the name of the map with the .cfg extention, they're going to be executed as soon as the map begins, so simply put the matching command seen in the green code area above ^.

EXAMPLE OF A "mvm_mannworks.cfg" FILE WITH "Ironman" DIFFICULTY.

Code:

tf_mvm_popfile "mvm_mannworks_ironman"
NOTE: THE DIFFICULTY CAN BE CHANGED THROUGH VOTE.
If you don't want the difficulty to change, use sv_allow_votes "0" to avoid people voting for difficulty changes.


---

UPDATE1: Found out a few more useful commands. Props to "nowakpl3" for pointing them.

Quote:
"tf_mm_servermode" = "2"
game notify
- Activates / deactivates Lobby-based hosting mode.
0 = not active
1 = Put in quickplay pool (based on current map)
2 = Put in MvM pool. (Lobby will control current map)
Quote:
"tf_mm_strict" = "0"
game notify
- 0 = Show in server browser, and allow ad-hoc joins
1 = Hide from server browser. Only allow joins coordinated through GC matchmaking
---

UPDATE2: Example server.cfg for beginners.

Code:
hostname "HOSTNAME"

sv_password ""
rcon_password "PASSWORD"

// TV COMMANDS

tv_delay			        "60"
tv_maxrate			        "3500"
tv_transmitall			        "1"
tv_delaymapchange 		        "1"
tv_relayvoice			        "0"

// CONNECTION COMMANDS

sv_maxrate			        "21000"
sv_minrate			        "2500"
sv_maxupdaterate			"66"
sv_minupdaterate			"25"
sv_maxcmdrate 				"66"
sv_mincmdrate 				"25"
sv_client_cmdrate_difference 		"30"
sv_client_predict			"1"
sv_client_max_interp_ratio 		"1"
sv_client_min_interp_ratio     		"1"
fps_max 				"500"
sv_region				"255"

// SETTINGS

mp_allowspectators			"0"
mp_autoteambalance 			"1"
mp_autocrosshair 			"0"
mp_bonusroundtime 			"12"
mp_chattime				"8"
mp_disable_respawn_times 		"0"
mp_enableroundwaittime 			"1"
mp_falldamage 				"0"
mp_flashlight				"0"
mp_footsteps				"1"
mp_forcecamera				"0"
mp_fraglimit				"0"
mp_forcerespawn 			"1"
mp_friendlyfire 			"0"
mp_fraglimit 				"0"
mp_idledealmethod 			"0" 		
mp_idlemaxtime 				"0"
mp_match_end_at_timelimit		"1"
mp_maxrounds 				"0"
mp_respawnwavetime 			"0"
mp_showrespawntimes 			"1"
mp_stalemate_enable			"1"
mp_stalemate_timelimit			"240"
mp_teams_unbalance_limit  		"1"
mp_autoteambalance_warning_delay        "20"
mp_teamplay				"0"
mp_time_between_capscoring 		"30"	
mp_timelimit 				"0"
mp_tournament                       	"0"
mp_tournament_allow_non_admin_restart 	"0"
mp_tournament_restart
mp_tournament_stopwatch 		"0"	
mp_winlimit 				"0"

sv_allow_color_correction		"1"
sv_allow_votes				"0"
sv_allow_wait_command			"0"
sv_allowdownload			"1"
sv_allowupload				"1"
sv_alltalk 				"1"
sv_cheats				"0"
sv_consistency				"1"
sv_gravity				"800"	
sv_voiceenable				"1"
sv_pure					"1"
sv_pure_kick_clients			"1"
sv_pure_trace                   	"1"
sv_pausable				"0"

tf_flag_caps_per_round              	"3"
tf_weapon_criticals			"1"
tf_birthday 				"0"
tf_damage_disablespread 		"1"
tf_tournament_hide_domination_icons	"1"
tf_use_fixed_weaponspreads 		"1"



tf_mm_servermode			"2"
tf_mm_strict				"0"



//replay

sv_maxreplay 				"2"


exec banned_user.cfg
exec banned_ip.cfg


I will be updating this thread with information I find out and I would also like to hear from your experience.

Last edited by fefobiz: 08-17-2012 at 10:27 PM. Reason: VALVE BROKE IT
fefobiz is offline  
Reply With Quote