Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

New squad egg for wine #2887

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 24 additions & 3 deletions game_eggs/steamcmd_servers/squad/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@

# Squad

Squad is an online multiplayer first-person shooter that aims to capture combat realism through communication and teamplay.
## Steam Description
Squad is a tactical FPS that provides authentic combat experiences through teamwork, communication, and realistic combat. It bridges the gap between arcade shooter and military realism with 100-player battles, combined-arms warfare, and base building.

## Server Ports
## Versions
* Vanilla - The standard Squad server optimized for Linux environments. Offers maximum stability and performance.
QuintenQVD0 marked this conversation as resolved.
Show resolved Hide resolved
* Wine - Enables the use of Windows-specific Squad mods on a Linux server. Ideal for expanded modding options.

## Required Ports
Squad requires 5 ports

| Port | default |
Expand All @@ -12,4 +17,20 @@ Squad requires 5 ports
| game +1 | 7788 |
| Query | 27165 |
| Query +1 | 27166 |
| Beacon | 15000 |
| Beacon | 15000+ |

Add `-beaconport=15000` to your commandline if you have more than one (1) server, increase this number by five (5).
fakhry7050 marked this conversation as resolved.
Show resolved Hide resolved

## Features
- Wine Integration: Runs Squad servers through Wine, allowing you to leverage Windows-based server executables on Linux platforms.
- Workshop Items Management: Full support for downloading and configuring mods directly through the Pterodactyl panel.
- Automation: Includes scripts for easy setup and management of the game server, including installations and updates.

