From ace1b6d4c98c5f8c9449c31a6396cfeac9d1f950 Mon Sep 17 00:00:00 2001 From: Marco Spreckels Date: Wed, 24 Jan 2024 18:06:36 +0100 Subject: [PATCH 1/4] Renaming ports - 8211-palworld -> server, because its the game/server port - 27015-palworld -> query, because its the steam query port (https://help.steampowered.com/en/faqs/view/2EA8-4D75-DA21-31EB) Adding a configmap for PalWorldSettings as a temporary workaround until they can be set via ENV --- k8s/configmap.yaml | 11 ++++++++++- k8s/deployment.yaml | 12 +++++++++--- k8s/service.yaml | 8 ++++---- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/k8s/configmap.yaml b/k8s/configmap.yaml index 41785c3..cd305eb 100644 --- a/k8s/configmap.yaml +++ b/k8s/configmap.yaml @@ -13,4 +13,13 @@ data: COMMUNITY: "false" # Enable this if you want your server to show up in the community servers tab, USE WITH SERVER_PASSWORD! # Enable the environment variables below if you have COMMUNITY=true # SERVER_PASSWORD: "yourServerPassword" - SERVER_NAME: "Server_Name" # Note, it seems spaces are not supported, so use underlines. \ No newline at end of file + SERVER_NAME: "Server_Name" # Note, it seems spaces are not supported, so use underlines. +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: palworld-settings +data: + PalWorldSettings.ini: | + [/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") \ No newline at end of file diff --git a/k8s/deployment.yaml b/k8s/deployment.yaml index 3169897..cfca36c 100644 --- a/k8s/deployment.yaml +++ b/k8s/deployment.yaml @@ -20,10 +20,10 @@ spec: imagePullPolicy: IfNotPresent ports: - containerPort: 8211 - name: 8211-palworld + name: server protocol: UDP - containerPort: 27015 - name: 27015-palworld + name: query protocol: UDP env: - name: ADMIN_PASSWORD @@ -37,7 +37,13 @@ spec: volumeMounts: - mountPath: /palworld name: datadir + - name: palworld-settings + mountPath: /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini + subPath: PalWorldSettings.ini volumes: - name: datadir persistentVolumeClaim: - claimName: palworld-server-datadir \ No newline at end of file + claimName: palworld-server-datadir + - name: palworld-settings + configMap: + name: palworld-settings \ No newline at end of file diff --git a/k8s/service.yaml b/k8s/service.yaml index 41c8b15..1455f3b 100644 --- a/k8s/service.yaml +++ b/k8s/service.yaml @@ -6,14 +6,14 @@ metadata: name: palworld-server spec: ports: - - name: 8211-palworld + - name: server port: 8211 protocol: UDP - targetPort: 8211-palworld - - name: 27015-palworld + targetPort: server + - name: query port: 27015 protocol: UDP - targetPort: 27015-palworld + targetPort: query selector: app: palworld-server type: LoadBalancer \ No newline at end of file From ad8e47fb4e00b92c1ebf3acf2d2e13b8c63a6818 Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Wed, 24 Jan 2024 16:20:26 -0500 Subject: [PATCH 2/4] Added timezone option --- Dockerfile | 3 ++- README.md | 1 + docker-compose.yml | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 5978229..69b72e6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,7 +25,8 @@ ENV PORT= \ UPDATE_ON_BOOT=true \ RCON_ENABLED=true \ RCON_PORT=25575 \ - QUERY_PORT=27015 + QUERY_PORT=27015 \ + TZ=UTC COPY ./scripts/* /home/steam/server/ RUN chmod +x /home/steam/server/init.sh /home/steam/server/start.sh /home/steam/server/backup.sh diff --git a/README.md b/README.md index b23efda..80d7d2b 100644 --- a/README.md +++ b/README.md @@ -96,6 +96,7 @@ It is highly recommended you set the following environment values before startin | 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-31 | | PORT* | UDP port that the server will expose | 8211 | 1024-65535 | | PUID* | The uid of the user the server should run as | 1000 | !0 | diff --git a/docker-compose.yml b/docker-compose.yml index 7dc7136..2800f57 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,6 +14,7 @@ services: - MULTITHREADING=true - RCON_ENABLED=true - RCON_PORT=25575 + - TZ=UTC - ADMIN_PASSWORD="adminPasswordHere" - COMMUNITY=false # Enable this if you want your server to show up in the community servers tab, USE WITH SERVER_PASSWORD! # Enable the environment variables below if you have COMMUNITY=true From 75a747a641d1268df63c50a5951956c3fd9fc015 Mon Sep 17 00:00:00 2001 From: Thijs van Loef <58031337+thijsvanloef@users.noreply.github.com> Date: Thu, 25 Jan 2024 09:02:20 +0100 Subject: [PATCH 3/4] Add TZ to examples in readme --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 80d7d2b..011f554 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,7 @@ services: - MULTITHREADING=true - RCON_ENABLED=true - RCON_PORT=25575 + - TZ=UTC - ADMIN_PASSWORD="adminPasswordHere" - COMMUNITY=false # Enable this if you want your server to show up in the community servers tab, USE WITH SERVER_PASSWORD! # Enable the environment variables below if you have COMMUNITY=true @@ -71,6 +72,7 @@ docker run -d \ -e MULTITHREADING=true \ -e RCON_ENABLED=true \ -e RCON_PORT=25575 \ + -e TZ=UTC \ -e ADMIN_PASSWORD="adminPasswordHere" \ -e COMMUNITY=false \ --restart unless-stopped \ From 3735ac0e8240c4e13709b390238397cf5be1db0b Mon Sep 17 00:00:00 2001 From: Marco Spreckels Date: Thu, 25 Jan 2024 09:36:36 +0100 Subject: [PATCH 4/4] settings formatting --- k8s/configmap.yaml | 68 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 66 insertions(+), 2 deletions(-) diff --git a/k8s/configmap.yaml b/k8s/configmap.yaml index cd305eb..266b340 100644 --- a/k8s/configmap.yaml +++ b/k8s/configmap.yaml @@ -20,6 +20,70 @@ kind: ConfigMap metadata: name: palworld-settings data: - PalWorldSettings.ini: | + PalWorldSettings.ini: >- [/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") \ No newline at end of file + + 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" + ) \ No newline at end of file