Browse Source

feat(cs2): update parameters and add workshop support (#4405)

* feat(cs2): update config and parameter settings

* remove serverlogging

* add authkey for workshop

* add cs2 label
pull/4453/head
Daniel Gibbs 1 year ago
committed by GitHub
parent
commit
2fff61f41a
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 6
      .github/labeler.yml
  2. 32
      lgsm/config-default/config-lgsm/cs2server/_default.cfg
  3. 8
      lgsm/modules/info_game.sh

6
.github/labeler.yml

@ -74,6 +74,8 @@
- "/(Barotrauma)/i" - "/(Barotrauma)/i"
"game: Counter-Strike: Global Offensive": "game: Counter-Strike: Global Offensive":
- "/(Counter-Strike: Global Offensive|CS:GO|csgo)/i" - "/(Counter-Strike: Global Offensive|CS:GO|csgo)/i"
"game: Counter-Strike 2":
- "/(Counter-Strike 2|CS2)/i"
"game: Counter-Strike: Source": "game: Counter-Strike: Source":
- "/(Counter-Strike: Source|CS:S)/i" - "/(Counter-Strike: Source|CS:S)/i"
"game: Counter-Strike 1.6": "game: Counter-Strike 1.6":
@ -95,13 +97,13 @@
"game: Left 4 Dead 2": "game: Left 4 Dead 2":
- "/(Left 4 Dead 2|L4D2)/i" - "/(Left 4 Dead 2|L4D2)/i"
"game: Minecraft": "game: Minecraft":
- "/(minecraft)((?!bedrock).)*$/i" - "/(Minecraft)((?!bedrock).)*$/i"
"game: Minecraft Bedrock": "game: Minecraft Bedrock":
- "/(Bedrock)/i" - "/(Bedrock)/i"
"game: Mumble": "game: Mumble":
- "/(Mumble)/i" - "/(Mumble)/i"
"game: Project Zomboid": "game: Project Zomboid":
- "/(Project Zomboid)/i" - "/(Project Zomboid|PZ)/i"
"game: Quake 3": "game: Quake 3":
- "/(Quake 3|Q3A|q3)/i" - "/(Quake 3|Q3A|q3)/i"
"game: Rising World": "game: Rising World":

32
lgsm/config-default/config-lgsm/cs2server/_default.cfg

@ -10,41 +10,13 @@
## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters ## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters
# https://docs.linuxgsm.com/game-servers/counter-strike-2 # https://docs.linuxgsm.com/game-servers/counter-strike-2
# [Game Modes] gametype gamemode gamemodeflags skirmishid mapgroup (you can mix these across all Game Modes except Danger Zone, but use only one)
# Arms Race 1 0 0 0 mg_armsrace
# Boom! Headshot! 1 2 0 6 mg_skirmish_headshots
# Classic Casual 0 0 0 0 mg_casualsigma, mg_casualdelta
# Classic Competitive (Default) 0 1 0 0 mg_active, mg_reserves, mg_hostage, mg_de_dust2, ...
# Classic Competitive (Short Match) 0 1 32 0 mg_active, mg_reserves, mg_hostage, mg_de_dust2, ...
# Danger Zone 6 0 0 0 mg_dz_blacksite (map: dz_blacksite), mg_dz_sirocco (map: dz_sirocco)
# Deathmatch (Default) 1 2 0 0 mg_deathmatch
# Deathmatch (Free For All) 1 2 32 0 mg_deathmatch
# Deathmatch (Team vs Team) 1 2 4 0 mg_deathmatch
# Demolition 1 1 0 0 mg_demolition
# Flying Scoutsman 0 0 0 3 mg_skirmish_flyingscoutsman
# Hunter-Gatherers 1 2 0 7 mg_skirmish_huntergatherers
# Retakes 0 0 0 12 mg_skirmish_retakes
# Stab Stab Zap 0 0 0 1 mg_skirmish_stabstabzap
# Trigger Discipline 0 0 0 4 mg_skirmish_triggerdiscipline
# Wingman 0 2 0 0 mg_de_prime, mg_de_blagai, mg_de_vertigo, mg_de_inferno, mg_de_overpass, mg_de_cbble, mg_de_train, mg_de_shortnuke, mg_de_shortdust, mg_de_lake
gametype="0"
gamemode="1"
gamemodeflags="0"
skirmishid="0"
mapgroup="mg_active"
ip="0.0.0.0" ip="0.0.0.0"
port="27015" port="27015"
defaultmap="de_dust2"
maxplayers="16" maxplayers="16"
tickrate="64" wsapikey=""
## Game Server Login Token (GSLT): Required
# GSLT is required for running a public server.
# More info: https://docs.linuxgsm.com/steamcmd/gslt
gslt=""
## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
startparameters="-dedicated -ip ${ip} -port ${port} -maxplayers ${maxplayers} -tickrate ${tickrate} -serverlogging +sv_setsteamaccount ${gslt} +map ${defaultmap} +game_type ${gametype} +game_mode ${gamemode} +sv_game_mode_flags ${gamemodeflags} +sv_skirmish_id ${skirmishid} +sv_logfile 1 +exec ${selfname}.cfg" startparameters="-dedicated -ip ${ip} -port ${port} -maxplayers ${maxplayers} -authkey ${wsapikey} +exec ${selfname}.cfg"
#### LinuxGSM Settings #### #### LinuxGSM Settings ####

8
lgsm/modules/info_game.sh

@ -1159,14 +1159,12 @@ fn_info_game_col() {
fn_info_game_cs2() { fn_info_game_cs2() {
if [ -f "${servercfgfullpath}" ]; then if [ -f "${servercfgfullpath}" ]; then
fn_info_game_valve_keyvalues "servername" "hostname" fn_info_game_valve_keyvalues "servername" "hostname"
fi fn_info_game_valve_keyvalues "defaultmap" "map"
# Steamport can be between 26901-26910 and is normally automatically set. fn_info_game_valve_keyvalues "password" "sv_password"
# Some servers might support -steamport parameter to set
if [ "${steamport}" == "0" ] || [ -v "${steamport}" ]; then
steamport="$(echo "${ssinfo}" | grep "${srcdslinuxpid}" | awk '{print $5}' | grep ":269" | cut -d ":" -f2)"
fi fi
defaultmap="${defaultmap:-"NOT SET"}" defaultmap="${defaultmap:-"NOT SET"}"
maxplayers="${maxplayers:-"0"}" maxplayers="${maxplayers:-"0"}"
password="${password:-"NOT SET"}"
port="${port:-"0"}" port="${port:-"0"}"
queryport="${port:-"0"}" queryport="${port:-"0"}"
servername="${servername:-"NOT SET"}" servername="${servername:-"NOT SET"}"

Loading…
Cancel
Save