## Credits
#### Authors:
- [@Fakhry](https://github.com/fakhry7050)
- [@Rectofen](https://github.com/Cloud9OS)
- [@ghoti](https://github.com/sergelouie6)
- [@Cartitarul](https://github.com/Cartitarul)

These individuals have contributed to the development of this project either by direct code contributions, testing, or providing insights and documentation help.
244 changes: 244 additions & 0 deletions game_eggs/steamcmd_servers/squad/egg-squad-wine.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,244 @@
{
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
"meta": {
"version": "PTDL_v2",
"update_url": null
},
"exported_at": "2024-04-12T13:17:40+01:00",
"name": "Squad Wine",
"author": "[email protected]",
"description": "Squad is a realism-based military tactical first-person shooter video game developed and published by Canadian indie developer Offworld Industries exclusively through the Steam distribution platform. It is a spiritual successor to the Project Reality modification for Battlefield 2.",
"features": [
"steam_disk_space"
],
"docker_images": {
"ghcr.io\/parkervcp\/yolks:wine_latest": "ghcr.io\/parkervcp\/yolks:wine_latest"
},
"file_denylist": [],
"startup": "rm \/home\/container\/SquadGame\/Saved\/Logs\/SquadGame.log; wine \/home\/container\/SquadGame\/Binaries\/Win64\/SquadGameServer.exe Port={{SERVER_PORT}} QueryPort={{QUERY_PORT}} beaconport={{BEACON_PORT}} FIXEDMAXTICKRATE={{FIXEDMAXTICKRATE}} -log & SQD_PID=$!; tail -c0 -F \/home\/container\/SquadGame\/Saved\/Logs\/SquadGame.log --pid=$SQD_PID",
"config": {
"files": "{\r\n \"SquadGame\/ServerConfig\/Server.cfg\": {\r\n \"parser\": \"file\",\r\n \"find\": {\r\n \"ServerName\": \"ServerName=\\\"{{server.build.env.SERVERNAME}}\\\"\",\r\n \"MaxPlayers\": \"MaxPlayers={{server.build.env.MAXPLAYERS}}\",\r\n \"AllowTeamChanges\": \"AllowTeamChanges={{server.build.env.ALLOWTEAMCHANGE}}\",\r\n \"ShouldAdvertise\": \"ShouldAdvertise={{server.build.env.ADVERTISE}}\",\r\n \"NumReservedSlots\": \"NumReservedSlots={{server.build.env.RESERVEDSLOTS}}\",\r\n \"PreventTeamChangeIfUnbalanced\": \"PreventTeamChangeIfUnbalanced={{server.build.env.PTCIU}}\",\r\n \"EnforceTeamBalance\": \"EnforceTeamBalance={{server.build.env.TEAMBAL}}\",\r\n \"RecordDemos\": \"RecordDemos={{server.build.env.RECORDDEMOS}}\",\r\n \"TKAutoKickEnabled\": \"TKAutoKickEnabled={{server.build.env.TKAUTOKICKENABLED}}\"\r\n }\r\n },\r\n \"config.sh\": {\r\n \"parser\": \"file\",\r\n \"find\": {\r\n \"FIXEDMAXTICKRATE\": \"FIXEDMAXTICKRATE={{server.build.env.FIXEDMAXTICKRATE}}\",\r\n \"QueryPort\": \"QueryPort={{server.build.env.QUERY_PORT}}\"\r\n }\r\n }\r\n}",
"startup": "{\r\n \"done\": \"Everything Done\"\r\n}",
"logs": "{}",
"stop": "^C"
fakhry7050 marked this conversation as resolved.
Show resolved Hide resolved
},
"scripts": {
"installation": {
"script": "#!\/bin\/bash\r\n# This script installs the Squad game server using Wine and SteamCMD, as well as creates a start.sh script.\r\n\r\n# Navigate to the temporary directory and setup 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\n# Create a directory to prevent SteamCMD disk write errors\r\nmkdir -p \/mnt\/server\/steamapps\r\ncd \/mnt\/server\/steamcmd\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# Install the game using steamcmd\r\n.\/steamcmd.sh +force_install_dir \/mnt\/server +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} \\\r\n$( [[ \"${WINDOWS_INSTALL}\" == \"1\" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) \\\r\n+app_update ${SRCDS_APPID} $( [[ -n ${SRCDS_BETAID} ]] && printf %s \"-beta ${SRCDS_BETAID}\" ) \\\r\n$( [[ -n ${SRCDS_BETAPASS} ]] && printf %s \"-betapassword ${SRCDS_BETAPASS}\" ) ${INSTALL_FLAGS} validate \\\r\n+quit\r\n\r\n# Remove the Steam workshop file to prevent conflict with mods specified in the variables tab\r\nrm \/mnt\/server\/steamapps\/workshop\/appworkshop_393380.acf\r\n\r\n# Address ownership issues which can cause SteamCMD to fail, especially when running as root\r\nchown -R root:root \/mnt\r\n\r\n# Set the HOME environment variable to the server directory\r\nexport HOME=\/mnt\/server\r\n\r\n# Download specified workshop items using a list from the `WORKSHOP_ITEMS` environment variable\r\n.\/steamcmd.sh +@sSteamCmdForcePlatformType windows +force_install_dir \/mnt\/server +login anonymous \\\r\n$(IFS=','; for item in $WORKSHOP_ITEMS; do echo \"+workshop_download_item 393380 ${item}\"; done) \\\r\n+quit\r\n\r\n# Move downloaded mods to the appropriate directory\r\nmv -f \/mnt\/server\/steamapps\/workshop\/content\/393380\/* \/mnt\/server\/SquadGame\/Plugins\/Mods\/\r\n\r\n# Create or Download 'start.sh' in the server directory\r\necho \"Creating config.sh script in the server directory...\"\r\ncat << 'EOF' > \/mnt\/server\/config.sh\r\n#!\/bin\/bash\r\nFIXEDMAXTICKRATE=\r\nQueryPort=\r\nEOF\r\n\r\nchmod +x \/mnt\/server\/config.sh\r\n\r\n# Inform user of installation completion\r\necho \"-----------------------------------------\"\r\necho \"Installation and script setup completed...\"\r\necho \"-----------------------------------------\"",
fakhry7050 marked this conversation as resolved.
Show resolved Hide resolved
"container": "ghcr.io\/parkervcp\/installers:debian",
"entrypoint": "bash"
}
},
"variables": [
{
"name": "Download Workshops Items",
"description": "Workshop file ids separated by a comma \",\" (1111111,222222) \r\nReinstall Required to install mods",
"env_variable": "WORKSHOP_ITEMS",
"default_value": "",
"user_viewable": true,
"user_editable": true,
"rules": "required|string",
"field_type": "text"
},
{
"name": "Beacon Port",
"description": "Beacon port for your Squad server.",
"env_variable": "BEACON_PORT",
"default_value": "",
"user_viewable": true,
"user_editable": false,
"rules": "required|numeric",
"field_type": "text"
},
{
"name": "Max Players",
"description": "Sets the maximum number of players.",
"env_variable": "MAXPLAYERS",
"default_value": "80",
"user_viewable": true,
"user_editable": false,
"rules": "required",
fakhry7050 marked this conversation as resolved.
Show resolved Hide resolved
"field_type": "text"
},
{
"name": "Server Name",
"description": "The name for the server in the server list",
"env_variable": "SERVERNAME",
"default_value": "Squad Server",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|max:30",
"field_type": "text"
},
{
"name": "Allowteamchange",
"description": "Allow players to change teams ( true \\\/ false )",
"env_variable": "ALLOWTEAMCHANGE",
"default_value": "true",
"user_viewable": true,
"user_editable": true,
"rules": "required|string",
fakhry7050 marked this conversation as resolved.
Show resolved Hide resolved
"field_type": "text"
},
{
"name": "TKAutoKick",
"description": "teamkill system if you like enable by ( true \\\/ false )",
"env_variable": "TKAUTOKICKENABLED",
"default_value": "true",
"user_viewable": true,
"user_editable": true,
"rules": "required|string",
fakhry7050 marked this conversation as resolved.
Show resolved Hide resolved
"field_type": "text"
},
{
"name": "Tickrate",
"description": "your numbers of max tickrate",
"env_variable": "FIXEDMAXTICKRATE",
"default_value": "60",
"user_viewable": true,
"user_editable": true,
"rules": "required|string",
fakhry7050 marked this conversation as resolved.
Show resolved Hide resolved
"field_type": "text"
},
{
"name": "Query Port",
"description": "",
"env_variable": "QUERY_PORT",
"default_value": "27165",
"user_viewable": true,
"user_editable": true,
"rules": "required|string",
fakhry7050 marked this conversation as resolved.
Show resolved Hide resolved
"field_type": "text"
},
{
"name": "Advertise Server",
"description": "Have the server report to the public server list ( true \/ false )",
"env_variable": "ADVERTISE",
"default_value": "true",
"user_viewable": true,
"user_editable": true,
"rules": "required|string",
fakhry7050 marked this conversation as resolved.
Show resolved Hide resolved
"field_type": "text"
},
{
"name": "Reserved Slots",
"description": "The number of reserved slots for admins \/ mods",
"env_variable": "RESERVEDSLOTS",
"default_value": "0",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|max:20",
fakhry7050 marked this conversation as resolved.
Show resolved Hide resolved
"field_type": "text"
},
{
"name": "Prevent Team Change If Unbalanced",
"description": "This will prevent players from changing teams if they're already unbalanced ( true \/ false )",
"env_variable": "PTCIU",
"default_value": "true",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|max:20",
fakhry7050 marked this conversation as resolved.
Show resolved Hide resolved
"field_type": "text"
},
{
"name": "Enforce Team Balance",
"description": "This will FORCE team balance if the teams are too uneven ( true \/ false )",
"env_variable": "TEAMBAL",
"default_value": "true",
"user_viewable": true,
"user_editable": true,
"rules": "required|string",
"field_type": "text"
},
{
"name": "Record Demos",
"description": "This will record demos of the players ( true \/ false )",
"env_variable": "RECORDDEMOS",
"default_value": "true",
"user_viewable": true,
"user_editable": true,
"rules": "required|string",
"field_type": "text"
},
{
"name": "STEAM USER",
"description": "Specify Steam User or leave it Blank for anonymous",
"env_variable": "STEAM_USER",
"default_value": "anonymous",
"user_viewable": true,
"user_editable": true,
"rules": "max:30",
"field_type": "text"
},
{
"name": "STEAM PASSWORD",
"description": "Specify Steam Password or leave it Blank for anonymous",
"env_variable": "STEAM_PASS",
"default_value": "",
"user_viewable": true,
"user_editable": true,
"rules": "max:30",
fakhry7050 marked this conversation as resolved.
Show resolved Hide resolved
"field_type": "text"
},
{
"name": "STEAM AUTH",
"description": "Specify Steam AUTH for 2FA if enabled or leave it Blank for anonymous",
"env_variable": "STEAM_AUTH",
"default_value": "",
"user_viewable": true,
"user_editable": true,
"rules": "max:30",
"field_type": "text"
fakhry7050 marked this conversation as resolved.
Show resolved Hide resolved
},
{
"name": "WINDOWS INSTALL",
"description": "Set specific SteamCMD platform type\r\n1 For WIndows\r\n2 For linux",
fakhry7050 marked this conversation as resolved.
Show resolved Hide resolved
"env_variable": "WINDOWS_INSTALL",
"default_value": "1",
"user_viewable": true,
fakhry7050 marked this conversation as resolved.
Show resolved Hide resolved
"user_editable": true,
"rules": "required|string|max:2",
fakhry7050 marked this conversation as resolved.
Show resolved Hide resolved
"field_type": "text"
},
{
"name": "SRCDS APPID",
"description": "steam app id found here - https:\/\/developer.valvesoftware.com\/wiki\/Dedicated_Servers_List",
"env_variable": "SRCDS_APPID",
"default_value": "403240",
"user_viewable": true,
fakhry7050 marked this conversation as resolved.
Show resolved Hide resolved
"user_editable": false,
"rules": "required|string|max:20",
"field_type": "text"
},
{
"name": "SRCDS BETAID",
"description": "Beta branch of a steam app. Leave blank to install normal branch",
"env_variable": "SRCDS_BETAID",
"default_value": "",
"user_viewable": true,
"user_editable": false,
fakhry7050 marked this conversation as resolved.
Show resolved Hide resolved
"rules": "max:20",
"field_type": "text"
},
{
"name": "SRCDS BETAPASS",
"description": "password for a beta branch should one be required during private or closed testing phases.. Leave blank for no password.",
"env_variable": "SRCDS_BETAPASS",
"default_value": "",
"user_viewable": true,
"user_editable": false,
"rules": "max:30",
fakhry7050 marked this conversation as resolved.
Show resolved Hide resolved
"field_type": "text"
},
{
"name": "INSTALL FLAGS",
"description": "Any additional SteamCMD flags to pass during install.. Keep in mind that steamcmd auto update process in the docker image might overwrite or ignore these when it performs update on server boot.",
"env_variable": "INSTALL_FLAGS",
"default_value": "",
"user_viewable": true,
fakhry7050 marked this conversation as resolved.
Show resolved Hide resolved
"user_editable": true,
"rules": "max:30",
"field_type": "text"
}
]
}