GameServerManagers / LinuxGSM

The command-line tool for quick, simple deployment and management of Linux dedicated game servers.
https://linuxgsm.com
MIT License
4.25k stars 813 forks source link

[Bug]: DayZ Standalone launch doesn't load all mods #4505

Open firemandave6024 opened 7 months ago

firemandave6024 commented 7 months ago

User story

When adding mods to ~/lgsm/config-lgsm/dayzserver/common.cfg, it only loads the first mod

Game

DayZ Standalone

Linux distro

Ubuntu 22.04

Command

command: start

Further information

In the config section to load mods, this is how the variable is laid out (Comment markers removed to avoid markdown issues):

DayZ Modules Add mods with relative paths: mods/@cf To load the "Community framework for DayZ SA" module found in the directory serverfiles/mods/@cf. Load several mods as: mods="mods/@cf\;mods/@dayz-expansion\;mods/@deerisle" mods="mods/@CF;mods/@Basic_Territories_Updated;mods/@RaG_Hunting_Cabin"

When the startparameters variable is built, this is the code:

Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters startparameters="-ip=${ip} -port=${port} -config=${servercfgfullpath} -mod=${mods} -servermod=${servermods} -bepath=${bepath} -limitFPS=60 -dologs -adminlog -freezeCheck"

It appears that the actual binary expects everything after -mod= to be wrapped in double quotes. Changing my config file startparameters variable to use this line appears to have fixed the issue:

Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters startparameters="-ip=${ip} -port=${port} -config=${servercfgfullpath} -mod=\"${mods}\" -servermod=${servermods} -bepath=${bepath} -limitFPS=60 -dologs -adminlog -freezeCheck"

Wrapping the $mods variable in escaped double quotes loaded all of the mods, and may need to be added to the default config file.

Relevant log output

PRETTY_NAME="Ubuntu 22.04.4 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.4 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

No other relevant logs are available, the console log file doesn't show anything when I tried to load only Community Framework.

Steps to reproduce

1: Install multiple mods 2: Add them to the appropriate config file 3: Start the server 4: Use whichever tool you choose to check loaded mods, only the first will load.

NoReXxDE1 commented 2 months ago

Hey guys, that's really the fix for LinuxGSM up there. I simply went to _default.cfg in /home/dayzserver/lgsm/config-default/config-lgsm/dayzserver and then I just changed -mod=${mods} to -mod=\"${mods}\" which is also the solution for me

You can simply add you're mods to you main serverfiles like "/home/dayzserver/serverfiles" If it dosent works test ist with low characters in modfolder name like not "@DayZ-Expansion-Licensed" do "@dayz-expansion-licensed"

I hope this little trick help you out, sorry for my bad english im from germany :)

Michael-Kraft commented 1 month ago

change in startparameter to -mod=\"${mods}\" fixed it for me