Giter Club home page Giter Club logo

dayz-ctl's Introduction

DayZ Command Line Launcher

dayz-ctl β€” this is an experimental launcher (server explorer and launcher) DayZ on Steam Proton for Linux.

This document is available in languages: eng πŸ‡¬πŸ‡§, rus πŸ‡·πŸ‡Ί, ua πŸ‡ΊπŸ‡¦

logo

At the time of this project, Bohemia Interactive was still unable to make a working launcher for the game that could correctly install modifications and connect to game servers. That is why this project was born.

Key Features:

  • Server Explorer with information about each server
  • Fuzzy search in Server Explorer based on fzf
  • Automatic installation of mods (as an option)
  • A wide range of filters for searching servers (map, time of day, modifications, number of players, first person, password, etc.)
  • Additional information in the form of country of location (using geoip base) and ping for each server
  • Favorites list, last 10 games history and creation of quick launch shortcuts to connect to servers
  • Offline mode DayZCommunityOfflineMode with automatic installation, updates and the ability to select modifications
  • Configuration menu with game launch options, launcher settings, mod controls and statistics
  • Provides a link with detailed server information to battlemetrics

Special thanks to dayz-linux-cli-launcher for the idea and dayzsalauncher for the API.

Preview

Launcher Demo Launcher Demo

More screenshots πŸ‘ˆ

Main menu

Server browser

Server filters

Filter by map

Applied selected filters

Favorites browser

History browser

Fuzzy search

Offline mode

Mods for offline

Server mods

Mods info

Config menu

Launch options

About menu

DayZ News

Features of using SteamCMD

There are two modes of operation of the launcher with and without using SteamCMD to manage mods in manual mode.

You can combine both approaches, for example, subscribe to those modifications that you will definitely need in the future by clicking on the link, and check for updates or force update mods using the launcher. Also, you can not subscribe to the "doubtful 50 mods" of the next server and easily remove them with one action from the launcher, while maintaining all the mods for which you have a subscription.

Using SteamCMD

  • 🟒 Everything happens automatically
  • 🟒 Automatically check for mod updates right now (forced)
  • 🟑 Mod subscriptions are not created, they are just downloaded
  • 🟑 Requires closing the Steam client to download mods
  • πŸ”΄ Sometimes you need to re-login to Steam

Not using SteamCMD

  • 🟒 Familiar behavior if you have already used other solutions, for example dayz-linux-cli-launcher
  • 🟑 The game itself will not start after downloading mods
  • 🟑 Steam sometimes delays checking for updates and downloads them only after restarting or subscribing/unsubscribing from the mod
  • πŸ”΄ You need to subscribe to mods with your own hands

Installation

With installer

For ease of installation, there is a small script that will do everything for you (at least try to do it)

Execute this:

curl -sSfLA dayz-ctl bit.ly/3Vf2zz3 | bash

Manual installation

For the launcher to work, you need to make sure that you have all the dependencies installed:

  • jq - JSON processing utility
  • fzf - fuzzy search utility
  • gum - utility for creating dialogs and styling output
  • ping (iputils-ping) - find out the ping to the server (where ICMP is enabled)
  • geoiplookup (geoip-bin) - find out the country where the server is located
  • whois - fallback for geoiplookup, less accurate and slower, but not all entries are in the standard geoip database
  • curl - utility for communicating with various APIs over HTTP/S
  • cut, tr, grep, pgrep, pkill, killal, timeout, sed, awk (gawk) - where without classic utilities in scripts
  • Steam - online service for digital distribution of computer games
  • SteamCMD - steamcmd Steam console client
  • DayZ - and of course the game itself

Then you can clone the repository:

git clone [email protected]:WoozyMasta/dayz-ctl.git
# or
git clone https://github.com/WoozyMasta/dayz-ctl.git
# and run
cd dayz-ctl
./dayz-ctl

Or download the script file itself:

curl -sSfL -o ~/.local/bin/dayz-ctl \
  https://raw.githubusercontent.com/WoozyMasta/dayz-ctl/master/dayz-ctl
chmod +x ~/.local/bin/dayz-ctl
# and run
dayz-ctl

Emoji

Emojis can be used to properly display elements, you may need to install them, for example, you can use the Noto font from Google.

Below is a list with the package name for different distributions:

  • fonts-noto-color-emoji - debian/ubuntu
  • google-noto-emoji-color-fonts - centos
  • google-noto-emoji-fonts - fedora
  • noto-fonts-emoji - arch
  • font-noto-emoji - alpine
  • noto-coloremoji-fonts - suse

Or if you don't like emoji or can't use them for some reason, you can apply a patch to replace them with strings:

