Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option for steam username/password to download previous versions #649

Merged
merged 2 commits into from
Dec 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ ENABLE_PLAYER_LOGGING=true
PLAYER_LOGGING_POLL_PERIOD=5

DIFFICULTY=None
RANDOMIZER_TYPE=
RANDOMIZER_SEED=none
DAYTIME_SPEEDRATE=1.000000
NIGHTTIME_SPEEDRATE=1.000000
EXP_RATE=1.000000
Expand All @@ -47,6 +49,7 @@ PAL_STOMACH_DECREASE_RATE=1.000000
PAL_STAMINA_DECREASE_RATE=1.000000
PAL_AUTO_HP_REGEN_RATE=1.000000
PAL_AUTO_HP_REGEN_RATE_IN_SLEEP=1.000000
BUILD_OBJECT_HP_RATE=1.000000
BUILD_OBJECT_DAMAGE_RATE=1.000000
BUILD_OBJECT_DETERIORATION_DAMAGE_RATE=1.000000
COLLECTION_DROP_RATE=1.000000
Expand Down Expand Up @@ -74,20 +77,27 @@ WORK_SPEED_RATE=1.000000
AUTO_SAVE_SPAN=30.000000
IS_MULTIPLAY=False
IS_PVP=False
HARDCORE=False
PAL_LOST=False
CAN_PICKUP_OTHER_GUILD_DEATH_PENALTY_DROP=False
ENABLE_NON_LOGIN_PENALTY=True
ENABLE_FAST_TRAVEL=True
IS_START_LOCATION_SELECT_BY_MAP=True
EXIST_PLAYER_AFTER_LOGOUT=False
ENABLE_DEFENSE_OTHER_GUILD_PLAYER=False
INVISIBLE_OTHER_GUILD_BASE_CAMP_AREA_FX=False
BUILD_AREA_LIMIT=False
ITEM_WEIGHT_RATE=1.000000
COOP_PLAYER_MAX_NUM=4
REGION=
USEAUTH=True
BAN_LIST_URL=https://api.palworldgame.com/api/banlist.txt
REST_API_ENABLED=False
REST_API_PORT=8212
SHOW_PLAYER_LIST=True
ENABLE_PREDATOR_BOSS_PAL=True
MAX_BUILDING_LIMIT_NUM=0
SERVER_REPLICATE_PAWN_CULL_DISTANCE=15000.000000
# ALLOW_CONNECT_PLATFORM Defaults to "Steam" if not set, set this to "Xbox" if you want to host a server for Xbox players. CROSSPLAY BETWEEN XBOX-STEAM IS NOT YET SUPPORTED
ALLOW_CONNECT_PLATFORM=Steam
USE_BACKUP_SAVE_DATA=True
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,9 @@ It is highly recommended you set the following environment values before startin
| AUTO_REBOOT_ENABLED | Enables automatic reboots | false | true/false | 0.21.0 |
| AUTO_REBOOT_WARN_MINUTES | How long to wait to reboot the server, after the player were informed. | 5 | Integer | 0.21.0 |
| AUTO_REBOOT_EVEN_IF_PLAYERS_ONLINE | Restart the Server even if there are players online. | false | true/false | 0.21.0 |
| TARGET_MANIFEST_ID | Locks game version to corespond with Manifest ID from Steam Download Depot. | | See [Manifest ID Table](#locking-specific-game-version) | 0.27.0 |
| TARGET_MANIFEST_ID | Locks game version to corespond with Manifest ID from Steam Download, use with STEAM_USERNAME/STEAM_PASSWORD Depot. | | See [Manifest ID Table](#locking-specific-game-version) | 0.27.0 |
| STEAM_USERNAME | Steam username for downloading the server with a TARGET_MANIFEST_ID. | | "string" | 1.2.2 |
| STEAM_PASSWORD | Steam password for downloading the server with a TARGET_MANIFEST_ID. | | "string" | 1.2.2 |
| INSTALL_BETA_INSIDER | Installs the latest Beta version of the Palworld dedicated server | false | true/false | 0.38.0 |
| DISCORD_WEBHOOK_URL | Discord webhook url found after creating a webhook on a discord server. | | `https://discord.com/api/webhooks/<webhook_id>` | 0.22.0 |
| DISCORD_SUPPRESS_NOTIFICATIONS | Enables/Disables `@silent` messages for the server messages. | false | boolean | 0.34.0 |
Expand Down Expand Up @@ -686,7 +688,8 @@ send discord messages with docker compose:
>[!WARNING]
>Downgrading to a lower game version is possible, but it is unknown what impact it will have on existing saves.
>
>This requires you to set STEAM_USERNAME and STEAM_PASSWORD to a Steam account that owns the game.
>Accounts with Steam Guard enabled are currently not supported.
>**Please do so at your own risk!**
If **TARGET_MANIFEST_ID** environment variable is set, will lock server version to specific manifest.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ It is highly recommended you set the following environment values before startin
| AUTO_REBOOT_WARN_MINUTES | How long to wait to reboot the server, after the player were informed. | 5 | Integer | 0.21.0 |
| AUTO_REBOOT_EVEN_IF_PLAYERS_ONLINE | Restart the Server even if there are players online. | false | true/false | 0.21.0 |
| 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) | 0.27.0 |
| STEAM_USERNAME | Steam username for downloading the server files (only needed when using TARGET_MANIFEST_ID). | | "string" | 1.2.2 |
| STEAM_PASSWORD | Steam password for downloading the server files (only needed when using TARGET_MANIFEST_ID). | | "string" | 1.2.2 |
| INSTALL_BETA_INSIDER | Installs the latest Beta version of the Palworld dedicated server | false | true/false | 0.38.0 |
| DISCORD_WEBHOOK_URL | Discord webhook url found after creating a webhook on a discord server | | `https://discord.com/api/webhooks/<webhook_id>` | 0.22.0 |
| DISCORD_SUPPRESS_NOTIFICATIONS | Enables/Disables `@silent` messages for the server messages. | false | boolean | 0.34.0 |
Expand Down
3 changes: 2 additions & 1 deletion docusaurus/docs/guides/pinning-game-version.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ sidebar_position: 7

:::warning
Downgrading to a lower game version is possible, but it is unknown what impact it will have on existing saves.

This requires you to set STEAM_USERNAME and STEAM_PASSWORD to a Steam account that owns the game.
Accounts with Steam Guard enabled are currently not supported.
**Please do so at your own risk!**
:::

Expand Down
11 changes: 8 additions & 3 deletions scripts/helper_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,18 @@ InstallServer() {
targetManifest="${TARGET_MANIFEST_ID}"

LogWarn "Installing Target Version: $targetManifest"
if [ -z "${STEAM_USERNAME}" ] || [ -z "${STEAM_PASSWORD}" ]; then
LogError "STEAM_USERNAME or STEAM_PASSWORD is not set. Please set these variables to install a specific version."
DiscordMessage "Install" "STEAM_USERNAME or STEAM_PASSWORD is not set. Please set these variables to install a specific version." "failure"
return 2
fi
DiscordMessage "Install" "${DISCORD_PRE_UPDATE_BOOT_MESSAGE}" "in-progress" "${DISCORD_PRE_UPDATE_BOOT_MESSAGE_ENABLED}" "${DISCORD_PRE_UPDATE_BOOT_MESSAGE_URL}"
if [ "${USE_DEPOT_DOWNLOADER}" == true ]; then
LogWarn "Downloading server files using DepotDownloader"
DepotDownloader -app 2394010 -depot 2394012 -manifest "$targetManifest" -osarch 64 -dir /palworld -validate
DepotDownloader -app 2394010 -depot 1006 -osarch 64 -dir /palworld -validate
DepotDownloader -app 2394010 -username "${STEAM_USERNAME}" -password "${STEAM_PASSWORD}" -depot 2394012 -manifest "$targetManifest" -osarch 64 -dir /palworld -validate
DepotDownloader -app 2394010 -username "${STEAM_USERNAME}" -password "${STEAM_PASSWORD}" -depot 1006 -osarch 64 -dir /palworld -validate
else
/home/steam/steamcmd/steamcmd.sh +@sSteamCmdForcePlatformType linux +@sSteamCmdForcePlatformBitness 64 +force_install_dir "/palworld" +login anonymous +download_depot 2394010 2394012 "$targetManifest" +quit
/home/steam/steamcmd/steamcmd.sh +@sSteamCmdForcePlatformType linux +@sSteamCmdForcePlatformBitness 64 +force_install_dir "/palworld" +login "${STEAM_USERNAME}" "${STEAM_PASSWORD}" +download_depot 2394010 2394012 "$targetManifest" +quit
cp -vr "/home/steam/steamcmd/linux32/steamapps/content/app_2394010/depot_2394012/." "/palworld/"
fi
CreateACFFile "$targetManifest"
Expand Down
Loading