Raised This Month: $ Target: $400
 0% 

[L4D2] Launch server with gamemode from an addon


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
gudvinr
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:
Code:
addoninfo.txt
modes/modename.txt
addonimage.jpg
scripts/vscripts/modename.nut
materials/vgui/modename.vmt
materials/vgui/modename.vtf
Most straightforward solution is to put VPK into left4dead2/addons/ and run srcds:
Code:
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 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:
Code:
/home/steam/srcds/update/pak01_dir.vpk
/home/steam/srcds/left4dead2_dlc3/pak01_dir.vpk
/home/steam/srcds/left4dead2_dlc2/pak01_dir.vpk
/home/steam/srcds/left4dead2_dlc1/pak01_dir.vpk
/home/steam/srcds/left4dead2/pak01_dir.vpk
/home/steam/srcds/left4dead2/addons/modename.vpk
And show_addon_metadata confirms that I indeed have such game mode:
Code:
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 08:40.


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