jammsen / docker-palworld-dedicated-server

Docker container to easily provision and manage Palworld Dedicated Server
https://hub.docker.com/r/jammsen/palworld-dedicated-server
MIT License
907 stars 157 forks source link

[Bug Report] PAL_AUTO_HP_REGENE_RATE_IN_SLEEP replaced by other var #116

Closed TsunaLamperouge closed 7 months ago

TsunaLamperouge commented 7 months ago

Have you read the Important information text above

Current behavior

In the script theres an extra SED command to replace PAL_AUTO_HP_REGENE_RATE_IN_SLEEP with the BUILD_OBJECT_DETERIORATION_DAMAGE_RATE value.

Desired behavior

PAL_AUTO_HP_REGENE_RATE_IN_SLEEP only being replaced by its own environment var.

Links to screenshots

No response

To Reproduce

Line 152 of servermanager.sh

if [[ ! -z ${BUILD_OBJECT_DETERIORATION_DAMAGE_RATE+x} ]]; then echo "> Setting PalAutoHpRegeneRateInSleep to $BUILD_OBJECT_DETERIORATION_DAMAGE_RATE" sed -E -i "s/PalAutoHpRegeneRateInSleep=[+-]?([0-9]*[.])?[0-9]+/PalAutoHpRegeneRateInSleep=$BUILD_OBJECT_DETERIORATION_DAMAGE_RATE/" ${GAME_PATH}/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini fi

Software setup

Hardware setup

Additional context

No response

tipanic commented 7 months ago

Thank your for pointing this out, thought something was off but couldn't figure it out. I just checked my PalWorldSettings.ini BUILD_OBJECT_DETERIORATION_DAMAGE_RATE is set "0" but PAL_AUTO_HP_REGENE_RATE_IN_SLEEP also.

tipanic commented 7 months ago

I changed the values to the following in the servermanager.sh on my environment, started the container, and its now working as it should.

if [[ ! -z ${PAL_AUTO_HP_REGENE_RATE_IN_SLEEP+x} ]]; then
    echo "Setting PalAutoHpRegeneRateInSleep to $PAL_AUTO_HP_REGENE_RATE_IN_SLEEP"
    sed -E -i "s/PalAutoHpRegeneRateInSleep=[+-]?([0-9]*[.])?[0-9]+/PalAutoHpRegeneRateInSleep=$PAL_AUTO_HP_REGENE_RATE_IN_SLEEP/" ${GAME_PATH}/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini 
fi
jammsen commented 7 months ago

Hey @TsunaLamperouge you are right, thanks for reporting it, sorry about that, we had some massive merges and updates of the code. Im to blame for that. #137 fixed that.