Updateed the starter script in preparation for pterodactyl support (support is currently WIP)

This commit is contained in:
NATroutter
2026-01-12 19:32:22 +02:00
parent 678d23893f
commit 42ec2b69ef
2 changed files with 166 additions and 13 deletions

144
egg-hytale.pterodactyl.json Normal file
View File

@@ -0,0 +1,144 @@
{
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
"meta": {
"version": "PTDL_v2",
"update_url": "https://raw.githubusercontent.com/NATroutter/egg-hytale/refs/heads/main/egg-hytale.pterodactyl.json"
},
"exported_at": "2026-01-12T19:09:20+02:00",
"name": "Hytale",
"author": "contact@natroutter.fi",
"description": "Hytale is a block-based sandbox game that blends creative building with RPG adventure. Explore procedurally generated worlds filled with unique biomes, dungeons, and creatures. Build anything from simple homes to grand castles, craft items, and battle monsters. Create custom content with built-in modding tools, host your own servers, and shape the experience with plugins and mods. Play solo or with friends in a world designed for both creation and exploration.\r\n\r\nCredits:\r\n- Made by NATroutter\r\n- https:\/\/natroutter.fi\r\n- https:\/\/github.com\/NATroutter",
"features": [
"java_version"
],
"docker_images": {
"ghcr.io\/parkervcp\/yolks:java_25": "ghcr.io\/parkervcp\/yolks:java_25"
},
"file_denylist": [],
"startup": ".\/start.sh",
"config": {
"files": "{}",
"startup": "{\r\n \"done\": \")! For help, type \"\r\n}",
"logs": "{}",
"stop": "stop"
},
"scripts": {
"installation": {
"script": "#!\/bin\/bash\r\nDOWNLOAD_URL=\"https:\/\/downloader.hytale.com\/hytale-downloader.zip\"\r\nDOWNLOAD_FILE=\"hytale-downloader.zip\"\r\n\r\napt update\r\napt install -y curl unzip\r\n\r\ncd \/mnt\/server\r\n\r\n# Downloads and extracts the Hytale downloader\r\necho \"Starting Hytale downloader installation...\"\r\n\r\n# Download the file\r\necho \"Downloading hytale-downloader.zip...\"\r\ncurl -L -o \"${DOWNLOAD_FILE}\" \"${DOWNLOAD_URL}\"\r\n\r\nif [ $? -ne 0 ]; then\r\n echo \"Error: Failed to download ${DOWNLOAD_URL}\"\r\n exit 1\r\nfi\r\n\r\necho \"Download completed successfully.\"\r\n\r\n# Extract the zip file\r\necho \"Extracting ${DOWNLOAD_FILE}...\"\r\nunzip -o \"${DOWNLOAD_FILE}\"\r\n\r\nif [ $? -ne 0 ]; then\r\n echo \"Error: Failed to extract ${DOWNLOAD_FILE}\"\r\n exit 1\r\nfi\r\n\r\necho \"Extraction completed successfully.\"\r\n\r\n# Remove the unnessasery file\r\necho \"Cleaning up...\"\r\nrm \"${DOWNLOAD_FILE}\"\r\nrm QUICKSTART.md\r\nrm hytale-downloader-windows-amd64.exe\r\n\r\necho \"Downloading start.sh script...\"\r\ncurl -L -o start.sh \"https:\/\/raw.githubusercontent.com\/NATroutter\/egg-hytale\/main\/start.sh\"\r\n\r\nif [ $? -ne 0 ]; then\r\n echo \"Error: Failed to download start.sh\"\r\n exit 1\r\nfi\r\n\r\necho \"Setting executable permissions...\"\r\nchmod +x .\/hytale-downloader-linux-amd64\r\nchmod +x .\/start.sh\r\n\r\necho \"Running Hytale downloader...\"\r\n.\/hytale-downloader-linux-amd64\r\n\r\necho \"Installation complete!\"",
"container": "ghcr.io\/pterodactyl\/installers:debian",
"entrypoint": "bash"
}
},
"variables": [
{
"name": "Accept Early Plugins",
"description": "Acknowledge that loading early plugins is unsupported and may cause stability issues",
"env_variable": "ACCEPT_EARLY_PLUGINS",
"default_value": "0",
"user_viewable": true,
"user_editable": true,
"rules": "required|boolean",
"field_type": "text"
},
{
"name": "Allow OP",
"description": "Do you wish to allow operators or not",
"env_variable": "ALLOW_OP",
"default_value": "1",
"user_viewable": true,
"user_editable": true,
"rules": "required|boolean",
"field_type": "text"
},
{
"name": "Asset Pack",
"description": "Assets pack (.zip) that are being send to player",
"env_variable": "ASSET_PACK",
"default_value": "Assets.zip",
"user_viewable": true,
"user_editable": true,
"rules": "string|regex:\/^([\\w\\d._-]+)(\\.zip)$\/",
"field_type": "text"
},
{
"name": "Auth Mode",
"description": "Authentication mode",
"env_variable": "AUTH_MODE",
"default_value": "authenticated",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|in:authenticated,offline",
"field_type": "text"
},
{
"name": "Automatic Update",
"description": "Update the hytale server automaticly",
"env_variable": "AUTOMATIC_UPDATE",
"default_value": "1",
"user_viewable": true,
"user_editable": true,
"rules": "required|boolean",
"field_type": "text"
},
{
"name": "Backup Directory",
"description": "Directory where backups are saved",
"env_variable": "BACKUP_DIRECTORY",
"default_value": "\/backup",
"user_viewable": true,
"user_editable": true,
"rules": "required|string",
"field_type": "text"
},
{
"name": "Backup Frequency",
"description": "Backup interval in minutes",
"env_variable": "BACKUP_FREQUENCY",
"default_value": "30",
"user_viewable": true,
"user_editable": true,
"rules": "required|integer|min:1",
"field_type": "text"
},
{
"name": "Disable Sentry Crash Reporting",
"description": "Important: Disable Sentry during active plugin development.\r\n\r\nHytale use Sentry to track crashes. Disable it to avoid submitting your development errors",
"env_variable": "DISABLE_SENTRY",
"default_value": "1",
"user_viewable": true,
"user_editable": true,
"rules": "required|boolean",
"field_type": "text"
},
{
"name": "Enable Backups",
"description": "Enable automatic backups",
"env_variable": "ENABLE_BACKUPS",
"default_value": "0",
"user_viewable": true,
"user_editable": true,
"rules": "required|boolean",
"field_type": "text"
},
{
"name": "JVM Arguments",
"description": "Additional Java Virtual Machine arguments for advanced configuration.\r\n\r\nWarning: Improper JVM settings can lead to poor performance, crashes, or failure to start. Only modify if you understand what these parameters do.",
"env_variable": "JVM_ARGS",
"default_value": "-XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1",
"user_viewable": true,
"user_editable": true,
"rules": "string",
"field_type": "text"
},
{
"name": "Leverage Ahead-Of-Time Cache",
"description": "The server ships with a pre-trained AOT cache (HytaleServer.aot) that improves boot times by skipping JIT warmup. See https:\/\/openjdk.org\/jeps\/514",
"env_variable": "LEVERAGE_AHEAD_OF_TIME_CACHE",
"default_value": "1",
"user_viewable": true,
"user_editable": true,
"rules": "required|boolean",
"field_type": "text"
}
]
}

