I want to start server using game mode from VPK addon (let's say modename.vpk
VPK contains typical addon info and mode files:
Most straightforward solution is to put VPK into left4dead2/addons/
and run srcds:
srcds_run -ip 0.0.0.0 -game left4dead2 +sv_gametypes modename +mp_gamemode modename
But, game starts in coop mode with an error: "Invalid mp_gamemode value modename
" and game starts with coop gamemode.
It probably means that addons aren't loaded by the time mp_gamemode
I need to say that VPK itself works. I use this exact addon to start this exact game mode in my local install of L4D2.
Also, if I just unpack modes/
content directly to left4dead2/
, game starts this gamemode correctly too using command above.
Moreover, addon itself is recognized by srcds as I run show_addon_load_order
confirms that I indeed have such game mode:
MODE: modename (/home/steam/srcds/left4dead2/addons/modename.vpk)
SM and MMS are installed and working.
What I also tried:
- Put mp_gamemode modename to autoexec.cfg and server.cfg - cvar isn't visible here
- Put sm_cvar mp_gamemode modename to autoexec.cfg - SM isn't loaded by that time
- Put sm_cvar mp_gamemode modename to server.cfg - too late, game already started
So, what else can I do to actually use addon content in srcds?