From 2bb7ca29ab9e54bb919a583031b51b8c7db34945 Mon Sep 17 00:00:00 2001 From: Chase Eller Date: Sun, 11 Dec 2022 00:49:10 -0500 Subject: [PATCH 1/9] ATS Egg Commit of working egg for American Truck Simulator with instructions. --- .../american-truck-simulator/README.md | 82 +++++++++++++++++++ .../american-truck-simulator/egg-ats.json | 31 +++++++ 2 files changed, 113 insertions(+) create mode 100644 game_eggs/steamcmd_servers/american-truck-simulator/README.md create mode 100644 game_eggs/steamcmd_servers/american-truck-simulator/egg-ats.json diff --git a/game_eggs/steamcmd_servers/american-truck-simulator/README.md b/game_eggs/steamcmd_servers/american-truck-simulator/README.md new file mode 100644 index 00000000..326dfeb5 --- /dev/null +++ b/game_eggs/steamcmd_servers/american-truck-simulator/README.md @@ -0,0 +1,82 @@ +# ATSPtero - A Egg For Setting Up ATS Dedicated Server + + +Ports below are the default ports that are associated with the ATS dedicated server. If you change them in server setup be sure to change them in the .local/shared/American Truck Simulator/server_config.sii file. (See Server_Config Directions below) +| Port | default | +|---------|---------------| +| Dedicated| 27015 | +| Query | 27016 | + +# Setup +You must generate the required server config files necessary to run the server in game on ATS. To do so you **MUST** have console enabled. + +# Enabling Console +To enable your console you must change 2 values in the clients config.cfg file. With the game off simply change the following: +- g_developer "0" -----> g_developer "1" +- g_console "0" -----> g_console "1" + +Once those have been changed save and close the file and start up ATS. + +# Generating Config Files +Once you have enabled your console and started ATS, go ahead and log in to game and set up the convoy how you would normally set it up. This includes, any mods that you may have. Also, dont worry about setting up the name, password, description, etc, as the server_config.sii generated will ignore these settings. + +Once you have your convoy set up in game, press the ~ key and a console will open on the bottom center of your screen. If a console does not open, close ATS and go back up to **Enabling Console** section and go through those steps again. + +With the console open type ```export_server_packages``` and press enter. The game will then tell you that the export was successful. + +Navigate to the folder that contains your clients config.cfg file that you changed in the **Enabling Console** section and look for the following: + +- server_packages.sii +- server_packages.dat + + +# Copy to Server + +With your newly set up files its time to copy them over to the Pterodactyl Panel. Simply upload them through either your preferred SCP program or the file browser in the server panel to the .local/shared/American Truck Simulator/ folder. + +On the panel select start server and the server will then start up and create a default server_config.sii file. Proceed to the .local/shared/American Truck Simulator/ folder. + +Edit the server_config.sii using your favorite text editor and set it up as you need, making any changes to name, password etc. This is also where you would change your default ports if needed to suit your Pterodactyl settings. It should look something like this when you are finished: + +``` +SiiNunit +{ +server_config : *randomly generated string* { + lobby_name: "American Truck Simulator Dedicated Server" + description: "" + welcome_message: "" + password: + max_players: 8 + max_vehicles_total: 100 + max_ai_vehicles_player: 50 + max_ai_vehicles_player_spawn: 50 + connection_virtual_port: 100 + query_virtual_port: 101 + connection_dedicated_port: 27015 + query_dedicated_port: 27016 + server_logon_token: "" + player_damage: true + traffic: true + hide_in_company: false + hide_colliding: true + force_speed_limiter: false + mods_optioning: false + service_no_collision: false + in_menu_ghosting: false + name_tags: true + friends_only: false + show_server: true + moderator_list: 0 +} + +} + +``` + +# Enjoy your server +Once those files have been uploaded and configured you are free to start up your server. When the sever is started look for the line: Session search id: 00000000000000000/101 The number before the / is your search term. This is number to search for in the convoy screen to find your server. You can **NOT** search by the server name at this time. Example: if your number before the / is 987654321 then you would search for 987654321 on your convoy screen in game. + + +# Disclaimer +I do not claim to know everything about this setup as I just got it reliably working myself and will update the egg if anything changes. That being said, if you have problems open up an issue and I will do my best to help if when I have the time. + diff --git a/game_eggs/steamcmd_servers/american-truck-simulator/egg-ats.json b/game_eggs/steamcmd_servers/american-truck-simulator/egg-ats.json new file mode 100644 index 00000000..7f7dd029 --- /dev/null +++ b/game_eggs/steamcmd_servers/american-truck-simulator/egg-ats.json @@ -0,0 +1,31 @@ +{ + "_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO", + "meta": { + "version": "PTDL_v2", + "update_url": null + }, + "exported_at": "2022-12-10T21:09:36-05:00", + "name": "American Truck Simulator Dedicated Server.", + "author": "chase@cstmgames.com", + "description": "This will set up SteamCMD and all the required files for the newly released American Truck Simulator Dedicated server. Simply placed the exported server config from your ATS instance to the .local\/share\/American Truck Simulator\/ folder and select start.", + "features": null, + "docker_images": { + "ghcr.io\/parkervcp\/games:source": "ghcr.io\/parkervcp\/games:source" + }, + "file_denylist": [], + "startup": "$(pwd)\/bin\/linux_x64\/amtrucks_server", + "config": { + "files": "{}", + "startup": "{\r\n \"done\": \"[MP] Session running.\"\r\n}", + "logs": "{}", + "stop": "^C" + }, + "scripts": { + "installation": { + "script": "#!\/bin\/bash\r\napt -y update\r\napt -y --no-install-recommends --no-install-suggests install curl lib32gcc-s1 ca-certificates\r\n\r\n## download and install steamcmd\r\ncd \/tmp\r\nmkdir -p \/mnt\/server\/steamcmd\r\ncurl -sSL -o steamcmd.tar.gz https:\/\/steamcdn-a.akamaihd.net\/client\/installer\/steamcmd_linux.tar.gz\r\ntar -xzvf steamcmd.tar.gz -C \/mnt\/server\/steamcmd\r\n\r\nmkdir -p \/mnt\/server\/Engine\/Binaries\/ThirdParty\/SteamCMD\/Linux\r\ntar -xzvf steamcmd.tar.gz -C \/mnt\/server\/Engine\/Binaries\/ThirdParty\/SteamCMD\/Linux\r\nmkdir -p \/mnt\/server\/steamapps\r\ncd \/mnt\/server\/steamcmd\r\n\r\n# SteamCMD will fail unless this is set, it will revert at the end of the install.\r\nchown -R root:root \/mnt\r\nexport HOME=\/mnt\/server\r\n\r\n## install game using steamcmd\r\n.\/steamcmd.sh +login anonymous +force_install_dir \/mnt\/server +app_update 2239530 +quit\r\n\r\n## set up 32 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk32\r\ncp -v linux32\/steamclient.so ..\/.steam\/sdk32\/steamclient.so\r\n\r\n## set up 64 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk64\r\ncp -v linux64\/steamclient.so ..\/.steam\/sdk64\/steamclient.so", + "container": "ghcr.io\/parkervcp\/installers:debian", + "entrypoint": "bash" + } + }, + "variables": [] +} \ No newline at end of file From 7417976ef06fb766ed5c1b0e952706c18d82c00a Mon Sep 17 00:00:00 2001 From: Chase Eller Date: Sun, 11 Dec 2022 03:07:49 -0500 Subject: [PATCH 2/9] Update README.md Udated README to reflect the information on how to add moderators to the server file. --- .../steamcmd_servers/american-truck-simulator/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/game_eggs/steamcmd_servers/american-truck-simulator/README.md b/game_eggs/steamcmd_servers/american-truck-simulator/README.md index 326dfeb5..c19232cd 100644 --- a/game_eggs/steamcmd_servers/american-truck-simulator/README.md +++ b/game_eggs/steamcmd_servers/american-truck-simulator/README.md @@ -71,6 +71,15 @@ server_config : *randomly generated string* { } +``` +To add moderators to your server instance you have to also add them to this file. An example seen below: + +``` +moderator_list: 3 +moderator_list[0]: "Steam64 ID Here" +moderator_list[1]: "Steam64 ID Here" +moderator_list[2]: "Steam64 ID Here", +^^^ Can be found by googling Steam ID Lookup ``` # Enjoy your server From b88f8d0edc09944595f34972af787e1984bc0389 Mon Sep 17 00:00:00 2001 From: Chase Eller Date: Sun, 11 Dec 2022 03:16:15 -0500 Subject: [PATCH 3/9] Higherarchy Update Update folder flow to better allow both ATS and ETS to be under the same umbrella. --- .../{ => truck-simulator}/american-truck-simulator/README.md | 0 .../{ => truck-simulator}/american-truck-simulator/egg-ats.json | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename game_eggs/steamcmd_servers/{ => truck-simulator}/american-truck-simulator/README.md (100%) rename game_eggs/steamcmd_servers/{ => truck-simulator}/american-truck-simulator/egg-ats.json (100%) diff --git a/game_eggs/steamcmd_servers/american-truck-simulator/README.md b/game_eggs/steamcmd_servers/truck-simulator/american-truck-simulator/README.md similarity index 100% rename from game_eggs/steamcmd_servers/american-truck-simulator/README.md rename to game_eggs/steamcmd_servers/truck-simulator/american-truck-simulator/README.md diff --git a/game_eggs/steamcmd_servers/american-truck-simulator/egg-ats.json b/game_eggs/steamcmd_servers/truck-simulator/american-truck-simulator/egg-ats.json similarity index 100% rename from game_eggs/steamcmd_servers/american-truck-simulator/egg-ats.json rename to game_eggs/steamcmd_servers/truck-simulator/american-truck-simulator/egg-ats.json From 1a168338a3154f9247ed9475222c6249c804b650 Mon Sep 17 00:00:00 2001 From: Quinten <67589015+QuintenQVD0@users.noreply.github.com> Date: Sun, 11 Dec 2022 09:45:18 +0100 Subject: [PATCH 4/9] Update ATS --- ...ican-truck-simulator-dedicated-server.json | 54 +++++++++++++++++++ .../american-truck-simulator/egg-ats.json | 31 ----------- 2 files changed, 54 insertions(+), 31 deletions(-) create mode 100644 game_eggs/steamcmd_servers/truck-simulator/american-truck-simulator/egg-american-truck-simulator-dedicated-server.json delete mode 100644 game_eggs/steamcmd_servers/truck-simulator/american-truck-simulator/egg-ats.json diff --git a/game_eggs/steamcmd_servers/truck-simulator/american-truck-simulator/egg-american-truck-simulator-dedicated-server.json b/game_eggs/steamcmd_servers/truck-simulator/american-truck-simulator/egg-american-truck-simulator-dedicated-server.json new file mode 100644 index 00000000..36c41711 --- /dev/null +++ b/game_eggs/steamcmd_servers/truck-simulator/american-truck-simulator/egg-american-truck-simulator-dedicated-server.json @@ -0,0 +1,54 @@ +{ + "_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO", + "meta": { + "version": "PTDL_v2", + "update_url": null + }, + "exported_at": "2022-12-11T09:43:37+01:00", + "name": "American Truck Simulator Dedicated Server.", + "author": "chase@cstmgames.com", + "description": "This will set up SteamCMD and all the required files for the newly released American Truck Simulator Dedicated server. Simply placed the exported server config from your ATS instance to the .local\/share\/American Truck Simulator\/ folder and select start.", + "features": [ + "steam_disk_space" + ], + "docker_images": { + "ghcr.io\/parkervcp\/games:source": "ghcr.io\/parkervcp\/games:source" + }, + "file_denylist": [], + "startup": ".\/bin\/linux_x64\/amtrucks_server", + "config": { + "files": "{}", + "startup": "{\r\n \"done\": \"[MP] Session running.\"\r\n}", + "logs": "{}", + "stop": "^C" + }, + "scripts": { + "installation": { + "script": "#!\/bin\/bash\r\n\r\n## just in case someone removed the defaults.\r\nif [[ \"${STEAM_USER}\" == \"\" ]] || [[ \"${STEAM_PASS}\" == \"\" ]]; then\r\n echo -e \"steam user is not set.\\n\"\r\n echo -e \"Using anonymous user.\\n\"\r\n STEAM_USER=anonymous\r\n STEAM_PASS=\"\"\r\n STEAM_AUTH=\"\"\r\nelse\r\n echo -e \"user set to ${STEAM_USER}\"\r\nfi\r\n\r\n## download and install steamcmd\r\ncd \/tmp\r\nmkdir -p \/mnt\/server\/steamcmd\r\ncurl -sSL -o steamcmd.tar.gz https:\/\/steamcdn-a.akamaihd.net\/client\/installer\/steamcmd_linux.tar.gz\r\ntar -xzvf steamcmd.tar.gz -C \/mnt\/server\/steamcmd\r\nmkdir -p \/mnt\/server\/steamapps # Fix steamcmd disk write error when this folder is missing\r\ncd \/mnt\/server\/steamcmd\r\n\r\n# SteamCMD fails otherwise for some reason, even running as root.\r\n# This is changed at the end of the install process anyways.\r\nchown -R root:root \/mnt\r\nexport HOME=\/mnt\/server\r\n\r\n## install game using steamcmd\r\n.\/steamcmd.sh +force_install_dir \/mnt\/server +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} +app_update ${SRCDS_APPID} validate +quit\r\n\r\n## set up 32 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk32\r\ncp -v linux32\/steamclient.so ..\/.steam\/sdk32\/steamclient.so\r\n\r\n## set up 64 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk64\r\ncp -v linux64\/steamclient.so ..\/.steam\/sdk64\/steamclient.so\r\n\r\n\r\n## add below your custom commands if needed\r\nmkdir -p \/mnt\/server\/.local\/shared\/American Truck Simulator\/\r\necho -e '\\033[1mUpload your config and pack file first before starting the server!\\033[0m'\r\n\r\n## install end\r\necho \"-----------------------------------------\"\r\necho \"Installation completed...\"\r\necho \"-----------------------------------------\"", + "container": "ghcr.io\/parkervcp\/installers:debian", + "entrypoint": "bash" + } + }, + "variables": [ + { + "name": "Auto update", + "description": "", + "env_variable": "AUTO_UPDATE", + "default_value": "1", + "user_viewable": true, + "user_editable": true, + "rules": "required|boolean", + "field_type": "text" + }, + { + "name": "App ID", + "description": "", + "env_variable": "SRCDS_APPID", + "default_value": "2239530", + "user_viewable": false, + "user_editable": false, + "rules": "required|string|in:2239530", + "field_type": "text" + } + ] +} \ No newline at end of file diff --git a/game_eggs/steamcmd_servers/truck-simulator/american-truck-simulator/egg-ats.json b/game_eggs/steamcmd_servers/truck-simulator/american-truck-simulator/egg-ats.json deleted file mode 100644 index 7f7dd029..00000000 --- a/game_eggs/steamcmd_servers/truck-simulator/american-truck-simulator/egg-ats.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO", - "meta": { - "version": "PTDL_v2", - "update_url": null - }, - "exported_at": "2022-12-10T21:09:36-05:00", - "name": "American Truck Simulator Dedicated Server.", - "author": "chase@cstmgames.com", - "description": "This will set up SteamCMD and all the required files for the newly released American Truck Simulator Dedicated server. Simply placed the exported server config from your ATS instance to the .local\/share\/American Truck Simulator\/ folder and select start.", - "features": null, - "docker_images": { - "ghcr.io\/parkervcp\/games:source": "ghcr.io\/parkervcp\/games:source" - }, - "file_denylist": [], - "startup": "$(pwd)\/bin\/linux_x64\/amtrucks_server", - "config": { - "files": "{}", - "startup": "{\r\n \"done\": \"[MP] Session running.\"\r\n}", - "logs": "{}", - "stop": "^C" - }, - "scripts": { - "installation": { - "script": "#!\/bin\/bash\r\napt -y update\r\napt -y --no-install-recommends --no-install-suggests install curl lib32gcc-s1 ca-certificates\r\n\r\n## download and install steamcmd\r\ncd \/tmp\r\nmkdir -p \/mnt\/server\/steamcmd\r\ncurl -sSL -o steamcmd.tar.gz https:\/\/steamcdn-a.akamaihd.net\/client\/installer\/steamcmd_linux.tar.gz\r\ntar -xzvf steamcmd.tar.gz -C \/mnt\/server\/steamcmd\r\n\r\nmkdir -p \/mnt\/server\/Engine\/Binaries\/ThirdParty\/SteamCMD\/Linux\r\ntar -xzvf steamcmd.tar.gz -C \/mnt\/server\/Engine\/Binaries\/ThirdParty\/SteamCMD\/Linux\r\nmkdir -p \/mnt\/server\/steamapps\r\ncd \/mnt\/server\/steamcmd\r\n\r\n# SteamCMD will fail unless this is set, it will revert at the end of the install.\r\nchown -R root:root \/mnt\r\nexport HOME=\/mnt\/server\r\n\r\n## install game using steamcmd\r\n.\/steamcmd.sh +login anonymous +force_install_dir \/mnt\/server +app_update 2239530 +quit\r\n\r\n## set up 32 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk32\r\ncp -v linux32\/steamclient.so ..\/.steam\/sdk32\/steamclient.so\r\n\r\n## set up 64 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk64\r\ncp -v linux64\/steamclient.so ..\/.steam\/sdk64\/steamclient.so", - "container": "ghcr.io\/parkervcp\/installers:debian", - "entrypoint": "bash" - } - }, - "variables": [] -} \ No newline at end of file From 689538d16ef690bbe6c26e52543dd1eb65a152bc Mon Sep 17 00:00:00 2001 From: Chase Eller Date: Sun, 11 Dec 2022 04:15:09 -0500 Subject: [PATCH 5/9] Patch Out for Release Made requested changes to the readme and tweaked the config file slightly, the mkdir line that sets up the share folder was set up without quotes and was failing Added reminders to not auto start on completion to allow for upload of configs. --- .../american-truck-simulator/README.md | 2 + ...ican-truck-simulator-dedicated-server.json | 104 +++++++++--------- 2 files changed, 54 insertions(+), 52 deletions(-) diff --git a/game_eggs/steamcmd_servers/truck-simulator/american-truck-simulator/README.md b/game_eggs/steamcmd_servers/truck-simulator/american-truck-simulator/README.md index c19232cd..24f99fcf 100644 --- a/game_eggs/steamcmd_servers/truck-simulator/american-truck-simulator/README.md +++ b/game_eggs/steamcmd_servers/truck-simulator/american-truck-simulator/README.md @@ -7,6 +7,8 @@ Ports below are the default ports that are associated with the ATS dedicated ser | Dedicated| 27015 | | Query | 27016 | +--**Make sure during server setup that the autostart server box is unchecked**-- + # Setup You must generate the required server config files necessary to run the server in game on ATS. To do so you **MUST** have console enabled. diff --git a/game_eggs/steamcmd_servers/truck-simulator/american-truck-simulator/egg-american-truck-simulator-dedicated-server.json b/game_eggs/steamcmd_servers/truck-simulator/american-truck-simulator/egg-american-truck-simulator-dedicated-server.json index 36c41711..b1634b3f 100644 --- a/game_eggs/steamcmd_servers/truck-simulator/american-truck-simulator/egg-american-truck-simulator-dedicated-server.json +++ b/game_eggs/steamcmd_servers/truck-simulator/american-truck-simulator/egg-american-truck-simulator-dedicated-server.json @@ -1,54 +1,54 @@ { - "_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO", - "meta": { - "version": "PTDL_v2", - "update_url": null - }, - "exported_at": "2022-12-11T09:43:37+01:00", - "name": "American Truck Simulator Dedicated Server.", - "author": "chase@cstmgames.com", - "description": "This will set up SteamCMD and all the required files for the newly released American Truck Simulator Dedicated server. Simply placed the exported server config from your ATS instance to the .local\/share\/American Truck Simulator\/ folder and select start.", - "features": [ - "steam_disk_space" - ], - "docker_images": { - "ghcr.io\/parkervcp\/games:source": "ghcr.io\/parkervcp\/games:source" - }, - "file_denylist": [], - "startup": ".\/bin\/linux_x64\/amtrucks_server", - "config": { - "files": "{}", - "startup": "{\r\n \"done\": \"[MP] Session running.\"\r\n}", - "logs": "{}", - "stop": "^C" - }, - "scripts": { - "installation": { - "script": "#!\/bin\/bash\r\n\r\n## just in case someone removed the defaults.\r\nif [[ \"${STEAM_USER}\" == \"\" ]] || [[ \"${STEAM_PASS}\" == \"\" ]]; then\r\n echo -e \"steam user is not set.\\n\"\r\n echo -e \"Using anonymous user.\\n\"\r\n STEAM_USER=anonymous\r\n STEAM_PASS=\"\"\r\n STEAM_AUTH=\"\"\r\nelse\r\n echo -e \"user set to ${STEAM_USER}\"\r\nfi\r\n\r\n## download and install steamcmd\r\ncd \/tmp\r\nmkdir -p \/mnt\/server\/steamcmd\r\ncurl -sSL -o steamcmd.tar.gz https:\/\/steamcdn-a.akamaihd.net\/client\/installer\/steamcmd_linux.tar.gz\r\ntar -xzvf steamcmd.tar.gz -C \/mnt\/server\/steamcmd\r\nmkdir -p \/mnt\/server\/steamapps # Fix steamcmd disk write error when this folder is missing\r\ncd \/mnt\/server\/steamcmd\r\n\r\n# SteamCMD fails otherwise for some reason, even running as root.\r\n# This is changed at the end of the install process anyways.\r\nchown -R root:root \/mnt\r\nexport HOME=\/mnt\/server\r\n\r\n## install game using steamcmd\r\n.\/steamcmd.sh +force_install_dir \/mnt\/server +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} +app_update ${SRCDS_APPID} validate +quit\r\n\r\n## set up 32 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk32\r\ncp -v linux32\/steamclient.so ..\/.steam\/sdk32\/steamclient.so\r\n\r\n## set up 64 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk64\r\ncp -v linux64\/steamclient.so ..\/.steam\/sdk64\/steamclient.so\r\n\r\n\r\n## add below your custom commands if needed\r\nmkdir -p \/mnt\/server\/.local\/shared\/American Truck Simulator\/\r\necho -e '\\033[1mUpload your config and pack file first before starting the server!\\033[0m'\r\n\r\n## install end\r\necho \"-----------------------------------------\"\r\necho \"Installation completed...\"\r\necho \"-----------------------------------------\"", - "container": "ghcr.io\/parkervcp\/installers:debian", - "entrypoint": "bash" - } - }, - "variables": [ - { - "name": "Auto update", - "description": "", - "env_variable": "AUTO_UPDATE", - "default_value": "1", - "user_viewable": true, - "user_editable": true, - "rules": "required|boolean", - "field_type": "text" - }, - { - "name": "App ID", - "description": "", - "env_variable": "SRCDS_APPID", - "default_value": "2239530", - "user_viewable": false, - "user_editable": false, - "rules": "required|string|in:2239530", - "field_type": "text" - } - ] + "_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO", + "meta": { + "version": "PTDL_v2", + "update_url": null + }, + "exported_at": "2022-12-11T04:10:41-05:00", + "name": "American Truck Simulator Dedicated Server", + "author": "chase@cstmgames.com", + "description": "This will set up SteamCMD and all the required files for the newly released American Truck Simulator Dedicated server. Simply placed the exported server config from your ATS instance to the .local\/share\/American Truck Simulator\/ folder and select start. Make sure that auto start is off on server creation to allow you to upload your config files.", + "features": [ + "steam_disk_space" + ], + "docker_images": { + "ghcr.io\/parkervcp\/games:source": "ghcr.io\/parkervcp\/games:source" + }, + "file_denylist": [], + "startup": ".\/bin\/linux_x64\/amtrucks_server", + "config": { + "files": "{}", + "startup": "{\r\n \"done\": \"[MP] Session running.\"\r\n}", + "logs": "{}", + "stop": "^C" + }, + "scripts": { + "installation": { + "script": "#!\/bin\/bash\r\n\r\n## just in case someone removed the defaults.\r\nif [[ \"${STEAM_USER}\" == \"\" ]] || [[ \"${STEAM_PASS}\" == \"\" ]]; then\r\n echo -e \"steam user is not set.\\n\"\r\n echo -e \"Using anonymous user.\\n\"\r\n STEAM_USER=anonymous\r\n STEAM_PASS=\"\"\r\n STEAM_AUTH=\"\"\r\nelse\r\n echo -e \"user set to ${STEAM_USER}\"\r\nfi\r\n\r\n## download and install steamcmd\r\ncd \/tmp\r\nmkdir -p \/mnt\/server\/steamcmd\r\ncurl -sSL -o steamcmd.tar.gz https:\/\/steamcdn-a.akamaihd.net\/client\/installer\/steamcmd_linux.tar.gz\r\ntar -xzvf steamcmd.tar.gz -C \/mnt\/server\/steamcmd\r\nmkdir -p \/mnt\/server\/steamapps # Fix steamcmd disk write error when this folder is missing\r\ncd \/mnt\/server\/steamcmd\r\n\r\n# SteamCMD fails otherwise for some reason, even running as root.\r\n# This is changed at the end of the install process anyways.\r\nchown -R root:root \/mnt\r\nexport HOME=\/mnt\/server\r\n\r\n## install game using steamcmd\r\n.\/steamcmd.sh +force_install_dir \/mnt\/server +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} +app_update ${SRCDS_APPID} validate +quit\r\n\r\n## set up 32 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk32\r\ncp -v linux32\/steamclient.so ..\/.steam\/sdk32\/steamclient.so\r\n\r\n## set up 64 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk64\r\ncp -v linux64\/steamclient.so ..\/.steam\/sdk64\/steamclient.so\r\n\r\n\r\n## add below your custom commands if needed\r\nmkdir -p \"\/mnt\/server\/.local\/share\/American Truck Simulator\/\"\r\necho -e '\\033[1mUpload your config and pack file first before starting the server!\\033[0m'\r\n\r\n## install end\r\necho \"-----------------------------------------\"\r\necho \"Installation completed...\"\r\necho \"-----------------------------------------\"", + "container": "ghcr.io\/parkervcp\/installers:debian", + "entrypoint": "bash" + } + }, + "variables": [ + { + "name": "Auto update", + "description": "", + "env_variable": "AUTO_UPDATE", + "default_value": "1", + "user_viewable": true, + "user_editable": true, + "rules": "required|boolean", + "field_type": "text" + }, + { + "name": "App ID", + "description": "", + "env_variable": "SRCDS_APPID", + "default_value": "2239530", + "user_viewable": false, + "user_editable": false, + "rules": "required|string|in:2239530", + "field_type": "text" + } + ] } \ No newline at end of file From 5864c2b4f547b5c2652b3acc7309f3429731b0c9 Mon Sep 17 00:00:00 2001 From: Chase Eller Date: Sun, 11 Dec 2022 04:34:51 -0500 Subject: [PATCH 6/9] Update Reademes Updated both READEMEs to include links to the files, leaving room for the ETS egg. --- game_eggs/README.md | 2 ++ game_eggs/steamcmd_servers/README.md | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/game_eggs/README.md b/game_eggs/README.md index 8df939c9..9095aaf1 100644 --- a/game_eggs/README.md +++ b/game_eggs/README.md @@ -157,6 +157,8 @@ * [Team Fortress 2 Classic](steamcmd_servers/team_fortress_2_classic) * [The Forest](steamcmd_servers/the_forest) * [Tower Unite](steamcmd_servers/tower_unite) +* [Truck Sim](truck-simulator) + * [American Truck Simulator](truck-simulator/american-truck-simulator/) * [Unturned](steamcmd_servers/unturned) * [V Rising](steamcmd_servers/v_rising) * [Valheim](steamcmd_servers/valheim) diff --git a/game_eggs/steamcmd_servers/README.md b/game_eggs/steamcmd_servers/README.md index c607f914..ed15c2c1 100644 --- a/game_eggs/steamcmd_servers/README.md +++ b/game_eggs/steamcmd_servers/README.md @@ -193,6 +193,11 @@ This is a collection of servers that use SteamCMD to install. [Tower Unite](tower_unite) +## Truck Sim + +* [Truck Sim](truck-simulator) + * [American Truck Simulator](truck-simulator/american-truck-simulator/) + ## Unturned [Unturned](unturned) From b167347e51ee9df6e6c5a7f1da85fa11d15fca73 Mon Sep 17 00:00:00 2001 From: Chase Eller Date: Sun, 11 Dec 2022 04:58:31 -0500 Subject: [PATCH 7/9] Update Readme Forgot to add main readme entry. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 66aaf868..02bebe0e 100644 --- a/README.md +++ b/README.md @@ -256,6 +256,8 @@ If you are reading this it looks like you are looking to add an egg to your serv * [The Forest](game_eggs/steamcmd_servers/the_forest) * [Team Fortress 2 Classic](game_eggs/steamcmd_servers/team_fortress_2_classic) * [Tower Unite](game_eggs/steamcmd_servers/tower_unite) +* [Truck Sim](game_eggs/steamcmd_servers/truck-simulator/) + * [American Truck Simulator](game_eggs/steamcmd_servers/truck-simulator/american-truck-simulator/) * [Unturned](game_eggs/steamcmd_servers/unturned) * [V Rising](game_eggs/steamcmd_servers/v_rising) * [Valheim](game_eggs/steamcmd_servers/valheim) From 5748e58de4144c34fdf0f2234ee54b3fc9865c36 Mon Sep 17 00:00:00 2001 From: Chase Eller Date: Sun, 11 Dec 2022 04:58:54 -0500 Subject: [PATCH 8/9] Update to reflect server vars updated vars to allow inserting into config file --- ...ican-truck-simulator-dedicated-server.json | 34 +++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/game_eggs/steamcmd_servers/truck-simulator/american-truck-simulator/egg-american-truck-simulator-dedicated-server.json b/game_eggs/steamcmd_servers/truck-simulator/american-truck-simulator/egg-american-truck-simulator-dedicated-server.json index b1634b3f..0db180fe 100644 --- a/game_eggs/steamcmd_servers/truck-simulator/american-truck-simulator/egg-american-truck-simulator-dedicated-server.json +++ b/game_eggs/steamcmd_servers/truck-simulator/american-truck-simulator/egg-american-truck-simulator-dedicated-server.json @@ -4,7 +4,7 @@ "version": "PTDL_v2", "update_url": null }, - "exported_at": "2022-12-11T04:10:41-05:00", + "exported_at": "2022-12-11T04:51:01-05:00", "name": "American Truck Simulator Dedicated Server", "author": "chase@cstmgames.com", "description": "This will set up SteamCMD and all the required files for the newly released American Truck Simulator Dedicated server. Simply placed the exported server config from your ATS instance to the .local\/share\/American Truck Simulator\/ folder and select start. Make sure that auto start is off on server creation to allow you to upload your config files.", @@ -17,7 +17,7 @@ "file_denylist": [], "startup": ".\/bin\/linux_x64\/amtrucks_server", "config": { - "files": "{}", + "files": "{\r\n \"\/.local\/share\/American Truck Simulator 2\/server_config.sii\": {\r\n \"parser\": \"file\",\r\n \"find\": {\r\n \" connection_dedicated_port:\": \" connection_dedicated_port: {{server.build.default.port}}\",\r\n \" query_dedicated_port:\": \" query_dedicated_port: {{env.QUERY_PORT}}\",\r\n \" server_logon_token:\": \" server_logon_token: \\\"{{env.STEAM_TOKEN}}\\\"\",\r\n \" lobby_name:\": \" lobby_name: \\\"{{env.LOBBY_NAME}}\\\"\"\r\n }\r\n }\r\n}", "startup": "{\r\n \"done\": \"[MP] Session running.\"\r\n}", "logs": "{}", "stop": "^C" @@ -49,6 +49,36 @@ "user_editable": false, "rules": "required|string|in:2239530", "field_type": "text" + }, + { + "name": "STEAM_TOKEN", + "description": "", + "env_variable": "STEAM_TOKEN", + "default_value": "", + "user_viewable": true, + "user_editable": true, + "rules": "nullable|string|max:64", + "field_type": "text" + }, + { + "name": "Query Port", + "description": "This is the port the sever will use to listen for and respond to queries.", + "env_variable": "QUERY_PORT", + "default_value": "27016", + "user_viewable": true, + "user_editable": true, + "rules": "required|string|between:27015,27020", + "field_type": "text" + }, + { + "name": "LOBBY_NAME", + "description": "Used as the name of the server lobby", + "env_variable": "LOBBY_NAME", + "default_value": "American Truck Simulator", + "user_viewable": true, + "user_editable": true, + "rules": "required|string|max:20", + "field_type": "text" } ] } \ No newline at end of file From a008e79c89bbf2e283060e76c5fb2c4fe3575c8a Mon Sep 17 00:00:00 2001 From: Chase Eller Date: Sun, 11 Dec 2022 05:03:46 -0500 Subject: [PATCH 9/9] Typo fix fixed typo from where I imported a config example and left a number in that was not needed. --- .../egg-american-truck-simulator-dedicated-server.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/game_eggs/steamcmd_servers/truck-simulator/american-truck-simulator/egg-american-truck-simulator-dedicated-server.json b/game_eggs/steamcmd_servers/truck-simulator/american-truck-simulator/egg-american-truck-simulator-dedicated-server.json index 0db180fe..23aaa181 100644 --- a/game_eggs/steamcmd_servers/truck-simulator/american-truck-simulator/egg-american-truck-simulator-dedicated-server.json +++ b/game_eggs/steamcmd_servers/truck-simulator/american-truck-simulator/egg-american-truck-simulator-dedicated-server.json @@ -4,7 +4,7 @@ "version": "PTDL_v2", "update_url": null }, - "exported_at": "2022-12-11T04:51:01-05:00", + "exported_at": "2022-12-11T05:02:58-05:00", "name": "American Truck Simulator Dedicated Server", "author": "chase@cstmgames.com", "description": "This will set up SteamCMD and all the required files for the newly released American Truck Simulator Dedicated server. Simply placed the exported server config from your ATS instance to the .local\/share\/American Truck Simulator\/ folder and select start. Make sure that auto start is off on server creation to allow you to upload your config files.", @@ -17,7 +17,7 @@ "file_denylist": [], "startup": ".\/bin\/linux_x64\/amtrucks_server", "config": { - "files": "{\r\n \"\/.local\/share\/American Truck Simulator 2\/server_config.sii\": {\r\n \"parser\": \"file\",\r\n \"find\": {\r\n \" connection_dedicated_port:\": \" connection_dedicated_port: {{server.build.default.port}}\",\r\n \" query_dedicated_port:\": \" query_dedicated_port: {{env.QUERY_PORT}}\",\r\n \" server_logon_token:\": \" server_logon_token: \\\"{{env.STEAM_TOKEN}}\\\"\",\r\n \" lobby_name:\": \" lobby_name: \\\"{{env.LOBBY_NAME}}\\\"\"\r\n }\r\n }\r\n}", + "files": "{\r\n \"\/.local\/share\/American Truck Simulator\/server_config.sii\": {\r\n \"parser\": \"file\",\r\n \"find\": {\r\n \" connection_dedicated_port:\": \" connection_dedicated_port: {{server.build.default.port}}\",\r\n \" query_dedicated_port:\": \" query_dedicated_port: {{env.QUERY_PORT}}\",\r\n \" server_logon_token:\": \" server_logon_token: \\\"{{env.STEAM_TOKEN}}\\\"\",\r\n \" lobby_name:\": \" lobby_name: \\\"{{env.LOBBY_NAME}}\\\"\"\r\n }\r\n }\r\n}", "startup": "{\r\n \"done\": \"[MP] Session running.\"\r\n}", "logs": "{}", "stop": "^C"