pelican-eggs / eggs

Service eggs for the pterodactyl panel
MIT License
2.84k stars 2.32k forks source link

[Egg Request]: SteamCMD: Warfork #1811

Open Hazerre opened 2 years ago

Hazerre commented 2 years ago

Does this expand an already existing service

No

Link to a game or software

https://store.steampowered.com/app/671610/Warfork/

Links for the download

https://store.steampowered.com/app/671610/Warfork/

Links for the install docs

https://warforkwiki.com/index.php?title=Hosting_Game_Servers

parkervcp commented 2 years ago

The generic steamcmd egg should be able to handle this. You would want to use the appid 1136510 for the server.

parkervcp commented 2 years ago

You will need to customize the start command to run the server.

Hazerre commented 2 years ago

Sorry, I could be just blind but whereabouts is the generic steamcmd egg? I see the generic wine egg. Is that the one I should use?

QuintenQVD0 commented 2 years ago

Sorry, I could be just blind but whereabouts is the generic steamcmd egg? I see the generic wine egg. Is that the one I should use?

I made one some time ago it is not perfect but should do the trick

 {
    "_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
    "meta": {
        "version": "PTDL_v2",
        "update_url": null
    },
    "exported_at": "2022-10-01T12:06:36+02:00",
    "name": "Generic SteamCMD",
    "author": "josdekurk@gmail.com",
    "description": "A generic egg to run servers with SteamCMD",
    "features": [
        "steam_disk_space"
    ],
    "docker_images": {
        "ghcr.io\/parkervcp\/games:source": "ghcr.io\/parkervcp\/games:source"
    },
    "file_denylist": [],
    "startup": ".\/{{SERVER_EXECUTABLE}} {{SERVER_STARTUP_FLAGS}}",
    "config": {
        "files": "{}",
        "startup": "{\r\n    \"done\": \"Connection to Steam servers successful\"\r\n}",
        "logs": "{}",
        "stop": "^C"
    },
    "scripts": {
        "installation": {
            "script": "#!\/bin\/bash\r\n\r\napt update\r\napt -y install curl wget git zip unzip jq tar lib32gcc-s1 ca-certificates file\r\n\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\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} $( [[ \"${WINDOWS_INSTALL}\" == \"1\" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update ${SRCDS_APPID} $( [[ -z ${SRCDS_BETAID} ]] || printf %s \"-beta ${SRCDS_BETAID}\" ) $( [[ -z ${SRCDS_BETAPASS} ]] || printf %s \"-betapassword ${SRCDS_BETAPASS}\" ) ${INSTALL_FLAGS} validate +quit ## other flags may be needed depending on install. looking at you cs 1.6\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\necho \"done\"",
            "container": "ghcr.io\/parkervcp\/installers:debian",
            "entrypoint": "\/bin\/bash"
        }
    },
    "variables": [
        {
            "name": "Steam Username",
            "description": "Your Steam username\r\n\r\nCan be empty for anonymous",
            "env_variable": "STEAM_USER",
            "default_value": "",
            "user_viewable": true,
            "user_editable": true,
            "rules": "nullable|string|max:60",
            "field_type": "text"
        },
        {
            "name": "Steam password",
            "description": "Your Steam password\r\n\r\nCan be empty for anonymous",
            "env_variable": "STEAM_PASS",
            "default_value": "",
            "user_viewable": true,
            "user_editable": true,
            "rules": "nullable|string|max:60",
            "field_type": "text"
        },
        {
            "name": "Windows Install",
            "description": "Install the windows version of a game",
            "env_variable": "WINDOWS_INSTALL",
            "default_value": "0",
            "user_viewable": false,
            "user_editable": false,
            "rules": "required|boolean",
            "field_type": "text"
        },
        {
            "name": "APP ID",
            "description": "The ID corresponding to the game to download.",
            "env_variable": "SRCDS_APPID",
            "default_value": "",
            "user_viewable": false,
            "user_editable": false,
            "rules": "required|numeric|digits_between:1,9",
            "field_type": "text"
        },
        {
            "name": "Beta Branch",
            "description": "Installs beta branch if specified",
            "env_variable": "SRCDS_BETAID",
            "default_value": "",
            "user_viewable": true,
            "user_editable": true,
            "rules": "nullable|boolean",
            "field_type": "text"
        },
        {
            "name": "Beta password",
            "description": "Required if Beta Branch is set",
            "env_variable": "SRCDS_BETAPASS",
            "default_value": "",
            "user_viewable": true,
            "user_editable": true,
            "rules": "nullable|string|max:60",
            "field_type": "text"
        },
        {
            "name": "Install Flags",
            "description": "extra SteamCMD install flags",
            "env_variable": "INSTALL_FLAGS",
            "default_value": "",
            "user_viewable": false,
            "user_editable": false,
            "rules": "nullable|string|max:80",
            "field_type": "text"
        },
        {
            "name": "Server Executable",
            "description": "The server executable to run",
            "env_variable": "SERVER_EXECUTABLE",
            "default_value": "game.bin.x64",
            "user_viewable": true,
            "user_editable": false,
            "rules": "required|string",
            "field_type": "text"
        },
        {
            "name": "Server startup flags",
            "description": "The flags you want to pass to the game binary",
            "env_variable": "SERVER_STARTUP_FLAGS",
            "default_value": "",
            "user_viewable": true,
            "user_editable": false,
            "rules": "nullable|string",
            "field_type": "text"
        },
        {
            "name": "Server Query Port",
            "description": "Server Query port",
            "env_variable": "QUERY_PORT",
            "default_value": "10037",
            "user_viewable": true,
            "user_editable": false,
            "rules": "required|numeric",
            "field_type": "text"
        },
        {
            "name": "RCON Port",
            "description": "Port used for RCON connections",
            "env_variable": "RCON_PORT",
            "default_value": "21114",
            "user_viewable": true,
            "user_editable": false,
            "rules": "nullable|numeric",
            "field_type": "text"
        },
        {
            "name": "HLDS_GAME",
            "description": "",
            "env_variable": "HLDS_GAME",
            "default_value": "",
            "user_viewable": false,
            "user_editable": false,
            "rules": "nullable|string|max:50",
            "field_type": "text"
        }
    ]
}