forked from pelican-eggs/eggs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: support 1.4+ tmodloader (pelican-eggs#1686)
Co-authored-by: softwarenoob <[email protected]> resolves pelican-eggs#1644
- Loading branch information
Showing
1 changed file
with
38 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,42 @@ | ||
{ | ||
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO", | ||
"meta": { | ||
"version": "PTDL_v1", | ||
"version": "PTDL_v2", | ||
"update_url": null | ||
}, | ||
"exported_at": "2022-05-14T02:54:50-05:00", | ||
"exported_at": "2022-06-25T23:43:59+03:00", | ||
"name": "tModloader", | ||
"author": "[email protected]", | ||
"description": "tModLoader is essentially a mod that provides a way to load your own mods without having to work directly with Terraria's source code itself. This means you can easily make mods that are compatible with other people's mods, save yourself the trouble of having to decompile and recompile Terraria.exe, and escape from having to understand all of the obscure \"intricacies\" of Terraria's source code. It is made to work for Terraria 1.3+.", | ||
"features": null, | ||
"images": [ | ||
"quay.io\/parkervcp\/pterodactyl-images:debian_mono-5" | ||
], | ||
"docker_images": { | ||
"Dotnet 6": "ghcr.io\/parkervcp\/yolks:dotnet_6" | ||
}, | ||
"file_denylist": [], | ||
"startup": ".\/tModLoaderServer -ip 0.0.0.0 -port ${SERVER_PORT} -maxplayers ${MAX_PLAYERS} -difficulty ${DIFFICULTY} -password \"${SERVER_PASSWORD}\" -motd \"${MOTD}\" -lang ${LANGUAGE} -world ~\/saves\/Worlds\/${WORLD_NAME}.wld -worldname ${WORLD_NAME} -autocreate ${WORLD_SIZE} -savedirectory ~\/ -tmlsavedirectory ~\/saves -modpath ~\/mods", | ||
"startup": ".\/tModLoaderServer -ip 0.0.0.0 -port {{SERVER_PORT}} -maxplayers {{MAX_PLAYERS}} -difficulty {{DIFFICULTY}} -password \"{{SERVER_PASSWORD}}\" -motd \"{{MOTD}}\" -lang {{LANGUAGE}} -world ~\/saves\/Worlds\/{{WORLD_NAME}}.wld -worldname {{WORLD_NAME}} -autocreate {{WORLD_SIZE}} -savedirectory ~\/ -tmlsavedirectory ~\/saves -modpath ~\/mods", | ||
"config": { | ||
"files": "{}", | ||
"startup": "{\r\n \"done\": \"Type 'help' for a list of commands\",\r\n \"userInteraction\": []\r\n}", | ||
"startup": "{\r\n \"done\": \"Type 'help' for a list of commands\"\r\n}", | ||
"logs": "{}", | ||
"stop": "exit" | ||
}, | ||
"scripts": { | ||
"installation": { | ||
"script": "#!\/bin\/bash\r\n# Vanilla tModloader Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\n## install packages to get version and download links\r\napt update\r\napt install -y curl jq file unzip\r\n\r\nGITHUB_PACKAGE=tModLoader\/tModLoader\r\n\r\nif [ -z \"$GITHUB_USER\" ] && [ -z \"$GITHUB_OAUTH_TOKEN\" ] ; then\r\n echo -e \"using anon api call\"\r\nelse\r\n echo -e \"user and oauth token set\"\r\n alias curl='curl -u $GITHUB_USER:$GITHUB_OAUTH_TOKEN '\r\nfi\r\n\r\n## get release info and download links\r\nLATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/tmodloader\/tmodloader\/releases\" | jq -c '.[] | select(.name | contains(\"v0\"))' | head -1)\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/$GITHUB_PACKAGE\/releases\" | jq '.[] | select(.name | contains(\"v0\"))')\r\n\r\n\r\nif [ -z \"$VERSION\" ] || [ \"$VERSION\" == \"latest\" ]; then\r\n echo -e \"defaulting to latest release\"\r\n DOWNLOAD_LINK=$(echo $LATEST_JSON | jq .assets | jq -r .[].browser_download_url | grep -i linux | grep -i zip)\r\nelse\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_LINK=$(echo $RELEASES | jq -r --arg VERSION \"$VERSION\" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i linux)\r\n else\r\n echo -e \"defaulting to latest release\"\r\n DOWNLOAD_LINK=$(echo $LATEST_JSON | jq .assets | jq -r .[].browser_download_url | grep -i linux | grep -i zip)\r\n fi\r\nfi\r\n\r\n## mkdir and cd to \/mnt\/server\/\r\nmkdir -p \/mnt\/server\r\n\r\ncd \/mnt\/server\r\n\r\n## download release\r\necho -e \"running: curl -sSL ${DOWNLOAD_LINK} -o ${DOWNLOAD_LINK##*\/}\"\r\ncurl -sSL ${DOWNLOAD_LINK} -o ${DOWNLOAD_LINK##*\/}\r\n\r\nFILETYPE=$(file -F ',' ${DOWNLOAD_LINK##*\/} | cut -d',' -f2 | cut -d' ' -f2)\r\nif [ \"$FILETYPE\" == \"gzip\" ]; then\r\n tar xzvf ${DOWNLOAD_LINK##*\/}\r\nelif [ \"$FILETYPE\" == \"Zip\" ]; then\r\n unzip -o ${DOWNLOAD_LINK##*\/}\r\nelse\r\n echo -e \"unknown filetype. Exiting\"\r\n exit 2 \r\nfi\r\n\r\nchmod +x tModLoaderServer.bin.x86_64\r\nchmod +x tModLoaderServer\r\n\r\necho -e \"Cleaning up extra files.\"\r\nrm -rf terraria-server-${CLEAN_VERSION}.zip rm ${DOWNLOAD_LINK##*\/}", | ||
"script": "#!\/bin\/bash\r\n# Vanilla tModloader Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\n## install packages to get version and download links\r\napt update\r\napt install -y curl jq file unzip\r\n\r\nGITHUB_PACKAGE=tmodloader\/tmodloader\r\n\r\nif [ -z \"$GITHUB_USER\" ] && [ -z \"$GITHUB_OAUTH_TOKEN\" ] ; then\r\n echo -e \"using anon api call\"\r\nelse\r\n echo -e \"user and oauth token set\"\r\n alias curl='curl -u $GITHUB_USER:$GITHUB_OAUTH_TOKEN '\r\nfi\r\n\r\n## get release info and download links\r\nLATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/$GITHUB_PACKAGE\/releases\" | jq -c '.[]' | head -1)\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/$GITHUB_PACKAGE\/releases\" | jq '.[]')\r\n\r\n\r\nif [ -z \"$VERSION\" ] || [ \"$VERSION\" == \"latest\" ]; then\r\n echo -e \"defaulting to latest release\"\r\n DOWNLOAD_LINK=$(echo $LATEST_JSON | jq .assets | jq -r .[].browser_download_url | grep -i tmodloader.zip)\r\nelse\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 if [[ \"$VERSION\" == v0* ]]; then\r\n DOWNLOAD_LINK=$(echo $RELEASES | jq -r --arg VERSION \"$VERSION\" '. | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i linux | grep -i zip)\r\n else\r\n DOWNLOAD_LINK=$(echo $RELEASES | jq -r --arg VERSION \"$VERSION\" '. | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i tmodloader.zip)\r\n fi\r\n else\r\n echo -e \"defaulting to latest release\"\r\n DOWNLOAD_LINK=$(echo $LATEST_JSON | jq .assets | jq -r .[].browser_download_url | grep -i tmodloader.zip)\r\n fi\r\nfi\r\n\r\n## mkdir and cd to \/mnt\/server\/\r\nmkdir -p \/mnt\/server\r\n\r\ncd \/mnt\/server || exit 5\r\n\r\n## download release\r\necho -e \"running: curl -sSL ${DOWNLOAD_LINK} -o ${DOWNLOAD_LINK##*\/}\"\r\ncurl -sSL ${DOWNLOAD_LINK} -o ${DOWNLOAD_LINK##*\/}\r\n\r\nFILETYPE=$(file -F ',' ${DOWNLOAD_LINK##*\/} | cut -d',' -f2 | cut -d' ' -f2)\r\nif [ \"$FILETYPE\" == \"gzip\" ]; then\r\n tar xzvf ${DOWNLOAD_LINK##*\/}\r\nelif [ \"$FILETYPE\" == \"Zip\" ]; then\r\n unzip -o ${DOWNLOAD_LINK##*\/}\r\nelse\r\n echo -e \"unknown filetype. Exiting\"\r\n exit 2\r\nfi\r\n\r\nif [[ \"$VERSION\" == v0* ]]; then\r\n chmod +x tModLoaderServer.bin.x86_64\r\n chmod +x tModLoaderServer\r\nelse\r\n #tiny startup script for backward compatibility\r\n echo 'dotnet tModLoader.dll -server \"$@\"' > tModLoaderServer\r\n chmod +x tModLoaderServer\r\nfi\r\n\r\necho -e \"Cleaning up extra files.\"\r\nrm -rf terraria-server-*.zip rm ${DOWNLOAD_LINK##*\/}\r\nif [[ \"$VERSION\" != v0* ]]; then\r\n rm -rf DedicatedServerUtils LaunchUtils PlatformVariantLibs tModPorter RecentGitHubCommits.txt *.bat *.sh\r\nfi", | ||
"container": "debian:buster-slim", | ||
"entrypoint": "bash" | ||
} | ||
}, | ||
"variables": [ | ||
{ | ||
"name": "tModloader Version", | ||
"description": "The version of tModloader that is to be used.", | ||
"env_variable": "VERSION", | ||
"default_value": "latest", | ||
"user_viewable": true, | ||
"user_editable": true, | ||
"rules": "required|string|max:20" | ||
}, | ||
{ | ||
"name": "World Name", | ||
"description": "The name for the world file.", | ||
"env_variable": "WORLD_NAME", | ||
"default_value": "world", | ||
"user_viewable": true, | ||
"user_editable": true, | ||
"rules": "required|string|max:20" | ||
"rules": "required|string|max:20", | ||
"field_type": "text" | ||
}, | ||
{ | ||
"name": "Max Players", | ||
|
@@ -53,7 +45,8 @@ | |
"default_value": "8", | ||
"user_viewable": true, | ||
"user_editable": false, | ||
"rules": "required|numeric|digits_between:1,3" | ||
"rules": "required|numeric|digits_between:1,3", | ||
"field_type": "text" | ||
}, | ||
{ | ||
"name": "World Size", | ||
|
@@ -62,7 +55,18 @@ | |
"default_value": "1", | ||
"user_viewable": true, | ||
"user_editable": true, | ||
"rules": "required|numeric|digits_between:1,3" | ||
"rules": "required|string|in:1,2,3", | ||
"field_type": "text" | ||
}, | ||
{ | ||
"name": "tModloader Version", | ||
"description": "The version of tModloader that is to be used.", | ||
"env_variable": "VERSION", | ||
"default_value": "latest", | ||
"user_viewable": true, | ||
"user_editable": true, | ||
"rules": "required|string|max:20", | ||
"field_type": "text" | ||
}, | ||
{ | ||
"name": "GitHub User", | ||
|
@@ -71,7 +75,8 @@ | |
"default_value": "", | ||
"user_viewable": false, | ||
"user_editable": false, | ||
"rules": "string|nullable" | ||
"rules": "string|nullable", | ||
"field_type": "text" | ||
}, | ||
{ | ||
"name": "GitHub OAuth Token", | ||
|
@@ -80,16 +85,18 @@ | |
"default_value": "", | ||
"user_viewable": false, | ||
"user_editable": false, | ||
"rules": "string|nullable" | ||
"rules": "string|nullable", | ||
"field_type": "text" | ||
}, | ||
{ | ||
"name": "Difficulty", | ||
"description": "Sets the difficulty of the world when using autocreate 0(normal), 1(expert)", | ||
"description": "Sets the difficulty of the world when using auto-create 0(normal), 1(expert). Toggle to choose expert (1).", | ||
"env_variable": "DIFFICULTY", | ||
"default_value": "0", | ||
"user_viewable": true, | ||
"user_editable": true, | ||
"rules": "required|numeric|digits_between:0,1" | ||
"rules": "required|string|in:0,1", | ||
"field_type": "text" | ||
}, | ||
{ | ||
"name": "Server Password", | ||
|
@@ -98,7 +105,8 @@ | |
"default_value": "", | ||
"user_viewable": true, | ||
"user_editable": true, | ||
"rules": "required|string|max:20" | ||
"rules": "required|string|max:20", | ||
"field_type": "text" | ||
}, | ||
{ | ||
"name": "MOTD", | ||
|
@@ -107,7 +115,8 @@ | |
"default_value": "Please don\u2019t cut the purple trees!", | ||
"user_viewable": true, | ||
"user_editable": true, | ||
"rules": "required|string|max:40" | ||
"rules": "required|string|max:40", | ||
"field_type": "text" | ||
}, | ||
{ | ||
"name": "Language", | ||
|
@@ -116,7 +125,8 @@ | |
"default_value": "1", | ||
"user_viewable": true, | ||
"user_editable": true, | ||
"rules": "required|numeric|digits_between:1,5" | ||
"rules": "required|string|in:1,2,3,4,5", | ||
"field_type": "text" | ||
} | ||
] | ||
} | ||
} |