Raised This Month: $32 Target: $400
 8% 

L4D2 Dedicated Server Help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
moxie2020
Veteran Member
Join Date: Aug 2011
Old 07-27-2012 , 03:52   L4D2 Dedicated Server Help
Reply With Quote #1

I am trying to setup a few L4D2 servers.

I am getting frustrated with a couple of things. When I launch the servers there games start without a lobby and start in campaign mode.

I want to start servers through lobbies and only have the sv_gametypes I define be available. I have found several guides on this but most of them contradict each other so apparently valve has made changes at some point.

Can someone point me in the right direction?
moxie2020 is offline
moxie2020
Veteran Member
Join Date: Aug 2011
Old 07-27-2012 , 12:40   Re: L4D2 Dedicated Server Help
Reply With Quote #2

I am trying to understand the purpose mm_dedicated_force_servers.

What I am getting is servers are always running and a lobby merely connects groups of people to a server?

So essentially the lobby and the server exist separately?

moxie2020 is offline
id5473
Member
Join Date: Mar 2012
Old 07-27-2012 , 13:28   Re: L4D2 Dedicated Server Help
Reply With Quote #3

servers are always "running". when there are no players connected it's hibernating.. (unless you enabled that bots are able to lead) I am unsure what exactly that state means or does.. I guess it's something like the ai director not being active at that time and nothing is happening in the map at all..

if you connect with a lobby to a server.. it gets reserved for your lobby.. and thus not available for other lobbies looking for a server. (you can use hlsw to check the reservation status of a server, you can also see if it's hibernating or not)

"mm_dedicated_force_servers" just tells your client (which is preferably the lobby leader) to try and reserve/connect to only this specific server(s). it overwrites the "official/best available" selection.

not sure if it's of much help to you.

I wasn't able to restrict gamemodes entirely on my server either.. 90% of the time it hosts campaign/realism games as it should.. but esp. right after a restart.. it sometimes ends up as a vs server.

Last edited by id5473; 07-27-2012 at 13:32. Reason: .
id5473 is offline
moxie2020
Veteran Member
Join Date: Aug 2011
Old 07-27-2012 , 18:28   Re: L4D2 Dedicated Server Help
Reply With Quote #4

Quote:
Originally Posted by id5473 View Post
servers are always "running". when there are no players connected it's hibernating.. (unless you enabled that bots are able to lead) I am unsure what exactly that state means or does.. I guess it's something like the ai director not being active at that time and nothing is happening in the map at all..

if you connect with a lobby to a server.. it gets reserved for your lobby.. and thus not available for other lobbies looking for a server. (you can use hlsw to check the reservation status of a server, you can also see if it's hibernating or not)

"mm_dedicated_force_servers" just tells your client (which is preferably the lobby leader) to try and reserve/connect to only this specific server(s). it overwrites the "official/best available" selection.

not sure if it's of much help to you.

I wasn't able to restrict gamemodes entirely on my server either.. 90% of the time it hosts campaign/realism games as it should.. but esp. right after a restart.. it sometimes ends up as a vs server.
How do I get it to launch into a certain gamemode on the first start without it reloading the same map?

mp_gamemode does nothing apparently and if I use +map MAPNAME GAMEMODE it only loads the map but not the gamemode.

I tried using +exec run##.cfg with +servercfgfile server##.cfg and tried to have run##.cffg load up the map and gamemode and server##.cfg load up the server settings but apparently exec does not work or it does not work together.

How do I just say run Versus you POS game!
moxie2020 is offline
id5473
Member
Join Date: Mar 2012
Old 07-28-2012 , 07:11   Re: L4D2 Dedicated Server Help
Reply With Quote #5

the the only parameter I have in my server.cfg regarding gamemode is

sv_gametypes "coop,realism"

it's a rented gameserver here.. and I am unable adjust startup parameters the way you do. (I don't have access to that)

I don't really see the need for it to start in a certain gamemode or level. Depending on which lobby reserves it.. it will (re)load the level anyway with proper map/difficulty/gamemode specified in this lobby.

but that switch doesn't work all the time.
id5473 is offline
PatriotGames
AlliedModders Donor
Join Date: Feb 2012
Location: root@irs:/# rm -rf /
Old 07-31-2012 , 14:59   Re: L4D2 Dedicated Server Help
Reply With Quote #6

Hi,

The only consistent way I've found to start the server in a specific game mode and keep it there is:

1. In your autoexec.cfg add "map mapname gamemode" where mapname is the name of the map you want as default on the server and gamemode is the preferred game mode:
  • example: map c5m1_waterfront versus will load Parish in versus mode.
Now, if a lobby joins your server having choosen another gamemode (e.g. co-op), you server will switch to that mode. If you want the server to run only one game mode:

1. In your server.cfg add sm_cvar mp_gamemode "gamemode" where gamemode is the only game mode you want on the server.
  • example: sm_cvar mp_gamemode "versus" will keep the server in versus game mode, allowing only versus lobbies to connect. Of course, using sm_cvar to unlock hidden cvars assumes you have installed Metamod and Sourcemod.
  • note: since versus players from public lobbies are notorious for leaving games, make sure you also allow other players to connect to your server directly without using a lobby with sv_allow_lobby_connect_only "0" in you server.cfg.This allow players to join an existing versus match on your server as other players leave and open up slots.
Regards,

PG

Last edited by PatriotGames; 07-31-2012 at 15:05.
PatriotGames is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:55.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode