DayZ Linux GUI Launcher
Find a file
2021-12-06 17:29:51 +01:00
.editorconfig tools: add .editorconfig 2021-12-05 18:56:05 +01:00
.gitattributes tools: force LF line endings via .gitattributes 2021-12-05 18:55:29 +01:00
dayz-launcher.sh chore: add log message when launching the game 2021-12-06 17:29:51 +01:00
LICENSE license: MIT 2021-12-05 19:15:33 +01:00
README.md chore: rename repo + launch script, update readme 2021-12-06 05:38:18 +01:00

DayZ Linux CLI launcher

About

This is an experimental launcher script for DayZ standalone on Linux when running the game via Proton.

Proton is currently unable to start the game's own regular launcher application which sets up mods and launch parameters for the game client. The game however does work fine when launching the client directly, so mods can be set up and configured manually, which is what this script does, similar to what the launcher would do.

Automatic Steam workshop mod downloads are currently unsupported due to a limitation of Steam's CLI. Workshop mods will therefore need to be subscribed manually via the web browser. A URL for each missing mod will be printed to the output.

Please see the "Important notes" section down below to get the game running on Linux.

Usage

Usage: dayz-launcher.sh [OPTION]... [MODID]...

Automatically set up mods for DayZ, launch the game and connect to a server,
or print the game's -mod command line argument for custom configuration.

Command line options:

  -h
  --help
    Print this help text.

  -d
  --debug
    Print debug messages to output.

  -l
  --launch
    Launch DayZ after resolving and setting up mods instead of
    printing the game's -mod command line argument.

  -n <name>
  --name <name>
    Set the profile name when launching the game via --launch.
    Some community servers require a profile name when trying to connect.

  -s <address[:port]>
  --server <address[:port]>
    Retrieve a server's mod list and add it to the remaining input.
    Uses the daemonforge.dev DayZ server JSON API.
    If --launch is set, it will automatically connect to the server.

  -p <port>
  --port <port>
    The server's query port, not to be confused with the server's game port.
    Default is: 27016

Environment variables:

  STEAM_ROOT
    Set a custom path to Steam's root directory. Default is:
    ${XDG_DATA_HOME:-${HOME}/.local/share}/Steam
    which defaults to ~/.local/share/Steam

    If the game is stored in a different Steam library directory, then this
    environment variable needs to be set/changed.

TODO

  • Don't use a custom server query API and query the server directly
  • Install mods automatically Unfortunately, Steam doesn't support downloading workshop mods via the CLI and only the steamcmd CLI utility seems to be able to do this from a command line shell context, but this requires a Steam login via CLI parameters, which is a bit unpractical.
  • If possible, resolve mod dependencies

Important notes

In order for the game to actually run on Linux via Proton, the vm.max_map_count kernel parameter needs to be increased, because otherwise the game will freeze while loading the main menu or after playing for a couple of minutes. Some custom kernels like TK-Glitch for example already increase this value from its default value of 64*1024-6 to 512*1024, but even this won't work reliably. Increasing it to 1024*1024 seems to work.

sudo sysctl -w vm.max_map_count=1048576

Or apply it permanently:

echo 'vm.max_map_count=1048576' | sudo tee /etc/sysctl.d/vm.max_map_count.conf