From 5428c326f348d96b65e272c619855be1ef69d8cd Mon Sep 17 00:00:00 2001 From: michaelell Date: Fri, 26 Jan 2024 13:02:36 -0500 Subject: [PATCH 01/36] modify deployment and chart for opionated deployment --- chart/templates/deployments.yaml | 2 ++ chart/values.yaml | 2 ++ k8s/deployment.yaml | 2 ++ 3 files changed, 6 insertions(+) diff --git a/chart/templates/deployments.yaml b/chart/templates/deployments.yaml index 73e9789..5c55893 100644 --- a/chart/templates/deployments.yaml +++ b/chart/templates/deployments.yaml @@ -9,6 +9,8 @@ spec: matchLabels: app.kubernetes.io/component: "{{ .Release.Name }}-server" template: + strategy: + type: "{{ .Values.server.strategy }}" metadata: annotations: {{- with .Values.server.annotations }} diff --git a/chart/values.yaml b/chart/values.yaml index 3c53bf2..4fa0f67 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -56,6 +56,8 @@ server: - name: rcon containerPort: 25575 protocol: UDP + # -- (string) Change the deployment strategy + strategy: Recreate # -- (dict) Change the service configuration. # If you change those, make sure to change the server.config and server.ports accordingly. diff --git a/k8s/deployment.yaml b/k8s/deployment.yaml index cfca36c..9d56e3a 100644 --- a/k8s/deployment.yaml +++ b/k8s/deployment.yaml @@ -6,6 +6,8 @@ metadata: name: palworld-server spec: replicas: 1 + strategy: + type: Recreate selector: matchLabels: app: palworld-server From 5c74ac289b53158416b466562d3e746cdefa4c4b Mon Sep 17 00:00:00 2001 From: Kyle Hemsley <9289079+hemsleyk@users.noreply.github.com> Date: Fri, 26 Jan 2024 14:12:37 -0500 Subject: [PATCH 02/36] Update deployment.yaml --- k8s/deployment.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/k8s/deployment.yaml b/k8s/deployment.yaml index cfca36c..2bdf8b7 100644 --- a/k8s/deployment.yaml +++ b/k8s/deployment.yaml @@ -37,8 +37,8 @@ spec: volumeMounts: - mountPath: /palworld name: datadir - - name: palworld-settings - mountPath: /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini + - mountPath: /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini + name: palworld-settings subPath: PalWorldSettings.ini volumes: - name: datadir @@ -46,4 +46,4 @@ spec: claimName: palworld-server-datadir - name: palworld-settings configMap: - name: palworld-settings \ No newline at end of file + name: palworld-settings From 537812c2b39243c289d6e721fcc6347cc77cc9d5 Mon Sep 17 00:00:00 2001 From: Kyle Hemsley <9289079+hemsleyk@users.noreply.github.com> Date: Fri, 26 Jan 2024 14:13:18 -0500 Subject: [PATCH 03/36] Implement tickrate in configmap --- k8s/configmap.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/k8s/configmap.yaml b/k8s/configmap.yaml index be8d7aa..f82b899 100644 --- a/k8s/configmap.yaml +++ b/k8s/configmap.yaml @@ -21,6 +21,9 @@ metadata: name: palworld-settings data: PalWorldSettings.ini: >- + [/Script/OnlineSubsystemUtils.IpNetDriver] + NetServerMaxTickRate=60 + [/Script/Pal.PalGameWorldSettings] OptionSettings=( @@ -86,4 +89,4 @@ data: Region="", bUseAuth=True, BanListURL="https://api.palworldgame.com/api/banlist.txt" - ) \ No newline at end of file + ) From 18e558fb00f3405abc238dbc242588e778866c59 Mon Sep 17 00:00:00 2001 From: Mercwri Date: Fri, 26 Jan 2024 22:18:42 -0500 Subject: [PATCH 04/36] fix strategy placement in chart --- chart/templates/deployments.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chart/templates/deployments.yaml b/chart/templates/deployments.yaml index 5c55893..ade424a 100644 --- a/chart/templates/deployments.yaml +++ b/chart/templates/deployments.yaml @@ -8,9 +8,9 @@ spec: selector: matchLabels: app.kubernetes.io/component: "{{ .Release.Name }}-server" + strategy: + type: "{{ .Values.server.strategy }}" template: - strategy: - type: "{{ .Values.server.strategy }}" metadata: annotations: {{- with .Values.server.annotations }} From 8ac3ba44845212ad7002d248b8673d31e1ac81c8 Mon Sep 17 00:00:00 2001 From: JohnsonRan Date: Sat, 27 Jan 2024 19:38:44 +0800 Subject: [PATCH 05/36] docs: Add Simplified Chinese translation of README.md --- README.md | 2 +- docs/zh-CN/README.md | 213 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 214 insertions(+), 1 deletion(-) create mode 100644 docs/zh-CN/README.md diff --git a/README.md b/README.md index 0a978fa..983e33d 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ [Chat with the community on Discord](https://discord.gg/UxBxStPAAE) -[English](/README.md) | [한국어](/docs/kr/README.md) +[English](/README.md) | [한국어](/docs/kr/README.md) | [简体中文](/docs/zh-CN/README.md) > [!TIP] > Unsure how to get started? Check out the [this guide I wrote!](https://tice.tips/containerization/palworld-server-docker/) diff --git a/docs/zh-CN/README.md b/docs/zh-CN/README.md new file mode 100644 index 0000000..b050a02 --- /dev/null +++ b/docs/zh-CN/README.md @@ -0,0 +1,213 @@ +# Palworld Dedicated Server Docker + +[![Release](https://img.shields.io/github/v/release/thijsvanloef/palworld-server-docker)](https://github.com/thijsvanloef/palworld-server-docker/releases) +[![Docker Pulls](https://img.shields.io/docker/pulls/thijsvanloef/palworld-server-docker)](https://hub.docker.com/r/thijsvanloef/palworld-server-docker) +[![Docker Stars](https://img.shields.io/docker/stars/thijsvanloef/palworld-server-docker)](https://hub.docker.com/r/thijsvanloef/palworld-server-docker) +[![Image Size](https://img.shields.io/docker/image-size/thijsvanloef/palworld-server-docker/latest)](https://hub.docker.com/r/thijsvanloef/palworld-server-docker/tags) +[![Discord](https://img.shields.io/discord/1200397673329594459?logo=discord&label=Discord&link=https%3A%2F%2Fdiscord.gg%2FUxBxStPAAE)](https://discord.com/invite/UxBxStPAAE) +[![Static Badge](https://img.shields.io/badge/README-0.16.0-blue?link=https%3A%2F%2Fgithub.com%2Fthijsvanloef%2Fpalworld-server-docker%2Fblob%2Fmain%2FREADME.md)](https://github.com/thijsvanloef/palworld-server-docker?tab=readme-ov-file#palworld-dedicated-server-docker) + +在 [Docker Hub](https://hub.docker.com/r/thijsvanloef/palworld-server-docker) 查看 + +加入我们的 [Discord](https://discord.gg/UxBxStPAAE) + +[English](/README.md) | [한국어](/docs/kr/README.md) | [简体中文](/docs/zh-CN/README.md) + +> [!提示] +> 不知道从何开始? [看看这里吧!](https://tice.tips/containerization/palworld-server-docker/) + +这是一个 [Docker](https://docs.docker.com/engine/install/) 容器,可帮助您创建自己的 +[幻兽帕鲁](https://store.steampowered.com/app/1623730/Palworld/) 服务器 + +此容器经测试可正常在 (Ubuntu/Debian) 和 Windows 10 上运行 + +> [!注意] +> 目前, Xbox Game Pass/Xbox 主机玩家无法加入服务器 +> +> 他们只能通过邀请码加入,并且最多允许4人游玩 + +## 服务器配置需求 + +| 资源 | 最小 | 推荐 | +|----------|---------|------------------------------------------| +| CPU | 4 核 | 4+ 核以上 | +| 内存 | 16GB | 推荐 32GB 以上以稳定运行 | +| 存储空间 | 4GB | 12GB | + +## 开始使用 + +注意,您需要配置 [环境变量](#环境变量). + +### Docker Compose + +您可以直接使用 [docker-compose.yml](/docker-compose.yml) 来配置您的服务器 + +```yml +services: + palworld: + image: thijsvanloef/palworld-server-docker:latest + restart: unless-stopped + container_name: palworld-server + ports: + - 8211:8211/udp + - 27015:27015/udp + environment: + - PUID=1000 + - PGID=1000 + - PORT=8211 # 可选但推荐 + - PLAYERS=16 # 可选但推荐 + - SERVER_PASSWORD="worldofpals" # 可选但推荐 + - MULTITHREADING=true + - RCON_ENABLED=true + - RCON_PORT=25575 + - TZ=Asia/Shanghai + - ADMIN_PASSWORD="adminPasswordHere" + - COMMUNITY=false # 如果您希望服务器显示在社区服务器页中,请启用此选项(注意配置SERVER_PASSWORD!) + - SERVER_NAME="World of Pals" + volumes: + - ./palworld:/palworld/ +``` + +### Docker Run + +将``修改为您自己的路径 + +```bash +docker run -d \ + --name palworld-server \ + -p 8211:8211/udp \ + -p 27015:27015/udp \ + -v ./:/palworld/ \ + -e PUID=1000 \ + -e PGID=1000 \ + -e PORT=8211 \ + -e PLAYERS=16 \ + -e MULTITHREADING=true \ + -e RCON_ENABLED=true \ + -e RCON_PORT=25575 \ + -e TZ=Asia/Shanghai \ + -e ADMIN_PASSWORD="adminPasswordHere" \ + -e SERVER_PASSWORD="worldofpals" \ + -e COMMUNITY=false \ + -e SERVER_NAME="World of Pals" \ + --restart unless-stopped \ + thijsvanloef/palworld-server-docker:latest + +``` + +### Kubernetes + +将此容器部署到 Kubernetes 的所有文件都位于[此文件夹中](k8s/). + +请按照 [此处](k8s/readme.md) 进行部署 + +#### 使用 helm 部署 + +请按照 [此处](./chart/README.md) 进行部署 + +### 环境变量 + +您可以使用以下值来修改服务器设置 +强烈建议您在启动服务器之前设置以下变量: + + +* PLAYERS +* PORT +* PUID +* PGID + +| 变量 | 信息 | 默认值 | 允许值 | +|------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------|------------------------------------------------------------------------------------------------------------| +| TZ | 备份服务器时所使用的时间戳 | UTC | 参见 [时区列表](https://zh.wikipedia.org/wiki/%E6%97%B6%E5%8C%BA%E5%88%97%E8%A1%A8) | +| PLAYERS* | 可同加入服务器的最大玩家数 | 16 | 1-32 | +| PORT* | 服务器将开放的 UDP 端口 | 8211 | 1024-65535 | +| PUID* | 服务器运行时的用户的 UID | 1000 | !0 | +| PGID* | 服务器运行时的组的 GID | 1000 | !0 | +| MULTITHREADING** | 提高多线程 CPU 环境下的性能。它最多对 4 个线程有效,分配超过这个数量的线程没有太大意义 | false | true/false | +| COMMUNITY | 服务器是否显示在社区服务器页中(建议设置SERVER_PASSWORD) | false | true/false | +| PUBLIC_IP | 您可以手动指定服务器 IP 地址。若未指定,将自动检测 | | x.x.x.x | +| PUBLIC_PORT | 您可以手动指定服务器端口。若未指定,将自动检测 | | 1024-65535 | +| SERVER_NAME | 服务器名称 | | "string" | +| SERVER_PASSWORD | 为服务器设置密码 | | "string" | +| ADMIN_PASSWORD | 为服务器设置管理员密码 | | "string" | +| UPDATE_ON_BOOT** | 在启动 Docker 容器时更新/安装服务器(需要在第一次运行时启用) | true | true/false | +| RCON_ENABLED*** | 为服务器启用 RCON | true | true/false | +| RCON_PORT | RCON 连接端口 | 25575 | 1024-65535 | +| QUERY_PORT | 用于与 Steam 服务器通信的查询端口 | 27015 | 1024-65535 | + +*强烈建议设置 + +** 启用该选项时,请确保您知道自己在做什么 + +*** 是使用docker命令保存并关闭服务器的必要条件 + +> [!重要] +> 环境变量中使用的布尔值区分大小写,因为它们是在 shell 脚本中使用的 +> +> 必须准确使用 `true` 或 `false` 设置它们,选项才能生效 + +### Game Ports + +| 端口 | 信息 | +|-------|------------------| +| 8211 | 游戏端口 (UDP) | +| 27015 | 查询端口 (UDP) | +| 25575 | RCON 端口 (TCP) | + +## 使用 RCON + +RCON 已在此项目中默认开启 +使用 RCON CLI 非常简单: + +```bash +docker exec -it palworld-server rcon-cli +``` + +这将打开一个 CLI,使用 RCON 使用服务器命令 + +### 命令列表 + +| 命令 | 信息 | +|----------------------------------|-----------------------------------------------------| +| Shutdown {秒} {信息} | 服务器将在{秒}后关闭 | +| DoExit | 强制关闭服务器 | +| Broadcast | 向服务器中所有玩家发送消息 | +| KickPlayer {SteamID} | 从服务器中踢出玩家 | +| BanPlayer {SteamID} | 从服务器中封禁玩家 | +| TeleportToPlayer {SteamID} | 传送到目标玩家 | +| TeleportToMe {SteamID} | 将目标玩家传送到身边 | +| ShowPlayers | 显示所有已连接玩家信息 | +| Info | 显示服务器信息 | +| Save | 保存游戏 | + +请查看 [官方文档](https://tech.palworldgame.com/server-commands) 以获取所有命令 + +## 创建备份 + +To create a backup of the game's save at the current point in time, use the command: + +```bash +docker exec palworld-server backup +``` + +执行后将在 `/palworld/backups/` 文件夹中生成备份 + +若启用了 RCON,服务器将在备份前进行保存 + +## 修改服务器设置 + +服务器启动时, `PalWorldSettings.ini` 文件将在 `/Pal/Saved/Config/LinuxServer` 文件夹中生成 + +所有更改将在服务器下次启动时生效 + +请注意,环境变量将始终覆盖对 `PalWorldSettings.ini` 所做的更改 + +有关服务器设置的更详细解释列表,请在 [shockbyte](https://shockbyte.com/billing/knowledgebase/1189/How-to-Configure-your-Palworld-server.html) 中查看 + +## 报告问题/功能请求 + +可通过 [此链接](https://github.com/thijsvanloef/palworld-server-docker/issues/new/choose) 报告问题/功能请求 + +### 已知问题 + +已知问题已在 [Wiki](https://github.com/thijsvanloef/palworld-server-docker/wiki/Known-Issues) 中列出 From be4d7f052135b02e1e4e8ab5a1ca88f89c4bf266 Mon Sep 17 00:00:00 2001 From: Thijs van Loef Date: Sat, 27 Jan 2024 13:07:35 +0100 Subject: [PATCH 06/36] fix linting errors --- docs/zh-CN/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/zh-CN/README.md b/docs/zh-CN/README.md index b050a02..eaf6cf3 100644 --- a/docs/zh-CN/README.md +++ b/docs/zh-CN/README.md @@ -110,7 +110,6 @@ docker run -d \ 您可以使用以下值来修改服务器设置 强烈建议您在启动服务器之前设置以下变量: - * PLAYERS * PORT * PUID @@ -202,7 +201,8 @@ docker exec palworld-server backup 请注意,环境变量将始终覆盖对 `PalWorldSettings.ini` 所做的更改 -有关服务器设置的更详细解释列表,请在 [shockbyte](https://shockbyte.com/billing/knowledgebase/1189/How-to-Configure-your-Palworld-server.html) 中查看 +有关服务器设置的更详细解释列表,请在 +[shockbyte](https://shockbyte.com/billing/knowledgebase/1189/How-to-Configure-your-Palworld-server.html) 中查看 ## 报告问题/功能请求 From eba551f0fc59af500f4979e7c07d2fb946d99d1e Mon Sep 17 00:00:00 2001 From: JohnsonRan Date: Sat, 27 Jan 2024 20:18:41 +0800 Subject: [PATCH 07/36] docs: small translation fix --- docs/zh-CN/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/zh-CN/README.md b/docs/zh-CN/README.md index eaf6cf3..b086d3f 100644 --- a/docs/zh-CN/README.md +++ b/docs/zh-CN/README.md @@ -13,7 +13,7 @@ [English](/README.md) | [한국어](/docs/kr/README.md) | [简体中文](/docs/zh-CN/README.md) -> [!提示] +> [!TIP] > 不知道从何开始? [看看这里吧!](https://tice.tips/containerization/palworld-server-docker/) 这是一个 [Docker](https://docs.docker.com/engine/install/) 容器,可帮助您创建自己的 @@ -21,7 +21,7 @@ 此容器经测试可正常在 (Ubuntu/Debian) 和 Windows 10 上运行 -> [!注意] +> [!IMPORTANT] > 目前, Xbox Game Pass/Xbox 主机玩家无法加入服务器 > > 他们只能通过邀请码加入,并且最多允许4人游玩 @@ -140,7 +140,7 @@ docker run -d \ *** 是使用docker命令保存并关闭服务器的必要条件 -> [!重要] +> [!IMPORTANT] > 环境变量中使用的布尔值区分大小写,因为它们是在 shell 脚本中使用的 > > 必须准确使用 `true` 或 `false` 设置它们,选项才能生效 @@ -201,7 +201,7 @@ docker exec palworld-server backup 请注意,环境变量将始终覆盖对 `PalWorldSettings.ini` 所做的更改 -有关服务器设置的更详细解释列表,请在 +服务器配置文件参数相关说明,请在 [shockbyte](https://shockbyte.com/billing/knowledgebase/1189/How-to-Configure-your-Palworld-server.html) 中查看 ## 报告问题/功能请求 From 6223b4456ae38b1712e8a91a132394524fcbb5f2 Mon Sep 17 00:00:00 2001 From: JohnsonRan Date: Sat, 27 Jan 2024 20:28:44 +0800 Subject: [PATCH 08/36] fix linting errors --- docs/zh-CN/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/zh-CN/README.md b/docs/zh-CN/README.md index b086d3f..814dd2e 100644 --- a/docs/zh-CN/README.md +++ b/docs/zh-CN/README.md @@ -201,7 +201,7 @@ docker exec palworld-server backup 请注意,环境变量将始终覆盖对 `PalWorldSettings.ini` 所做的更改 -服务器配置文件参数相关说明,请在 +服务器配置文件参数相关说明,请在 [shockbyte](https://shockbyte.com/billing/knowledgebase/1189/How-to-Configure-your-Palworld-server.html) 中查看 ## 报告问题/功能请求 From efe31679e08774a3ec941189a54c132cb71506ea Mon Sep 17 00:00:00 2001 From: Filipe Souza Date: Sat, 27 Jan 2024 13:18:25 -0300 Subject: [PATCH 09/36] - Modified the chart, now the healthz container/service port is optional; --- chart/Chart.yaml | 2 +- chart/VALUES_SUMMARY.md | 10 ++++------ chart/templates/deployments.yaml | 2 ++ chart/templates/services.yaml | 6 ++++++ chart/values.yaml | 14 ++++++++------ 5 files changed, 21 insertions(+), 13 deletions(-) diff --git a/chart/Chart.yaml b/chart/Chart.yaml index 1f65797..da1408a 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: palworld -version: 0.0.0 +version: 0.0.1 description: This chart can provide an rAthena emulator installation on a Kubernetes cluster. type: application keywords: diff --git a/chart/VALUES_SUMMARY.md b/chart/VALUES_SUMMARY.md index d95dab2..e2b7aef 100644 --- a/chart/VALUES_SUMMARY.md +++ b/chart/VALUES_SUMMARY.md @@ -1,8 +1,6 @@ # palworld -![Version: 0.0.0](https://img.shields.io/badge/Version-0.0.0-informational?style=flat-square) -![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) -![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) +![Version: 0.0.0](https://img.shields.io/badge/Version-0.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) This chart can provide an rAthena emulator installation on a Kubernetes cluster. @@ -50,18 +48,18 @@ This chart can provide an rAthena emulator installation on a Kubernetes cluster. | server.service | dict | | Change the service configuration. If you change those, make sure to change the server.config and server.ports accordingly. | | server.service.annotations | object | `{}` | Additional annotations to the resources | | server.service.enabled | bool | `true` | Enables the creation of the service component. | +| server.service.healthz | dict | `{"enabled":false,"name":"healthz","port":80,"protocol":"TCP","targetPort":80}` | The "healthz" definition . Use if you need to create a TCP health check for load balancers on cloud services. | | server.service.labels | object | `{}` | Additional labels to the resources | | server.service.ports | dict | | Change the ports to be mapped to the service. If you change those, make sure to change the server.config and server.ports accordingly. | | server.service.ports[0] | dict | `{"name":"game","port":8211,"protocol":"UDP","targetPort":8211}` | The "game" port definition. If you change this, make sure to change the server.ports.game and server.config.port accordingly. | | server.service.ports[1] | dict | `{"name":"query","port":27015,"protocol":"UDP","targetPort":27015}` | The "query" port definition . If you change this, make sure to change the server.ports.query and server.config.query_port accordingly. | | server.service.ports[2] | dict | `{"name":"rcon","port":25575,"protocol":"UDP","targetPort":25575}` | The "rcon" port definition . If you change this, make sure to change the server.ports.rcon and server.config.rcon.port accordingly. | -| server.service.ports[3] | dict | `{"name":"healthz","port":80,"protocol":"TCP","targetPort":80}` | The "healthz" port definition . Used only to create a health check for load balancers on cloud services. | | server.service.type | string | `"LoadBalancer"` | The type of service to be created. | -| server.storage | dict | `{"external":false,"externalName":"","preventDelete":false,"size":"10Gi","storageClassName":""}` | Define some parameters for the storage volume | +| server.storage | dict | `{"external":false,"externalName":"","preventDelete":false,"size":"12Gi","storageClassName":""}` | Define some parameters for the storage volume | | server.storage.external | bool | `false` | Define if it will use an existing PVC containing the installation data. | | server.storage.externalName | bool | `""` | The external PVC name to use. | | server.storage.preventDelete | bool | `false` | Keeps helm from deleting the PVC. By default, helm does not delete pvcs. | -| server.storage.size | string | `"10Gi"` | The size of the pvc storage. | +| server.storage.size | string | `"12Gi"` | The size of the pvc storage. | | server.storage.storageClassName | string | `""` | The storage class name. | ---------------------------------------------- diff --git a/chart/templates/deployments.yaml b/chart/templates/deployments.yaml index 73e9789..d322296 100644 --- a/chart/templates/deployments.yaml +++ b/chart/templates/deployments.yaml @@ -26,6 +26,7 @@ spec: {{- end }} spec: containers: + {{ if .Values.server.service.healthz.enabled }} - name: healthz image: "chussenot/tiny-server:latest" imagePullPolicy: {{ .Values.server.image.imagePullPolicy }} @@ -33,6 +34,7 @@ spec: - name: healthz containerPort: 80 protocol: TCP + {{ end }} - name: server image: "{{ .Values.server.image.name }}:{{ .Values.server.image.tag }}" imagePullPolicy: {{ .Values.server.image.imagePullPolicy }} diff --git a/chart/templates/services.yaml b/chart/templates/services.yaml index a7ff4e2..2aa7fba 100644 --- a/chart/templates/services.yaml +++ b/chart/templates/services.yaml @@ -22,6 +22,12 @@ spec: selector: app.kubernetes.io/component: "{{ .Release.Name }}-server" ports: + {{ if .Values.server.service.healthz.enabled }} + - name: {{ .Values.server.service.healthz.name }} + port: {{ .Values.server.service.healthz.port }} + protocol: {{ .Values.server.service.healthz.protocol }} + targetPort: {{ .Values.server.service.healthz.targetPort }} + {{ end }} {{- with .Values.server.service.ports }} {{- toYaml . | nindent 4 }} {{- end }} diff --git a/chart/values.yaml b/chart/values.yaml index 3c53bf2..1950c97 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -69,6 +69,14 @@ server: labels: { } # -- (string) The type of service to be created. type: LoadBalancer + # -- (dict) The "healthz" definition . + # Use if you need to create a TCP health check for load balancers on cloud services. + healthz: + enabled: false + name: healthz + port: 80 + protocol: TCP + targetPort: 80 # -- (dict) Change the ports to be mapped to the service. # If you change those, make sure to change the server.config and server.ports accordingly. # @notationType -- bigValue @@ -91,12 +99,6 @@ server: port: 25575 protocol: UDP targetPort: 25575 - # -- (dict) The "healthz" port definition . - # Used only to create a health check for load balancers on cloud services. - - name: healthz - port: 80 - protocol: TCP - targetPort: 80 # -- (dict) Change the game server configuration. # If you change those, make sure to change the service.ports and server.ports accordingly. # Those are directly connected with the container image, providing multiple environment variables to the scripts. From 2082667b2a4fcb633e8835436efa5f83e8e471ad Mon Sep 17 00:00:00 2001 From: Twinki Date: Sat, 27 Jan 2024 12:27:11 -0500 Subject: [PATCH 10/36] Cleanup workflows --- .github/workflows/docker-hub.yml | 28 +++++++---------- .github/workflows/linting.yml | 54 +++++++++++++++++++------------- .github/workflows/release.yml | 19 +++++------ 3 files changed, 55 insertions(+), 46 deletions(-) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index 9e0ceaa..087d568 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -1,36 +1,32 @@ -name: Docker-Image-Dev -on: +name: Developer image +on: push: - branches: [ main ] + branches: [main] jobs: push: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v4 - - name: Login to DockerHub + - name: Docker - Login uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - - name: Docker meta + - name: Docker - Metadata id: meta uses: docker/metadata-action@v5 with: - # list of Docker images to use as base name for tags - images: | - ${{ github.repository }} - # generate Docker tags based on the following events/attributes - tags: | - type=raw,value=dev - # always generate latest tag on push + images: ${{ github.repository }} + tags: type=raw,value=dev + flavor: latest=false - - name: Build and push to DockerHub - id: docker_build + - name: Docker - Build / Push uses: docker/build-push-action@v5 with: push: true tags: | - ${{ steps.meta.outputs.tags }} \ No newline at end of file + ${{ steps.meta.outputs.tags }} diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 0972a7c..efc3156 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -1,36 +1,48 @@ name: Linting -on: [pull_request] +on: + pull_request: +run-name: Pull request - ${{ github.event.pull_request.number }} jobs: shellcheck: + name: Lint - Shell runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v2 - - name: Run ShellCheck - uses: ludeeus/action-shellcheck@master + - name: Checkout + uses: actions/checkout@v4 + + - name: Shellcheck + uses: ludeeus/action-shellcheck@2.0.0 + dockerlint: + name: Lint - Docker runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v2 - - uses: hadolint/hadolint-action@v2.0.0 + - name: Checkout + uses: actions/checkout@v4 + + - uses: hadolint/hadolint-action@v3.1.0 with: dockerfile: Dockerfile - lint: 'hadolint' + markdownlint: + name: Lint - Markdown runs-on: ubuntu-latest steps: - - name: Check out code - uses: actions/checkout@v2 - - uses: DavidAnson/markdownlint-cli2-action@v15 - with: - config: '.markdownlint.jsonc' - globs: '**/*.md' - test-build: - runs-on: ubuntu-latest - steps: - - name: Build the Image - uses: docker/build-push-action@v2 + - name: Checkout + uses: actions/checkout@v4 + + - name: Lint - Markdown + uses: DavidAnson/markdownlint-cli2-action@v15 with: - push: false \ No newline at end of file + config: ".markdownlint.jsonc" + globs: "**/*.md" + + test-build: + name: Docker - Build + runs-on: ubuntu-latest + steps: + - name: Docker - Build + uses: docker/build-push-action@v5 + with: + push: false diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a8b91be..b94b3f9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,5 @@ name: Release -on: +on: release: types: [published] @@ -7,15 +7,16 @@ jobs: release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v4 - - name: Login to DockerHub - uses: docker/login-action@v3 + - name: Docker - Login + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - - name: Docker meta + - name: Docker - Metadata id: meta uses: docker/metadata-action@v5 with: @@ -28,11 +29,11 @@ jobs: type=semver,pattern=v{{major}}.{{minor}} type=semver,pattern=v{{major}} # always generate latest tag on push - flavor: | - latest=true - - name: Build and push to DockerHub & GitHub Packages + flavor: latest=true + + - name: Docker - Build / Push id: docker_build uses: docker/build-push-action@v5 with: push: true - tags: ${{ steps.meta.outputs.tags }} \ No newline at end of file + tags: ${{ steps.meta.outputs.tags }} From 46470c49e804472571fd4a18d5c41bf968f37ca4 Mon Sep 17 00:00:00 2001 From: Twinki Date: Sat, 27 Jan 2024 12:34:34 -0500 Subject: [PATCH 11/36] Tweaks --- .github/workflows/docker-hub.yml | 3 +-- .github/workflows/release.yml | 5 +---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index 087d568..d272619 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -28,5 +28,4 @@ jobs: uses: docker/build-push-action@v5 with: push: true - tags: | - ${{ steps.meta.outputs.tags }} + tags: ${{ steps.meta.outputs.tags }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b94b3f9..df8c48f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,15 +20,12 @@ jobs: id: meta uses: docker/metadata-action@v5 with: - # list of Docker images to use as base name for tags - images: | - ${{ github.repository }} + images: ${{ github.repository }} # generate Docker tags based on the following events/attributes tags: | type=semver,pattern=v{{version}} type=semver,pattern=v{{major}}.{{minor}} type=semver,pattern=v{{major}} - # always generate latest tag on push flavor: latest=true - name: Docker - Build / Push From 2396746865ba26c545854ac83c315107e05a107f Mon Sep 17 00:00:00 2001 From: Thijs van Loef <58031337+thijsvanloef@users.noreply.github.com> Date: Sat, 27 Jan 2024 21:09:50 +0100 Subject: [PATCH 12/36] Create CODE_OF_CONDUCT.md --- CODE_OF_CONDUCT.md | 128 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 CODE_OF_CONDUCT.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..2dc6a85 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,128 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +thijs@loef.dev. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct +enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at +https://www.contributor-covenant.org/translations. From 3cafebe14b8fbb2c62218887e0bacfcd7538a119 Mon Sep 17 00:00:00 2001 From: Thijs van Loef <58031337+thijsvanloef@users.noreply.github.com> Date: Sat, 27 Jan 2024 21:14:19 +0100 Subject: [PATCH 13/36] Create dependabot.yml --- .github/dependabot.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..a458254 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,15 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file + +version: 2 +updates: + - package-ecosystem: "docker" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: "daily" + - package-ecosystem: "github-actions" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: "weekly" From a6b7a666d101f73113c8ddf72c70c4cc8100d88c Mon Sep 17 00:00:00 2001 From: Thijs van Loef <58031337+thijsvanloef@users.noreply.github.com> Date: Sat, 27 Jan 2024 21:17:45 +0100 Subject: [PATCH 14/36] Create SECURITY.md --- SECURITY.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 SECURITY.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..f5a4e7e --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,6 @@ +# Security Policy + +## Reporting a Vulnerability + +Please report (suspected) vulnerabilities at [the security page](https://github.com/thijsvanloef/palworld-server-docker/security). +I try to respond to vulnerability reports within 48 hours. From 106102c7b938b657543d7289bd174a8ca65bca23 Mon Sep 17 00:00:00 2001 From: Thijs van Loef Date: Sat, 27 Jan 2024 21:41:30 +0100 Subject: [PATCH 15/36] fix linting issues, and change badge style --- chart/VALUES_SUMMARY.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chart/VALUES_SUMMARY.md b/chart/VALUES_SUMMARY.md index e2b7aef..49d3222 100644 --- a/chart/VALUES_SUMMARY.md +++ b/chart/VALUES_SUMMARY.md @@ -1,6 +1,8 @@ # palworld -![Version: 0.0.0](https://img.shields.io/badge/Version-0.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) +![Version: 0.0.0](https://img.shields.io/badge/Version-0.0.0-informational) +![Type: application](https://img.shields.io/badge/Type-application-informational) +![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational) This chart can provide an rAthena emulator installation on a Kubernetes cluster. From 3802a87bf9f96c9f2fc719bd07db0daded2f344a Mon Sep 17 00:00:00 2001 From: Thijs van Loef Date: Sat, 27 Jan 2024 21:44:48 +0100 Subject: [PATCH 16/36] fix linting errors --- CODE_OF_CONDUCT.md | 8 ++++---- SECURITY.md | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 2dc6a85..250ceb0 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -60,7 +60,7 @@ representative at an online or offline event. Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at -thijs@loef.dev. +[thijs@loef.dev](mailto:thijs@loef.dev). All complaints will be reviewed and investigated promptly and fairly. All community leaders are obligated to respect the privacy and security of the @@ -116,7 +116,7 @@ the community. This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0, available at -https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. +[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html](https://www.contributor-covenant.org/version/2/0/code_of_conduct.html). Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity). @@ -124,5 +124,5 @@ enforcement ladder](https://github.com/mozilla/diversity). [homepage]: https://www.contributor-covenant.org For answers to common questions about this code of conduct, see the FAQ at -https://www.contributor-covenant.org/faq. Translations are available at -https://www.contributor-covenant.org/translations. +[https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq). Translations are available at +[https://www.contributor-covenant.org/translations](https://www.contributor-covenant.org/translations). diff --git a/SECURITY.md b/SECURITY.md index f5a4e7e..3acea88 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -2,5 +2,5 @@ ## Reporting a Vulnerability -Please report (suspected) vulnerabilities at [the security page](https://github.com/thijsvanloef/palworld-server-docker/security). -I try to respond to vulnerability reports within 48 hours. +Please report (suspected) vulnerabilities at [the security page](https://github.com/thijsvanloef/palworld-server-docker/security). +I try to respond to vulnerability reports within 48 hours. From 9260eff1077ed22016baac38dde9fb62a59575e7 Mon Sep 17 00:00:00 2001 From: Luigi Guevara Date: Sun, 28 Jan 2024 00:57:52 +0100 Subject: [PATCH 17/36] Updating readme documentation with latest SERVER_DESCRIPTION environment variable --- README.md | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 983e33d..1653eba 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,7 @@ services: - ADMIN_PASSWORD="adminPasswordHere" - 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="Awesome World of Pal" volumes: - ./palworld:/palworld/ ``` @@ -90,6 +91,7 @@ docker run -d \ -e SERVER_PASSWORD="worldofpals" \ -e COMMUNITY=false \ -e SERVER_NAME="World of Pals" \ + -e SERVER_DESCRIPTION="Awesome World of Pal" \ --restart unless-stopped \ thijsvanloef/palworld-server-docker:latest @@ -115,24 +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 | -| 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_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 | +| 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 | *highly recommended to set From fdfffc47d8aac67864ead6c2a89ef5967ab86e31 Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Sat, 27 Jan 2024 19:49:43 -0500 Subject: [PATCH 18/36] Minimized processes running as root. --- Dockerfile | 7 ++++--- scripts/backup.sh | 4 ++++ scripts/init.sh | 10 +++------- scripts/start.sh | 7 ++++++- 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index 137cf38..363306a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN wget -q https://github.com/gorcon/rcon-cli/releases/download/v0.10.3/rcon-0.10.3-amd64_linux.tar.gz -O - | tar -xz && \ - mv rcon-0.10.3-amd64_linux/rcon /usr/bin/rcon-cli + mv rcon-0.10.3-amd64_linux/rcon /usr/bin/rcon-cli && \ + ln -s /home/steam/server/rcon.yaml /root/rcon.yaml ENV PORT= \ PUID=1000 \ @@ -31,8 +32,8 @@ ENV PORT= \ SERVER_DESCRIPTION= COPY ./scripts/* /home/steam/server/ -RUN chmod +x /home/steam/server/init.sh /home/steam/server/start.sh /home/steam/server/backup.sh && \ - mv /home/steam/server/backup.sh /usr/local/bin/backup +RUN chmod u+x /home/steam/server/init.sh /home/steam/server/start.sh /home/steam/server/backup.sh && \ + ln -s /home/steam/server/backup.sh /usr/local/bin/backup WORKDIR /home/steam/server diff --git a/scripts/backup.sh b/scripts/backup.sh index 82e75eb..61911be 100644 --- a/scripts/backup.sh +++ b/scripts/backup.sh @@ -9,4 +9,8 @@ FILE_PATH="/palworld/backups/palworld-save-${DATE}.tar.gz" cd /palworld/Pal/ || exit tar -zcf "$FILE_PATH" "Saved/" + +if [ $(id -u) -eq 0 ]; then + chown steam:steam "$FILE_PATH" +fi echo "backup created at $FILE_PATH" diff --git a/scripts/init.sh b/scripts/init.sh index bbf91a4..24c3fac 100644 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -10,12 +10,7 @@ else fi mkdir -p /palworld/backups -chown -R steam:steam /palworld - -if [ "${UPDATE_ON_BOOT}" = true ]; then - printf "\e[0;32m*****STARTING INSTALL/UPDATE*****\e[0m\n" - su steam -c '/home/steam/steamcmd/steamcmd.sh +force_install_dir "/palworld" +login anonymous +app_update 2394010 validate +quit' -fi +chown -R steam:steam /palworld /home/steam/ term_handler() { if [ "${RCON_ENABLED}" = true ]; then @@ -29,6 +24,7 @@ term_handler() { trap 'term_handler' SIGTERM -./start.sh & +su steam -c ./start.sh & +# Process ID of su killpid="$!" wait $killpid diff --git a/scripts/start.sh b/scripts/start.sh index 2d83c36..bef212f 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -1,5 +1,10 @@ #!/bin/bash +if [ "${UPDATE_ON_BOOT}" = true ]; then + printf "\e[0;32m*****STARTING INSTALL/UPDATE*****\e[0m\n" + /home/steam/steamcmd/steamcmd.sh +force_install_dir "/palworld" +login anonymous +app_update 2394010 validate +quit +fi + STARTCOMMAND=("./PalServer.sh") if [ -n "${PORT}" ]; then @@ -81,5 +86,5 @@ EOL printf "\e[0;32m*****STARTING SERVER*****\e[0m\n" echo "bash -c '${STARTCOMMAND[*]}'" -su steam -c "bash -c '${STARTCOMMAND[*]}'" +"${STARTCOMMAND[@]}" From 763c06774a3c700131a028d725535caf13aad6af Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Sat, 27 Jan 2024 23:01:33 -0500 Subject: [PATCH 19/36] Removed su in start.sh --- scripts/start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/start.sh b/scripts/start.sh index bef212f..6ee233a 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -61,7 +61,7 @@ if [ ! "$(grep -s '[^[:space:]]' /palworld/Pal/Saved/Config/LinuxServer/PalWorld printf "\e[0;32m*****GENERATING CONFIG*****\e[0m\n" # Server will generate all ini files after first run. - su steam -c "timeout --preserve-status 15s ./PalServer.sh 1> /dev/null " + timeout --preserve-status 15s ./PalServer.sh 1> /dev/null # Wait for shutdown sleep 5 From e8089b8f3cfa958c2cea8a2f06c51f974cb20b3f Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Sat, 27 Jan 2024 21:34:20 -0500 Subject: [PATCH 20/36] Removed directory to remove error. --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 363306a..e9a853a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN wget -q https://github.com/gorcon/rcon-cli/releases/download/v0.10.3/rcon-0.10.3-amd64_linux.tar.gz -O - | tar -xz && \ mv rcon-0.10.3-amd64_linux/rcon /usr/bin/rcon-cli && \ - ln -s /home/steam/server/rcon.yaml /root/rcon.yaml + ln -s /home/steam/server/rcon.yaml /root/rcon.yaml && \ + rmdir /tmp/dumps ENV PORT= \ PUID=1000 \ From ac382af05703636e0c3caf8eb57f6889830a7d16 Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Sat, 27 Jan 2024 21:40:08 -0500 Subject: [PATCH 21/36] Added quotes --- scripts/backup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/backup.sh b/scripts/backup.sh index 61911be..bf797b7 100644 --- a/scripts/backup.sh +++ b/scripts/backup.sh @@ -10,7 +10,7 @@ cd /palworld/Pal/ || exit tar -zcf "$FILE_PATH" "Saved/" -if [ $(id -u) -eq 0 ]; then +if [ "$(id -u)" -eq 0 ]; then chown steam:steam "$FILE_PATH" fi echo "backup created at $FILE_PATH" From d93330e1d710f7656938b436e4cecb1041dec609 Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Sat, 27 Jan 2024 21:47:25 -0500 Subject: [PATCH 22/36] Removed symbolic links --- Dockerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index e9a853a..5fd8106 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN wget -q https://github.com/gorcon/rcon-cli/releases/download/v0.10.3/rcon-0.10.3-amd64_linux.tar.gz -O - | tar -xz && \ mv rcon-0.10.3-amd64_linux/rcon /usr/bin/rcon-cli && \ - ln -s /home/steam/server/rcon.yaml /root/rcon.yaml && \ rmdir /tmp/dumps ENV PORT= \ @@ -33,8 +32,8 @@ ENV PORT= \ SERVER_DESCRIPTION= COPY ./scripts/* /home/steam/server/ -RUN chmod u+x /home/steam/server/init.sh /home/steam/server/start.sh /home/steam/server/backup.sh && \ - ln -s /home/steam/server/backup.sh /usr/local/bin/backup +RUN chmod +x /home/steam/server/init.sh /home/steam/server/start.sh /home/steam/server/backup.sh && \ + mv /home/steam/server/backup.sh /usr/local/bin/backup WORKDIR /home/steam/server From f1d1ade290ba9e4788ab175fae6eba8a9edc128b Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Sat, 27 Jan 2024 21:48:13 -0500 Subject: [PATCH 23/36] Added spacing --- scripts/backup.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/backup.sh b/scripts/backup.sh index bf797b7..43eecb4 100644 --- a/scripts/backup.sh +++ b/scripts/backup.sh @@ -13,4 +13,5 @@ tar -zcf "$FILE_PATH" "Saved/" if [ "$(id -u)" -eq 0 ]; then chown steam:steam "$FILE_PATH" fi + echo "backup created at $FILE_PATH" From 6330c86fe9aba07e1eef83796528333ae1a209d0 Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Sat, 27 Jan 2024 22:08:54 -0500 Subject: [PATCH 24/36] Replaced * with @ to match --- scripts/start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/start.sh b/scripts/start.sh index 6ee233a..5bc0391 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -85,6 +85,6 @@ default: EOL printf "\e[0;32m*****STARTING SERVER*****\e[0m\n" -echo "bash -c '${STARTCOMMAND[*]}'" +echo "bash -c '${STARTCOMMAND[@]}'" "${STARTCOMMAND[@]}" From e0d4e6c48f17a603ce4b2b39f0c8e8a2acefc48f Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Sat, 27 Jan 2024 22:17:48 -0500 Subject: [PATCH 25/36] Changed back to [*] --- scripts/start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/start.sh b/scripts/start.sh index 5bc0391..6ee233a 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -85,6 +85,6 @@ default: EOL printf "\e[0;32m*****STARTING SERVER*****\e[0m\n" -echo "bash -c '${STARTCOMMAND[@]}'" +echo "bash -c '${STARTCOMMAND[*]}'" "${STARTCOMMAND[@]}" From b8e64f8e29fa2db44d7db359c6813bec80ce41d9 Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Sat, 27 Jan 2024 23:25:13 -0500 Subject: [PATCH 26/36] Updated readme to explain when the settings can be modified --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 983e33d..fd12ea5 100644 --- a/README.md +++ b/README.md @@ -197,10 +197,13 @@ The server will run a save before the backup if rcon is enabled. When the server starts, a `PalWorldSettings.ini` file will be created in the following location: `/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini` -Any changes made there will be applied to the Server on next boot. +Any changes made while the server is live will be overridden. Please keep in mind that the ENV variables will always overwrite the changes made to `PalWorldSettings.ini`. +> [!IMPORTANT] +> Changes can only be made to `PalWorldSettings.ini` while the server is off. + For a more detailed list of explanations of server settings go to: [shockbyte](https://shockbyte.com/billing/knowledgebase/1189/How-to-Configure-your-Palworld-server.html) ## Reporting Issues/Feature Requests From 0ff6286218dbab8ab11de48652b215ca19909255 Mon Sep 17 00:00:00 2001 From: MinJae Kim <33440010+minjae9610@users.noreply.github.com> Date: Sun, 28 Jan 2024 13:51:58 +0900 Subject: [PATCH 27/36] Translate more untranslated content --- docs/kr/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/kr/README.md b/docs/kr/README.md index 9d0e942..6632216 100644 --- a/docs/kr/README.md +++ b/docs/kr/README.md @@ -177,7 +177,7 @@ docker exec -it palworld-server rcon-cli | Info | 서버 정보를 표시합니다. | | Save | 월드 정보를 저장합니다. | -For a full list of commands go to: [https://tech.palworldgame.com/server-commands](https://tech.palworldgame.com/server-commands) +전체 명령어 목록을 보려면 다음으로 이동하세요.: [https://tech.palworldgame.com/server-commands](https://tech.palworldgame.com/server-commands) ## 백업 만들기 From 9de1b91cc7e2b5db97df3412adc1cc007699df3e Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Sat, 27 Jan 2024 23:52:10 -0500 Subject: [PATCH 28/36] Updated echo for start command to reflect what is being executed. --- scripts/start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/start.sh b/scripts/start.sh index 6ee233a..c60c58b 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -85,6 +85,6 @@ default: EOL printf "\e[0;32m*****STARTING SERVER*****\e[0m\n" -echo "bash -c '${STARTCOMMAND[*]}'" +echo "${STARTCOMMAND[*]}" "${STARTCOMMAND[@]}" From f488ce62d62d04ef8b6f513c1c07f8363acdc3fc Mon Sep 17 00:00:00 2001 From: Thijs van Loef Date: Sun, 28 Jan 2024 12:10:40 +0100 Subject: [PATCH 29/36] 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 2d83c36..26909f1 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 30/36] 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 28db4cc..89618d2 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 26909f1..39bc821 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 31/36] fix linting --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 89618d2..6adecf3 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 32/36] update description --- README.md | 112 +++++++++++++++++++++++++++--------------------------- 1 file changed, 56 insertions(+), 56 deletions(-) diff --git a/README.md b/README.md index 6adecf3..7085976 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 33/36] 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 6933b7e..7c9d854 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 39bc821..25c98db 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 34/36] remove references of configmap --- k8s/deployment.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/k8s/deployment.yaml b/k8s/deployment.yaml index d7a1204..d94759f 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 35/36] fix readme errors --- README.md | 111 +++++++++++++++++++++++++++--------------------------- 1 file changed, 55 insertions(+), 56 deletions(-) diff --git a/README.md b/README.md index 7085976..731e94a 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 36/36] 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 25c98db..e6795e2 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