diff --git a/Dockerfile b/Dockerfile index 37f8f0770..ab43a5f57 100644 --- a/Dockerfile +++ b/Dockerfile @@ -70,6 +70,7 @@ RUN case ${TARGETARCH} in \ && chmod +x supercronic \ && mv supercronic /usr/local/bin/supercronic +# hadolint ignore=DL3044 ENV HOME=/home/steam \ PORT= \ PUID=1000 \ @@ -103,12 +104,41 @@ ENV HOME=/home/steam \ DISCORD_CONNECT_TIMEOUT=30 \ DISCORD_MAX_TIMEOUT=30 \ DISCORD_PRE_UPDATE_BOOT_MESSAGE="Server is updating..." \ + DISCORD_PRE_UPDATE_BOOT_MESSAGE_URL= \ + DISCORD_PRE_UPDATE_BOOT_MESSAGE_ENABLED=true \ DISCORD_POST_UPDATE_BOOT_MESSAGE="Server update complete!" \ + DISCORD_POST_UPDATE_BOOT_MESSAGE_URL= \ + DISCORD_POST_UPDATE_BOOT_ENABLED=true \ DISCORD_PRE_START_MESSAGE="Server has been started!" \ + DISCORD_PRE_START_MESSAGE_URL= \ + DISCORD_PRE_START_MESSAGE_ENABLED=true \ DISCORD_PRE_SHUTDOWN_MESSAGE="Server is shutting down..." \ + DISCORD_PRE_SHUTDOWN_MESSAGE_URL= \ + DISCORD_PRE_SHUTDOWN_MESSAGE_ENABLED=true \ DISCORD_POST_SHUTDOWN_MESSAGE="Server has been stopped!" \ + DISCORD_POST_SHUTDOWN_MESSAGE_URL= \ + DISCORD_POST_SHUTDOWN_MESSAGE_ENABLED=true \ DISCORD_PLAYER_JOIN_MESSAGE="\${player_name} has joined Palworld!" \ + DISCORD_PLAYER_JOIN_MESSAGE_URL= \ + DISCORD_PLAYER_JOIN_MESSAGE_ENABLED=true \ DISCORD_PLAYER_LEAVE_MESSAGE="\${player_name} has left Palworld." \ + DISCORD_PLAYER_LEAVE_MESSAGE_URL= \ + DISCORD_PLAYER_LEAVE_MESSAGE_ENABLED=true \ + DISCORD_PRE_BACKUP_MESSAGE="Creating backup..." \ + DISCORD_PRE_BACKUP_MESSAGE_URL= \ + DISCORD_PRE_BACKUP_MESSAGE_ENABLED=true \ + DISCORD_POST_BACKUP_MESSAGE="Backup created at \${FILE_PATH}" \ + DISCORD_POST_BACKUP_MESSAGE_URL= \ + DISCORD_POST_BACKUP_MESSAGE_ENABLED=true \ + DISCORD_PRE_BACKUP_DELETE_MESSAGE="Removing backups older than \${OLD_BACKUP_DAYS} days" \ + DISCORD_PRE_BACKUP_DELETE_URL= \ + DISCORD_PRE_BACKUP_DELETE_ENABLED=true \ + DISCORD_POST_BACKUP_DELETE_MESSAGE="Removed backups older than \${OLD_BACKUP_DAYS} days" \ + DISCORD_POST_BACKUP_DELETE_URL= \ + DISCORD_POST_BACKUP_DELETE_ENABLED=true \ + DISCORD_ERR_BACKUP_DELETE_MESSAGE="Unable to delete old backups, OLD_BACKUP_DAYS is not an integer. OLD_BACKUP_DAYS=\${OLD_BACKUP_DAYS}" \ + DISCORD_ERR_BACKUP_DELETE_URL= \ + DISCORD_ERR_BACKUP_DELETE_ENABLED=true \ ENABLE_PLAYER_LOGGING=true \ PLAYER_LOGGING_POLL_PERIOD=5 \ ARM_COMPATIBILITY_MODE=false \ diff --git a/README.md b/README.md index 20a6650e2..1a69f7ece 100644 --- a/README.md +++ b/README.md @@ -201,52 +201,81 @@ It is highly recommended you set the following environment values before startin * PUID * PGID -| Variable | Info | Default Values | Allowed Values | -|------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------|-------------------------------------------------------------------------------------------------------------------| -| TZ | Timezone used for time stamping backup server | UTC | See [TZ Identifiers](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#Time_Zone_abbreviations) | -| PLAYERS* | Max amount of players that are able to join the server | 16 | 1-32 | -| PORT* | UDP port that the server will expose | 8211 | 1024-65535 | -| PUID* | The uid of the user the server should run as | 1000 | !0 | -| PGID* | The gid of the group the server should run as | 1000 | !0 | -| MULTITHREADING** | Improves performance in multi-threaded CPU environments. It is effective up to a maximum of about 4 threads, and allocating more than this number of threads does not make much sense. | false | true/false | -| COMMUNITY | Whether or not the server shows up in the community server browser (USE WITH SERVER_PASSWORD) | false | true/false | -| PUBLIC_IP | You can manually specify the global IP address of the network on which the server running. If not specified, it will be detected automatically. If it does not work well, try manual configuration. | | x.x.x.x | -| PUBLIC_PORT | You can manually specify the port number of the network on which the server running. If not specified, it will be detected automatically. If it does not work well, try manual configuration. | | 1024-65535 | -| SERVER_NAME | A name for your server | | "string" | -| SERVER_DESCRIPTION | Your server Description | | "string" | -| SERVER_PASSWORD | Secure your community server with a password | | "string" | -| ADMIN_PASSWORD | Secure administration access in the server with a password | | "string" | -| UPDATE_ON_BOOT** | Update/Install the server when the docker container starts (THIS HAS TO BE ENABLED THE FIRST TIME YOU RUN THE CONTAINER) | true | true/false | -| RCON_ENABLED*** | Enable RCON for the Palworld server | true | true/false | -| RCON_PORT | RCON port to connect to | 25575 | 1024-65535 | -| QUERY_PORT | Query port used to communicate with Steam servers | 27015 | 1024-65535 | -| BACKUP_CRON_EXPRESSION | Setting affects frequency of automatic backups. | 0 0 \* \* \* | Needs a Cron-Expression - See [Configuring Automatic Backups with Cron](#configuring-automatic-backups-with-cron) | -| BACKUP_ENABLED | Enables automatic backups | true | true/false | -| DELETE_OLD_BACKUPS | Delete backups after a certain number of days | false | true/false | -| OLD_BACKUP_DAYS | How many days to keep backups | 30 | any positive integer | -| AUTO_UPDATE_CRON_EXPRESSION | Setting affects frequency of automatic updates. | 0 \* \* \* \* | Needs a Cron-Expression - See [Configuring Automatic Backups with Cron](#configuring-automatic-backups-with-cron) | -| AUTO_UPDATE_ENABLED | Enables automatic updates | false | true/false | -| AUTO_UPDATE_WARN_MINUTES | How long to wait to update the server, after the player were informed. (This will be ignored, if no Players are connected) | 30 | Integer | -| AUTO_REBOOT_CRON_EXPRESSION | Setting affects frequency of automatic updates. | 0 0 \* \* \* | Needs a Cron-Expression - See [Configuring Automatic Backups with Cron](#configuring-automatic-reboots-with-cron) | -| AUTO_REBOOT_ENABLED | Enables automatic reboots | false | true/false | -| AUTO_REBOOT_WARN_MINUTES | How long to wait to reboot the server, after the player were informed. | 5 | Integer | -| AUTO_REBOOT_EVEN_IF_PLAYERS_ONLINE | Restart the Server even if there are players online. | false | true/false | -| TARGET_MANIFEST_ID | Locks game version to corespond with Manifest ID from Steam Download Depot. | | See [Manifest ID Table](#locking-specific-game-version) | -| DISCORD_WEBHOOK_URL | Discord webhook url found after creating a webhook on a discord server | | `https://discord.com/api/webhooks/` | -| DISCORD_CONNECT_TIMEOUT | Discord command initial connection timeout | 30 | !0 | -| DISCORD_MAX_TIMEOUT | Discord total hook timeout | 30 | !0 | -| DISCORD_PRE_UPDATE_BOOT_MESSAGE | Discord message sent when server begins updating | Server is updating... | "string" | -| DISCORD_POST_UPDATE_BOOT_MESSAGE | Discord message sent when server completes updating | Server update complete! | "string" | -| DISCORD_PRE_START_MESSAGE | Discord message sent when server begins to start | Server is started! | "string" | -| DISCORD_PRE_SHUTDOWN_MESSAGE | Discord message sent when server begins to shutdown | Server is shutting down... | "string" | -| DISCORD_POST_SHUTDOWN_MESSAGE | Discord message sent when server has stopped | Server is stopped! | "string" | -| DISCORD_PLAYER_JOIN_MESSAGE | Discord message sent when player joins the server | \${player_name} has joined Palworld! | "string" | -| DISCORD_PLAYER_LEAVE_MESSAGE | Discord message sent when player leaves the server | \${player_name} has left Palworld. | "string" | -| DISABLE_GENERATE_SETTINGS | Whether to automatically generate the PalWorldSettings.ini | false | true/false | -| DISABLE_GENERATE_ENGINE | Whether to automatically generate the Engine.ini | true | true/false | -| ENABLE_PLAYER_LOGGING | Enables Logging and announcing when players join and leave | true | true/false | -| PLAYER_LOGGING_POLL_PERIOD | Polling period (in seconds) to check for players who have joined or left | 5 | !0 | -| ARM_COMPATIBILITY_MODE | Switches the compatibility layer from Box86 to QEMU when executing steamcmd for server updates. This setting is only applicable for ARM64 hosts. | false | true/false | +| Variable | Info | Default Values | Allowed Values | +|--------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------| +| TZ | Timezone used for time stamping backup server | UTC | See [TZ Identifiers](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#Time_Zone_abbreviations) | +| PLAYERS* | Max amount of players that are able to join the server | 16 | 1-32 | +| PORT* | UDP port that the server will expose | 8211 | 1024-65535 | +| PUID* | The uid of the user the server should run as | 1000 | !0 | +| PGID* | The gid of the group the server should run as | 1000 | !0 | +| MULTITHREADING** | Improves performance in multi-threaded CPU environments. It is effective up to a maximum of about 4 threads, and allocating more than this number of threads does not make much sense. | false | true/false | +| COMMUNITY | Whether or not the server shows up in the community server browser (USE WITH SERVER_PASSWORD) | false | true/false | +| PUBLIC_IP | You can manually specify the global IP address of the network on which the server running. If not specified, it will be detected automatically. If it does not work well, try manual configuration. | | x.x.x.x | +| PUBLIC_PORT | You can manually specify the port number of the network on which the server running. If not specified, it will be detected automatically. If it does not work well, try manual configuration. | | 1024-65535 | +| SERVER_NAME | A name for your server | | "string" | +| SERVER_DESCRIPTION | Your server Description | | "string" | +| SERVER_PASSWORD | Secure your community server with a password | | "string" | +| ADMIN_PASSWORD | Secure administration access in the server with a password | | "string" | +| UPDATE_ON_BOOT** | Update/Install the server when the docker container starts (THIS HAS TO BE ENABLED THE FIRST TIME YOU RUN THE CONTAINER) | true | true/false | +| RCON_ENABLED*** | Enable RCON for the Palworld server | true | true/false | +| RCON_PORT | RCON port to connect to | 25575 | 1024-65535 | +| QUERY_PORT | Query port used to communicate with Steam servers | 27015 | 1024-65535 | +| BACKUP_CRON_EXPRESSION | Setting affects frequency of automatic backups. | 0 0 \* \* \* | Needs a Cron-Expression - See [Configuring Automatic Backups with Cron](#configuring-automatic-backups-with-cron) | +| BACKUP_ENABLED | Enables automatic backups | true | true/false | +| DELETE_OLD_BACKUPS | Delete backups after a certain number of days | false | true/false | +| OLD_BACKUP_DAYS | How many days to keep backups | 30 | any positive integer | +| AUTO_UPDATE_CRON_EXPRESSION | Setting affects frequency of automatic updates. | 0 \* \* \* \* | Needs a Cron-Expression - See [Configuring Automatic Backups with Cron](#configuring-automatic-backups-with-cron) | +| AUTO_UPDATE_ENABLED | Enables automatic updates | false | true/false | +| AUTO_UPDATE_WARN_MINUTES | How long to wait to update the server, after the player were informed. (This will be ignored, if no Players are connected) | 30 | Integer | +| AUTO_REBOOT_CRON_EXPRESSION | Setting affects frequency of automatic updates. | 0 0 \* \* \* | Needs a Cron-Expression - See [Configuring Automatic Backups with Cron](#configuring-automatic-reboots-with-cron) | +| AUTO_REBOOT_ENABLED | Enables automatic reboots | false | true/false | +| AUTO_REBOOT_WARN_MINUTES | How long to wait to reboot the server, after the player were informed. | 5 | Integer | +| AUTO_REBOOT_EVEN_IF_PLAYERS_ONLINE | Restart the Server even if there are players online. | false | true/false | +| TARGET_MANIFEST_ID | Locks game version to corespond with Manifest ID from Steam Download Depot. | | See [Manifest ID Table](#locking-specific-game-version) | +| DISCORD_WEBHOOK_URL | Discord webhook url found after creating a webhook on a discord server | | `https://discord.com/api/webhooks/` | +| DISCORD_CONNECT_TIMEOUT | Discord command initial connection timeout | 30 | !0 | +| DISCORD_MAX_TIMEOUT | Discord total hook timeout | 30 | !0 | +| DISCORD_PRE_UPDATE_BOOT_MESSAGE | Discord message sent when server begins updating | Server is updating... | "string" | +| DISCORD_PRE_UPDATE_BOOT_MESSAGE_ENABLED | If the Discord message is enabled for this message | true | boolean | +| DISCORD_PRE_UPDATE_BOOT_MESSAGE_URL | Discord Webhook URL for this message (if left empty will use DISCORD_WEBHOOK_URL) | | "string" | +| DISCORD_POST_UPDATE_BOOT_MESSAGE | Discord message sent when server completes updating | Server update complete! | "string" | +| DISCORD_POST_UPDATE_BOOT_MESSAGE_ENABLED | If the Discord message is enabled for this message | true | boolean | +| DISCORD_POST_UPDATE_BOOT_MESSAGE_URL | Discord Webhook URL for this message (if left empty will use DISCORD_WEBHOOK_URL) | | "string" | +| DISCORD_PRE_START_MESSAGE | Discord message sent when server begins to start | Server has been started! | "string" | +| DISCORD_PRE_START_MESSAGE_ENABLED | If the Discord message is enabled for this message | true | boolean | +| DISCORD_PRE_START_MESSAGE_URL | Discord Webhook URL for this message (if left empty will use DISCORD_WEBHOOK_URL) | | "string" | +| DISCORD_PRE_SHUTDOWN_MESSAGE | Discord message sent when server begins to shutdown | Server is shutting down... | "string" | +| DISCORD_PRE_SHUTDOWN_MESSAGE_ENABLED | If the Discord message is enabled for this message | true | boolean | +| DISCORD_PRE_SHUTDOWN_MESSAGE_URL | Discord Webhook URL for this message (if left empty will use DISCORD_WEBHOOK_URL) | | "string" | +| DISCORD_POST_SHUTDOWN_MESSAGE | Discord message sent when server has stopped | Server is stopped! | "string" | +| DISCORD_POST_SHUTDOWN_MESSAGE_ENABLED | If the Discord message is enabled for this message | true | boolean | +| DISCORD_POST_SHUTDOWN_MESSAGE_URL | Discord Webhook URL for this message (if left empty will use DISCORD_WEBHOOK_URL) | | "string" | +| DISCORD_PLAYER_JOIN_MESSAGE | Discord message sent when player joins the server | \${player_name} has joined Palworld! | "string" | +| DISCORD_PLAYER_JOIN_MESSAGE_ENABLED | If the Discord message is enabled for this message | true | boolean | +| DISCORD_PLAYER_JOIN_MESSAGE_URL | Discord Webhook URL for this message (if left empty will use DISCORD_WEBHOOK_URL) | | "string" | +| DISCORD_PLAYER_LEAVE_MESSAGE | Discord message sent when player leaves the server | \${player_name} has left Palworld. | "string" | +| DISCORD_PLAYER_LEAVE_MESSAGE_ENABLED | If the Discord message is enabled for this message | true | boolean | +| DISCORD_PLAYER_LEAVE_MESSAGE_URL | Discord Webhook URL for this message (if left empty will use DISCORD_WEBHOOK_URL) | | "string" | +| DISCORD_PRE_BACKUP_MESSAGE | Discord message when starting to create a backup | Creating backup... | "string" | +| DISCORD_PRE_BACKUP_MESSAGE_ENABLED | If the Discord message is enabled for this message | true | boolean | +| DISCORD_PRE_BACKUP_MESSAGE_URL | Discord Webhook URL for this message (if left empty will use DISCORD_WEBHOOK_URL) | | "string" | +| DISCORD_POST_BACKUP_MESSAGE | Discord message when a backup has been made | Backup created at \${FILE_PATH} | "string" | +| DISCORD_POST_BACKUP_MESSAGE_ENABLED | If the Discord message is enabled for this message | true | boolean | +| DISCORD_POST_BACKUP_MESSAGE_URL | Discord Webhook URL for this message (if left empty will use DISCORD_WEBHOOK_URL) | | "string" | +| DISCORD_PRE_BACKUP_DELETE_MESSAGE | Discord message when starting to remove older backups | Removing backups older than \${OLD_BACKUP_DAYS} days | "string" | +| DISCORD_PRE_BACKUP_DELETE_ENABLED | If the Discord message is enabled for this message | true | boolean | +| DISCORD_PRE_BACKUP_DELETE_URL | Discord Webhook URL for this message (if left empty will use DISCORD_WEBHOOK_URL) | | "string" | +| DISCORD_POST_BACKUP_DELETE_MESSAGE | Discord message when successfully removed older backups | Removed backups older than \${OLD_BACKUP_DAYS} days | "string" | +| DISCORD_POST_BACKUP_DELETE_ENABLED | If the Discord message is enabled for this message | true | boolean | +| DISCORD_POST_BACKUP_DELETE_URL | Discord Webhook URL for this message (if left empty will use DISCORD_WEBHOOK_URL) | | "string" | +| DISCORD_ERR_BACKUP_DELETE_MESSAGE | Discord message when there has been an error removing older backups | Unable to delete old backups, OLD_BACKUP_DAYS is not an integer. OLD_BACKUP_DAYS=\${OLD_BACKUP_DAYS} | "string" | +| DISCORD_ERR_BACKUP_DELETE_ENABLED | If the Discord message is enabled for this message | true | boolean | +| DISCORD_ERR_BACKUP_DELETE_URL | Discord Webhook URL for this message (if left empty will use DISCORD_WEBHOOK_URL) | | "string" | +| DISABLE_GENERATE_SETTINGS | Whether to automatically generate the PalWorldSettings.ini | false | true/false | +| DISABLE_GENERATE_ENGINE | Whether to automatically generate the Engine.ini | true | true/false | +| ENABLE_PLAYER_LOGGING | Enables Logging and announcing when players join and leave | true | true/false | +| PLAYER_LOGGING_POLL_PERIOD | Polling period (in seconds) to check for players who have joined or left | 5 | !0 | +| ARM_COMPATIBILITY_MODE | Switches the compatibility layer from Box86 to QEMU when executing steamcmd for server updates. This setting is only applicable for ARM64 hosts. | false | true/false | *highly recommended to set @@ -436,62 +465,62 @@ For example: * PalSpawnNumRate -> PAL_SPAWN_NUM_RATE * bIsPvP -> IS_PVP -| Variable | Description | Default Value | Allowed Value | -|-------------------------------------------|----------------------------------------------------------------|----------------------------------------------------------------------------------------------|----------------------------------------| -| DIFFICULTY | Game Difficulty | None | `None`,`Normal`,`Difficult` | -| DAYTIME_SPEEDRATE | Day time speed - Larger number means shorter days | 1.000000 | Float | -| NIGHTTIME_SPEEDRATE | Night time speed - Larger number means shorter nights | 1.000000 | Float | -| EXP_RATE | EXP earn rate | 1.000000 | Float | -| PAL_CAPTURE_RATE | Pal capture rate | 1.000000 | Float | -| PAL_SPAWN_NUM_RATE | Pal appearance rate | 1.000000 | Float | -| PAL_DAMAGE_RATE_ATTACK | Damage from pals multipiler | 1.000000 | Float | -| PAL_DAMAGE_RATE_DEFENSE | Damage to pals multipiler | 1.000000 | Float | -| PLAYER_DAMAGE_RATE_ATTACK | Damage from player multipiler | 1.000000 | Float | -| PLAYER_DAMAGE_RATE_DEFENSE | Damage to player multipiler | 1.000000 | Float | -| PLAYER_STOMACH_DECREASE_RATE | Player hunger depletion rate | 1.000000 | Float | -| PLAYER_STAMINA_DECREASE_RATE | Player stamina reduction rate | 1.000000 | Float | -| PLAYER_AUTO_HP_REGEN_RATE | Player auto HP regeneration rate | 1.000000 | Float | -| PLAYER_AUTO_HP_REGEN_RATE_IN_SLEEP | Player sleep HP regeneration rate | 1.000000 | Float | -| PAL_STOMACH_DECREASE_RATE | Pal hunger depletion rate | 1.000000 | Float | -| PAL_STAMINA_DECREASE_RATE | Pal stamina reduction rate | 1.000000 | Float | -| PAL_AUTO_HP_REGEN_RATE | Pal auto HP regeneration rate | 1.000000 | Float | -| PAL_AUTO_HP_REGEN_RATE_IN_SLEEP | Pal sleep health regeneration rate (in Palbox) | 1.000000 | Float | -| BUILD_OBJECT_DAMAGE_RATE | Damage to structure multipiler | 1.000000 | Float | -| BUILD_OBJECT_DETERIORATION_DAMAGE_RATE | Structure determination rate | 1.000000 | Float | -| COLLECTION_DROP_RATE | Getherable items multipiler | 1.000000 | Float | -| COLLECTION_OBJECT_HP_RATE | Getherable objects HP multipiler | 1.000000 | Float | -| COLLECTION_OBJECT_RESPAWN_SPEED_RATE | Getherable objects respawn interval - The smaller the number, the faster the regeneration | 1.000000 | Float | -| ENEMY_DROP_ITEM_RATE | Dropped Items Multipiler | 1.000000 | Float | -| DEATH_PENALTY | Death Penalty
None: No death penalty
Item: Drops items other than equipment
ItemAndEquipment: Drops all items
All: Drops all PALs and all items. | All | `None`,`Item`,`ItemAndEquipment`,`All` | -| ENABLE_PLAYER_TO_PLAYER_DAMAGE | Allows players to cause damage to players | False | Boolean | -| ENABLE_FRIENDLY_FIRE | Allow friendly fire | False | Boolean | -| ENABLE_INVADER_ENEMY | Enable invaders | True | Boolean | -| ACTIVE_UNKO | Enable UNKO (?) | False | Boolean | -| ENABLE_AIM_ASSIST_PAD | Enable controller aim assist | True | Boolean | -| ENABLE_AIM_ASSIST_KEYBOARD | Enable Keyboard aim assist | False | Boolean | -| DROP_ITEM_MAX_NUM | Maximum number of drops in the world | 3000 | Integer | -| DROP_ITEM_MAX_NUM_UNKO | Maximum number of UNKO drops in the world | 100 | Integer | -| BASE_CAMP_MAX_NUM | Maximum number of base camps | 128 | Integer | -| BASE_CAMP_WORKER_MAX_NUM | Maximum number of workers | 15 | Integer | -| DROP_ITEM_ALIVE_MAX_HOURS | Time it takes for items to despawn in hours | 1.000000 | Float | -| AUTO_RESET_GUILD_NO_ONLINE_PLAYERS | Automatically reset guild when no players are online | False | Bool | -| AUTO_RESET_GUILD_TIME_NO_ONLINE_PLAYERS | Time to automatically reset guild when no players are online | 72.000000 | Float | -| GUILD_PLAYER_MAX_NUM | Max player of Guild | 20 | Integer | -| PAL_EGG_DEFAULT_HATCHING_TIME | Time(h) to incubate massive egg | 72.000000 | Float | -| WORK_SPEED_RATE | Work speed muliplier | 1.000000 | Float | -| IS_MULTIPLAY | Enable multiplayer | False | Boolean | -| IS_PVP | Enable PVP | False | Boolean | -| CAN_PICKUP_OTHER_GUILD_DEATH_PENALTY_DROP | Allow players from other guilds to pick up death penalty items | False | Boolean | -| ENABLE_NON_LOGIN_PENALTY | Enable non-login penalty | True | Boolean | -| ENABLE_FAST_TRAVEL | Enable fast travel | True | Boolean | -| IS_START_LOCATION_SELECT_BY_MAP | Enable selecting of start location | True | Boolean | -| EXIST_PLAYER_AFTER_LOGOUT | Toggle for deleting players when they log off | False | Boolean | -| ENABLE_DEFENSE_OTHER_GUILD_PLAYER | Allows defense against other guild players | False | Boolean | -| COOP_PLAYER_MAX_NUM | Maximum number of players in a guild | 4 | Integer | -| REGION | Region | | String | -| USEAUTH | Use authentication | True | Boolean | -| BAN_LIST_URL | Which ban list to use | [https://api.palworldgame.com/api/banlist.txt](https://api.palworldgame.com/api/banlist.txt) | string | -| SHOW_PLAYER_LIST | Enable show player list | True | Boolean | +| Variable | Description | Default Value | Allowed Value | +|-------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------|----------------------------------------| +| DIFFICULTY | Game Difficulty | None | `None`,`Normal`,`Difficult` | +| DAYTIME_SPEEDRATE | Day time speed - Larger number means shorter days | 1.000000 | Float | +| NIGHTTIME_SPEEDRATE | Night time speed - Larger number means shorter nights | 1.000000 | Float | +| EXP_RATE | EXP earn rate | 1.000000 | Float | +| PAL_CAPTURE_RATE | Pal capture rate | 1.000000 | Float | +| PAL_SPAWN_NUM_RATE | Pal appearance rate | 1.000000 | Float | +| PAL_DAMAGE_RATE_ATTACK | Damage from pals multipiler | 1.000000 | Float | +| PAL_DAMAGE_RATE_DEFENSE | Damage to pals multipiler | 1.000000 | Float | +| PLAYER_DAMAGE_RATE_ATTACK | Damage from player multipiler | 1.000000 | Float | +| PLAYER_DAMAGE_RATE_DEFENSE | Damage to player multipiler | 1.000000 | Float | +| PLAYER_STOMACH_DECREASE_RATE | Player hunger depletion rate | 1.000000 | Float | +| PLAYER_STAMINA_DECREASE_RATE | Player stamina reduction rate | 1.000000 | Float | +| PLAYER_AUTO_HP_REGEN_RATE | Player auto HP regeneration rate | 1.000000 | Float | +| PLAYER_AUTO_HP_REGEN_RATE_IN_SLEEP | Player sleep HP regeneration rate | 1.000000 | Float | +| PAL_STOMACH_DECREASE_RATE | Pal hunger depletion rate | 1.000000 | Float | +| PAL_STAMINA_DECREASE_RATE | Pal stamina reduction rate | 1.000000 | Float | +| PAL_AUTO_HP_REGEN_RATE | Pal auto HP regeneration rate | 1.000000 | Float | +| PAL_AUTO_HP_REGEN_RATE_IN_SLEEP | Pal sleep health regeneration rate (in Palbox) | 1.000000 | Float | +| BUILD_OBJECT_DAMAGE_RATE | Damage to structure multipiler | 1.000000 | Float | +| BUILD_OBJECT_DETERIORATION_DAMAGE_RATE | Structure determination rate | 1.000000 | Float | +| COLLECTION_DROP_RATE | Getherable items multipiler | 1.000000 | Float | +| COLLECTION_OBJECT_HP_RATE | Getherable objects HP multipiler | 1.000000 | Float | +| COLLECTION_OBJECT_RESPAWN_SPEED_RATE | Getherable objects respawn interval - The smaller the number, the faster the regeneration | 1.000000 | Float | +| ENEMY_DROP_ITEM_RATE | Dropped Items Multipiler | 1.000000 | Float | +| DEATH_PENALTY | Death Penalty
None: No death penalty
Item: Drops items other than equipment
ItemAndEquipment: Drops all items
All: Drops all PALs and all items. | All | `None`,`Item`,`ItemAndEquipment`,`All` | +| ENABLE_PLAYER_TO_PLAYER_DAMAGE | Allows players to cause damage to players | False | Boolean | +| ENABLE_FRIENDLY_FIRE | Allow friendly fire | False | Boolean | +| ENABLE_INVADER_ENEMY | Enable invaders | True | Boolean | +| ACTIVE_UNKO | Enable UNKO (?) | False | Boolean | +| ENABLE_AIM_ASSIST_PAD | Enable controller aim assist | True | Boolean | +| ENABLE_AIM_ASSIST_KEYBOARD | Enable Keyboard aim assist | False | Boolean | +| DROP_ITEM_MAX_NUM | Maximum number of drops in the world | 3000 | Integer | +| DROP_ITEM_MAX_NUM_UNKO | Maximum number of UNKO drops in the world | 100 | Integer | +| BASE_CAMP_MAX_NUM | Maximum number of base camps | 128 | Integer | +| BASE_CAMP_WORKER_MAX_NUM | Maximum number of workers | 15 | Integer | +| DROP_ITEM_ALIVE_MAX_HOURS | Time it takes for items to despawn in hours | 1.000000 | Float | +| AUTO_RESET_GUILD_NO_ONLINE_PLAYERS | Automatically reset guild when no players are online | False | Bool | +| AUTO_RESET_GUILD_TIME_NO_ONLINE_PLAYERS | Time to automatically reset guild when no players are online | 72.000000 | Float | +| GUILD_PLAYER_MAX_NUM | Max player of Guild | 20 | Integer | +| PAL_EGG_DEFAULT_HATCHING_TIME | Time(h) to incubate massive egg | 72.000000 | Float | +| WORK_SPEED_RATE | Work speed muliplier | 1.000000 | Float | +| IS_MULTIPLAY | Enable multiplayer | False | Boolean | +| IS_PVP | Enable PVP | False | Boolean | +| CAN_PICKUP_OTHER_GUILD_DEATH_PENALTY_DROP | Allow players from other guilds to pick up death penalty items | False | Boolean | +| ENABLE_NON_LOGIN_PENALTY | Enable non-login penalty | True | Boolean | +| ENABLE_FAST_TRAVEL | Enable fast travel | True | Boolean | +| IS_START_LOCATION_SELECT_BY_MAP | Enable selecting of start location | True | Boolean | +| EXIST_PLAYER_AFTER_LOGOUT | Toggle for deleting players when they log off | False | Boolean | +| ENABLE_DEFENSE_OTHER_GUILD_PLAYER | Allows defense against other guild players | False | Boolean | +| COOP_PLAYER_MAX_NUM | Maximum number of players in a guild | 4 | Integer | +| REGION | Region | | String | +| USEAUTH | Use authentication | True | Boolean | +| BAN_LIST_URL | Which ban list to use | [https://api.palworldgame.com/api/banlist.txt](https://api.palworldgame.com/api/banlist.txt) | string | +| SHOW_PLAYER_LIST | Enable show player list | True | Boolean | ### Manually @@ -540,13 +569,13 @@ The manifest corresponds to the release date/update versions. Manifests can be f ### Version To Manifest ID Table -| Version | Manifest ID | -|---------|----------------------| -| 1.3.0 | 1354752814336157338 | -| 1.4.0 | 4190579964382773830 | -| 1.4.1 | 6370735655629434989 | -| 1.5.0 | 3750364703337203431 | -| 1.5.1 | 2815085007637542021 | +| Version | Manifest ID | +|---------|---------------------| +| 1.3.0 | 1354752814336157338 | +| 1.4.0 | 4190579964382773830 | +| 1.4.1 | 6370735655629434989 | +| 1.5.0 | 3750364703337203431 | +| 1.5.1 | 2815085007637542021 | ## Reporting Issues/Feature Requests diff --git a/docusaurus/docs/getting-started/configuration/server-settings.md b/docusaurus/docs/getting-started/configuration/server-settings.md index 7e7238f35..31809c6dc 100644 --- a/docusaurus/docs/getting-started/configuration/server-settings.md +++ b/docusaurus/docs/getting-started/configuration/server-settings.md @@ -21,52 +21,81 @@ It is highly recommended you set the following environment values before startin * PUID * PGID -| Variable | Info | Default Values | Allowed Values | -|------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------|-------------------------------------------------------------------------------------------------------------------| -| TZ | Timezone used for time stamping backup server | UTC | See [TZ Identifiers](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#Time_Zone_abbreviations) | -| PLAYERS* | Max amount of players that are able to join the server | 16 | 1-32 | -| PORT* | UDP port that the server will expose | 8211 | 1024-65535 | -| PUID* | The uid of the user the server should run as | 1000 | !0 | -| PGID* | The gid of the group the server should run as | 1000 | !0 | -| MULTITHREADING** | Improves performance in multi-threaded CPU environments. It is effective up to a maximum of about 4 threads, and allocating more than this number of threads does not make much sense. | false | true/false | -| COMMUNITY | Whether or not the server shows up in the community server browser (USE WITH SERVER_PASSWORD) | false | true/false | -| PUBLIC_IP | You can manually specify the global IP address of the network on which the server running. If not specified, it will be detected automatically. If it does not work well, try manual configuration. | | x.x.x.x | -| PUBLIC_PORT | You can manually specify the port number of the network on which the server running. If not specified, it will be detected automatically. If it does not work well, try manual configuration. | | 1024-65535 | -| SERVER_NAME | A name for your server | | "string" | -| SERVER_DESCRIPTION | Your server Description | | "string" | -| SERVER_PASSWORD | Secure your community server with a password | | "string" | -| ADMIN_PASSWORD | Secure administration access in the server with a password | | "string" | -| UPDATE_ON_BOOT** | Update/Install the server when the docker container starts (THIS HAS TO BE ENABLED THE FIRST TIME YOU RUN THE CONTAINER) | true | true/false | -| RCON_ENABLED*** | Enable RCON for the Palworld server | true | true/false | -| RCON_PORT | RCON port to connect to | 25575 | 1024-65535 | -| QUERY_PORT | Query port used to communicate with Steam servers | 27015 | 1024-65535 | -| BACKUP_CRON_EXPRESSION | Setting affects frequency of automatic backups. | 0 0 \* \* \* | Needs a Cron-Expression - See [Configuring Automatic Backups with Cron](https://palworld-server-docker.loef.dev/guides/backup/automated-backup) | -| BACKUP_ENABLED | Enables automatic backups | true | true/false | -| DELETE_OLD_BACKUPS | Delete backups after a certain number of days | false | true/false | -| OLD_BACKUP_DAYS | How many days to keep backups | 30 | any positive integer | -| AUTO_UPDATE_CRON_EXPRESSION | Setting affects frequency of automatic updates. | 0 \* \* \* \* | Needs a Cron-Expression - See [Configuring Automatic Updates with Cron](https://palworld-server-docker.loef.dev/guides/automatic-updates) | -| AUTO_UPDATE_ENABLED | Enables automatic updates | false | true/false | -| AUTO_UPDATE_WARN_MINUTES | How long to wait to update the server, after the player were informed. (This will be ignored, if no Players are connected) | 30 | Integer | -| AUTO_REBOOT_CRON_EXPRESSION | Setting affects frequency of automatic updates. | 0 0 \* \* \* | Needs a Cron-Expression - See [Configuring Automatic Reboots with Cron](https://palworld-server-docker.loef.dev/guides/automatic-reboots) | -| AUTO_REBOOT_ENABLED | Enables automatic reboots | false | true/false | -| AUTO_REBOOT_WARN_MINUTES | How long to wait to reboot the server, after the player were informed. | 5 | Integer | -| AUTO_REBOOT_EVEN_IF_PLAYERS_ONLINE | Restart the Server even if there are players online. | false | true/false | -| TARGET_MANIFEST_ID | Locks game version to corespond with Manfiest ID from Steam Download Depot. | | See [Manifest ID Table](https://palworld-server-docker.loef.dev/guides/pinning-game-version#version-to-manifest-id-table) | -| DISCORD_WEBHOOK_URL | Discord webhook url found after creating a webhook on a discord server | | `https://discord.com/api/webhooks/` | -| DISCORD_CONNECT_TIMEOUT | Discord command initial connection timeout | 30 | !0 | -| DISCORD_MAX_TIMEOUT | Discord total hook timeout | 30 | !0 | -| DISCORD_PRE_UPDATE_BOOT_MESSAGE | Discord message sent when server begins updating | Server is updating... | "string" | -| DISCORD_POST_UPDATE_BOOT_MESSAGE | Discord message sent when server completes updating | Server update complete! | "string" | -| DISCORD_PRE_START_MESSAGE | Discord message sent when server begins to start | Server is started! | "string" | -| DISCORD_PRE_SHUTDOWN_MESSAGE | Discord message sent when server begins to shutdown | Server is shutting down... | "string" | -| DISCORD_POST_SHUTDOWN_MESSAGE | Discord message sent when server has stopped | Server is stopped! | "string" | -| DISCORD_PLAYER_JOIN_MESSAGE | Discord message sent when player joins the server | \$\{player_name\} has joined Palworld! | "string" | -| DISCORD_PLAYER_LEAVE_MESSAGE | Discord message sent when player leaves the server | \$\{player_name\} has left Palworld. | "string" | -| DISABLE_GENERATE_SETTINGS | Whether to automatically generate the PalWorldSettings.ini | false | true/false | -| DISABLE_GENERATE_ENGINE | Whether to automatically generate the Engine.ini | true | true/false | -| ENABLE_PLAYER_LOGGING | Enables Logging and announcing when players join and leave | true | true/false | -| PLAYER_LOGGING_POLL_PERIOD | Polling period (in seconds) to check for players who have joined or left | 5 | !0 | -| ARM_COMPATIBILITY_MODE | Switches the compatibility layer from Box86 to QEMU when executing steamcmd for server updates. This setting is only applicable for ARM64 hosts. | false | true/false | +| Variable | Info | Default Values | Allowed Values | +|--------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------| +| TZ | Timezone used for time stamping backup server | UTC | See [TZ Identifiers](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#Time_Zone_abbreviations) | +| PLAYERS* | Max amount of players that are able to join the server | 16 | 1-32 | +| PORT* | UDP port that the server will expose | 8211 | 1024-65535 | +| PUID* | The uid of the user the server should run as | 1000 | !0 | +| PGID* | The gid of the group the server should run as | 1000 | !0 | +| MULTITHREADING** | Improves performance in multi-threaded CPU environments. It is effective up to a maximum of about 4 threads, and allocating more than this number of threads does not make much sense. | false | true/false | +| COMMUNITY | Whether or not the server shows up in the community server browser (USE WITH SERVER_PASSWORD) | false | true/false | +| PUBLIC_IP | You can manually specify the global IP address of the network on which the server running. If not specified, it will be detected automatically. If it does not work well, try manual configuration. | | x.x.x.x | +| PUBLIC_PORT | You can manually specify the port number of the network on which the server running. If not specified, it will be detected automatically. If it does not work well, try manual configuration. | | 1024-65535 | +| SERVER_NAME | A name for your server | | "string" | +| SERVER_DESCRIPTION | Your server Description | | "string" | +| SERVER_PASSWORD | Secure your community server with a password | | "string" | +| ADMIN_PASSWORD | Secure administration access in the server with a password | | "string" | +| UPDATE_ON_BOOT** | Update/Install the server when the docker container starts (THIS HAS TO BE ENABLED THE FIRST TIME YOU RUN THE CONTAINER) | true | true/false | +| RCON_ENABLED*** | Enable RCON for the Palworld server | true | true/false | +| RCON_PORT | RCON port to connect to | 25575 | 1024-65535 | +| QUERY_PORT | Query port used to communicate with Steam servers | 27015 | 1024-65535 | +| BACKUP_CRON_EXPRESSION | Setting affects frequency of automatic backups. | 0 0 \* \* \* | Needs a Cron-Expression - See [Configuring Automatic Backups with Cron](https://palworld-server-docker.loef.dev/guides/backup/automated-backup) | +| BACKUP_ENABLED | Enables automatic backups | true | true/false | +| DELETE_OLD_BACKUPS | Delete backups after a certain number of days | false | true/false | +| OLD_BACKUP_DAYS | How many days to keep backups | 30 | any positive integer | +| AUTO_UPDATE_CRON_EXPRESSION | Setting affects frequency of automatic updates. | 0 \* \* \* \* | Needs a Cron-Expression - See [Configuring Automatic Updates with Cron](https://palworld-server-docker.loef.dev/guides/automatic-updates) | +| AUTO_UPDATE_ENABLED | Enables automatic updates | false | true/false | +| AUTO_UPDATE_WARN_MINUTES | How long to wait to update the server, after the player were informed. (This will be ignored, if no Players are connected) | 30 | Integer | +| AUTO_REBOOT_CRON_EXPRESSION | Setting affects frequency of automatic updates. | 0 0 \* \* \* | Needs a Cron-Expression - See [Configuring Automatic Reboots with Cron](https://palworld-server-docker.loef.dev/guides/automatic-reboots) | +| AUTO_REBOOT_ENABLED | Enables automatic reboots | false | true/false | +| AUTO_REBOOT_WARN_MINUTES | How long to wait to reboot the server, after the player were informed. | 5 | Integer | +| AUTO_REBOOT_EVEN_IF_PLAYERS_ONLINE | Restart the Server even if there are players online. | false | true/false | +| TARGET_MANIFEST_ID | Locks game version to corespond with Manfiest ID from Steam Download Depot. | | See [Manifest ID Table](https://palworld-server-docker.loef.dev/guides/pinning-game-version#version-to-manifest-id-table) | +| DISCORD_WEBHOOK_URL | Discord webhook url found after creating a webhook on a discord server | | `https://discord.com/api/webhooks/` | +| DISCORD_CONNECT_TIMEOUT | Discord command initial connection timeout | 30 | !0 | +| DISCORD_MAX_TIMEOUT | Discord total hook timeout | 30 | !0 | +| DISCORD_PRE_UPDATE_BOOT_MESSAGE | Discord message sent when server begins updating | Server is updating... | "string" | +| DISCORD_PRE_UPDATE_BOOT_MESSAGE_ENABLED | If the Discord message is enabled for this message | true | boolean | +| DISCORD_PRE_UPDATE_BOOT_MESSAGE_URL | Discord Webhook URL for this message (if left empty will use DISCORD_WEBHOOK_URL) | | "string" | +| DISCORD_POST_UPDATE_BOOT_MESSAGE | Discord message sent when server completes updating | Server update complete! | "string" | +| DISCORD_POST_UPDATE_BOOT_MESSAGE_ENABLED | If the Discord message is enabled for this message | true | boolean | +| DISCORD_POST_UPDATE_BOOT_MESSAGE_URL | Discord Webhook URL for this message (if left empty will use DISCORD_WEBHOOK_URL) | | "string" | +| DISCORD_PRE_START_MESSAGE | Discord message sent when server begins to start | Server has been started! | "string" | +| DISCORD_PRE_START_MESSAGE_ENABLED | If the Discord message is enabled for this message | true | boolean | +| DISCORD_PRE_START_MESSAGE_URL | Discord Webhook URL for this message (if left empty will use DISCORD_WEBHOOK_URL) | | "string" | +| DISCORD_PRE_SHUTDOWN_MESSAGE | Discord message sent when server begins to shutdown | Server is shutting down... | "string" | +| DISCORD_PRE_SHUTDOWN_MESSAGE_ENABLED | If the Discord message is enabled for this message | true | boolean | +| DISCORD_PRE_SHUTDOWN_MESSAGE_URL | Discord Webhook URL for this message (if left empty will use DISCORD_WEBHOOK_URL) | | "string" | +| DISCORD_POST_SHUTDOWN_MESSAGE | Discord message sent when server has stopped | Server is stopped! | "string" | +| DISCORD_POST_SHUTDOWN_MESSAGE_ENABLED | If the Discord message is enabled for this message | true | boolean | +| DISCORD_POST_SHUTDOWN_MESSAGE_URL | Discord Webhook URL for this message (if left empty will use DISCORD_WEBHOOK_URL) | | "string" | +| DISCORD_PLAYER_JOIN_MESSAGE | Discord message sent when player joins the server | `\${player_name}` has joined Palworld! | "string" | +| DISCORD_PLAYER_JOIN_MESSAGE_ENABLED | If the Discord message is enabled for this message | true | boolean | +| DISCORD_PLAYER_JOIN_MESSAGE_URL | Discord Webhook URL for this message (if left empty will use DISCORD_WEBHOOK_URL) | | "string" | +| DISCORD_PLAYER_LEAVE_MESSAGE | Discord message sent when player leaves the server | `\${player_name}` has left Palworld. | "string" | +| DISCORD_PLAYER_LEAVE_MESSAGE_ENABLED | If the Discord message is enabled for this message | true | boolean | +| DISCORD_PLAYER_LEAVE_MESSAGE_URL | Discord Webhook URL for this message (if left empty will use DISCORD_WEBHOOK_URL) | | "string" | +| DISCORD_PRE_BACKUP_MESSAGE | Discord message when starting to create a backup | Creating backup... | "string" | +| DISCORD_PRE_BACKUP_MESSAGE_ENABLED | If the Discord message is enabled for this message | true | boolean | +| DISCORD_PRE_BACKUP_MESSAGE_URL | Discord Webhook URL for this message (if left empty will use DISCORD_WEBHOOK_URL) | | "string" | +| DISCORD_POST_BACKUP_MESSAGE | Discord message when a backup has been made | Backup created at `\${FILE_PATH}` | "string" | +| DISCORD_POST_BACKUP_MESSAGE_ENABLED | If the Discord message is enabled for this message | true | boolean | +| DISCORD_POST_BACKUP_MESSAGE_URL | Discord Webhook URL for this message (if left empty will use DISCORD_WEBHOOK_URL) | | "string" | +| DISCORD_PRE_BACKUP_DELETE_MESSAGE | Discord message when starting to remove older backups | Removing backups older than `\${OLD_BACKUP_DAYS}` days | "string" | +| DISCORD_PRE_BACKUP_DELETE_ENABLED | If the Discord message is enabled for this message | true | boolean | +| DISCORD_PRE_BACKUP_DELETE_URL | Discord Webhook URL for this message (if left empty will use DISCORD_WEBHOOK_URL) | | "string" | +| DISCORD_POST_BACKUP_DELETE_MESSAGE | Discord message when successfully removed older backups | Removed backups older than `\${OLD_BACKUP_DAYS}` days | "string" | +| DISCORD_POST_BACKUP_DELETE_ENABLED | If the Discord message is enabled for this message | true | boolean | +| DISCORD_POST_BACKUP_DELETE_URL | Discord Webhook URL for this message (if left empty will use DISCORD_WEBHOOK_URL) | | "string" | +| DISCORD_ERR_BACKUP_DELETE_MESSAGE | Discord message when there has been an error removing older backups | Unable to delete old backups, OLD_BACKUP_DAYS is not an integer. OLD_BACKUP_DAYS=`\${OLD_BACKUP_DAYS}` | "string" | +| DISCORD_ERR_BACKUP_DELETE_ENABLED | If the Discord message is enabled for this message | true | boolean | +| DISCORD_ERR_BACKUP_DELETE_URL | Discord Webhook URL for this message (if left empty will use DISCORD_WEBHOOK_URL) | | "string" | +| DISABLE_GENERATE_SETTINGS | Whether to automatically generate the PalWorldSettings.ini | false | true/false | +| DISABLE_GENERATE_ENGINE | Whether to automatically generate the Engine.ini | true | true/false | +| ENABLE_PLAYER_LOGGING | Enables Logging and announcing when players join and leave | true | true/false | +| PLAYER_LOGGING_POLL_PERIOD | Polling period (in seconds) to check for players who have joined or left | 5 | !0 | +| ARM_COMPATIBILITY_MODE | Switches the compatibility layer from Box86 to QEMU when executing steamcmd for server updates. This setting is only applicable for ARM64 hosts. | false | true/false | *highly recommended to set diff --git a/scripts/backup.sh b/scripts/backup.sh index 88437ad4c..f84a686f6 100644 --- a/scripts/backup.sh +++ b/scripts/backup.sh @@ -2,7 +2,7 @@ # shellcheck source=scripts/helper_functions.sh source "/home/steam/server/helper_functions.sh" -DiscordMessage "Backup" "Creating backup..." "in-progress" +DiscordMessage "Backup" "${DISCORD_PRE_BACKUP_MESSAGE}" "in-progress" "${DISCORD_PRE_BACKUP_MESSAGE_ENABLED}" "${DISCORD_PRE_BACKUP_MESSAGE_URL}" if [ "${RCON_ENABLED,,}" = true ]; then save_server fi @@ -18,7 +18,7 @@ if [ "$(id -u)" -eq 0 ]; then chown steam:steam "$FILE_PATH" fi LogInfo "Backup created at ${FILE_PATH}" -DiscordMessage "Backup" "Backup created at ${FILE_PATH}" "success" +DiscordMessage "Backup" "${DISCORD_POST_BACKUP_MESSAGE//\$\{FILE_PATH\}/${FILE_PATH}}" "success" "${DISCORD_POST_BACKUP_MESSAGE_ENABLED}" "${DISCORD_POST_BACKUP_MESSAGE_URL}" if [ "${DELETE_OLD_BACKUPS,,}" != true ]; then exit 0 @@ -33,11 +33,11 @@ fi if [[ "${OLD_BACKUP_DAYS}" =~ ^[0-9]+$ ]]; then LogAction "Removing Old Backups" LogInfo "Removing backups older than ${OLD_BACKUP_DAYS} days" - DiscordMessage "Backup" "Removing backups older than ${OLD_BACKUP_DAYS} days..." "in-progress" + DiscordMessage "Backup" "${DISCORD_PRE_BACKUP_DELETE_MESSAGE//\$\{FILE_PATH\}/${FILE_PATH}}" "in-progress" "${DISCORD_PRE_BACKUP_DELETE_MESSAGE_ENABLED}" "${DISCORD_PRE_BACKUP_DELETE_MESSAGE_URL}" find /palworld/backups/ -mindepth 1 -maxdepth 1 -mtime "+${OLD_BACKUP_DAYS}" -type f -name 'palworld-save-*.tar.gz' -print -delete - DiscordMessage "Backup" "Removed backups older than ${OLD_BACKUP_DAYS} days" "success" + DiscordMessage "Backup" "${DISCORD_POST_BACKUP_DELETE_MESSAGE//\$\{FILE_PATH\}/${FILE_PATH}}" "success" "${DISCORD_POST_BACKUP_DELETE_MESSAGE_ENABLED}" "${DISCORD_POST_BACKUP_DELETE_MESSAGE_URL}" exit 0 fi LogError "Unable to delete old backups, OLD_BACKUP_DAYS is not an integer. OLD_BACKUP_DAYS=${OLD_BACKUP_DAYS}" -DiscordMessage "Backup" "Unable to delete old backups, OLD_BACKUP_DAYS is not an integer. OLD_BACKUP_DAYS=${OLD_BACKUP_DAYS}" "failure" \ No newline at end of file +DiscordMessage "Backup" "${DISCORD_ERR_BACKUP_DELETE_MESSAGE//\$\{OLD_BACKUP_DAYS\}/${OLD_BACKUP_DAYS}}}" "failure" "${DISCORD_ERR_BACKUP_DELETE_MESSAGE_ENABLED}" "${DISCORD_ERR_BACKUP_DELETE_MESSAGE_URL}" \ No newline at end of file diff --git a/scripts/discord.sh b/scripts/discord.sh index 1c9ac4bed..5786ee335 100644 --- a/scripts/discord.sh +++ b/scripts/discord.sh @@ -16,6 +16,8 @@ DISCORD_GREEN=52224 TITLE=$1 MESSAGE=$2 LEVEL=$3 +ENABLED=$4 +URL=$5 if [ -n "${DISCORD_CONNECT_TIMEOUT}" ] && [[ "${DISCORD_CONNECT_TIMEOUT}" =~ ^[0-9]+$ ]]; then CONNECT_TIMEOUT=$DISCORD_CONNECT_TIMEOUT @@ -58,5 +60,13 @@ else fi JSON=$(jo embeds[]="$(jo title="$TITLE" description="$MESSAGE" color=$COLOR)") -LogInfo "Sending Discord json: ${JSON}" -curl -sfSL --connect-timeout "$CONNECT_TIMEOUT" --max-time "$MAX_TIMEOUT" -H "Content-Type: application/json" -d "$JSON" "$DISCORD_WEBHOOK_URL" + +if [ "$ENABLED" = true ]; then + if [ "$URL" == "" ]; then + DISCORD_URL="$DISCORD_WEBHOOK_URL" + else + DISCORD_URL="$URL" + fi + LogInfo "Sending Discord json: ${JSON}" + curl -sfSL --connect-timeout "$CONNECT_TIMEOUT" --max-time "$MAX_TIMEOUT" -H "Content-Type: application/json" -d "$JSON" "$DISCORD_URL" +fi diff --git a/scripts/helper_functions.sh b/scripts/helper_functions.sh index 20faa097a..0df5538d5 100644 --- a/scripts/helper_functions.sh +++ b/scripts/helper_functions.sh @@ -145,11 +145,13 @@ DiscordMessage() { local title="$1" local message="$2" local level="$3" + local enabled="$4" + local webhook_url="$5" if [ -z "$level" ]; then level="info" fi if [ -n "${DISCORD_WEBHOOK_URL}" ]; then - /home/steam/server/discord.sh "$title" "$message" "$level" & + /home/steam/server/discord.sh "$title" "$message" "$level" "$enabled" "$webhook_url" & fi } diff --git a/scripts/helper_install.sh b/scripts/helper_install.sh index 523ab00d4..1f0a826cb 100644 --- a/scripts/helper_install.sh +++ b/scripts/helper_install.sh @@ -125,9 +125,9 @@ InstallServer() { fi if [ -z "${TARGET_MANIFEST_ID}" ]; then - DiscordMessage "Install" "${DISCORD_PRE_UPDATE_BOOT_MESSAGE}" "in-progress" + DiscordMessage "Install" "${DISCORD_PRE_UPDATE_BOOT_MESSAGE}" "in-progress" "${DISCORD_PRE_UPDATE_BOOT_MESSAGE_ENABLED}" "${DISCORD_PRE_UPDATE_BOOT_MESSAGE_URL}" /home/steam/steamcmd/steamcmd.sh +@sSteamCmdForcePlatformType linux +@sSteamCmdForcePlatformBitness 64 +force_install_dir "/palworld" +login anonymous +app_update 2394010 validate +quit - DiscordMessage "Install" "${DISCORD_POST_UPDATE_BOOT_MESSAGE}" "success" + DiscordMessage "Install" "${DISCORD_POST_UPDATE_BOOT_MESSAGE}" "success" "${DISCORD_POST_UPDATE_BOOT_MESSAGE_ENABLED}" "${DISCORD_POST_UPDATE_BOOT_MESSAGE_URL}" return fi @@ -135,9 +135,9 @@ InstallServer() { targetManifest="${TARGET_MANIFEST_ID}" LogWarn "Installing Target Version: $targetManifest" - DiscordMessage "Install" "${DISCORD_PRE_UPDATE_BOOT_MESSAGE}" "in-progress" + DiscordMessage "Install" "${DISCORD_PRE_UPDATE_BOOT_MESSAGE}" "in-progress" "${DISCORD_PRE_UPDATE_BOOT_MESSAGE_ENABLED}" "${DISCORD_PRE_UPDATE_BOOT_MESSAGE_URL}" /home/steam/steamcmd/steamcmd.sh +@sSteamCmdForcePlatformType linux +@sSteamCmdForcePlatformBitness 64 +force_install_dir "/palworld" +login anonymous +download_depot 2394010 2394012 "$targetManifest" +quit cp -vr "/home/steam/steamcmd/linux32/steamapps/content/app_2394010/depot_2394012/." "/palworld/" CreateACFFile "$targetManifest" - DiscordMessage "Install" "${DISCORD_POST_UPDATE_BOOT_MESSAGE}" "success" + DiscordMessage "Install" "${DISCORD_POST_UPDATE_BOOT_MESSAGE}" "success" "${DISCORD_POST_UPDATE_BOOT_MESSAGE_ENABLED}" "${DISCORD_POST_UPDATE_BOOT_MESSAGE_URL}" } diff --git a/scripts/init.sh b/scripts/init.sh index cf881ee17..286c1a0f9 100644 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -26,7 +26,7 @@ mkdir -p /palworld/backups # shellcheck disable=SC2317 term_handler() { - DiscordMessage "Shutdown" "${DISCORD_PRE_SHUTDOWN_MESSAGE}" "in-progress" + DiscordMessage "Shutdown" "${DISCORD_PRE_SHUTDOWN_MESSAGE}" "in-progress" "${DISCORD_PRE_SHUTDOWN_MESSAGE_ENABLED}" "${DISCORD_PRE_SHUTDOWN_MESSAGE_URL}" if ! shutdown_server; then # Does not save diff --git a/scripts/player_logging.sh b/scripts/player_logging.sh index 8ae38bb17..da811242f 100644 --- a/scripts/player_logging.sh +++ b/scripts/player_logging.sh @@ -48,7 +48,7 @@ while true; do broadcast_command "${player_name} has left" # Replace ${player_name} with actual player's name - DiscordMessage "Player Left" "${DISCORD_PLAYER_LEAVE_MESSAGE//\$\{player_name\}/${player_name}}" "failure" + DiscordMessage "Player Left" "${DISCORD_PLAYER_LEAVE_MESSAGE//\$\{player_name\}/${player_name}}" "failure" "${DISCORD_PLAYER_LEAVE_MESSAGE_ENABLED}" "${DISCORD_PLAYER_LEAVE_MESSAGE_URL}" done # Notify Discord and log all players who have joined @@ -58,7 +58,7 @@ while true; do broadcast_command "${player_name} has joined" # Replace ${player_name} with actual player's name - DiscordMessage "Player Joined" "${DISCORD_PLAYER_JOIN_MESSAGE//\$\{player_name\}/${player_name}}" "success" + DiscordMessage "Player Joined" "${DISCORD_PLAYER_JOIN_MESSAGE//\$\{player_name\}/${player_name}}" "success" "${DISCORD_PLAYER_JOIN_MESSAGE_ENABLED}" "${DISCORD_PLAYER_JOIN_MESSAGE_URL}" done old_player_list=("${current_player_list[@]}") diff --git a/scripts/start.sh b/scripts/start.sh index 5f7589d8b..a747ad765 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -177,10 +177,10 @@ if [ "${ENABLE_PLAYER_LOGGING,,}" = true ] && [[ "${PLAYER_LOGGING_POLL_PERIOD}" fi LogAction "Starting Server" -DiscordMessage "Start" "${DISCORD_PRE_START_MESSAGE}" "success" +DiscordMessage "Start" "${DISCORD_PRE_START_MESSAGE}" "success" "${DISCORD_PRE_START_MESSAGE_ENABLED}" "${DISCORD_PRE_START_MESSAGE_URL}" echo "${STARTCOMMAND[*]}" "${STARTCOMMAND[@]}" -DiscordMessage "Stop" "${DISCORD_POST_SHUTDOWN_MESSAGE}" "failure" +DiscordMessage "Stop" "${DISCORD_POST_SHUTDOWN_MESSAGE}" "failure" "${DISCORD_POST_SHUTDOWN_MESSAGE_ENABLED}" "${DISCORD_POST_SHUTDOWN_MESSAGE_URL}" exit 0