Merge branch 'main' into graceful-shutdown-fix

This commit is contained in:
Carlos M. Martinez
2024-01-28 12:18:21 -05:00
20 changed files with 784 additions and 191 deletions

15
.github/dependabot.yml vendored Normal file
View File

@@ -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"

View File

@@ -1,36 +1,31 @@
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 }}
tags: ${{ steps.meta.outputs.tags }}

View File

@@ -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
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

View File

@@ -1,5 +1,5 @@
name: Release
on:
on:
release:
types: [published]
@@ -7,32 +7,30 @@ 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:
# 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: 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 }}
tags: ${{ steps.meta.outputs.tags }}

128
CODE_OF_CONDUCT.md Normal file
View File

@@ -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](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
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](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](https://www.contributor-covenant.org/faq). Translations are available at
[https://www.contributor-covenant.org/translations](https://www.contributor-covenant.org/translations).

View File

@@ -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 && \
rmdir /tmp/dumps
ENV PORT= \
PUID=1000 \

110
README.md
View File

@@ -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/)
@@ -65,6 +65,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/
```
@@ -91,6 +92,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
@@ -119,24 +121,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
@@ -199,12 +202,79 @@ 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 |
|-------------------------------------------|----------------------------------------------------------------|----------------------------------------------------------------------------------------------|----------------------------------------|
| 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
When the server starts, a `PalWorldSettings.ini` file will be created in the following location: `<mount_folder>/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

6
SECURITY.md Normal file
View File

@@ -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.

View File

@@ -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:

View File

@@ -1,8 +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.
@@ -50,18 +50,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. |
----------------------------------------------

View File

@@ -8,6 +8,8 @@ spec:
selector:
matchLabels:
app.kubernetes.io/component: "{{ .Release.Name }}-server"
strategy:
type: "{{ .Values.server.strategy }}"
template:
metadata:
annotations:
@@ -26,6 +28,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 +36,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 }}

View File

@@ -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 }}

View File

@@ -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.
@@ -69,6 +71,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 +101,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.

View File

@@ -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)
## 백업 만들기

213
docs/zh-CN/README.md Normal file
View File

@@ -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)
> [!TIP]
> 不知道从何开始? [看看这里吧!](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 上运行
> [!IMPORTANT]
> 目前, 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
`<palworld-folder>`修改为您自己的路径
```bash
docker run -d \
--name palworld-server \
-p 8211:8211/udp \
-p 27015:27015/udp \
-v ./<palworld-folder>:/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命令保存并关闭服务器的必要条件
> [!IMPORTANT]
> 环境变量中使用的布尔值区分大小写,因为它们是在 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` 文件将在 `<mount_folder>/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) 中列出

View File

@@ -15,76 +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/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"
)

View File

@@ -6,6 +6,8 @@ metadata:
name: palworld-server
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: palworld-server
@@ -37,13 +39,7 @@ spec:
volumeMounts:
- mountPath: /palworld
name: datadir
- name: palworld-settings
mountPath: /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini
subPath: PalWorldSettings.ini
volumes:
- name: datadir
persistentVolumeClaim:
claimName: palworld-server-datadir
- name: palworld-settings
configMap:
name: palworld-settings

View File

@@ -9,4 +9,9 @@ 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"

View File

@@ -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

View File

@@ -1,27 +1,16 @@
#!/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
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 +31,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
@@ -56,13 +49,237 @@ 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
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
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_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_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"
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 "${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
@@ -80,6 +297,6 @@ default:
EOL
printf "\e[0;32m*****STARTING SERVER*****\e[0m\n"
echo "bash -c '${STARTCOMMAND[*]}'"
su steam -c "bash -c '${STARTCOMMAND[*]}'"
echo "${STARTCOMMAND[*]}"
"${STARTCOMMAND[@]}"