From aa55582ee7674ae7e298e9e206c9fb5793d93acc Mon Sep 17 00:00:00 2001 From: diaoyiran Date: Tue, 13 Aug 2024 14:36:44 +0800 Subject: [PATCH 1/2] feat: Add ENV Support for server config setting SupplyDropSpan --- Dockerfile | 3 ++- configs/PalWorldSettings.ini.template | 2 +- default.env | 1 + docs/ENV_VARS.md | 1 + includes/config.sh | 4 ++++ 5 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 363aff0..3d0dace 100644 --- a/Dockerfile +++ b/Dockerfile @@ -178,7 +178,8 @@ ENV DEBIAN_FRONTEND=noninteractive \ SHOW_PLAYER_LIST=false \ ALLOW_CONNECT_PLATFORM=Steam \ ENABLE_WORLD_BACKUP=false \ - LOG_FORMAT_TYPE=Text + LOG_FORMAT_TYPE=Text \ + SUPPLY_DROP_SPAN=180 EXPOSE 8211/udp EXPOSE 25575/tcp diff --git a/configs/PalWorldSettings.ini.template b/configs/PalWorldSettings.ini.template index efb9b7f..f9c926c 100644 --- a/configs/PalWorldSettings.ini.template +++ b/configs/PalWorldSettings.ini.template @@ -1,2 +1,2 @@ [/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,BaseCampMaxNumInGuild=4,PalEggDefaultHatchingTime=72.000000,WorkSpeedRate=1.000000,AutoSaveSpan=30.000000,bIsMultiplay=False,bIsPvP=False,bCanPickupOtherGuildDeathPenaltyDrop=False,bEnableNonLoginPenalty=True,bEnableFastTravel=True,bIsStartLocationSelectByMap=True,bExistPlayerAfterLogout=False,bEnableDefenseOtherGuildPlayer=False,bInvisibleOtherGuildBaseCampAreaFX=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",RESTAPIEnabled=False,RESTAPIPort=8212,bShowPlayerList=False,AllowConnectPlatform=Steam,bIsUseBackupSaveData=True,LogFormatType=Text) \ 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,BaseCampMaxNumInGuild=4,PalEggDefaultHatchingTime=72.000000,WorkSpeedRate=1.000000,AutoSaveSpan=30.000000,bIsMultiplay=False,bIsPvP=False,bCanPickupOtherGuildDeathPenaltyDrop=False,bEnableNonLoginPenalty=True,bEnableFastTravel=True,bIsStartLocationSelectByMap=True,bExistPlayerAfterLogout=False,bEnableDefenseOtherGuildPlayer=False,bInvisibleOtherGuildBaseCampAreaFX=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",RESTAPIEnabled=False,RESTAPIPort=8212,bShowPlayerList=False,AllowConnectPlatform=Steam,bIsUseBackupSaveData=True,LogFormatType=Text,SupplyDropSpan=180) \ No newline at end of file diff --git a/default.env b/default.env index 80f010f..830ac81 100644 --- a/default.env +++ b/default.env @@ -121,3 +121,4 @@ SHOW_PLAYER_LIST=false ALLOW_CONNECT_PLATFORM=Steam ENABLE_WORLD_BACKUP=false LOG_FORMAT_TYPE=Text +SUPPLY_DROP_SPAN=180 diff --git a/docs/ENV_VARS.md b/docs/ENV_VARS.md index 8be91f1..292861b 100644 --- a/docs/ENV_VARS.md +++ b/docs/ENV_VARS.md @@ -150,6 +150,7 @@ Information sources and credits to the following websites: | ALLOW_CONNECT_PLATFORM | AllowConnectPlatform | Looks like Cross-Play, but according to official documentation, isnt working yet and no more infos given on this; See: https://tech.palworldgame.com/settings-and-operation/configuration | Steam | String | | ENABLE_WORLD_BACKUP | bIsUseBackupSaveData | Enables internal world backup inside the game-server; off by default, because we have our own backup solution | false | Boolean | | LOG_FORMAT_TYPE | LogFormatType | Log format Text or Json | Text | Enum | +| SUPPLY_DROP_SPAN | SupplyDropSpan | Interval for supply drop (and meteorite drop) (minutes) | 180 | Integer | ** Updates to descriptions taken from [this reddit post](https://www.reddit.com/r/Palworld/comments/19bumby/settings_explanation/) ** diff --git a/includes/config.sh b/includes/config.sh index 86f2788..5ea7f37 100644 --- a/includes/config.sh +++ b/includes/config.sh @@ -332,6 +332,10 @@ function setup_palworld_settings_ini() { e "> Setting LogFormatType to '$LOG_FORMAT_TYPE'" sed -E -i "s/LogFormatType=[a-zA-Z]*/LogFormatType=$LOG_FORMAT_TYPE/" "$GAME_SETTINGS_FILE" fi + if [[ -n ${SUPPLY_DROP_SPAN+x} ]]; then + e "> Setting SupplyDropSpan to '$SUPPLY_DROP_SPAN'" + sed -E -i "s/SupplyDropSpan=[0-9]*/SupplyDropSpan=$SUPPLY_DROP_SPAN/" "$GAME_SETTINGS_FILE" + fi es ">>> Finished setting up PalWorldSettings.ini" } From fd7f2e4cc7c5c0383c9e095b891d9c1ebacddaed Mon Sep 17 00:00:00 2001 From: diaoyiran Date: Thu, 15 Aug 2024 09:49:17 +0800 Subject: [PATCH 2/2] fix: add missing changelog entry --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 566bab4..134df3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog [Back to main](README.md#changelog) +## 2024-08-15 + +- added support for variable SUPPLY_DROP_SPAN @KyleDiao (#279) + ## 2024-08-12 - added support to turn off backup-announcements, to have less spammy chat ingame, but errors will always be announced @Jadiction @jammsen (#272)