Raised This Month: $ Target: $400

[L4D2] Launch server with gamemode from an addon

Post New Thread Reply   
Thread Tools Display Modes
Author Message
New Member
Join Date: Sep 2023
Old 09-13-2023 , 17:03   [L4D2] Launch server with gamemode from an addon
Reply With Quote #1

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 -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 is handled.

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/ and scripts/ 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:
And show_addon_metadata 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?
gudvinr is offline

Thread Tools
Display Modes

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 10:16.

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