Add Counter-Strike 2 (#473)

This commit is contained in:
Greelan 2023-10-04 17:38:26 +11:00 committed by GitHub
parent fff2f41dd1
commit bdbe29b9de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 330 additions and 0 deletions

101
counter-strike2.kvp Normal file
View File

@ -0,0 +1,101 @@
Meta.DisplayName=Counter-Strike 2
Meta.Description=Counter-Strike 2 Dedicated Server
Meta.OS=Windows, Linux
Meta.AarchSupport=NotSupported
Meta.Arch=x86_64
Meta.Author=Greelan
Meta.URL=https://www.counter-strike.net/cs2
Meta.DisplayImageSource=url:https://cdn.cloudflare.steamstatic.com/steam/apps/730/header.jpg?t=1695947021
Meta.EndpointURIFormat=steam://connect/{ip}:{GenericModule.App.Ports.$ServerPort}
Meta.ConfigManifest=counter-strike2config.json
Meta.MetaConfigManifest=counter-strike2metaconfig.json
Meta.ConfigRoot=counter-strike2.kvp
Meta.MinAMPVersion=2.4.6.4
Meta.SpecificDockerImage=
Meta.DockerRequired=False
Meta.DockerBaseReadOnly=False
Meta.ContainerPolicy=Supported
Meta.ContainerPolicyReason=
Meta.ExtraSetupStepsURI=
Meta.Prerequsites=[]
Meta.ExtraContainerPackages=[]
Meta.ConfigReleaseState=NotSpecified
Meta.NoCommercialUsage=False
Meta.ConfigVersion=0.0.0.0
Meta.ReleaseNotes=
Meta.BreakingReleaseNotes=
App.DisplayName=Counter-Strike 2
App.RootDir=./counter-strike2/
App.BaseDirectory=./counter-strike2/730/
App.SteamWorkshopDownloadLocation=
App.ExecutableWin=730\game\bin\win64\cs2.exe
App.ExecutableLinux=730/game/bin/linuxsteamrt64/cs2
App.WorkingDir=730
App.LinuxCommandLineArgs=
App.WindowsCommandLineArgs=
App.CommandLineArgs={{$PlatformArgs}} -dedicated -usercon -serverlogging -nobreakpad -port {{$ServerPort}} -ip {{$ApplicationIPBinding}} -maxplayers_override {{$MaxUsers}} -maxplayers {{$MaxUsers}} {{insecure}}{{CustomParameters}} {{CustomConVars}} +sv_logfile 1 {{gamemode}} +rcon_password "{{$RemoteAdminPassword}}" {{$FormattedArgs}}
App.UseLinuxIOREDIR=False
App.AppSettings={}
App.EnvironmentVariables={"LD_LIBRARY_PATH":"{{$FullRootDir}}linux64:{{$FullBaseDir}}game/bin/linuxsteamrt64:%LD_LIBRARY_PATH%","SteamAppId":"730"}
App.CommandLineParameterFormat=+{0} "{1}"
App.CommandLineParameterDelimiter=
App.ExitMethod=String
App.ExitTimeout=30
App.ExitString=quit
App.ExitFile=lock
App.HasWriteableConsole=True
App.HasReadableConsole=True
App.SupportsLiveSettingsChanges=False
App.LiveSettingChangeCommandFormat=set {0} "{1}"
App.ApplicationIPBinding=0.0.0.0
App.Ports=[{"Protocol":"Both","Port":27015,"Ref":"ServerPort","Name":"Game and RCON Port","Description":"Port for game and RCON traffic"}]
App.AdminPortRef=ServerPort
App.PrimaryApplicationPortRef=ServerPort
App.UniversalSleepApplicationUDPPortRef=ServerPort
App.UniversalSleepSteamQueryPortRef=0
App.MaxUsers=32
App.UseRandomAdminPassword=True
App.PersistRandomPassword=False
App.RemoteAdminPassword=
App.AdminMethod=SourceRCON
App.AdminLoginTransform=None
App.LoginTransformPrefix=
App.RCONConnectDelaySeconds=5
App.RCONConnectRetrySeconds=5
App.RCONHeartbeatMinutes=0
App.RCONHeartbeatCommand=ping
App.TelnetLoginFormat={0}
App.UpdateSources=@IncludeJson[counter-strike2updates.json]
App.PreStartStages=[]
App.ForceUpdate=False
App.ForceUpdateReason=
App.Compatibility=None
App.SteamUpdateAnonymousLogin=False
App.SteamForceLoginPrompt=True
App.RapidStartup=False
App.MonitorChildProcess=False
App.DumpFullChildProcessTree=False
App.MonitorChildProcessWaitMs=100
App.MonitorChildProcessName=
App.SupportsUniversalSleep=False
App.WakeupMode=Any
App.ApplicationReadyMode=RCONConnected
App.TemplateMatchRegex={{(\$?[\w]+)}}
Console.FilterMatchRegex=CTextConsoleWin::GetLine: !GetNumberOfConsoleInputEvents
Console.FilterMatchReplacement=
Console.ThrowawayMessageRegex=^(WARNING|ERROR): Shader.+$
Console.AppReadyRegex=^SV: Connection to Steam servers successful\.$
Console.UserJoinRegex=^L [\d\/]+ - [\d:]+: "(?<username>.+?)<\d+><(BOT|(?<userid>(?!BOT).+?))><>" entered the game$
Console.UserLeaveRegex=^L [\d\/]+ - [\d:]+: "(?<username>.+?)<\d+><(BOT|(?<userid>(?!BOT).+?))><.*>" disconnected \(reason ".*"\)$
Console.UserChatRegex=^$
Console.UpdateAvailableRegex=^\[\d\d:\d\d:\d\d\] \[INFO\] A new server update is available! v[\d\.]+.$
Console.MetricsRegex=
Console.SuppressLogAtStart=False
Console.ActivateLogRegex=
Console.UserActions={}
Limits.SleepMode=True
Limits.SleepOnStart=False
Limits.SleepDelayMinutes=5
Limits.DozeDelay=2
Limits.AutoRetryCount=0
Limits.SleepStartThresholdSeconds=25

212
counter-strike2config.json Normal file
View File

@ -0,0 +1,212 @@
[
{
"DisplayName":"Server Name",
"Category":"CS2 Server Settings",
"Description":"Sets the name of the server that appears in the server list",
"Keywords":"server,name,hostname",
"FieldName":"hostname",
"InputType":"text",
"ParamFieldName":"hostname",
"IncludeInCommandLine":true,
"DefaultValue":"AMP Powered Counter-Strike 2 Server",
"EnumValues":{}
},
{
"DisplayName":"Server Tags",
"Category":"CS2 Server Settings",
"Description":"Comma-separated list of server tags that give additional information about the server in the server browser",
"Keywords":"tags,sv_tags",
"FieldName":"sv_tags",
"InputType":"text",
"ParamFieldName":"sv_tags",
"IncludeInCommandLine":true,
"EnumValues":{}
},
{
"DisplayName":"LAN Server",
"Category":"CS2 Server Settings",
"Description":"If enabled, the server will operate as a LAN server: no heartbeat, no authentication, and no non-class C addresses",
"Keywords":"lan,local,sv_lan",
"FieldName":"sv_lan",
"InputType":"checkbox",
"ParamFieldName":"sv_lan",
"IncludeInCommandLine":true,
"DefaultValue":"false",
"EnumValues":{
"False":"false",
"True":"true"
}
},
{
"DisplayName":"Server Password",
"Category":"CS2 Server Settings",
"Description":"Sets the password required to connect to the server. Default is no password",
"Keywords":"server,password,sv_password",
"FieldName":"sv_password",
"InputType":"password",
"ParamFieldName":"sv_password",
"IncludeInCommandLine":true,
"DefaultValue":"",
"EnumValues":{}
},
{
"DisplayName":"RCON Password",
"Category":"CS2 Server Settings",
"Description":"See the Security and Privacy menu for configurable options for the server's RCON",
"Keywords":"rcon,password,rcon_password",
"FieldName":"$RemoteAdminPassword",
"InputType":"hidden",
"IsFlagArgument":false,
"ParamFieldName":"rcon_password",
"EnumValues":{}
},
{
"DisplayName":"Initial Game Mode",
"Category":"CS2 Server Settings",
"Description":"Sets the game mode (game_type, game_mode) to start the server with",
"Keywords":"game,mode,gamemode,game_mode,game_type",
"FieldName":"gamemode",
"InputType":"enum",
"ParamFieldName":"gamemode",
"DefaultValue":"+game_type 0 +game_mode 0",
"EnumValues":{
"+game_type 0 +game_mode 0":"Casual (default)",
"+game_type 0 +game_mode 1":"Competitive",
"+game_type 0 +game_mode 2":"Wingman (Competitive 2v2)",
"+game_type 1 +game_mode 2":"Deathmatch",
"+game_type 2 +game_mode 0":"Training",
"+game_type 3 +game_mode 0":"Custom",
"+game_type 4 +game_mode 0":"Guardian (Co-operative)",
"+game_type 4 +game_mode 1":"Co-op Strike (Co-op Mission)"
}
},
{
"DisplayName":"Initial Map",
"Category":"CS2 Server Settings",
"Description":"Sets the map to start the server with. If \"Custom\" is selected, Custom Initial Map must also be specified",
"Keywords":"map",
"FieldName":"map",
"InputType":"enum",
"ParamFieldName":"map",
"IncludeInCommandLine":true,
"DefaultValue":"de_dust2",
"EnumValues":{
"de_ancient":"Ancient",
"de_anubis":"Anubis",
"de_dust2":"Dust II (default)",
"de_inferno":"Inferno",
"cs_italy":"Italy",
"de_mirage":"Mirage",
"de_nuke":"Nuke",
"cs_office":"Office",
"de_overpass":"Overpass",
"de_vertigo":"Vertigo",
"{{CustomMap}}":"--Custom--"
}
},
{
"DisplayName":"Custom Initial Map",
"Category":"CS2 Server Settings",
"Description":"Sets a custom map to use for the Initial Map, if \"Custom\" is selected",
"Keywords":"custom,map",
"FieldName":"CustomMap",
"InputType":"text",
"ParamFieldName":"CustomMap",
"DefaultValue":"",
"EnumValues":{}
},
{
"DisplayName":"Player Limit",
"Category":"CS2 Server Settings",
"Description":"Sets the maximum number of players allowed on the server at one time",
"Keywords":"max,players,limit,maxplayers",
"FieldName":"$MaxUsers",
"InputType":"number",
"MinValue":"1",
"MaxValue":"64",
"ParamFieldName":"maxplayers",
"DefaultValue":"32",
"Placeholder":"32",
"Suffix":"players",
"EnumValues":{}
},
{
"DisplayName":"Pure Server Mode",
"Category":"CS2 Server Settings",
"Description":"Sets whether clients are only allowed to use certain files",
"Keywords":"pure,server,cheat,hack,integrity,sv_pure",
"FieldName":"sv_pure",
"InputType":"enum",
"ParamFieldName":"sv_pure",
"IncludeInCommandLine":true,
"DefaultValue":"0",
"EnumValues":{
"0":"Client files not restricted",
"1":"All client files except those listed in pure_server_whitelist.txt must match the server",
"2":"All client files must come from Steam"
}
},
{
"DisplayName":"Enable Cheats",
"Category":"CS2 Server Settings",
"Description":"If set, cheat convars will be allowed to be used on the server",
"Keywords":"allow,cheat,hack,integrity,sv_cheats",
"FieldName":"sv_cheats",
"InputType":"checkbox",
"ParamFieldName":"sv_cheats",
"IncludeInCommandLine":true,
"DefaultValue":"false",
"EnumValues":{
"False":"false",
"True":"true"
}
},
{
"DisplayName":"Disable Valve Anti-Cheat",
"Category":"CS2 Server Settings",
"Description":"If set, Valve Anti-Cheat (VAC) will be disabled",
"Keywords":"valve,anti,cheat,vac,insecure",
"FieldName":"insecure",
"InputType":"checkbox",
"ParamFieldName":"insecure",
"DefaultValue":"",
"EnumValues":{
"False":"",
"True":"-insecure "
}
},
{
"DisplayName":"Server/RCON IPv4 IP Binding",
"Category":"CS2 Server Settings",
"Description":"If required, you can change the IPv4 IP binding of the server and RCON by editing App.ApplicationIPBinding in GenericModule.kvp for the instance. Default is 0.0.0.0 (all IPs). Stop the instance (not just the server) first. NOTE: The IP must be reachable by AMP, otherwise AMP's console won't work",
"Keywords":"ip,binding",
"FieldName":"ip",
"InputType":"hidden",
"ParamFieldName":"ip",
"EnumValues":{}
},
{
"DisplayName":"Additional Command Line Parameters",
"Category":"CS2 Server Settings",
"Description":"Specifies additional command line parameters (anything that begins with a -) that are not otherwise set by AMP. Use with care",
"Keywords":"custom,server,arguments,variables,cvars,convars,parameters",
"FieldName":"CustomParameters",
"InputType":"text",
"ParamFieldName":"CustomParameters",
"DefaultValue":"",
"Placeholder":"",
"EnumValues":{}
},
{
"DisplayName":"Additional Console Variables",
"Category":"CS2 Server Settings",
"Description":"Specifies additional console variables (anything that begins with a +) that are not otherwise set by AMP. Use with care",
"Keywords":"custom,server,arguments,variables,cvars,convars,parameters",
"FieldName":"CustomConVars",
"InputType":"text",
"ParamFieldName":"CustomConVars",
"DefaultValue":"",
"Placeholder":"",
"EnumValues":{}
}
]

View File

@ -0,0 +1 @@
[]

View File

@ -0,0 +1,16 @@
[
{
"UpdateStageName":"SteamCMD Server Download",
"UpdateSourcePlatform":"All",
"UpdateSource":"SteamCMD",
"UpdateSourceData":"730",
"UpdateSourceArgs":"730"
},
{
"UpdateStageName":"SteamCMD Component Download",
"UpdateSourcePlatform":"Windows",
"UpdateSource":"SteamCMD",
"UpdateSourceData":"1007",
"UpdateSourceTarget":"{{$FullBaseDir}}game/bin/win64"
}
]