thijsvanloef / palworld-server-docker

A Docker Container to easily run a Palworld dedicated server.
https://hub.docker.com/r/thijsvanloef/palworld-server-docker
MIT License
2.43k stars 295 forks source link

Problems with modifying egg hatching time env #446

Closed clyde0813 closed 8 months ago

clyde0813 commented 8 months ago

There is an issue with modifying PAL_EGG_DEFAULT_HATCHING_TIME. When attempting to set the default value from 72 hours to 0 hours, there is a problem where any value equal to or less than 1 is forced to be set as 1. I wonder if it is forcibly set to 1 because it cannot be set to less than 1 hour.

Even when setting PAL_EGG_DEFAULT_HATCHING_TIME to 0 in the Docker environment, it remains set to 1 in PalGameWorldSettings.

Is there no other way but to modify and apply it within the Docker container?

Diyagi commented 8 months ago

I have mine set to 0 and its working, can you share your docker compose ?

clyde0813 commented 8 months ago

Here's my compose.yaml. Did I write something wrong?

services:
  palworld:
    image: thijsvanloef/palworld-server-docker:latest
    restart: unless-stopped
    container_name: palworld-server
    stop_grace_period: 30s
    ports:
      - 8211:8211/udp
      - 27015:27015/udp
    environment:
      PUID: 1000
      PGID: 1000
      PORT: 8211 
      PLAYERS: 8
      SERVER_PASSWORD: ****
      MULTITHREADING: true
      RCON_ENABLED: true
      RCON_PORT: 25575
      TZ: UTC
      ADMIN_PASSWORD: ****
      COMMUNITY: false
      SERVER_NAME: ****
      SERVER_DESCRIPTION: ****
      PAL_EGG_DEFAULT_HATCHING_TIME: 0
    volumes:
      - ./palworld:/palworld/
networks: {}
Diyagi commented 8 months ago

Seems fine, are you using WorldOption.sav ?

clyde0813 commented 8 months ago

No, I'm not using it.

Diyagi commented 8 months ago

I dont know why this is happening tbh, you can try to set DISABLE_GENERATE_SETTINGS to true and manually change PalWorldSettings.ini file

thijsvanloef commented 8 months ago

If your issue still persists after updating to 0.29.1 please reopen this issue

clyde0813 commented 8 months ago

It looks like the cause has been found. When performing a backup using the Docker command "docker exec palworld-server backup" and checking the files, it seems that the values modified via docker env are not reflected in the PalWorldSettings.ini file within the Config. Instead, the file contains the initial settings values, and if modifications were made after initial setting, it seems that the updated docker env values are not being applied later. When restoring, the initial values are loaded, so the values applied in the docker env seem to be ignored.

@thijsvanloef @Diyagi