sed -e 's/▫️/β€’/g' -e 's/🟩/βœ•/g' -e 's/⬛/ /g' -e 's/πŸ•’/time/g' -e 's/❔/?/g' \
  -e 's/🟒/ok/g' -e 's/πŸ”΄/no/g' -e 's/πŸŒ™/night/g' -e 's/β˜€οΈ/day/g' \
  -e 's/πŸ”’/yes/g' -e 's/πŸ”“/no/g' -e 's/βœ…/ok/g' -e 's/❌/no/g' \
  -i "$(which dayz-ctl)"

Tested distros

  • 🟒 Debian bookworm
  • 🟒 Debian bullseye
  • 🟒 Debian buster
  • 🟒 Ubuntu 18.04
  • 🟒 Ubuntu 20.04 πŸ’―
  • 🟒 Ubuntu 22.04 πŸ’―
  • 🟒 Fedora latest
  • 🟑 Centos 7 (small bugs)
  • 🟑 Centos stream9 (small bugs)
  • 🟒 Alpine latest
  • 🟒 Alpine edge
  • 🟒 Archlinux
  • 🟑 Opensuse leap (small bugs)

Other

Steam

It is better to remove all DayZ launch options in Steam and manage them from the launcher or vice versa. Since the keys can be duplicated and this can cause confusion, or in the worst case, cut off some of the keys, because the argument string has a length limit, and on servers with a large number of mods, a very long launch parameter is also used.

Those. leave the launch options empty, or specify only the set of auxiliary utilities and variables you need, for example:

MANGOHUD=1 ENABLE_VKBASALT=1 gamemoderun %command%

Search syntax

You can enter multiple search terms separated by spaces. e.g. ^namalsk DE !PVE !RP

token match type description
sbtrkt fuzzy match Items that match sbtrkt
wild exact-match (quoted) Items that include wild
^music prefix-exact-match Items that start with music
.mp3$ suffix-exact-match Items that end with .mp3
!fire inverse-exact-match Items that do not include fire
!^music inverse-prefix-exact-match Items that do not start with music
!.mp3$ inverse-suffix-exact-match Items that do not end with .mp3

A term with a single bar character acts as an OR operator

PVE | RP

Environment variables

You can fine-tune how the launcher works with the help of environment variables that you can pass to the environment as usual or write to the configuration file $HOME/.local/share/dayz-ctl/dayz-ctl.conf (by default)

List of available variables:

  • DAYZ_CTL_VERSION β€” application version
  • DAYZ_CTL_NAME=dayz-ctl β€” application name
  • DAYZ_GAME_ID=221100 β€” Steam game ID
  • APPLICATIONS_DIR=$HOME/.local/share/applications β€” directory for storing application shortcuts
  • DAYZ_CTL_DIR=$HOME/.local/share/dayz-ctl β€” launcher working directory
  • DAYZ_CTL_BIN_DIR=$HOME/.local/share/dayz-ctl/bin β€” directory for storing additional executable files
  • DAYZ_REQUEST_TIMEOUT=10 β€” standard timeout for HTTP requests in seconds
  • DAYZ_CONFIG_FILE=$DAYZ_CTL_DIR/$DAYZ_CTL_NAME.conf β€” dayz-ctl configuration file
  • DAYZ_SERVER_DB=$DAYZ_CTL_DIR/servers.json β€” server database file
  • DAYZ_SERVER_DB_TTL=300 β€” TTL for server database in seconds
  • DAYZ_SERVER_REQUEST_TIMEOUT=30 β€” timeout for getting a list of servers in seconds
  • DAYZ_NEWS_DB=$DAYZ_CTL_DIR/news.json β€” news base file
  • DAYZ_NEWS_DB_TTL=3600 β€” TTL for the news database in seconds
  • DAYZ_MODS_DB=$DAYZ_CTL_DIR/mods.json β€” modification database file
  • DAYZ_PROFILE=$DAYZ_CTL_DIR/profile.json β€” user profile file
  • DAYZ_HISTORY_SIZE=10 - server explorer history size
  • DAYZ_FZF_HISTORY=$DAYZ_CTL_DIR/.$DAYZ_CTL_NAME-history β€” history file for fuzzy search
  • DAYZ_USERAGENT="$DAYZ_CTL_NAME $DAYZ_CTL_VERSION" β€” User-Agent used for HTTP requests
  • DAYZ_API=https://dayzsalauncher.com/api/v1 β€” API address for getting a list of servers
  • DAYZ_STEAMCMD_ENABLED=true - switch to enable or disable the use of SteamCMD
  • DAYZ_FILTER_MOD_LIMIT=10 - default mod limit filter value
  • DAYZ_FILTER_PLAYERS_LIMIT=50 - default player limit filter value
  • DAYZ_FILTER_PLAYERS_SLOTS=60 β€” default slot limit filter value for players

Useful

Steam launch options with MangoHud, vkBasalt and gamemode enabled:

MANGOHUD=1 ENABLE_VKBASALT=1 gamemoderun %command%

Also, without resorting to third-party utilities, you can display an overlay with information about resources and limit FPS using standard DXVK tools, for example:

DXVK_HUD=fps DXVK_FRAME_RATE=60 gamemoderun %command%

