From f488ce62d62d04ef8b6f513c1c07f8363acdc3fc Mon Sep 17 00:00:00 2001 From: Thijs van Loef Date: Sun, 28 Jan 2024 12:10:40 +0100 Subject: [PATCH 1/8] Allow changing of all config trough ENV --- scripts/start.sh | 216 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 216 insertions(+) diff --git a/scripts/start.sh b/scripts/start.sh index 2d83c36f4..26909f102 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -63,6 +63,222 @@ if [ ! "$(grep -s '[^[:space:]]' /palworld/Pal/Saved/Config/LinuxServer/PalWorld cp /palworld/DefaultPalWorldSettings.ini /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini fi +if [ -n "${DIFFICULTY}" ]; then + echo "DIFFICULTY=$DIFFICULTY" + sed -E -i "s/Difficulty=[a-zA-Z]*/Difficulty=$DIFFICULTY/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${DAYTIME_SPEEDRATE}" ]; then + echo "DAYTIME_SPEEDRATE=$DAYTIME_SPEEDRATE" + sed -E -i "s/DayTimeSpeedRate=[+-]?([0-9]*[.])?[0-9]+/DayTimeSpeedRate=$DAYTIME_SPEEDRATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${NIGHTTIME_SPEEDRATE}" ]; then + echo "NIGHTTIME_SPEEDRATE=$NIGHTTIME_SPEEDRATE" + sed -E -i "s/NightTimeSpeedRate=[+-]?([0-9]*[.])?[0-9]+/NightTimeSpeedRate=$NIGHTTIME_SPEEDRATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${EXP_RATE}" ]; then + echo "EXP_RATE=$EXP_RATE" + sed -E -i "s/ExpRate=[+-]?([0-9]*[.])?[0-9]+/ExpRate=$EXP_RATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${PAL_CAPTURE_RATE}" ]; then + echo "PAL_CAPTURE_RATE=$PAL_CAPTURE_RATE" + sed -E -i "s/PalCaptureRate=[+-]?([0-9]*[.])?[0-9]+/PalCaptureRate=$PAL_CAPTURE_RATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${PAL_SPAWN_NUM_RATE}" ]; then + echo "PAL_SPAWN_NUM_RATE=$PAL_SPAWN_NUM_RATE" + sed -E -i "s/PalSpawnNumRate=[+-]?([0-9]*[.])?[0-9]+/PalSpawnNumRate=$PAL_SPAWN_NUM_RATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${PAL_DAMAGE_RATE_ATTACK}" ]; then + echo "PAL_DAMAGE_RATE_ATTACK=$PAL_DAMAGE_RATE_ATTACK" + sed -E -i "s/PalDamageRateAttack=[+-]?([0-9]*[.])?[0-9]+/PalDamageRateAttack=$PAL_DAMAGE_RATE_ATTACK/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${PAL_DAMAGE_RATE_DEFENSE}" ]; then + echo "PAL_DAMAGE_RATE_DEFENSE=$PAL_DAMAGE_RATE_DEFENSE" + sed -E -i "s/PalDamageRateDefense=[+-]?([0-9]*[.])?[0-9]+/PalDamageRateDefense=$PAL_DAMAGE_RATE_DEFENSE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${PLAYER_DAMAGE_RATE_ATTACK}" ]; then + echo "PLAYER_DAMAGE_RATE_ATTACK=$PLAYER_DAMAGE_RATE_ATTACK" + sed -E -i "s/PlayerDamageRateAttack=[+-]?([0-9]*[.])?[0-9]+/PlayerDamageRateAttack=$PLAYER_DAMAGE_RATE_ATTACK/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${PLAYER_DAMAGE_RATE_DEFENSE}" ]; then + echo "PLAYER_DAMAGE_RATE_DEFENSE=$PLAYER_DAMAGE_RATE_DEFENSE" + sed -E -i "s/PlayerDamageRateDefense=[+-]?([0-9]*[.])?[0-9]+/PlayerDamageRateDefense=$PLAYER_DAMAGE_RATE_DEFENSE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${PLAYER_STOMACH_DECREASE_RATE}" ]; then + echo "PLAYER_STOMACH_DECREASE_RATE=$PLAYER_STOMACH_DECREASE_RATE" + sed -E -i "s/PlayerStomachDecreaceRate=[+-]?([0-9]*[.])?[0-9]+/PlayerStomachDecreaceRate=$PLAYER_STOMACH_DECREASE_RATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${PLAYER_STAMINA_DECREASE_RATE}" ]; then + echo "PLAYER_STAMINA_DECREASE_RATE=$PLAYER_STAMINA_DECREASE_RATE" + sed -E -i "s/PlayerStaminaDecreaceRate=[+-]?([0-9]*[.])?[0-9]+/PlayerStaminaDecreaceRate=$PLAYER_STAMINA_DECREASE_RATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${PLAYER_AUTO_HP_REGEN_RATE}" ]; then + echo "PLAYER_AUTO_HP_REGEN_RATE=$PLAYER_AUTO_HP_REGEN_RATE" + sed -E -i "s/PlayerAutoHPRegeneRate=[+-]?([0-9]*[.])?[0-9]+/PlayerAutoHPRegeneRate=$PLAYER_AUTO_HP_REGEN_RATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${PLAYER_AUTO_HP_REGEN_RATE_IN_SLEEP}" ]; then + echo "PLAYER_AUTO_HP_REGEN_RATE_IN_SLEEP=$PLAYER_AUTO_HP_REGEN_RATE_IN_SLEEP" + sed -E -i "s/PlayerAutoHpRegeneRateInSleep=[+-]?([0-9]*[.])?[0-9]+/PlayerAutoHpRegeneRateInSleep=$PLAYER_AUTO_HP_REGEN_RATE_IN_SLEEP/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${PAL_STOMACH_DECREASE_RATE}" ]; then + echo "PAL_STOMACH_DECREASE_RATE=$PAL_STOMACH_DECREASE_RATE" + sed -E -i "s/PalStomachDecreaceRate=[+-]?([0-9]*[.])?[0-9]+/PalStomachDecreaceRate=$PAL_STOMACH_DECREASE_RATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${PAL_STAMINA_DECREASE_RATE}" ]; then + echo "PAL_STAMINA_DECREASE_RATE=$PAL_STAMINA_DECREASE_RATE" + sed -E -i "s/PalStaminaDecreaceRate=[+-]?([0-9]*[.])?[0-9]+/PalStaminaDecreaceRate=$PAL_STAMINA_DECREASE_RATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${PAL_AUTO_HP_REGENE_RATE}" ]; then + echo "PAL_AUTO_HP_REGENE_RATE=$PAL_AUTO_HP_REGENE_RATE" + sed -E -i "s/PalAutoHPRegeneRate=[+-]?([0-9]*[.])?[0-9]+/PalAutoHPRegeneRate=$PAL_AUTO_HP_REGENE_RATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${PAL_AUTO_HP_REGENE_RATE_IN_SLEEP}" ]; then + echo "PAL_AUTO_HP_REGENE_RATE_IN_SLEEP=$PAL_AUTO_HP_REGENE_RATE_IN_SLEEP" + sed -E -i "s/PalAutoHpRegeneRateInSleep=[+-]?([0-9]*[.])?[0-9]+/PalAutoHpRegeneRateInSleep=$PAL_AUTO_HP_REGENE_RATE_IN_SLEEP/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${BUILD_OBJECT_DAMAGE_RATE}" ]; then + echo "BUILD_OBJECT_DAMAGE_RATE=$BUILD_OBJECT_DAMAGE_RATE" + sed -E -i "s/BuildObjectDamageRate=[+-]?([0-9]*[.])?[0-9]+/BuildObjectDamageRate=$BUILD_OBJECT_DAMAGE_RATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${BUILD_OBJECT_DETERIORATION_DAMAGE_RATE}" ]; then + echo "BUILD_OBJECT_DETERIORATION_DAMAGE_RATE=$BUILD_OBJECT_DETERIORATION_DAMAGE_RATE" + sed -E -i "s/BuildObjectDeteriorationDamageRate=[+-]?([0-9]*[.])?[0-9]+/BuildObjectDeteriorationDamageRate=$BUILD_OBJECT_DETERIORATION_DAMAGE_RATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${BUILD_OBJECT_DETERIORATION_DAMAGE_RATE}" ]; then + echo "BUILD_OBJECT_DETERIORATION_DAMAGE_RATE=$BUILD_OBJECT_DETERIORATION_DAMAGE_RATE" + sed -E -i "s/PalAutoHpRegeneRateInSleep=[+-]?([0-9]*[.])?[0-9]+/PalAutoHpRegeneRateInSleep=$BUILD_OBJECT_DETERIORATION_DAMAGE_RATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${COLLECTION_DROP_RATE}" ]; then + echo "COLLECTION_DROP_RATE=$COLLECTION_DROP_RATE" + sed -E -i "s/CollectionDropRate=[+-]?([0-9]*[.])?[0-9]+/CollectionDropRate=$COLLECTION_DROP_RATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${COLLECTION_OBJECT_HP_RATE}" ]; then + echo "COLLECTION_OBJECT_HP_RATE=$COLLECTION_OBJECT_HP_RATE" + sed -E -i "s/CollectionObjectHpRate=[+-]?([0-9]*[.])?[0-9]+/CollectionObjectHpRate=$COLLECTION_OBJECT_HP_RATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${COLLECTION_OBJECT_RESPAWN_SPEED_RATE}" ]; then + echo "COLLECTION_OBJECT_RESPAWN_SPEED_RATE=$COLLECTION_OBJECT_RESPAWN_SPEED_RATE" + sed -E -i "s/CollectionObjectRespawnSpeedRate=[+-]?([0-9]*[.])?[0-9]+/CollectionObjectRespawnSpeedRate=$COLLECTION_OBJECT_RESPAWN_SPEED_RATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${ENEMY_DROP_ITEM_RATE}" ]; then + echo "ENEMY_DROP_ITEM_RATE=$ENEMY_DROP_ITEM_RATE" + sed -E -i "s/EnemyDropItemRate=[+-]?([0-9]*[.])?[0-9]+/EnemyDropItemRate=$ENEMY_DROP_ITEM_RATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${DEATH_PENALTY}" ]; then + echo "DEATH_PENALTY=$DEATH_PENALTY" + sed -E -i "s/DeathPenalty=[a-zA-Z]*/DeathPenalty=$DEATH_PENALTY/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${ENABLE_PLAYER_TO_PLAYER_DAMAGE}" ]; then + echo "ENABLE_PLAYER_TO_PLAYER_DAMAGE=$ENABLE_PLAYER_TO_PLAYER_DAMAGE" + sed -E -i "s/bEnablePlayerToPlayerDamage=[a-zA-Z]*/bEnablePlayerToPlayerDamage=$ENABLE_PLAYER_TO_PLAYER_DAMAGE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${ENABLE_FRIENDLY_FIRE}" ]; then + echo "ENABLE_FRIENDLY_FIRE=$ENABLE_FRIENDLY_FIRE" + sed -E -i "s/bEnableFriendlyFire=[a-zA-Z]*/bEnableFriendlyFire=$ENABLE_FRIENDLY_FIRE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${ENABLE_INVADER_ENEMY}" ]; then + echo "ENABLE_INVADER_ENEMY=$ENABLE_INVADER_ENEMY" + sed -E -i "s/bEnableInvaderEnemy=[a-zA-Z]*/bEnableInvaderEnemy=$ENABLE_INVADER_ENEMY/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${ACTIVE_UNKO}" ]; then + echo "ACTIVE_UNKO=$ACTIVE_UNKO" + sed -E -i "s/bActiveUNKO=[a-zA-Z]*/bActiveUNKO=$ACTIVE_UNKO/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${ENABLE_AIM_ASSIST_PAD}" ]; then + echo "ENABLE_AIM_ASSIST_PAD=$ENABLE_AIM_ASSIST_PAD" + sed -E -i "s/bEnableAimAssistPad=[a-zA-Z]*/bEnableAimAssistPad=$ENABLE_AIM_ASSIST_PAD/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${ENABLE_AIM_ASSIST_KEYBOARD}" ]; then + echo "ENABLE_AIM_ASSIST_KEYBOARD=$ENABLE_AIM_ASSIST_KEYBOARD" + sed -E -i "s/bEnableAimAssistKeyboard=[a-zA-Z]*/bEnableAimAssistKeyboard=$ENABLE_AIM_ASSIST_KEYBOARD/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${DROP_ITEM_MAX_NUM}" ]; then + echo "DROP_ITEM_MAX_NUM=$DROP_ITEM_MAX_NUM" + sed -E -i "s/DropItemMaxNum=[0-9]*/DropItemMaxNum=$DROP_ITEM_MAX_NUM/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${DROP_ITEM_MAX_NUM_UNKO}" ]; then + echo "DROP_ITEM_MAX_NUM_UNKO=$DROP_ITEM_MAX_NUM_UNKO" + sed -E -i "s/DropItemMaxNum_UNKO=[0-9]*/DropItemMaxNum_UNKO=$DROP_ITEM_MAX_NUM_UNKO/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${BASE_CAMP_MAX_NUM}" ]; then + echo "BASE_CAMP_MAX_NUM=$BASE_CAMP_MAX_NUM" + sed -E -i "s/BaseCampMaxNum=[0-9]*/BaseCampMaxNum=$BASE_CAMP_MAX_NUM/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${BASE_CAMP_WORKER_MAXNUM}" ]; then + echo "BASE_CAMP_WORKER_MAXNUM=$BASE_CAMP_WORKER_MAXNUM" + sed -E -i "s/BaseCampWorkerMaxNum=[0-9]*/BaseCampWorkerMaxNum=$BASE_CAMP_WORKER_MAXNUM/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${DROP_ITEM_ALIVE_MAX_HOURS}" ]; then + echo "DROP_ITEM_ALIVE_MAX_HOURS=$DROP_ITEM_ALIVE_MAX_HOURS" + sed -E -i "s/DropItemAliveMaxHours=[+-]?([0-9]*[.])?[0-9]+/DropItemAliveMaxHours=$DROP_ITEM_ALIVE_MAX_HOURS/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${AUTO_RESET_GUILD_NO_ONLINE_PLAYERS}" ]; then + echo "AUTO_RESET_GUILD_NO_ONLINE_PLAYERS=$AUTO_RESET_GUILD_NO_ONLINE_PLAYERS" + sed -E -i "s/bAutoResetGuildNoOnlinePlayers=[a-zA-Z]*/bAutoResetGuildNoOnlinePlayers=$AUTO_RESET_GUILD_NO_ONLINE_PLAYERS/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${AUTO_RESET_GUILD_TIME_NO_ONLINE_PLAYERS}" ]; then + echo "AUTO_RESET_GUILD_TIME_NO_ONLINE_PLAYERS=$AUTO_RESET_GUILD_TIME_NO_ONLINE_PLAYERS" + sed -E -i "s/AutoResetGuildTimeNoOnlinePlayers=[+-]?([0-9]*[.])?[0-9]+/AutoResetGuildTimeNoOnlinePlayers=$AUTO_RESET_GUILD_TIME_NO_ONLINE_PLAYERS/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${GUILD_PLAYER_MAX_NUM}" ]; then + echo "GUILD_PLAYER_MAX_NUM=$GUILD_PLAYER_MAX_NUM" + sed -E -i "s/GuildPlayerMaxNum=[0-9]*/GuildPlayerMaxNum=$GUILD_PLAYER_MAX_NUM/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${PAL_EGG_DEFAULT_HATCHING_TIME}" ]; then + echo "PAL_EGG_DEFAULT_HATCHING_TIME=$PAL_EGG_DEFAULT_HATCHING_TIME" + sed -E -i "s/PalEggDefaultHatchingTime=[+-]?([0-9]*[.])?[0-9]+/PalEggDefaultHatchingTime=$PAL_EGG_DEFAULT_HATCHING_TIME/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${WORK_SPEED_RATE}" ]; then + echo "WORK_SPEED_RATE=$WORK_SPEED_RATE" + sed -E -i "s/WorkSpeedRate=[+-]?([0-9]*[.])?[0-9]+/WorkSpeedRate=$WORK_SPEED_RATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${IS_MULTIPLAY}" ]; then + echo "IS_MULTIPLAY=$IS_MULTIPLAY" + sed -E -i "s/bIsMultiplay=[a-zA-Z]*/bIsMultiplay=$IS_MULTIPLAY/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${IS_PVP}" ]; then + echo "IS_PVP=$IS_PVP" + sed -E -i "s/bIsPvP=[a-zA-Z]*/bIsPvP=$IS_PVP/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${CAN_PICKUP_OTHER_GUILD_DEATH_PENALTY_DROP}" ]; then + echo "CAN_PICKUP_OTHER_GUILD_DEATH_PENALTY_DROP=$CAN_PICKUP_OTHER_GUILD_DEATH_PENALTY_DROP" + sed -E -i "s/bCanPickupOtherGuildDeathPenaltyDrop=[a-zA-Z]*/bCanPickupOtherGuildDeathPenaltyDrop=$CAN_PICKUP_OTHER_GUILD_DEATH_PENALTY_DROP/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${ENABLE_NON_LOGIN_PENALTY}" ]; then + echo "ENABLE_NON_LOGIN_PENALTY=$ENABLE_NON_LOGIN_PENALTY" + sed -E -i "s/bEnableNonLoginPenalty=[a-zA-Z]*/bEnableNonLoginPenalty=$ENABLE_NON_LOGIN_PENALTY/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${ENABLE_FAST_TRAVEL}" ]; then + echo "ENABLE_FAST_TRAVEL=$ENABLE_FAST_TRAVEL" + sed -E -i "s/bEnableFastTravel=[a-zA-Z]*/bEnableFastTravel=$ENABLE_FAST_TRAVEL/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${IS_START_LOCATION_SELECT_BY_MAP}" ]; then + echo "IS_START_LOCATION_SELECT_BY_MAP=$IS_START_LOCATION_SELECT_BY_MAP" + sed -E -i "s/bIsStartLocationSelectByMap=[a-zA-Z]*/bIsStartLocationSelectByMap=$IS_START_LOCATION_SELECT_BY_MAP/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${EXIST_PLAYER_AFTER_LOGOUT}" ]; then + echo "EXIST_PLAYER_AFTER_LOGOUT=$EXIST_PLAYER_AFTER_LOGOUT" + sed -E -i "s/bExistPlayerAfterLogout=[a-zA-Z]*/bExistPlayerAfterLogout=$EXIST_PLAYER_AFTER_LOGOUT/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${ENABLE_DEFENSE_OTHER_GUILD_PLAYER}" ]; then + echo "ENABLE_DEFENSE_OTHER_GUILD_PLAYER=$ENABLE_DEFENSE_OTHER_GUILD_PLAYER" + sed -E -i "s/bEnableDefenseOtherGuildPlayer=[a-zA-Z]*/bEnableDefenseOtherGuildPlayer=$ENABLE_DEFENSE_OTHER_GUILD_PLAYER/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${COOP_PLAYER_MAX_NUM}" ]; then + echo "COOP_PLAYER_MAX_NUM=$COOP_PLAYER_MAX_NUM" + sed -E -i "s/CoopPlayerMaxNum=[0-9]*/CoopPlayerMaxNum=$COOP_PLAYER_MAX_NUM/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${REGION}" ]; then + echo "REGION=$REGION" + sed -E -i "s/Region=\"[^\"]*\"/Region=\"$REGION\"/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${USEAUTH}" ]; then + echo "USEAUTH=$USEAUTH" + sed -E -i "s/bUseAuth=[a-zA-Z]*/bUseAuth=$USEAUTH/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${BAN_LIST_URL}" ]; then + echo "BAN_LIST_URL=$BAN_LIST_URL" + sed -E -i "s~BanListURL=\"[^\"]*\"~BanListURL=\"$BAN_LIST_URL\"~" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi if [ -n "${RCON_ENABLED}" ]; then echo "RCON_ENABLED=${RCON_ENABLED}" sed -i "s/RCONEnabled=[a-zA-Z]*/RCONEnabled=$RCON_ENABLED/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini From 85dac84a39294db7203bbe054ac2ff1c7f8a6dc7 Mon Sep 17 00:00:00 2001 From: Thijs van Loef Date: Sun, 28 Jan 2024 12:23:36 +0100 Subject: [PATCH 2/8] fix typo add docs --- README.md | 98 +++++++++++++++++++++++++++++++++++++++--------- scripts/start.sh | 12 +++--- 2 files changed, 87 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 28db4ccb9..89618d2b2 100644 --- a/README.md +++ b/README.md @@ -117,25 +117,25 @@ 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 | +| 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 | +| 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 | *highly recommended to set @@ -198,6 +198,70 @@ The server will run a save before the backup if rcon is enabled. ## Editing Server Settings +### With Environment Variables + +> [!IMPORTANT] +> +> These Environment Variables/Settings are subject to change since the game is still in beta + +| Variable | Description | Default Value | Allowed Value PLAYER_STOMACH_DECREASE_RATE | +|-------------------------------------------|------------------------------------------------------------------------|----------------------------------------------------------------------------------------------|--------------------------------------------------| +| NETSERVERMAXTICKRATE | Changes the TickRate of the server, be very careful with this setting! | 120 | 30-120 | +| DIFFICULTY | Game Difficulty: | None | `None`,`Normal`,`Difficult` | +| DAYTIME_SPEEDRATE | Day time speed - Smaller number means shorter days | 1.000000 | Float | +| NIGHTTIME_SPEEDRATE | Night time speed - Smaller number means shorter nights | 1.000000 | Float | +| EXP_RATE | EXP 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 | 1.000000 | Float | +| ENEMY_DROP_ITEM_RATE | Dropped Items Multipiler | 1.000000 | Float | +| DEATH_PENALTY | What will drop when you die | 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_MAXNUM | 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 | Area | | 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 | + +### Manually When the server starts, a `PalWorldSettings.ini` file will be created in the following location: `/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini` Any changes made while the server is live will be overridden. diff --git a/scripts/start.sh b/scripts/start.sh index 26909f102..39bc8214d 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -127,13 +127,13 @@ if [ -n "${PAL_STAMINA_DECREASE_RATE}" ]; then echo "PAL_STAMINA_DECREASE_RATE=$PAL_STAMINA_DECREASE_RATE" sed -E -i "s/PalStaminaDecreaceRate=[+-]?([0-9]*[.])?[0-9]+/PalStaminaDecreaceRate=$PAL_STAMINA_DECREASE_RATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini fi -if [ -n "${PAL_AUTO_HP_REGENE_RATE}" ]; then - echo "PAL_AUTO_HP_REGENE_RATE=$PAL_AUTO_HP_REGENE_RATE" - sed -E -i "s/PalAutoHPRegeneRate=[+-]?([0-9]*[.])?[0-9]+/PalAutoHPRegeneRate=$PAL_AUTO_HP_REGENE_RATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +if [ -n "${PAL_AUTO_HP_REGEN_RATE}" ]; then + echo "PAL_AUTO_HP_REGEN_RATE=$PAL_AUTO_HP_REGEN_RATE" + sed -E -i "s/PalAutoHPRegeneRate=[+-]?([0-9]*[.])?[0-9]+/PalAutoHPRegeneRate=$PAL_AUTO_HP_REGEN_RATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini fi -if [ -n "${PAL_AUTO_HP_REGENE_RATE_IN_SLEEP}" ]; then - echo "PAL_AUTO_HP_REGENE_RATE_IN_SLEEP=$PAL_AUTO_HP_REGENE_RATE_IN_SLEEP" - sed -E -i "s/PalAutoHpRegeneRateInSleep=[+-]?([0-9]*[.])?[0-9]+/PalAutoHpRegeneRateInSleep=$PAL_AUTO_HP_REGENE_RATE_IN_SLEEP/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +if [ -n "${PAL_AUTO_HP_REGEN_RATE_IN_SLEEP}" ]; then + echo "PAL_AUTO_HP_REGEN_RATE_IN_SLEEP=$PAL_AUTO_HP_REGEN_RATE_IN_SLEEP" + sed -E -i "s/PalAutoHpRegeneRateInSleep=[+-]?([0-9]*[.])?[0-9]+/PalAutoHpRegeneRateInSleep=$PAL_AUTO_HP_REGEN_RATE_IN_SLEEP/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini fi if [ -n "${BUILD_OBJECT_DAMAGE_RATE}" ]; then echo "BUILD_OBJECT_DAMAGE_RATE=$BUILD_OBJECT_DAMAGE_RATE" From 31e22fa1603caa0ea25ce7d0b7d1e739130962db Mon Sep 17 00:00:00 2001 From: Thijs van Loef Date: Sun, 28 Jan 2024 12:24:14 +0100 Subject: [PATCH 3/8] fix linting --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 89618d2b2..6adecf318 100644 --- a/README.md +++ b/README.md @@ -262,6 +262,7 @@ The server will run a save before the backup if rcon is enabled. | BAN_LIST_URL | Which ban list to use | [https://api.palworldgame.com/api/banlist.txt](https://api.palworldgame.com/api/banlist.txt) | string | ### Manually + When the server starts, a `PalWorldSettings.ini` file will be created in the following location: `/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini` Any changes made while the server is live will be overridden. From 4e86948094a0b43c49db58ea4addd35bb96251d2 Mon Sep 17 00:00:00 2001 From: Thijs van Loef Date: Sun, 28 Jan 2024 13:00:03 +0100 Subject: [PATCH 4/8] update description --- README.md | 112 +++++++++++++++++++++++++++--------------------------- 1 file changed, 56 insertions(+), 56 deletions(-) diff --git a/README.md b/README.md index 6adecf318..708597690 100644 --- a/README.md +++ b/README.md @@ -204,62 +204,62 @@ The server will run a save before the backup if rcon is enabled. > > These Environment Variables/Settings are subject to change since the game is still in beta -| Variable | Description | Default Value | Allowed Value PLAYER_STOMACH_DECREASE_RATE | -|-------------------------------------------|------------------------------------------------------------------------|----------------------------------------------------------------------------------------------|--------------------------------------------------| -| NETSERVERMAXTICKRATE | Changes the TickRate of the server, be very careful with this setting! | 120 | 30-120 | -| DIFFICULTY | Game Difficulty: | None | `None`,`Normal`,`Difficult` | -| DAYTIME_SPEEDRATE | Day time speed - Smaller number means shorter days | 1.000000 | Float | -| NIGHTTIME_SPEEDRATE | Night time speed - Smaller number means shorter nights | 1.000000 | Float | -| EXP_RATE | EXP 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 | 1.000000 | Float | -| ENEMY_DROP_ITEM_RATE | Dropped Items Multipiler | 1.000000 | Float | -| DEATH_PENALTY | What will drop when you die | 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_MAXNUM | 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 | Area | | 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 | +| Variable | Description | Default Value | Allowed Value PLAYER_STOMACH_DECREASE_RATE | +|-------------------------------------------|----------------------------------------------------------------|----------------------------------------------------------------------------------------------|--------------------------------------------------| +| NETSERVERMAXTICKRATE | Changes the TickRate of the server. | 120 | 30-120 | +| DIFFICULTY | Game Difficulty | None | `None`,`Normal`,`Difficult` | +| DAYTIME_SPEEDRATE | Day time speed - Smaller number means shorter days | 1.000000 | Float | +| NIGHTTIME_SPEEDRATE | Night time speed - Smaller 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 | 1.000000 | Float | +| ENEMY_DROP_ITEM_RATE | Dropped Items Multipiler | 1.000000 | Float | +| DEATH_PENALTY | What will drop when you die | 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_MAXNUM | 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 | ### Manually From 7de59973a2c48080e97dd5b903c6ae27113a4a88 Mon Sep 17 00:00:00 2001 From: Thijs van Loef Date: Sun, 28 Jan 2024 13:18:47 +0100 Subject: [PATCH 5/8] remove config map & remove duplicate --- k8s/configmap.yaml | 76 ---------------------------------------------- scripts/start.sh | 4 --- 2 files changed, 80 deletions(-) diff --git a/k8s/configmap.yaml b/k8s/configmap.yaml index 6933b7e83..7c9d8549c 100644 --- a/k8s/configmap.yaml +++ b/k8s/configmap.yaml @@ -15,79 +15,3 @@ data: COMMUNITY: "false" # Enable this if you want your server to show up in the community servers tab, USE WITH SERVER_PASSWORD! SERVER_NAME: "World of Pals" SERVER_DESCRIPTION: "" ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: palworld-settings -data: - PalWorldSettings.ini: >- - [/Script/OnlineSubsystemUtils.IpNetDriver] - NetServerMaxTickRate=60 - - [/Script/Pal.PalGameWorldSettings] - - OptionSettings=( - Difficulty=None, - DayTimeSpeedRate=1.000000, - NightTimeSpeedRate=1.000000, - ExpRate=1.000000, - PalCaptureRate=1.000000, - PalSpawnNumRate=1.000000, - PalDamageRateAttack=1.000000, - PalDamageRateDefense=1.000000, - PlayerDamageRateAttack=1.000000, - PlayerDamageRateDefense=1.000000, - PlayerStomachDecreaceRate=1.000000, - PlayerStaminaDecreaceRate=1.000000, - PlayerAutoHPRegeneRate=1.000000, - PlayerAutoHpRegeneRateInSleep=1.000000, - PalStomachDecreaceRate=1.000000, - PalStaminaDecreaceRate=1.000000, - PalAutoHPRegeneRate=1.000000, - PalAutoHpRegeneRateInSleep=1.000000, - BuildObjectDamageRate=1.000000, - BuildObjectDeteriorationDamageRate=1.000000, - CollectionDropRate=1.000000, - CollectionObjectHpRate=1.000000, - CollectionObjectRespawnSpeedRate=1.000000, - EnemyDropItemRate=1.000000, - DeathPenalty=All, - bEnablePlayerToPlayerDamage=False, - bEnableFriendlyFire=False, - bEnableInvaderEnemy=True, - bActiveUNKO=False, - bEnableAimAssistPad=True, - bEnableAimAssistKeyboard=False, - DropItemMaxNum=3000, - DropItemMaxNum_UNKO=100, - BaseCampMaxNum=128, - BaseCampWorkerMaxNum=15, - DropItemAliveMaxHours=1.000000, - bAutoResetGuildNoOnlinePlayers=False, - AutoResetGuildTimeNoOnlinePlayers=72.000000, - GuildPlayerMaxNum=20, - PalEggDefaultHatchingTime=72.000000, - WorkSpeedRate=1.000000, - bIsMultiplay=False, - bIsPvP=False, - bCanPickupOtherGuildDeathPenaltyDrop=False, - bEnableNonLoginPenalty=True, - bEnableFastTravel=True, - bIsStartLocationSelectByMap=True, - bExistPlayerAfterLogout=False, - bEnableDefenseOtherGuildPlayer=False, - CoopPlayerMaxNum=4, - ServerPlayerMaxNum=32, - ServerName="Default Palworld Server", - ServerDescription="", - AdminPassword="", - ServerPassword="", - PublicPort=8211, - PublicIP="", - RCONEnabled=False, - RCONPort=25575, - Region="", - bUseAuth=True, - BanListURL="https://api.palworldgame.com/api/banlist.txt" - ) diff --git a/scripts/start.sh b/scripts/start.sh index 39bc8214d..25c98dbf6 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -143,10 +143,6 @@ if [ -n "${BUILD_OBJECT_DETERIORATION_DAMAGE_RATE}" ]; then echo "BUILD_OBJECT_DETERIORATION_DAMAGE_RATE=$BUILD_OBJECT_DETERIORATION_DAMAGE_RATE" sed -E -i "s/BuildObjectDeteriorationDamageRate=[+-]?([0-9]*[.])?[0-9]+/BuildObjectDeteriorationDamageRate=$BUILD_OBJECT_DETERIORATION_DAMAGE_RATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini fi -if [ -n "${BUILD_OBJECT_DETERIORATION_DAMAGE_RATE}" ]; then - echo "BUILD_OBJECT_DETERIORATION_DAMAGE_RATE=$BUILD_OBJECT_DETERIORATION_DAMAGE_RATE" - sed -E -i "s/PalAutoHpRegeneRateInSleep=[+-]?([0-9]*[.])?[0-9]+/PalAutoHpRegeneRateInSleep=$BUILD_OBJECT_DETERIORATION_DAMAGE_RATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini -fi if [ -n "${COLLECTION_DROP_RATE}" ]; then echo "COLLECTION_DROP_RATE=$COLLECTION_DROP_RATE" sed -E -i "s/CollectionDropRate=[+-]?([0-9]*[.])?[0-9]+/CollectionDropRate=$COLLECTION_DROP_RATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini From a0f8aef2a248b2a6cbf75515637b6e6d6c868281 Mon Sep 17 00:00:00 2001 From: Thijs van Loef Date: Sun, 28 Jan 2024 13:31:07 +0100 Subject: [PATCH 6/8] remove references of configmap --- k8s/deployment.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/k8s/deployment.yaml b/k8s/deployment.yaml index d7a1204d8..d94759fb4 100644 --- a/k8s/deployment.yaml +++ b/k8s/deployment.yaml @@ -39,13 +39,7 @@ spec: volumeMounts: - mountPath: /palworld name: datadir - - mountPath: /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini - name: palworld-settings - subPath: PalWorldSettings.ini volumes: - name: datadir persistentVolumeClaim: claimName: palworld-server-datadir - - name: palworld-settings - configMap: - name: palworld-settings From 0c265e4b583d1d35c182f67b42df619f73bc28ea Mon Sep 17 00:00:00 2001 From: Thijs van Loef Date: Sun, 28 Jan 2024 13:52:03 +0100 Subject: [PATCH 7/8] fix readme errors --- README.md | 111 +++++++++++++++++++++++++++--------------------------- 1 file changed, 55 insertions(+), 56 deletions(-) diff --git a/README.md b/README.md index 708597690..731e94a72 100644 --- a/README.md +++ b/README.md @@ -204,62 +204,61 @@ The server will run a save before the backup if rcon is enabled. > > These Environment Variables/Settings are subject to change since the game is still in beta -| Variable | Description | Default Value | Allowed Value PLAYER_STOMACH_DECREASE_RATE | -|-------------------------------------------|----------------------------------------------------------------|----------------------------------------------------------------------------------------------|--------------------------------------------------| -| NETSERVERMAXTICKRATE | Changes the TickRate of the server. | 120 | 30-120 | -| DIFFICULTY | Game Difficulty | None | `None`,`Normal`,`Difficult` | -| DAYTIME_SPEEDRATE | Day time speed - Smaller number means shorter days | 1.000000 | Float | -| NIGHTTIME_SPEEDRATE | Night time speed - Smaller 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 | 1.000000 | Float | -| ENEMY_DROP_ITEM_RATE | Dropped Items Multipiler | 1.000000 | Float | -| DEATH_PENALTY | What will drop when you die | 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_MAXNUM | 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 | +| Variable | Description | Default Value | Allowed Value | +|-------------------------------------------|----------------------------------------------------------------|----------------------------------------------------------------------------------------------|----------------------------------------| +| DIFFICULTY | Game Difficulty | None | `None`,`Normal`,`Difficult` | +| DAYTIME_SPEEDRATE | Day time speed - Smaller number means shorter days | 1.000000 | Float | +| NIGHTTIME_SPEEDRATE | Night time speed - Smaller 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 | 1.000000 | Float | +| ENEMY_DROP_ITEM_RATE | Dropped Items Multipiler | 1.000000 | Float | +| DEATH_PENALTY | What will drop when you die | 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_MAXNUM | 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 | ### Manually From 156b3a6a69e036aa069e644dac643f8fcd2d6ee0 Mon Sep 17 00:00:00 2001 From: Thijs van Loef Date: Sun, 28 Jan 2024 13:56:18 +0100 Subject: [PATCH 8/8] change some env variables to PalWorldSettings.in --- scripts/start.sh | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/scripts/start.sh b/scripts/start.sh index 25c98dbf6..e6795e209 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -6,22 +6,6 @@ if [ -n "${PORT}" ]; then STARTCOMMAND+=("-port=${PORT}") fi -if [ -n "${PLAYERS}" ]; then - STARTCOMMAND+=("-players=${PLAYERS}") -fi - -if [ "${COMMUNITY}" = true ]; then - STARTCOMMAND+=("EpicApp=PalServer") -fi - -if [ -n "${PUBLIC_IP}" ]; then - STARTCOMMAND+=("-publicip=${PUBLIC_IP}") -fi - -if [ -n "${PUBLIC_PORT}" ]; then - STARTCOMMAND+=("-publicport=${PUBLIC_PORT}") -fi - if [ -n "${SERVER_NAME}" ]; then STARTCOMMAND+=("-servername=${SERVER_NAME}") fi @@ -42,6 +26,10 @@ if [ -n "${QUERY_PORT}" ]; then STARTCOMMAND+=("-queryport=${QUERY_PORT}") fi +if [ "${COMMUNITY}" = true ]; then + STARTCOMMAND+=("EpicApp=PalServer") +fi + if [ "${MULTITHREADING}" = true ]; then STARTCOMMAND+=("-useperfthreads" "-NoAsyncLoadingThread" "-UseMultithreadForDS") fi @@ -63,6 +51,18 @@ if [ ! "$(grep -s '[^[:space:]]' /palworld/Pal/Saved/Config/LinuxServer/PalWorld cp /palworld/DefaultPalWorldSettings.ini /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini fi +if [ -n "${PLAYERS}" ]; then + echo "PLAYERS=${PLAYERS}" + sed -E -i "s/ServerPlayerMaxNum=[0-9]*/ServerPlayerMaxNum=$PLAYERS/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${PUBLIC_IP}" ]; then + echo "PUBLIC_IP=${PUBLIC_IP}" + sed -E -i "s/PublicIP=\"[^\"]*\"/PublicIP=\"$PUBLIC_IP\"/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${PUBLIC_PORT}" ]; then + echo "PUBLIC_PORT=${PUBLIC_PORT}" + sed -E -i "s/PublicPort=[0-9]*/PublicPort=$PUBLIC_PORT/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi if [ -n "${DIFFICULTY}" ]; then echo "DIFFICULTY=$DIFFICULTY" sed -E -i "s/Difficulty=[a-zA-Z]*/Difficulty=$DIFFICULTY/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini