From c00061afcc4a8085ff2f897a3fc76dbd3baf9acd Mon Sep 17 00:00:00 2001 From: Crazy-Pie Date: Sun, 21 Apr 2024 09:49:48 +0500 Subject: [PATCH 1/5] Create cs2.json This template will allow you to install a cs2 server --- CounterStrike2/cs2.json | 139 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 139 insertions(+) create mode 100644 CounterStrike2/cs2.json diff --git a/CounterStrike2/cs2.json b/CounterStrike2/cs2.json new file mode 100644 index 0000000..e47b38a --- /dev/null +++ b/CounterStrike2/cs2.json @@ -0,0 +1,139 @@ +{ + "name": "CS 2", + "display": "Counter Strike 2", + "type": "srcds", + "install": [ + { + "appId": "730", + "type": "steamgamedl" + } + ], + "run": { + "stop": "quit", + "command": "./game/bin/linuxsteamrt64/cs2 -dedicated ${vac}-ip ${ip} -port ${port} -maxplayers ${player} +sv_setsteamaccount ${steamid} +map ${map} +hostname ${hostname} +game_alias ${gamemode} ${workshop_enable} ${workshopid}", + "workingDirectory": "", + "pre": [ + { + "commands": [ + "chmod +x bin/linuxsteamrt64/cs2" + ], + "type": "command" + } + ], + "post": [], + "environmentVars": {} + }, + "data": { + "gamemode": { + "type": "option", + "display": "Game mode ", + "value": "deathmatch", + "userEdit": true, + "options": [ + { + "value": "deathmatch", + "display": "DeathMath" + }, + { + "value": "competitive", + "display": "Competitive" + }, + { + "value": "wingman", + "display": "Wingman" + }, + { + "value": "casual", + "display": "Casual" + }, + { + "value": "custom", + "display": "Custom" + } + ] + }, + "hostname": { + "type": "string", + "display": "Host name server", + "value": "Counter Strike 2 server", + "userEdit": true + }, + "ip": { + "type": "string", + "display": "Ip", + "value": "192.168.0.1", + "userEdit": true + }, + "map": { + "type": "string", + "display": "Map", + "value": "de_dust2", + "userEdit": true + }, + "player": { + "type": "integer", + "display": "Max players", + "value": "20", + "userEdit": true + }, + "port": { + "type": "integer", + "display": "Port", + "value": "27015", + "userEdit": true + }, + "steamid": { + "type": "string", + "display": "Tokken", + "required": true, + "userEdit": true + }, + "vac": { + "type": "option", + "display": "Vac system", + "required": true, + "value": "false", + "userEdit": true, + "options": [ + { + "value": "-insecure ", + "display": "Vac False" + }, + { + "value": "", + "display": "Vac True" + } + ] + }, + "workshop_enable": { + "type": "option", + "display": "Workshop enable", + "required": true, + "userEdit": true, + "options": [ + { + "value": "+host_workshop_map", + "display": "True" + }, + { + "value": "", + "display": "False" + } + ] + }, + "workshopid": { + "type": "integer", + "display": "Workshop Map ID", + "userEdit": true + } + }, + "environment": { + "type": "tty" + }, + "supportedEnvironments": [ + { + "type": "tty" + } + ], + "requirements": {} +} From f96b62ad3ea6a7c66f9b9a814ee7006cc9e576c6 Mon Sep 17 00:00:00 2001 From: Crazy-Pie Date: Tue, 7 May 2024 00:30:44 +0500 Subject: [PATCH 2/5] Update and rename cs2.json to CounterStrike2.json Minor fix. --- .../{cs2.json => CounterStrike2.json} | 29 +++++++++---------- 1 file changed, 14 insertions(+), 15 deletions(-) rename CounterStrike2/{cs2.json => CounterStrike2.json} (88%) diff --git a/CounterStrike2/cs2.json b/CounterStrike2/CounterStrike2.json similarity index 88% rename from CounterStrike2/cs2.json rename to CounterStrike2/CounterStrike2.json index e47b38a..e23911a 100644 --- a/CounterStrike2/cs2.json +++ b/CounterStrike2/CounterStrike2.json @@ -6,27 +6,26 @@ { "appId": "730", "type": "steamgamedl" + }, + { + "type": "command", + "commands": [ + "chmod +x bin/linuxsteamrt64/cs2" + ] } ], "run": { "stop": "quit", "command": "./game/bin/linuxsteamrt64/cs2 -dedicated ${vac}-ip ${ip} -port ${port} -maxplayers ${player} +sv_setsteamaccount ${steamid} +map ${map} +hostname ${hostname} +game_alias ${gamemode} ${workshop_enable} ${workshopid}", "workingDirectory": "", - "pre": [ - { - "commands": [ - "chmod +x bin/linuxsteamrt64/cs2" - ], - "type": "command" - } - ], + "pre": [], "post": [], "environmentVars": {} }, "data": { "gamemode": { "type": "option", - "display": "Game mode ", + "display": "Game mode", "value": "deathmatch", "userEdit": true, "options": [ @@ -56,13 +55,13 @@ "type": "string", "display": "Host name server", "value": "Counter Strike 2 server", - "userEdit": true + "userEdit": false }, "ip": { "type": "string", "display": "Ip", - "value": "192.168.0.1", - "userEdit": true + "value": "0.0.0.0", + "userEdit": false }, "map": { "type": "string", @@ -80,7 +79,7 @@ "type": "integer", "display": "Port", "value": "27015", - "userEdit": true + "userEdit": false }, "steamid": { "type": "string", @@ -97,11 +96,11 @@ "options": [ { "value": "-insecure ", - "display": "Vac False" + "display": "Vac Disable" }, { "value": "", - "display": "Vac True" + "display": "Vac Enable" } ] }, From f83fd20c97ecf3b08d3c67e9cef0f1db7e89ea2c Mon Sep 17 00:00:00 2001 From: Crazy-Pie Date: Tue, 7 May 2024 00:32:20 +0500 Subject: [PATCH 3/5] Update CounterStrike2.json Tokken user edit false. --- CounterStrike2/CounterStrike2.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CounterStrike2/CounterStrike2.json b/CounterStrike2/CounterStrike2.json index e23911a..e1be0d8 100644 --- a/CounterStrike2/CounterStrike2.json +++ b/CounterStrike2/CounterStrike2.json @@ -85,7 +85,7 @@ "type": "string", "display": "Tokken", "required": true, - "userEdit": true + "userEdit": false }, "vac": { "type": "option", From 17dd3d50a258ac963fe52dda44cd0815ab2437ab Mon Sep 17 00:00:00 2001 From: Crazy-Pie Date: Tue, 7 May 2024 00:34:11 +0500 Subject: [PATCH 4/5] Update CounterStrike2.json Minor fix --- CounterStrike2/CounterStrike2.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CounterStrike2/CounterStrike2.json b/CounterStrike2/CounterStrike2.json index e1be0d8..2bb00f8 100644 --- a/CounterStrike2/CounterStrike2.json +++ b/CounterStrike2/CounterStrike2.json @@ -16,7 +16,7 @@ ], "run": { "stop": "quit", - "command": "./game/bin/linuxsteamrt64/cs2 -dedicated ${vac}-ip ${ip} -port ${port} -maxplayers ${player} +sv_setsteamaccount ${steamid} +map ${map} +hostname ${hostname} +game_alias ${gamemode} ${workshop_enable} ${workshopid}", + "command": "./game/bin/linuxsteamrt64/cs2 -dedicated ${vac}-ip ${ip} -port ${port} -maxplayers ${player} +sv_setsteamaccount ${steamid} +map ${map} +hostname ${hostname} +game_alias ${gamemode} ${workshopenable} ${workshopid}", "workingDirectory": "", "pre": [], "post": [], @@ -104,7 +104,7 @@ } ] }, - "workshop_enable": { + "workshopenable": { "type": "option", "display": "Workshop enable", "required": true, From 837b809539ccd72ffac551f6303cfe7482be6f14 Mon Sep 17 00:00:00 2001 From: Crazy-Pie Date: Tue, 7 May 2024 00:48:32 +0500 Subject: [PATCH 5/5] Update CounterStrike2.json --- CounterStrike2/CounterStrike2.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CounterStrike2/CounterStrike2.json b/CounterStrike2/CounterStrike2.json index 2bb00f8..d5b24be 100644 --- a/CounterStrike2/CounterStrike2.json +++ b/CounterStrike2/CounterStrike2.json @@ -106,23 +106,23 @@ }, "workshopenable": { "type": "option", - "display": "Workshop enable", + "display": "Workshop map", "required": true, "userEdit": true, "options": [ { "value": "+host_workshop_map", - "display": "True" + "display": "Enable" }, { "value": "", - "display": "False" + "display": "Disable" } ] }, "workshopid": { "type": "integer", - "display": "Workshop Map ID", + "display": "Workshop Map ID (Need to clear if workshop map disable.)", "userEdit": true } },