feat: add UE4SS mod loader & Steam workshop mod loader (Wine) (WIP) - #914
feat: add UE4SS mod loader & Steam workshop mod loader (Wine) (WIP)#914MusclePr wants to merge 16 commits into
Conversation
afd30c4 to
5b6c337
Compare
f3aa448 to
9d66863
Compare
|
Edit 1: Works after disabling It seems the container would stuck at starting after auto restart or docker compose restart Debug log stucks here: docker top: composename: test
x-logging: &logging-setting
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "3m"
services:
palworld-test:
image: thijsvanloef/palworld-server-docker:windows
container_name: palworld-test
ports:
- 60000:60000/udp # Game port, default 8211
#- 60001:60001/udp # Steam query, default 27015
#- 60002:60002/tcp # REST API, default 8212
env_file:
- $HOME/.volumes/.palworld-test/.env
volumes:
- $HOME/.volumes/.palworld-test/data:/palworld/
<<: *logging-setting
stop_grace_period: 60s
networks: [containers]
mem_limit: 16g
memswap_limit: 20g
restart: unless-stopped
networks:
containers:
enable_ipv6: false
ipam:
driver: default
config:
- subnet: 172.20.3.0/24
gateway: 172.20.3.1env (without in-game settings part)########################## WINDOWS SPECIFIC ##########################
# Steam username for downloading the server with a TARGET_MANIFEST_ID.
STEAM_USERNAME=redacted
# Comma-separated Steam Workshop mod IDs to download and deploy.
WORKSHOP_MOD_IDS=3625223587,3625280368
# Cron expression for periodic Workshop mod sync checks. Leave empty to disable periodic checks.
WORKSHOP_MOD_UPDATE_CRON=
# Install latest experimental UE4SS package download and deployment.
UE4SS_EXPERIMENTAL_INSTALL=false
# Download URL for the experimental UE4SS package zip.
UE4SS_EXPERIMENTAL_URL=https://github.com/Okaetsu/RE-UE4SS/releases/download/experimental-palworld/UE4SS-Palworld.zip
########################## SERVER SETTINGS ##########################
# Update/Install the server when the docker container starts (THIS HAS TO BE ENABLED THE FIRST TIME YOU RUN THE CONTAINER)
UPDATE_ON_BOOT=false
# Enables automatic backups
BACKUP_ENABLED=true
# Enables native automatic backups
USE_BACKUP_SAVE_DATA=true
# Delete backups after a certain number of days
DELETE_OLD_BACKUPS=true
# How many days to keep backups
OLD_BACKUP_DAYS=30
# Setting affects frequency of automatic backups.
BACKUP_CRON_EXPRESSION=50 2,14 * * *
# Enables automatic updates
AUTO_UPDATE_ENABLED=false
# Setting affects frequency of automatic updates.
AUTO_UPDATE_CRON_EXPRESSION=0 * * * *
# How long to wait to update the server, after the player were informed. (This will be ignored, if no Players are connected)
AUTO_UPDATE_WARN_MINUTES=30
# Enables automatic reboots
AUTO_REBOOT_ENABLED=true
# Restart the Server even if there are players online.
AUTO_REBOOT_EVEN_IF_PLAYERS_ONLINE=false
# How long to wait to reboot the server, after the player were informed.
AUTO_REBOOT_WARN_MINUTES=5
# Setting affects frequency of automatic updates.
AUTO_REBOOT_CRON_EXPRESSION=* * * * *
# Timezone used for time stamping backup server
TZ=Asia/Hong_Kong
# Max amount of players that are able to join the server
PLAYERS=16
# UDP port that the server will expose
PORT=60000
# The uid of the user the server should run as
PUID=1000
# The gid of the group the server should run as
PGID=1000
# Enables performance-related threading startup arguments (-useperfthreads -NoAsyncLoadingThread -UseMultithreadForDS).
ENABLE_PERF_THREADING_ARGS=true
# Sets -NumberOfWorkerThreadsServer. Leave empty to use the game's default. When using deprecated MULTITHREADING=true, this defaults to all CPUs.
WORKER_THREADS_SERVER=10
# Enables Palworld's built-in recovery for negative DeltaTime through an Engine ini override. This opt-in mitigation does not correct or synchronize the host or VM clock.
PALWORLD_ALLOW_NEGATIVE_DELTA_TIME=false
# Whether or not the server shows up in the community server browser (USE WITH SERVER_PASSWORD)
COMMUNITY=false
# 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.
PUBLIC_IP=209.25.142.27
# 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.
PUBLIC_PORT=1108
# A name for your server
SERVER_NAME=Biscuit Test Server
# Your server Description
SERVER_DESCRIPTION=FOR TESTING ONLY
# Secure your community server with a password
SERVER_PASSWORD=
# Secure administration access in the server with a password
ADMIN_PASSWORD=redacted
# Enable REST API for the palworld server
REST_API_ENABLED=true
# REST API port to connect to
REST_API_PORT=60002
# Enable RCON for the Palworld server
RCON_ENABLED=false
# RCON port to connect to
RCON_PORT=60003
# Query port used to communicate with Steam servers
QUERY_PORT=60001
# Enables automatic pause (with ENABLE_PLAYER_LOGGING=true and REST_API_ENABLED=true required.)
AUTO_PAUSE_ENABLED=true
# Default 180 (seconds) describes the time between the last client disconnect and the pausing of the process (read as timeout established)
AUTO_PAUSE_TIMEOUT_EST=180
# Enable auto-pause logging
AUTO_PAUSE_LOG=true
# Enable auto-pause debug logging
AUTO_PAUSE_DEBUG=false
# Enables Logging and announcing when players join and leave (with REST_API_ENABLED=true required.)
ENABLE_PLAYER_LOGGING=true
# Polling period (in seconds) to check for players who have joined or left
PLAYER_LOGGING_POLL_PERIOD=5
# Enable filter to reduce duplicated log lines
LOG_FILTER_ENABLED=true
# Minimum container log level to emit (DEBUG < INFO < WARN < ERROR; SUCCESS/ACTION are treated as INFO) (DEBUG/INFO/WARN/ERROR/OFF)
LOG_LEVEL=DEBUG
# Configure log format type (json/logfmt/colored/plain/default)
LOG_FORMAT_TYPE=default
# Uses DepotDownloader to download game server files instead of steamcmd. This will help hosts incompatible with steamcmd (e.g. M-series Mac)
USE_DEPOT_DOWNLOADER=false
# Installs the latest Beta version of the Palworld dedicated server
INSTALL_BETA_INSIDER=false |
|
@gammamonbiscuit |
|
Cool, thanks! Reason behind this question is that, we tried to test this mod yesterday, but it didn't work, after some debugging, we think it is not installed correctly, but I haven't tested it so this is just a guess. Here's what steam downloaded: And here's what the script installed: After comparing other player's local install, we think the lua scripts should be stayed in the |
|
Added the |
|
Now restart works with
entrypoint:
- /bin/bash
- -c
- |
#!/bin/bash
sed -i -r -z 's/if\s(\[.*?\])(;\sthen)(\n.*?\n.*?mods\-update)/if \1 \&\& [ "$${UPDATE_MODS_ON_BOOT,,}" = true ]\2\3/' ./start.sh
exec ./init.shAfter more tests, it seems UE4SS (I use workshop version) is looking for I have to disable mod update, and edit ModsFolderPath = Z:\palworld\Pal\Binaries\Win64\ue4ss\ModsAnd move LevelLock's files back into PalSchema would crash on launch tho. |
|
Thank you for the quick updates! I added more mods to test, log looks fine but I need some more time to test to see if they actually work since they target different aspects of the game. Currently my last problem before I can test it with my prod server is that, I'm not yet able to find a way to get stdout printed like in the linux version. I tried launching |
|
During tests, I also noticed that many mods use a config file to let user change settings, which is shipped together and placed next to their main script, which would be deleted during mod update.
Some ideas that comes to my mind:
I think the third one would be the easiest and doesn't affect the current workflow. |
464a05a to
f723ebb
Compare
430dc88 to
9cd8b6b
Compare
|
Since user-edited files have their timestamps updated, I utilized this to prevent them from being overwritten or deleted when the mod is updated. |
|
Using last edit time is indeed a better idea haha, I'm not experiencing problem on this part yet. As for the realtime log, it seems it broke both auto pause and log filtering. Repeated lines didn't combine.
And these, I don't know... I'm not very familiar with how the whole auto pause work. Log: log.txt |
50b9c98 to
f4a293c
Compare
| /home/steam/server/compile-engine.sh || exit | ||
| fi | ||
|
|
||
| if [ "${platform}" = "windows" ] && isTrue "${UPDATE_MODS_ON_BOOT}"; then |
There was a problem hiding this comment.
Old env name UPDATE_MODS_ON_BOOT is still being used here.
| local line | ||
| local -r ignore_ue4ss_id="3625223587" # UE4SS workshop mod ID | ||
|
|
||
| if [ -n "${WORKSHOP_MOD_IDS:-}" ]; then |
There was a problem hiding this comment.
Old env name WORKSHOP_MOD_IDS is still being used here.
89fac6a to
5a54d98
Compare
|
Nice, it is now good enough for my server's use, thank you. I think it is time to get more people to try on this in case I missed something? Some suggestions... Document: Mention that disabling mod will uninstall mods, so that the user needs to enable update to reinstall them. Debug Logging: Maybe add a header like |
Points at ghcr.io/nlopez/palworld-server-docker built from branch mods-wine-support (PR thijsvanloef/palworld-server-docker#914), which runs the server under Wine so Steam Workshop mods can be downloaded via MOD_IDS. Fixes health-check probes to use the image's own platform-aware process check instead of the hardcoded Linux process name, and enables MOD_ENABLED/MOD_UPDATE_ON_BOOT/MOD_IDS in the configmap for mod IDs 3772992108,3773035536.
36336b1 to
8a28b9a
Compare
Context
(Work In Progress)
thijsvanloef/palworld-server-docker:windows... Wine (amd64)thijsvanloef/palworld-server-docker:latest... Linux (amd64, arm64)/home/steam/Steamhas been changed to a symbolic link to/palworld/.steam./palworld/.steamis the actual location of/home/steam/Steam.To ensure compatibility with UE4SS Linux, align with the same environment variables.Follow the script that has already been implemented.
The official docs of Installing Mods on a Server is not behaving as described.
True... UE4SS experimental and PalSchema are used by default.False... System will withdraw all mods and add-NoModto the server startup options.Choices
I chose Wine to make all mods available.
Test instructions
Prepaire subscribe in steam workshop.
Subscribe UE4SS Exp.Prepaire Palworld client
Prepaire Server
docker compose -f windows.yaml build.env./save-login-credential.shdocker compose downTest step
docker compose up/AdminPassword adminPasswordHereChecklist before requesting a review
AI Usage Disclosure
Please read the AI Usage Guidelines for Contributors before submitting this PR.
If you used an AI tool to assist in writing or refactoring code for this PR, please disclose it below.
I have manually reviewed the generated code and tested the container build locally.