Meaning of DXVK_HUD=fps ... DXVK_HUD=full:

  • devinfo - Displays the name of the GPU and the driver version.
  • fps - Shows the current frame rate.
  • frametimes - Shows a frame time graph.
  • submissions - Shows the number of command buffers submitted per frame.
  • drawcalls - Shows the number of draw calls and render passes per frame.
  • pipelines - Shows the total number of graphics and compute pipelines.
  • descriptors - Shows the number of descriptor pools and descriptor sets.
  • memory - Shows the amount of device memory allocated and used.
  • gpuload - Shows estimated GPU load. May be inaccurate.
  • version - Shows DXVK version.
  • api - Shows the D3D feature level used by the application.
  • cs - Shows worker thread statistics.
  • compiler β€” Shows shader compiler activity
  • samplers - Shows the current number of sampler pairs used [D3D9 Only]
  • scale=x β€” Scales the HUD by a factor of x (e.g. 1.5)

Frame rate limit DXVK_FRAME_RATE=0

dayz-ctl's People

Contributors

airtonix avatar woozymasta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

dayz-ctl's Issues

Uninstall Instructions

I see packages are installed in the following directories. Is there a uninstall script or simply delete the following and any additional directories not listed below.

/.local/bin/dayz-ctl
/.local/bin/fzf
/.local/bin/gum
/.local/bin/steamcmd
/.local/share/dayz-ctl/
/.local/share/applications/dayz-ctl.desktop

Usage of Serverbrowser / Missing Error Message

cant launch directly into server on archlinux

using all-server > [SELECT SERVER] -> Play

the tool exits without doing anything, wether I'm ingame / outside of the game

there is no error message i get, am i misunderstanding the usage ?

Launching the game normaly via Launch Game works fine

FR: add launch option for FSR

According to https://support.system76.com/articles/use-amd-fsr/ one can run Proton games using FSR using either:

WINE_FULLSCREEN_FSR=1 %command%
or
WINE_FULLSCREEN_FSR=1 WINE_FULLSCREEN_FSR_STRENGTH=1 %command%
Where the latter allows to set sharpening level.

It would be absolutely wonderful if this could be incorporated into dayzctl, a launcher I gratefully use nearly every day :)
Or maybe allow setting a custom launch option in addition to the existing list.

Steam root at $HOME is assumed

I use steam library at my SSD which is not the same device on which my system is located which results in error : DayZ not installed or cant find it
What can i do?)

server filter by country

it is required to prepare the database of servers after downloading, fill all the servers with the finished result from the geoip database

~8k geoip calls take <1min
the cycle with writing values to the database slows down the process by x5-10 times, you need a quick solution

Ошибка установки dayz-ctl

ПослС установки всСх зависимостСй, Π²Ρ‹Π»Π΅Ρ‚Π°Π΅Ρ‚ ошибка Π½Π° Π½Π΅Π²ΠΎΠ·ΠΌΠΎΠΆΠ½ΠΎΡΡ‚ΡŒ ΡΠΊΠ°Ρ‡Π°Ρ‚ΡŒ dayz-ctl

+ local url=https://github.com/charmbracelet/gum/releases/download/v0.6.0/gum_0.6.0_linux_x86_64.tar.gz
+ command -v gum
+ wget -q --show-progress --progress=bar:force -O /home/random/.local/share/dayz-ctl/bin/dayz-ctl https://raw.githubusercontent.com/WoozyMasta/dayz-ctl/master/dayz-ctl
/home/random/.local 100%[===================>]  45,21K  97,4KB/s    in 0,5s    
+ chmod +x /home/random/.local/share/dayz-ctl/bin/dayz-ctl
+ command -v dayz-ctl
+ '[' -d /home/random/.local/share/applications ']'
+ '[' -d /home/random/.local/share/icons ']'
+ icon_path=/home/random/.local/share/icons/dayz-ctl.svg
+ icon=dayz-ctl
+ wget -q --show-progress --progress=bar:force -O /home/random/.local/share/icons/dayz-ctl.svg raw_url/master/extra/dayz-ctl.svg
+ fail 'Can'\''t download dayz-ctl from https://github.com/WoozyMasta/dayz-ctl'
+ printf '\e[1;31mERROR:\e[0m %s\n' 'Can'\''t download dayz-ctl from https://github.com/WoozyMasta/dayz-ctl'
ERROR: Can't download dayz-ctl from https://github.com/WoozyMasta/dayz-ctl
+ exit 1

add the ability to run from steam

Redefine the launch command in steam to dayz-ctl %command% and catch the launch state, exclude self-retraction

if [ "${2:-}" = SteamLaunch ] && [ "${3:-}" = "AppId=$DAYZ_GAME_ID" ]; then
  # xterm or https://github.com/i3/i3/blob/next/i3-sensible-terminal
  exec xterm -e dayz-ctl -T 'DayZ CTL Launcher'
fi

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.