View File

@@ -12,26 +12,35 @@
DOWNLOADER="./hytale-downloader-linux-amd64"
# Run automatic update if enabled
if [ "${AUTOMATIC_UPDATE}" = "1" ]; then
# Check if the downloader exists
if [ ! -f "$DOWNLOADER" ]; then
echo "Error: Hytale downloader not found!"
echo "Please run the installation script first."
exit 1
fi
# Check if the downloader exists
if [ ! -f "$DOWNLOADER" ]; then
echo "Error: Hytale downloader not found!"
echo "Please run the installation script first."
exit 1
fi
# Check if the downloader is executable
if [ ! -x "$DOWNLOADER" ]; then
echo "Setting executable permissions..."
chmod +x "$DOWNLOADER"
fi
# Check if the downloader is executable
if [ ! -x "$DOWNLOADER" ]; then
echo "Setting executable permissions..."
chmod +x "$DOWNLOADER"
fi
# Check if credentials file exists, if not run the updater
if [ ! -f ".hytale-downloader-credentials.json" ]; then
echo "Credentials file not found, running initial setup..."
echo "Starting Hytale downloader..."
$DOWNLOADER -check-update
$DOWNLOADER
fi
# Run automatic update if enabled
if [ "${AUTOMATIC_UPDATE}" = "1" ]; then
echo "Starting Hytale downloader..."
$DOWNLOADER -check-update
$DOWNLOADER
fi
echo "Starting Hytale server..."
# Build the Java command