AMP icon indicating copy to clipboard operation
AMP copied to clipboard

Allow custom game configuration for SRCDS/HLDS instances

Open cmdrscotty opened this issue 3 years ago • 8 comments

Feature Request

Feature Information:

  • Allow the ability to define custom configs/games for SRCDS/HLDS instances, in order to allow more functionality without the need to specify it as a generic module when the framework for SRCDS/HLDS is already in place.
  • Only needs to have the ability to select a pre-fab from the game selection dropdown (current behavior) or allow the admin to specify game configs if they are not listed within the dropdown -- example, SvenCoop is not listed in the dropdown as a selectable game for SRCDS/HLDS, but is a valid game config for the HLDS server program and is downloaded via SteamCMD. Current instance configuration currently lacks the ability to select this which forces the admin to define it as a generic module which also removes functionality unique to the SRCDS/HLDS instance configs.

I confirm:

  • [x] that I have searched for an existing feature request matching the description.
  • [x] Tried making it as generic module, but found it did not provide the functionality needed
  • [x] Confirmed that request is for enhanced functionality of an existing module

Edit:

with the help of the fine people below, was able to locate that there are two spots that require manual updates:

  • apps.json located under (__VDS__ADS01 -> Plugins -> steamcmdplugin -> apps.json)
  • apps.json located under (name of instance -> Plugins -> steamcmdplugin -> apps.json)

The apps.json located in the ADS plugins folder will allow you to add it as a listing to the instance creation dropdown. apps.json located within the instance plugins folder will allow you to select the server type from the configuration page.

an example of what needs to be added:

{ "AppID": 276060, "ClientAppID": 225840, "Server": "Sven Co-Op Dedicated Server", "SteamCMD": true, "AnonymousLogin": true, "ExecutableWin32": "SvenDS.exe", "ExecutableLinux": "svends_run", "GameName": "svencoop", "ModName": "svencoop", "Args": "+app_update 276060 validate", "SettingMaps": { "srcdsModule.SRCDS.Map": "abandoned" }, "Srcds": true },

Was able to confirm this allows the instance to launch steamcmd, download the server files, and attempt to launch it.

server does indeed launch, however the instance console will get stuck at 'starting' which might be simply that it's not receiving the right feedback it's expecting from the server instance to validate that it's been launched (maybe, need to investigate that more)

But was able to successfully launch and join the server

cmdrscotty avatar Dec 05 '21 17:12 cmdrscotty

You can already do this by editing apps.json in the steamcmdplugin directory.

PhonicUK avatar Dec 05 '21 18:12 PhonicUK

You can already do this by editing apps.json in the steamcmdplugin directory.

So this is what I was able to add to the apps.json listing:

{ "AppID": 276060, "ClientAppID": 225840, "Server": "Sven Co-Op Dedicated Server", "SteamCMD": true, "AnonymousLogin": true, "ExecutableWin32": "SvenDS.exe", "ExecutableLinux": "svends_run", "GameName": "svencoop", "ModName": "svencoop", "Srcds": true },

(more info about installing the svencoop dedicated server from the official site: https://www.svencoop.com/manual/server-basic.html )

Which did get it listed when creating the instance (shows up as Sven Co-op)

however when actually setting up the server configuration, it's not listed in 'Server Type' which causes it to download the wrong server packages after it's been started. image_2021-12-05_150254 image_2021-12-05_150338

It'll throw an error about not being able to find the right files (looking for the wrong appid too) then also starts downloading the configs for Team Fortress 2 rather than svencoop

image_2021-12-05_150459

Wondering if either i'm missing something in the apps.json listing, or something else is missing to define what it needs to download/configure for it.

cmdrscotty avatar Dec 05 '21 22:12 cmdrscotty

You'll need to add it to that instances own copy of apps.json after creating it too.

PhonicUK avatar Dec 06 '21 12:12 PhonicUK

Try this:

{ "AppID": 276060, "ClientAppID": 225840, "Server": "Sven Co-Op Dedicated Server", "SteamCMD": true, "AnonymousLogin": true, "ExecutableWin32": "SvenDS.exe", "ExecutableLinux": "svends_run", "GameName": "svencoop", "ModName": "svencoop", "Args": "+app_update 276060 validate", "SettingMaps": { "srcdsModule.SRCDS.Map": "abandoned" }, "Srcds": true },

xLeviNx avatar Dec 06 '21 20:12 xLeviNx

Try this:

{ "AppID": 276060, "ClientAppID": 225840, "Server": "Sven Co-Op Dedicated Server", "SteamCMD": true, "AnonymousLogin": true, "ExecutableWin32": "SvenDS.exe", "ExecutableLinux": "svends_run", "GameName": "svencoop", "ModName": "svencoop", "Args": "+app_update 276060 validate", "SettingMaps": { "srcdsModule.SRCDS.Map": "abandoned" }, "Srcds": true },

Nice! that seems to have done the trick!

odd quirk i found is that AMP doesn't seem to recognize the server instance is actually running as it gets stuck at 'starting'

image

However I am able to ping the server and remote into it so it definitely is running. Thank you for your help :)

I'll update the feature request to ammend the settings that need to be added as a default to the apps.json as well as a note that the server will start, however AMP doesn't exactly recognize that it's really running.

cmdrscotty avatar Dec 06 '21 21:12 cmdrscotty

AMP doesn’t support old rcon, which is why you’ll run into that issue. It’s currently something that won’t be installed anytime soon

xLeviNx avatar Dec 07 '21 00:12 xLeviNx

A gentlemen took the time to make a Sven Co-op build which has a lot of nice features and such, rcon support is still not a thing due to the game and legacy support, but check this out if you intend on running servers for this mod:

https://github.com/CubeCoders/AMPTemplates/pull/15

@cmdrscotty

xLeviNx avatar Dec 23 '21 14:12 xLeviNx

Thank you for the mention! I'll be glad to work on other games if you are wanting any besides that.

Also feedback is welcome. Sven was my first generic module creation, so it's very possible there will be things to tweak.

IceOfWraith avatar Dec 23 '21 15:12 IceOfWraith

This has been largely made redundant by improvements to the generic module, so unless there's a compelling reason to change something I'll be closing this.

PhonicUK avatar Aug 29 '22 15:08 PhonicUK