From 94670ff12a6d0a14e0371a4ca9946bd2d012519c Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Fri, 19 May 2023 12:43:27 +0900 Subject: [PATCH] docs: update documentation --- docs/dzgui.adoc | 476 +++++++++++++++++++++++++++++++++++++++++++ docs/dzgui_dark.adoc | 476 +++++++++++++++++++++++++++++++++++++++++++ dzgui.sh | 121 +++++------ 3 files changed, 1002 insertions(+), 71 deletions(-) create mode 100644 docs/dzgui.adoc create mode 100644 docs/dzgui_dark.adoc diff --git a/docs/dzgui.adoc b/docs/dzgui.adoc new file mode 100644 index 0000000..554e9ef --- /dev/null +++ b/docs/dzgui.adoc @@ -0,0 +1,476 @@ +:nofooter: +:toc: left +:stylesheet: custom.css + += DZGUI documentation +DayZ official/community server graphical launcher for Linux | Last updated: 2023-05-15 + +Click https://aclist.github.io/dzgui/dzgui_dark.html[here] for dark mode + +== What this is +A GUI version of https://github.com/aclist/dztui[DZTUI] for Linux. +Used to list official and community server details and quick connect to preferred servers +by staging mods and concatenating launch options automatically. + +Development on DZTUI (terminal client) has stopped at this time. +Instead, DZGUI brings numerous functionality and security improvements and is intended to be a more user-friendly, +turnkey solution for graphical desktop environments, and can also be used on the Steam Deck or similar devices. + +== Setup +=== Dependencies +If not already installed, the below can be found in your system's package manager. + +If any dependencies are missing when the application starts, it will warn you, so you need not take any preemptive measures here. + +- `curl` +- `jq` +- `zenity` +- `steam` +- `wmctrl` or `xdotool` + +=== Preparation +. **Download DZGUI and make it executable:** + +Automatic method: generic OS (skip to step 3 below when complete) + +``` +curl -s "https://raw.githubusercontent.com/aclist/dztui/main/install.sh" | bash +``` + +Automatic method: nix-based systems (contributed by lelgenio) + +Follow the instructions at https://github.com/lelgenio/dzgui-nix to ingest the package and dependencies +into your system using flakes. + +Manual method + +``` +git clone https://github.com/aclist/dztui.git +chmod +x dzgui.sh +``` + +''' +[start=2] +. **Update the `vm.max_map_count` value (see https://www.protondb.com/app/221100)** + +**Automatic method:** + +This is handled automatically by DZGUI if you just choose to run the application out of the box. +You will be prompted for your sudo password in order to check whether the system map count is too small. +This is a one-time check that will not be triggered again once the map count is updated. +If you used the automatic method, you can skip to Step 3 below. + +[NOTE] +The map count check prompts for a sudo password. If you are using a Steam Deck and have never set a sudo password, +you must enter Desktop Mode, invoke `passwd` from Konsole, and type your desired password twice to set it. + +This process writes the count to the file `/etc/sysctl.d/dayz.conf`. + +If the map count was lower than the threshold, it is updated to 1048576. +If the system map count was already higher, that value is interpolated into this file as a redundancy check. + +[NOTE] +If, for reasons unrelated to DayZ, you choose at a later time to raise your system map count higher than it originally was and +you find that the count is not sticking, check for the presence of the `dayz.conf` file to see if it is taking precedence and delete it accordingly. + +**Ephemeral method:** +the map count will revert after the system is rebooted. + +``` +sudo sysctl -w vm.max_map_count=1048576 +``` + +**Persistent method:** +``` +echo 'vm.max_map_count=1048576' | sudo tee /etc/sysctl.d/dayz.conf +``` + +[start=3] +. **Prepare a Steam account with a DayZ license** +. **Enable a Proton version ≥ `6.8` (or use Experimental) in the `Compatibility` field of the game's right-click options.** + +=== API key & server IDs +==== BattleMetrics API key +1. Register for an API key at https://www.battlemetrics.com/account/register?after=%2Fdevelopers[BattleMetrics] (free) +2. From the **Personal Access Tokens** area, Select **New Token** +3. Give the token any name in the field at the top +4. Leave all options **unchecked** and scroll to the bottom, select **Create Token** +5. Copy the access token for later use (see below). This is the unique token you will use to query servers. + +==== Steam API key +1. Register for a https://steamcommunity.com/dev/apikey[Steam API key] (free) using your Steam account. You will be asked for a unique URL for your app when registering. +2. Since this key is for a personal use application and does not actually call back anywhere, set a generic local identifier here like "127.0.0.1" or some other name that is meaningful to you. +3. Once configured, you can insert this key in the app when launching it for the first time. + +=== First-time launch + +0. It is always advised to have Steam running in the background. DayZ is meant to run "on top of" Steam. + +1. DZGUI can be launched one of two ways. + +**From the terminal:** + +``` +./dzgui.sh +``` + +Launching from the terminal gives more verbose information in the event of a crash, +and can be a good way of troubleshooting problems. + +**From the shortcut shipped with the application** (if using a desktop environment based on the Freedesktop specification): + +- Located under the "Games" category of your system's applications list. +- Via the DZGUI desktop shortcut (Steam Deck only) + +[start=2] +2. Follow the menu prompts given by the app. You will be asked to provide: + +- Player name (a generic handle, required by some servers) +- BM API key (see above) +- Steam API key + +==== Steam path discovery + +DZGUI will then attempt to locate your default Steam installation and DayZ path. You *must* have DayZ installed in your Steam library in order to proceed. (It can be installed to any drive of your choosing.) +If DZGUI cannot find Steam or cannot find DayZ installed at the detected Steam path, it will prompt you to manually specify the path to your Steam installation. + +Specify the top-level entry point to Steam, not DayZ. E.g., + +`/media/mydrive/Steam`, not `/media/mydrive/Steam/steamapps/common/DayZ` + +If your Steam installation is in a hidden folder but the file picker dialog does not show hidden folders, ensure that your GTK settings are set to show hidden files. + +For GTK 2, edit the file below so that `ShowHidden=true`: + +`~/.config/gtk-2.0/gtkfilechooser.ini` + +For GTK 3, invoke the command: + +`gsettings set org.gtk.Settings.FileChooser show-hidden true` + +=== Steam integration & artwork + +==== Adding to steam + +DZGUI can be added to Steam as a "non-Steam game" in order to facilitate integration with Steam Deck or desktop environments. + +1. Launch Steam in the "Large" view. + +[NOTE] +Steam Deck: you must switch to "Desktop Mode" and launch Steam from the desktop. + +[start=2] +2. Select **Add a Game** > **Add a Non-Steam Game** from the lower left-hand corner. + +image::https://github.com/aclist/dztui/raw/testing/images/tutorial/01.png[01,500] + +[start=3] +3. Navigate to `$HOME/.local/share/applications/` and select `dzgui.desktop` +4. Select **Add Selected Programs**. + +==== Controller layout + +An official controller layout for Steam Deck is available in the Steam community layouts section. Search for "DZGUI Official Config" to download it. Long-press the View button and Select button (☰) to toggle D-pad navigation. This creates an additional layer that lets you navigate through menus using the D-pad and A/B to respectively confirm selections and go back. Remember to toggle this layer off again after launching your game to revert back to the master layer. + +==== Artwork + +The application also ships with Steam cover artwork. It is located under: + +``` +$HOME/.local/share/dzgui +``` + +The artwork consists of four parts: + +1. Grid: a vertical "box art" grid used on library pages +2. Hero: a large horizontal banner used on the app's details page +3. Logo: a transparent icon used to remove Steam's default app text +4. dzgui: used by freedesktop shortcut to generate a desktop icon; not intended for the user + +Updating the artwork: + +1. Navigate to the app's details page and right-click the blank image header at the top. + +image::https://github.com/aclist/dztui/raw/testing/images/tutorial/03.png[03,700] + +[start=2] +2. Select **Set Custom Background** +3. Select to display All Files from the File type dropdown +4. Navigate to the artwork path described above and select `hero.png`. +5. Next, right-click the image background and select **Set Custom Logo**. + +image::https://github.com/aclist/dztui/raw/testing/images/tutorial/04.png[04,700] + +[start=5] +5. Navigate to the same path and select `logo.png`. Notice that this removes the redundant app name that occluded the image. + +image::https://github.com/aclist/dztui/raw/testing/images/tutorial/05.png[05,700] + +[start=6] +6. Next, navigate to your Library index (looks like a bookshelf of cover art) and find the DZGUI app. + +[start=7] +7. Right-click its cover and select **Manage** > **Set custom artwork**. + +image::https://github.com/aclist/dztui/raw/testing/images/tutorial/06.png[06,700] + +[start=8] +8. Navigate to the same path and select `grid.png`. The final result: + +image::https://github.com/aclist/dztui/raw/testing/images/tutorial/07.png[07,700] + + +=== Updating the app +If DZGUI detects a new upstream version, it will prompt you to download it automatically. +It backs up the original version before fetching the new one, then updates your config file with your existing values. Once finished, it will ask you to relaunch the app. + +If you decline to upgrade to the new version, DZGUI will continue to the main menu with the current version. + +[NOTE] +New versions may include changes to bugs that could prevent you from playing on certain servers. +Upgrading is always advised. + +If you experience a problem or need to restore the prior version of DZGUI and/or your configs, +it is enough to simply replace the new version with the old one and relaunch the app. +The files can be found at: + +Script: +``` +