Configuration with Left 4 Dead 2 server.cfg - Forced to enable uneeded cvars which break server functionality

System Information

Field Value
Operating System Windows - Windows 10 Home on x86_64
Product AMP ‘Proteus’ v2.8.0.4 (Mainline)
Virtualization None
Application Left 4 Dead 2
Module GenericModule
Running in Container No
Current State PreStart

Problem Description

Issue

Hello,

I am trying to configure my l4d2 server to have functionality which allows players to vote between gamemodes (coop and versus, for example) but AMP is configured to force me to use the command “sm_cvar mp_gamemode” in the server.cfg file. It is set to “coop” in this example.

The problem here is that L4D2 runs server.cfg on every single map change, which in turn, changes the gamemode to whatever it is set to in AMP every single map change. This means that I cannot vote my server to be a versus server, as it will just change back to a coop server as soon as the map loads, which happens several times in a campaign. All players would be switched to the survivor team, and the scoring would be reset every time, not to mention an admin needs to now manually change the gamemode back to versus before anyone can switch to their proper teams again.

I tried running the server with server.cfg as read only with these commands blocked out, but this appears to cause a hangup for AMP, and prevents the server from starting at all. There is no apparent way for me to resolve this issue on my own, the only solution I can consider currently being to manually enter AMP every time I wish to play a different gamemode, potentially requiring a server restart as well. Not practical, especially considering I want my friends to be able to choose the gamemode without me present. I also do not believe I would be able to choose a specific mutation, as the gamemode options in AMP were very limited.

My request is to allow any of these cvars and commands which are modified in AMP to be either be excluded from server.cfg, or have a // in front, to effectively disable the setting. The gamemode cvar is the most destructive in my case, but there are others which create unwarranted friction for configuration.

The other config lines which stick out to me are sv_cheats and z_difficulty in particular, as well as sm_cvar mp_friendlyfire, sm_cvar survivor_friendly_fire_factor_easy/normal/hard/expert, mp_roundlimit and sm_cvar pipe_bomb_timer_duration. All of these commands are forced to be set to certain values in AMP, when they could be excluded from server.cfg entirely if a server host deems it best. The game would assume the default values, and not overwrite changes made by admins during gameplay when the game loads a new map.

I hope this is able to be resolved with ease from your end relatively soon. AMP solves a lot of issues which manual hosting caused for me, but this issue makes it much less appealing as a solution for my use case.

Thank you very much.

Reproduction Steps

  • Configure server in AMP
  • Modify server.cfg outside of AMP
  • Start server in AMP
  • Any changes made to server.cfg are overwritten by AMP, enabling unecessary cvars which could be excluded from AMP/server.cfg without issue

I am too stuck here, as any console command or plugin designed to change the mode cannot do so. incredibly frustrating.

Yup, pretty annoying, right? AMP is supposed to make things easy, but in this case, it becomes its own enemy. Should be easy to fix, just modify exactly how the setting inputs, or even just add one more option that is completely blank. In my eyes, it would only take someone with the knowledge and power a few moments to enact a fix, though I am ignorant to the full process here, maybe it is more complicated than that. I will admit, I am glad you commented here even if there is no resolution yet. It is nice to know I am not the only person with this issue.

One thing I have theorized but not yet tried - it may be possible to start the AMP instance, and THEN modify the server.cfg to have the // in front of the unwanted variables, then set server.cfg to read only so AMP does not change it back. Not exactly the perfect solution, still needs manual intervention every time the server is to be restarted, or possibly some kind of script to automate. I am unsure how AMP would react to this, but I imagine it would get past the hangup I mentioned in the original post. Wishful thinking, but I may try this when I get home in a few hours, if I think about it. I will let you know how it works when I get the chance.