diff --git a/game_eggs/tycoon_games/openrct2/README.md b/game_eggs/tycoon_games/openrct2/README.md index b0dbaf98..082e3378 100644 --- a/game_eggs/tycoon_games/openrct2/README.md +++ b/game_eggs/tycoon_games/openrct2/README.md @@ -50,9 +50,9 @@ ___ | | Minimum | |---------|---------| -| Processor | Multiarch is supported for most modern processors | +| Processor | x86/64 (\*multiarch may be supported for develop builds, but has not been tested) | | RAM | 256-512 MiB (depends on # of clients & park size) | -| Storage | 80 MB (*may require more if building from source*) | +| Storage | 110 MB (*may require more if building from source*) | | RCT2 Files | **Not required** | ___ @@ -71,15 +71,13 @@ Unfortunately, because console commands currently do not register, becoming the 1. Ensure the "Log Server Actions" startup variable is set to "true". 2. Start the server and join it with the client you want to make an admin. 3. Open `ServerData/serverlogs//.txt` and copy the SHA1 hash next to your client's username (note the username as well). -4. Then, open `ServerData/users.json`. Paste the hash into the "hash" value, and change the "name" value to your client's username. +4. Then, open `ServerData/users.json`. Paste the hash into the "hash" value, change the "name" value to your client's username, and save the file. 5. Reboot the server, re-join it, and you should be an admin! After becoming an admin, you can use the in-game users management window to add additional admins (or groups) more easily if you wish. ___ ### Known Issues The following are known issues that are unique to running OpenRCT2 on Pterodactyl, but likely can only be fixed by further development/updates from OpenRCT2. -- Only building from source from the `develop` branch currently yields a package that is bootable. This will no longer be true for any OpenRCT2 releases after v.0.3.5.1. - - This also means that clients joining the server must be on the latest `develop` branch as well. - Configuring a password on the server disallows non-admin clients from entering in a password in their client to connect; it just disconnects them. Admin clients can still join normally. (reference issue [OpenRCT2/OpenRCT2#16396](https://github.com/OpenRCT2/OpenRCT2/issues/16396)) - You may rarely run into the server crashing on start due to a "Floating point exception(core dumped)" error. If this occurs to you, please help with OpenRCT2 development by doing the following: 1. Add the following to the beginning of your server's startup command: `SEGFAULT_SIGNALS=fpe LD_PRELOAD=/lib/x86_64-linux-gnu/libSegFault.so ` diff --git a/game_eggs/tycoon_games/openrct2/egg-openrct2.json b/game_eggs/tycoon_games/openrct2/egg-openrct2.json index ed070f1a..a7ec143d 100644 --- a/game_eggs/tycoon_games/openrct2/egg-openrct2.json +++ b/game_eggs/tycoon_games/openrct2/egg-openrct2.json @@ -1,27 +1,27 @@ { - "_comment": "Pterodactyl OpenRCT2 Egg ~ Red-Thirten and parkervcp ~ 2022-01-12", + "_comment": "Pterodactyl OpenRCT2 Egg ~ Red-Thirten and parkervcp ~ 2022-06-28", "meta": { - "version": "PTDL_v1", + "version": "PTDL_v2", "update_url": null }, "name": "OpenRCT2", "author": "rehlmgaming@gmail.com", "description": "OpenRCT2 is an open-source re-implementation of RollerCoaster Tycoon 2 (RCT2), expanding the game with new features, fixing bugs and raising game limits.", "features": null, - "images": [ - "ghcr.io\/parkervcp\/yolks:debian" - ], + "docker_images": { + "ghcr.io\/parkervcp\/yolks:debian": "ghcr.io\/parkervcp\/yolks:debian" + }, "file_denylist": [], "startup": ".\/OpenRCT2\/openrct2-cli --version && .\/OpenRCT2\/openrct2-cli host $(if {{LOAD_AUTOSAVE}} && [ -d ServerData\/save\/autosave\/ ]; then find ServerData\/save\/autosave\/ | sort -r | head -1; else echo \"{{SAVE_URI}}\"; fi) --port {{SERVER_PORT}} --user-data-path \/home\/container\/ServerData\/", "config": { "files": "{\r\n \"ServerData\/config.ini\": {\r\n \"parser\": \"ini\",\r\n \"find\": {\r\n \"general.autosave\": \"{{server.build.env.AUTOSAVE_INTERVAL}}\",\r\n \"general.autosave_amount\": \"{{server.build.env.AUTOSAVE_AMOUNT}}\",\r\n \"network.player_name\": \"\\\"{{server.build.env.SERVER_PLAYER_NAME}}\\\"\",\r\n \"network.default_port\": \"{{server.build.default.port}}\",\r\n \"network.default_password\": \"\\\"{{server.build.env.SERVER_PASSWORD}}\\\"\",\r\n \"network.advertise\": \"{{server.build.env.SERVER_ADVERTISE}}\",\r\n \"network.maxplayers\": \"{{server.build.env.MAX_PLAYERS}}\",\r\n \"network.server_name\": \"\\\"{{server.build.env.SERVER_NAME}}\\\"\",\r\n \"network.server_description\": \"\\\"{{server.build.env.SERVER_DESCRIPTION}}\\\"\",\r\n \"network.server_greeting\": \"\\\"{{server.build.env.SERVER_GREETING}}\\\"\",\r\n \"network.provider_name\": \"\\\"{{server.build.env.PROVIDER_NAME}}\\\"\",\r\n \"network.provider_email\": \"\\\"{{server.build.env.PROVIDER_EMAIL}}\\\"\",\r\n \"network.provider_website\": \"\\\"{{server.build.env.PROVIDER_WEBSITE}}\\\"\",\r\n \"network.log_chat\": \"{{server.build.env.LOG_CHAT}}\",\r\n \"network.log_server_actions\": \"{{server.build.env.LOG_SERVER_ACTIONS}}\",\r\n \"network.pause_server_if_no_clients\": \"{{server.build.env.PAUSE_NO_CLIENTS}}\"\r\n }\r\n }\r\n}", "startup": "{\r\n \"done\": \"Listening for clients on\"\r\n}", "logs": "{}", - "stop": "^C^C" + "stop": "^C" }, "scripts": { "installation": { - "script": "#!\/bin\/bash\r\n\r\n## File: Pterodactyl OpenRCT2 Egg - egg-openrct2.json\r\n## Authors: David Wolfe (Red-Thirten), parkervcp\r\n## Date: 2022\/01\/12\r\n## License: MIT License\r\n\r\nGITHUB_PACKAGE=\"OpenRCT2\/OpenRCT2\"\r\nMATCH=\"linux-bullseye-x86_64.tar.gz\"\r\nDEFAULT_SAVE=\"https:\/\/raw.githubusercontent.com\/parkervcp\/eggs\/master\/game_eggs\/tycoon_games\/openrct2\/save.park\"\r\n\r\n## OpenRCT2 Install\r\napt -y update\r\n[ ! -d \/mnt\/server ] && mkdir \/mnt\/server\r\ncd \/mnt\/server\r\n# Remove existing installation if present\r\n[ -d OpenRCT2 ] && rm -rf OpenRCT2\r\n\r\n# Determine if installing from source or from release\r\nif [ \"${VERSION}\" == \"develop\" ]; then\r\n # Get required packages\r\n apt -y install curl git make cmake gcc build-essential libicu-dev pkg-config libcurl4-openssl-dev libcrypto++-dev libpng-dev libssl-dev libzip-dev duktape-dev nlohmann-json3-dev\r\n echo -e \"\\nInstalling\/Updating OpenRCT2 from source...\\n\"\r\n # Setup temp directory for building and move to it\r\n [ -d temp ] && rm -rf temp\r\n mkdir temp && cd temp\r\n # Clone the branch and check if successful\r\n git clone --branch \"${VERSION}\" https:\/\/github.com\/${GITHUB_PACKAGE}\r\n if [ ! -d OpenRCT2 ]; then\r\n echo -e \"\\nFailed to clone \\\"${VERSION}\\\" branch from https:\/\/github.com\/${GITHUB_PACKAGE}\\n\"\r\n exit 1\r\n fi\r\n cd OpenRCT2\r\n mkdir build && cd build\r\n # Prepare CMake files for a lightweight and CLI-only build of OpenRCT2, using the appropriate flags\r\n cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DPORTABLE=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_CXX_FLAGS=\"-g -gz\" -DDISABLE_TTF=ON -DDISABLE_GOOGLE_BENCHMARK=ON -DDISABLE_DISCORD_RPC=ON -DDISABLE_GUI=ON\r\n echo -e \"\\nBuilding OpenRCT2 package from source...\\n\\tThis process can take quite some time. Grab a coffee :)\\n\"\r\n # Build OpenRCT2\r\n DESTDIR=. make install\r\n # Check if build was successful and move to it\r\n if [ ! -d usr\/local ]; then\r\n echo -e \"\\nFailed to successfully build OpenRCT2!\\n\"\r\n exit 1\r\n fi\r\n cd usr\/local\r\n # Make executable-ready package by moving compiled files to the correct locations\r\n mkdir -p \/mnt\/server\/OpenRCT2\/data\r\n mv bin\/* \/mnt\/server\/OpenRCT2\/\r\n mv share\/openrct2\/* share\/openrct2-cli\/* \/mnt\/server\/OpenRCT2\/data\/\r\n mv share\/doc \/mnt\/server\/OpenRCT2\/\r\n cd \/mnt\/server\r\n rm -rf temp # Clean up temp building directory\r\n echo -e \"\\nBuild of OpenRCT2 package complete!\"\r\nelse\r\n # Get required packages\r\n apt install -y curl jq\r\n echo -e \"\\nInstalling\/Updating OpenRCT2 from release tag \\\"${VERSION}\\\"...\\n\"\r\n # This is a simple script to use the GitHub API for release versions.\r\n # This requires the egg has a variable for GITHUB_PACKAGE, VERSION and MATCH (MATCH is to match the filename in some way).\r\n # Get release info and download links\r\n LATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/${GITHUB_PACKAGE}\/releases\/latest\")\r\n RELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/${GITHUB_PACKAGE}\/releases\")\r\n\r\n if [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"latest\" ]; then\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${MATCH})\r\n else\r\n VERSION_CHECK=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .tag_name')\r\n if [ \"${VERSION}\" == \"${VERSION_CHECK}\" ]; then\r\n DOWNLOAD_URL=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i ${MATCH})\r\n else\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url)\r\n fi\r\n fi\r\n # Download and unpackage the release\r\n curl -L ${DOWNLOAD_URL} | tar -xzv\r\n # Check if it was successful\r\n if [ -d OpenRCT2 ]; then\r\n echo -e \"\\nDownload of OpenRCT2 release successful!\"\r\n else\r\n echo -e \"\\nFailed to download\/unpack file: ${DOWNLOAD_URL}\\n\"\r\n exit 1\r\n fi\r\nfi\r\n\r\n## OpenRCT2 Setup\r\n# Setup ServerData\/save directory\r\n[ ! -d ServerData\/save ] && mkdir -p ServerData\/save\r\ncd ServerData\/save\r\n# Download default save.park if missing\r\nif [ ! -f save.park ]; then\r\n echo -e \"Downloading default save.park file from ${DEFAULT_SAVE}\"\r\n curl -sSLO ${DEFAULT_SAVE}\r\nfi\r\n\r\necho -e \"\\nOpenRCT2 Successfully Installed!\"", + "script": "#!\/bin\/bash\r\n\r\n## File: Pterodactyl OpenRCT2 Egg - egg-openrct2.json\r\n## Authors: David Wolfe (Red-Thirten), parkervcp\r\n## Date: 2022\/06\/28\r\n## License: MIT License\r\n\r\nGITHUB_PACKAGE=\"OpenRCT2\/OpenRCT2\"\r\nMATCH=\"linux-x86_64.AppImage\"\r\nDEFAULT_SAVE=\"https:\/\/raw.githubusercontent.com\/parkervcp\/eggs\/master\/game_eggs\/tycoon_games\/openrct2\/save.park\"\r\n\r\n## OpenRCT2 Install\r\napt -y update\r\n[ ! -d \/mnt\/server ] && mkdir \/mnt\/server\r\ncd \/mnt\/server\r\n# Remove existing installation if present\r\n[ -d OpenRCT2 ] && rm -rf OpenRCT2\r\n# Setup OpenRCT2 directory\r\nmkdir -p OpenRCT2\/data\r\n# Setup temp directory for building and move to it\r\n[ -d temp ] && rm -rf temp\r\nmkdir temp && cd temp\r\n\r\n# Determine if installing from source or from release\r\nif [ \"${VERSION}\" == \"develop\" ]; then\r\n # Get required packages\r\n apt -y install curl git make cmake gcc build-essential libicu-dev pkg-config libcurl4-openssl-dev libcrypto++-dev libpng-dev libssl-dev libzip-dev duktape-dev nlohmann-json3-dev\r\n echo -e \"\\nInstalling\/Updating OpenRCT2 from source...\\n\"\r\n \r\n # Clone the branch and check if successful\r\n git clone --branch \"${VERSION}\" https:\/\/github.com\/${GITHUB_PACKAGE}\r\n if [ ! -d OpenRCT2 ]; then\r\n echo -e \"\\nFailed to clone \\\"${VERSION}\\\" branch from https:\/\/github.com\/${GITHUB_PACKAGE}\\n\"\r\n exit 1\r\n fi\r\n \r\n cd OpenRCT2\r\n mkdir build && cd build\r\n # Prepare CMake files for a lightweight and CLI-only build of OpenRCT2, using the appropriate flags\r\n cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DPORTABLE=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_CXX_FLAGS=\"-g -gz\" -DDISABLE_TTF=ON -DDISABLE_GOOGLE_BENCHMARK=ON -DDISABLE_DISCORD_RPC=ON -DDISABLE_GUI=ON\r\n echo -e \"\\nBuilding OpenRCT2 package from source...\\n\\tThis process can take quite some time. Grab a coffee :)\\n\"\r\n # Build OpenRCT2\r\n DESTDIR=. make install\r\n # Check if build was successful\r\n if [ ! -d usr\/local ]; then\r\n echo -e \"\\nFailed to successfully build OpenRCT2!\\n\"\r\n exit 1\r\n fi\r\n \r\n # Make executable-ready package by moving compiled files to the correct locations\r\n cd usr\/local\r\n mv bin\/* \/mnt\/server\/OpenRCT2\/\r\n mv share\/openrct2\/* share\/openrct2-cli\/* \/mnt\/server\/OpenRCT2\/data\/\r\n mv share\/doc \/mnt\/server\/OpenRCT2\/\r\n echo -e \"\\nBuild of OpenRCT2 package complete!\"\r\nelse\r\n # Get required packages\r\n apt install -y curl jq\r\n echo -e \"\\nInstalling\/Updating OpenRCT2 from release tag \\\"${VERSION}\\\"...\\n\"\r\n \r\n # This is a simple script to use the GitHub API for release versions.\r\n # This requires the egg has a variable for GITHUB_PACKAGE, VERSION and MATCH (MATCH is to match the filename in some way).\r\n # Get release info and download links\r\n LATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/${GITHUB_PACKAGE}\/releases\/latest\")\r\n RELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/${GITHUB_PACKAGE}\/releases\")\r\n if [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"latest\" ]; then\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${MATCH})\r\n else\r\n VERSION_CHECK=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .tag_name')\r\n if [ \"${VERSION}\" == \"${VERSION_CHECK}\" ]; then\r\n DOWNLOAD_URL=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i ${MATCH})\r\n else\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url)\r\n fi\r\n fi\r\n # Download the release and check if successful\r\n curl -L ${DOWNLOAD_URL} -o OpenRCT2.AppImage\r\n if [ ! -f OpenRCT2.AppImage ]; then\r\n echo -e \"\\nFailed to download release: ${DOWNLOAD_URL}\\n\"\r\n exit 1\r\n fi\r\n \r\n chmod +x OpenRCT2.AppImage\r\n # Extract AppImage and check if successful\r\n echo -e \"Extracting AppImage files...\"\r\n .\/OpenRCT2.AppImage --appimage-extract\r\n if [ ! -d squashfs-root\/usr ]; then\r\n echo -e \"\\nFailed to extract AppImage!\\n\\t(Is the `MATCH` variable set to download an AppImage?)\\n\"\r\n exit 1\r\n fi\r\n \r\n # Move needed files to correct directories\r\n cd squashfs-root\/usr\r\n mv lib bin\/openrct2-cli \/mnt\/server\/OpenRCT2\/\r\n mv share\/openrct2\/* \/mnt\/server\/OpenRCT2\/data\/\r\n mkdir \/mnt\/server\/OpenRCT2\/doc && mv share\/doc\/openrct2 $_\r\n echo -e \"\\nDownload\/Update of OpenRCT2 release successful!\"\r\nfi\r\n\r\ncd \/mnt\/server\r\nrm -rf temp # Clean up temp building directory\r\n\r\n## OpenRCT2 Setup\r\n# Setup ServerData\/save directory\r\n[ ! -d ServerData\/save ] && mkdir -p ServerData\/save\r\ncd ServerData\/save\r\n# Download default save.park if missing\r\nif [ ! -f save.park ]; then\r\n echo -e \"Downloading default save.park file from ${DEFAULT_SAVE}\"\r\n curl -sSLO ${DEFAULT_SAVE}\r\nfi\r\n\r\necho -e \"\\nOpenRCT2 Successfully Installed!\"", "container": "debian:bullseye-slim", "entrypoint": "\/bin\/bash" } @@ -34,7 +34,8 @@ "default_value": "ServerData\/save\/save.park", "user_viewable": true, "user_editable": true, - "rules": "required|string|min:4" + "rules": "required|string|min:4", + "field_type": "text" }, { "name": "Load Latest Autosave", @@ -43,7 +44,8 @@ "default_value": "true", "user_viewable": true, "user_editable": true, - "rules": "required|string|in:true,false" + "rules": "required|string|in:true,false", + "field_type": "text" }, { "name": "Autosave Interval", @@ -52,7 +54,8 @@ "default_value": "1", "user_viewable": true, "user_editable": true, - "rules": "required|integer|between:0,5" + "rules": "required|integer|between:0,5", + "field_type": "text" }, { "name": "Autosaves To Keep", @@ -61,7 +64,8 @@ "default_value": "10", "user_viewable": true, "user_editable": true, - "rules": "required|integer|min:0" + "rules": "required|integer|min:0", + "field_type": "text" }, { "name": "Max Players", @@ -70,7 +74,8 @@ "default_value": "16", "user_viewable": true, "user_editable": true, - "rules": "required|integer|min:0" + "rules": "required|integer|min:0", + "field_type": "text" }, { "name": "Server Password", @@ -79,7 +84,8 @@ "default_value": "", "user_viewable": true, "user_editable": true, - "rules": "string|nullable" + "rules": "string|nullable", + "field_type": "text" }, { "name": "Advertise Server", @@ -88,7 +94,8 @@ "default_value": "true", "user_viewable": true, "user_editable": true, - "rules": "required|string|in:true,false" + "rules": "required|string|in:true,false", + "field_type": "text" }, { "name": "Pause Server If No Clients", @@ -97,7 +104,8 @@ "default_value": "false", "user_viewable": true, "user_editable": true, - "rules": "required|string|in:true,false" + "rules": "required|string|in:true,false", + "field_type": "text" }, { "name": "Server Name", @@ -106,7 +114,8 @@ "default_value": "", "user_viewable": true, "user_editable": true, - "rules": "string|nullable" + "rules": "string|nullable", + "field_type": "text" }, { "name": "Server Description", @@ -115,7 +124,8 @@ "default_value": "", "user_viewable": true, "user_editable": true, - "rules": "string|nullable" + "rules": "string|nullable", + "field_type": "text" }, { "name": "Server Player Name", @@ -124,7 +134,8 @@ "default_value": "Server", "user_viewable": true, "user_editable": true, - "rules": "string|nullable" + "rules": "string|nullable", + "field_type": "text" }, { "name": "Server Greeting", @@ -133,7 +144,8 @@ "default_value": "", "user_viewable": true, "user_editable": true, - "rules": "string|nullable" + "rules": "string|nullable", + "field_type": "text" }, { "name": "Provider Name", @@ -142,7 +154,8 @@ "default_value": "", "user_viewable": true, "user_editable": true, - "rules": "string|nullable" + "rules": "string|nullable", + "field_type": "text" }, { "name": "Server Provider E-Mail", @@ -151,7 +164,8 @@ "default_value": "", "user_viewable": true, "user_editable": true, - "rules": "string|nullable" + "rules": "string|nullable", + "field_type": "text" }, { "name": "Server Provider Website", @@ -160,7 +174,8 @@ "default_value": "", "user_viewable": true, "user_editable": true, - "rules": "string|nullable" + "rules": "string|nullable", + "field_type": "text" }, { "name": "Log Chat", @@ -169,7 +184,8 @@ "default_value": "false", "user_viewable": true, "user_editable": true, - "rules": "required|string|in:true,false" + "rules": "required|string|in:true,false", + "field_type": "text" }, { "name": "Log Server Actions", @@ -178,16 +194,28 @@ "default_value": "false", "user_viewable": true, "user_editable": true, - "rules": "required|string|in:true,false" + "rules": "required|string|in:true,false", + "field_type": "text" }, { "name": "OpenRCT2 Version", "description": "The release tag (version) of OpenRCT2 to download and install from their official Github (ie. \"v0.3.5.1\"). Use \"latest\" to download the latest release, or \"develop\" to build from the latest source (takes longer to install but is the most up to date).", "env_variable": "VERSION", - "default_value": "develop", + "default_value": "latest", "user_viewable": true, "user_editable": true, - "rules": "required|string|min:1" + "rules": "required|string|min:1", + "field_type": "text" + }, + { + "name": "[Advanced] Library Path", + "description": "What path to load libraries from for release binaries. Rarely needs to be changed.", + "env_variable": "LD_LIBRARY_PATH", + "default_value": ".\/OpenRCT2\/lib", + "user_viewable": false, + "user_editable": false, + "rules": "required|string", + "field_type": "text" } ] } \ No newline at end of file