Rework tModLoader egg
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
*
|
*
|
||||||
!/mods
|
!/mods/enabled.json
|
||||||
!/saves
|
!/saves
|
||||||
|
/saves/Worlds/Backups
|
||||||
|
/saves/Worlds/*.bak*
|
@@ -1,6 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
RED='\033[0;31m'
|
RED='\033[0;31m'
|
||||||
|
|
||||||
|
# Check for and create symlinks
|
||||||
if [ ! -L ~/.steam/sdk32 ]; then
|
if [ ! -L ~/.steam/sdk32 ]; then
|
||||||
echo "Creating Steam SDK32 symlink"
|
echo "Creating Steam SDK32 symlink"
|
||||||
ln -s ~/.local/share/Steam/steamcmd/linux32 ~/.steam/sdk32
|
ln -s ~/.local/share/Steam/steamcmd/linux32 ~/.steam/sdk32
|
||||||
@@ -11,15 +12,24 @@ if [ ! -L ~/.steam/sdk64 ]; then
|
|||||||
ln -s ~/.local/share/Steam/steamcmd/linux64 ~/.steam/sdk64
|
ln -s ~/.local/share/Steam/steamcmd/linux64 ~/.steam/sdk64
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$WORLD_SIZE" == "0" ]
|
# Set baseline startup command
|
||||||
then
|
chmod +x ~/start-tModLoader.sh
|
||||||
if [ -e ~/saves/Worlds/${WORLD_NAME}.wld ]
|
START_COMMAND="./start-tModLoader.sh -server -tmlsavedirectory ~/saves -modpath ~/mods -world \"~/saves/Worlds/${WORLD_NAME}.wld\" -ip 0.0.0.0 -port ${SERVER_PORT} -noupnp -npcstream ${NPC_STREAM} -maxplayers ${MAX_PLAYERS} -motd \"${MOTD}\" -password \"${SERVER_PASSWORD}\""
|
||||||
then
|
|
||||||
echo \n | ./DedicatedServerUtils/Setup_tModLoaderServer.sh && ./LaunchUtils/ScriptCaller.sh -server -ip 0.0.0.0 -port ${SERVER_PORT} -noupnp -maxplayers ${MAX_PLAYERS} -password "${SERVER_PASSWORD}" -motd "${MOTD}" -world ~/saves/Worlds/${WORLD_NAME}.wld$( [ \"$SECURE_SERVER\" == \"0\" ] || printf %s ' -secure' ) -savedirectory ~/ -tmlsavedirectory ~/saves -modpath ~/mods
|
# Add secure flag if enabled
|
||||||
|
if [ $SECURE_SERVER ]; then
|
||||||
|
START_COMMAND = ${START_COMMAND} + " -secure"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Perform startup logic
|
||||||
|
if [ -e ~/saves/Worlds/${WORLD_NAME}.wld ]; then
|
||||||
|
echo -e $START_COMMAND
|
||||||
else
|
else
|
||||||
echo -e "${RED}Auto-generation is disabled and the specified world file is not present! Upload your world file with the correct name, or change startup settings to generate a world"
|
if [ "$WORLD_SIZE" == "0" ]; then
|
||||||
|
echo -e "${RED}Auto-generation is disabled and the specified world file \"${WORLD_NAME}\" is not present! Upload a world file with the correct name, or change startup settings to generate a world."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
echo \n | ./DedicatedServerUtils/Setup_tModLoaderServer.sh && ./LaunchUtils/ScriptCaller.sh -server -ip 0.0.0.0 -port ${SERVER_PORT} -noupnp -maxplayers ${MAX_PLAYERS} -password "${SERVER_PASSWORD}" -motd "${MOTD}" -world ~/saves/Worlds/${WORLD_NAME}.wld -autocreate ${WORLD_SIZE} -seed ${WORLD_SEED} -worldname "${WORLD_NAME}"$( [ \"$SECURE_SERVER\" == \"0\" ] || printf %s ' -secure' ) -savedirectory ~/ -tmlsavedirectory ~/saves -modpath ~/mods
|
START_COMMAND = ${START_COMMAND} + " -autocreate ${WORLD_SIZE} -worldname \"${WORLD_NAME}\" -seed \"${WORLD_SEED}\""
|
||||||
|
echo -e $START_COMMAND
|
||||||
|
fi
|
||||||
fi
|
fi
|
@@ -4,7 +4,7 @@
|
|||||||
"version": "PTDL_v2",
|
"version": "PTDL_v2",
|
||||||
"update_url": null
|
"update_url": null
|
||||||
},
|
},
|
||||||
"exported_at": "2022-07-05T16:39:06-05:00",
|
"exported_at": "2022-08-03T15:53:38-05:00",
|
||||||
"name": "tModLoader",
|
"name": "tModLoader",
|
||||||
"author": "mindfang@taco.quest",
|
"author": "mindfang@taco.quest",
|
||||||
"description": "tModLoader (TML) is an open-source, community-driven, modification and expansion of the Terraria game that makes it possible to make and play mods. TML expands your Terraria adventures with new content to explore created by the Terraria community! TML allows players to create and play Terraria mods and is designed in such a way so that you can play alone or together with friends, with one mod or with multiple mods: choose to play however you like! It is however required that all your friends also install TML if you want to play together; vanilla users can't play with TML users.",
|
"description": "tModLoader (TML) is an open-source, community-driven, modification and expansion of the Terraria game that makes it possible to make and play mods. TML expands your Terraria adventures with new content to explore created by the Terraria community! TML allows players to create and play Terraria mods and is designed in such a way so that you can play alone or together with friends, with one mod or with multiple mods: choose to play however you like! It is however required that all your friends also install TML if you want to play together; vanilla users can't play with TML users.",
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"installation": {
|
"installation": {
|
||||||
"script": "#!\/bin\/bash\r\nHOME=\/mnt\/server\r\nGREEN='\\033[0;32m'\r\n\r\nmkdir -p $HOME\r\ncd $HOME\r\n\r\necho -e \"Creating Steam subdirectories\"\r\nmkdir -p ${HOME}\/.steam\/{root,steam} && \\\r\n\r\necho -e \"Running Steam initial update\"\r\nsteamcmd +quit\r\n\r\nif [ -z \"$VERSION\" ] || [ \"$VERSION\" == \"latest\" ]; then\r\n echo -e \"Downloading latest release\"\r\n curl -sSL https:\/\/github.com\/tModLoader\/tModLoader\/releases\/latest\/download\/tModLoader.zip -O\r\nelse\r\n echo -e \"Downloading version $VERSION of tModLoader\"\r\n curl -sSL https:\/\/github.com\/tModLoader\/tModLoader\/releases\/download\/${VERSION}\/tModLoader.zip -O\r\nfi\r\n\r\necho -e \"Installing tModLoader\"\r\nunzip -o tModLoader.zip\r\n\r\necho -e \"Downloading additional files\"\r\ncurl -sSL https:\/\/raw.githubusercontent.com\/Gethec\/Pterodactyl-Eggs\/main\/Terraria\/tModLoader\/startServer.sh -O\r\ncurl -sSL https:\/\/raw.githubusercontent.com\/Gethec\/Pterodactyl-Eggs\/main\/Terraria\/tModLoader\/.pteroignore -O\r\n\r\necho -e \"Creating content directories\"\r\nmkdir -p mods saves\/Worlds\r\n\r\necho -e \"Setting executables\"\r\nchmod +x .\/DedicatedServerUtils\/Setup_tModLoaderServer.sh .\/LaunchUtils\/ScriptCaller.sh start-tModLoaderServer.sh start-tModLoader.sh startServer.sh\r\n\r\necho -e \"Cleaning up extra files\"\r\nrm tModLoader.zip\r\n\r\necho -e \"${GREEN}Server installation complete!\"",
|
"script": "#!\/bin\/bash\r\nHOME=\/mnt\/server\r\nRED='\\033[0;31m'\r\nGREEN='\\033[0;32m'\r\n\r\nDownloadItem () {\r\n if curl --output \/dev\/null --silent --head --fail $1; then\r\n echo -e \"Downloading file: $1\"\r\n curl -sSL $1 -O\r\n else\r\n echo -e \"Specified file does not exist: $1\"\r\n echo -e \"${RED}Make sure your tModLoader version is correct, and report this error if it persists\"\r\n exit 1\r\n fi\r\n}\r\n\r\nmkdir -p $HOME\r\ncd $HOME\r\n\r\necho -e \"Creating Steam subdirectories\"\r\nmkdir -p ${HOME}\/.steam\/{root,steam} && \\\r\n\r\necho -e \"Downloading tModLoader\"\r\nif [ -z \"$VERSION\" ] || [ \"$VERSION\" == \"latest\" ]; then\r\n DownloadItem \"https:\/\/github.com\/tModLoader\/tModLoader\/releases\/latest\/download\/tModLoader.zip\"\r\nelse\r\n DownloadItem \"https:\/\/github.com\/tModLoader\/tModLoader\/releases\/download\/${VERSION}\/tModLoader.zip\"\r\nfi\r\n\r\necho -e \"Unpacking tModLoader\"\r\nunzip -o tModLoader.zip\r\n\r\necho -e \"Downloading additional files\"\r\nDownloadItem \"https:\/\/raw.githubusercontent.com\/Gethec\/Pterodactyl-Eggs\/main\/Terraria\/tModLoader\/startServer.sh\"\r\nDownloadItem \"https:\/\/raw.githubusercontent.com\/Gethec\/Pterodactyl-Eggs\/main\/Terraria\/tModLoader\/.pteroignore\"\r\n\r\necho -e \"Creating content directories\"\r\nmkdir -p mods saves\/Worlds\r\n\r\necho -e \"Setting executables\"\r\nchmod +x startServer.sh\r\n\r\necho -e \"Cleaning up\"\r\nrm tModLoader.zip\r\n\r\necho -e \"${GREEN}Server installation complete!\"",
|
||||||
"container": "gethec\/pterodactyl-yolks:steamcmd-installer",
|
"container": "gethec\/pterodactyl-yolks:steamcmd-installer",
|
||||||
"entrypoint": "bash"
|
"entrypoint": "bash"
|
||||||
}
|
}
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
"variables": [
|
"variables": [
|
||||||
{
|
{
|
||||||
"name": "tModloader Version",
|
"name": "tModloader Version",
|
||||||
"description": "The version of tModloader that is to be used.",
|
"description": "The version of tModloader that is to be used. If this is changed, make sure to go to Settings > Reinstall Server to update.",
|
||||||
"env_variable": "VERSION",
|
"env_variable": "VERSION",
|
||||||
"default_value": "latest",
|
"default_value": "latest",
|
||||||
"user_viewable": true,
|
"user_viewable": true,
|
||||||
@@ -50,27 +50,27 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Max Players",
|
"name": "Max Players",
|
||||||
"description": "The maximum number of players a server will hold.",
|
"description": "The maximum number of players allowed on the server.",
|
||||||
"env_variable": "MAX_PLAYERS",
|
"env_variable": "MAX_PLAYERS",
|
||||||
"default_value": "8",
|
"default_value": "8",
|
||||||
"user_viewable": true,
|
"user_viewable": true,
|
||||||
"user_editable": false,
|
"user_editable": false,
|
||||||
"rules": "required|numeric|digits_between:1,3",
|
"rules": "required|numeric|between:1,255",
|
||||||
"field_type": "text"
|
"field_type": "text"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "World Size",
|
"name": "World Size",
|
||||||
"description": "Defines the worlds size. 0 (do not autogenerate), 1 (small), 2 (medium), 3 (large).",
|
"description": "Defines the worlds size. 0 = Do not autogenerate, 1 = Small, 2 = Medium, 3 = Large.",
|
||||||
"env_variable": "WORLD_SIZE",
|
"env_variable": "WORLD_SIZE",
|
||||||
"default_value": "0",
|
"default_value": "0",
|
||||||
"user_viewable": true,
|
"user_viewable": true,
|
||||||
"user_editable": true,
|
"user_editable": true,
|
||||||
"rules": "required|numeric|digits_between:0,3",
|
"rules": "required|numeric|between:0,3",
|
||||||
"field_type": "text"
|
"field_type": "text"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Server Password",
|
"name": "Server Password",
|
||||||
"description": "Server password for users to connect to your server",
|
"description": "Server password for users to connect to your server.",
|
||||||
"env_variable": "SERVER_PASSWORD",
|
"env_variable": "SERVER_PASSWORD",
|
||||||
"default_value": "",
|
"default_value": "",
|
||||||
"user_viewable": true,
|
"user_viewable": true,
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "MOTD",
|
"name": "MOTD",
|
||||||
"description": "Message of the Day for the server",
|
"description": "Message of the Day for the server.",
|
||||||
"env_variable": "MOTD",
|
"env_variable": "MOTD",
|
||||||
"default_value": "Please don\u2019t cut the purple trees!",
|
"default_value": "Please don\u2019t cut the purple trees!",
|
||||||
"user_viewable": true,
|
"user_viewable": true,
|
||||||
@@ -90,13 +90,33 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "World Seed",
|
"name": "World Seed",
|
||||||
"description": "Set the world seed for autogeneration",
|
"description": "Set the world seed for autogeneration.",
|
||||||
"env_variable": "WORLD_SEED",
|
"env_variable": "WORLD_SEED",
|
||||||
"default_value": "AwesomeSeed",
|
"default_value": "AwesomeSeed",
|
||||||
"user_viewable": true,
|
"user_viewable": true,
|
||||||
"user_editable": true,
|
"user_editable": true,
|
||||||
"rules": "required|string|max:20",
|
"rules": "required|string|max:20",
|
||||||
"field_type": "text"
|
"field_type": "text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "NPC Stream",
|
||||||
|
"description": "Reduces enemy skipping but increases bandwidth usage. The lower the number the less skipping will happen, but more data is sent. 0 is off. Recommended between 2-6.",
|
||||||
|
"env_variable": "NPC_STREAM",
|
||||||
|
"default_value": "6",
|
||||||
|
"user_viewable": true,
|
||||||
|
"user_editable": false,
|
||||||
|
"rules": "required|numeric|between:0,255",
|
||||||
|
"field_type": "text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Secure Server",
|
||||||
|
"description": "Adds additional cheat protection to the server.",
|
||||||
|
"env_variable": "SECURE_SERVER",
|
||||||
|
"default_value": "0",
|
||||||
|
"user_viewable": true,
|
||||||
|
"user_editable": true,
|
||||||
|
"rules": "required|boolean",
|
||||||
|
"field_type": "text"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
Reference in New Issue
Block a user