Closed haupthakan closed 2 years ago
Thanks for the suggestion. I could definitely look into that after receiving my Steam Deck in Q3. Flagging as on hold until then.
I'm playing DayZ almost daily on my SD but only on official ones. I've tested your script and it worked. If you want to start a GUI version and need someone who wants to try it out I would do it :)
Hmm. "Black box" development without being able to see the result can be difficult, but perhaps we could have a beta branch with some experimental GUI if you want to try it and report on the results. I'm thinking you just need a simple selection menu that can be controlled via the joystick, right? Does the joystick natively support moving around system menus when they pop up? Does Steam deck apply some styling to menus launched by the system?
I think we could just use system GTK bindings to draw a simple GUI and populate it with the array elements like so: https://i.imgur.com/py0VZLw.png
WIth this method, the menu should inherit the system window manager's styling and font size settings by default.
Sure. I would report frequently. You can use the trackpad as a mouse so you wouldn't have to design it specifically for controllers in mind. I think it would also be cool for normal pc users to use a gui. It would just have to be a script that launches the gui and you could add the script to your steam library. I've added a lot of scripts and you can start them no problem. One cool one is a script that launches a script that wol your pc. (scawp on GitHub)
I usually design terminal applications because that is what I personally want to use, but I can see why a GUI would be helpful in those cases. Especially with the SD, needing to input keyboard keys to move the menu is not ideal.
I guess we could have a GUI branch and rough out the core functionality before merging it into the main tool as a runtime option (choose to launch either TUI or GUI version).
What about if the script finds missing mods and wants you to install them? How do you propose handling this? We need to offer a button or something to trigger opening the links in the store, then allow the user to return to the script, right? Does the SD let you switch back to an unfocused window? I feel like the automatic/expert mode (steamcmd) would be better here, otherwise you will have to switch back and forth repeatedly. Or would the user just dock their SD, set up their mods with a mouse and keyboard, then use the tool exclusively as a launcher when all of their preferred servers are set up?
I think for now we should focus on getting the "launcher" part working as the minimum proof of concept, then focus on how to integrate some of the other features.
I think if you open a steam workshop link to the mod you can just open it and then press the b button and it goes back to the previous window. You can switch between multiple windows Like Dayz Game and Dayz launcher. I think I've had a game where I had to download some workshop content and it just opens the workshop where you subscribe to the content and with one b button press it goes back to the game. I mean I've used your launcher for a test on the steam deck and it worked. But with the small onscreen keyboard it's a pain to start it every time. I could add your script to the library and show you a screen recording how it would look like if I start it on the steam deck.
I see. Conceptually, I understand. I am just thinking of edge cases. SD is fundamentally a kiosk app, so I think the basic workflow for multiple mods would be like this:
Script prompts user to click button to open workshop -> user subscribes to mod, returns to script -> script reevaluates installed mods, prompts user to click button to open next mod in the list -> user subscribes to mod -> repeat until all mods requested are found.
Anyway, I'll have a small prototype of the GUI launcher for you in a few days. If you can send images/recordings at that time showing any problems, that would be great. Basic prototype is working here. I just need to investigate repopulating the list when refreshing, because I am using an external library.
Thanks for your great work. Im really looking forward to it :) When it's ready for some more people to try it think about posting it in the steam deck and Dayz subreddit so more people can enjoy it
Here's an experimental prototype (DZGUI) for you to try: https://github.com/aclist/dztui/tree/experimental
Important notes:
yad => 12.0
(available in arch repositories)I'd like to know whether the window is sized correctly and is readable, and if there are any graphical problems. I'd also like to know whether you can use it from start to finish to connect to a known server. Please provide as much detail as possible.
I still need to add a lot more error handling and graceful exiting for edge cases, and finish porting over the actual mod validation and installation routine. Most of the work is done, we just need to see how windows and buttons are interacting. Adding the other features is the easy part.
Hi So for the past few days I've tried some things but unfortunately I couldn't get it to work. I'm struggling with yad. I just can't get it to work on the steam deck. I think if it's going to be for everyone it would be important to use the resources already on the steam deck. Like emudeck and others there seems to be a way for some gui without yad.
No need to struggle. If you get stuck, you should post here first.
emudeck uses zenity
to draw its menus. zenity
is deprecated and is no longer maintained. yad
is a fork of zenity
that is more actively maintained and brings features like updating a list in place, which we're using to repopulate the server list.
Technically, the correct thing to do here would be to use a lower-level language and invoke GTK bindings to natively draw menus. That is a vast undertaking, though.
The other option here is to include a pre-compiled version of yad
and its license as a binary so that it can be linked directly from the root directory of the script. This should work, but I can't say for certain without knowing more about the SD architecture. It might also alleviate the problem of SD overwriting custom packages when updating.
What exact problem did you run into?
I added a /lib
directory to the experimental branch that contains a compiled binary of yad
and the file test.sh
in the root directory that will attempt to create a test dialog using this compiled binary. Give it a try. I have a feeling it should work, but I can't say for certain without knowing more about SD's architecture.
So I've just got back from work and tested the test.sh but got a premission denied for the lib folder (/home/deck/Downloads/dztui-experimental/test.sh: line 5: /home/deck/Downloads/dztut-experimental/lib/yad: Permission denied) For your first question if I want to install yad im getting a keyring error or something like that. Tried some solutions I've found online but with no luck. I've even redetted my steam deck :) I think some time ago someone on github released an iso of steamos for other devices. (called holoiso if I remember correctly) maybe it helps you :)
I didn't push the file with executable flags (will do so later). You can invoke chmod +x
on the yad
file and it will become executable.
Yes I've done this but made no difference. Always says Premission denied
I need more verbose information in order to help you:
It could be something quite simple or a mistake on my end, but like I said, I don't know about the SD architecture or your setup, so I'm just taking educated guesses here. I can't run the SD image because Holoiso does not work on Nvidia chips.
So permissions are read write execute Owner is the user "deck" It's in the folder "/Downloads/dztui-experimental" Running as user "deck" I've tried through right-click->Run in console and right from the terminal with no difference
To be honest I'm not using linux for long( 1 year max) so I don't know everything :)
Alright. I've been a bit busy. The problem with black box development is that I can't test this stuff for you really well. This'll be easier to troubleshoot once I have a SD.
Do you also get an error if you try to run the yad
binary directly from the lib
directory?
One thing I could do is drop back down to zenity
instead of yad
, but you'll lose the functionality to refresh the server list live. What do you think? Eventually I could use compiled code and draw the menus natively, but that's out of scope for now.
So I think I'm getting a different error.
I don't know how much work it is. Maybe you could make a window where you add the battlemetrics id or select a previous one and in the next window it shows what mods you need to install with links. Im not sure what would the best approach for this
That's actually very helpful; I see exactly what the issue is.
I didn't realize that the default settings for yad
compile it against some dynamic libraries that aren't found on the SD. I just went and recompiled it with all extraneous libraries disabled, so hopefully these are included in the default system. If not, I could compile it with static libraries, or I can just switch to an alternative menu system.
Anyway, before I push a fresh version of yad
, I made a little logger that will check your system for the required dependencies and generate a log if any are missing. You can get it at https://github.com/aclist/dztui/blob/experimental/lib/libtest.sh
Those are the libraries yad
is dynamically linked against. If any are missing, it will generate a libs.log
file the contents of which you can paste here. If everything is fine, it will just exit normally with a message.
I'm thinking it might even be a good idea to have entirely standalone tools for terminal, desktop PC, and SD, which would mitigate some of these problems. I have a few ideas. Need to establish a baseline for functionality first.
Thanks for your quick reply :) I've started the script and got the log: libicuuc.so.71 libicui18n.so.71 libicudata.so.71
Sounds pretty cool to be honest. I think Linux need a cool Dayz launcher.
Thanks for your patience! Few more things to try:
ldconfig -p | grep -E 'libicuu.*|libicui18.*|libicudata.*' > out
Paste content here. Thanks.
libicuuc.so.70 (libc6,x86-64) => /usr/lib/libicuuc.so.70
libicuuc.so.70 (libc6) => /usr/lib32/libicuuc.so.70
libicuuc.so (libc6,x86-64) => /usr/lib/libicuuc.so
libicuuc.so (libc6) => /usr/lib32/libicuuc.so
libicui18n.so.70 (libc6,x86-64) => /usr/lib/libicui18n.so.70
libicui18n.so.70 (libc6) => /usr/lib32/libicui18n.so.70
libicui18n.so (libc6,x86-64) => /usr/lib/libicui18n.so
libicui18n.so (libc6) => /usr/lib32/libicui18n.so
libicudata.so.70 (libc6,x86-64) => /usr/lib/libicudata.so.70
libicudata.so.70 (ELF) => /usr/lib32/libicudata.so.70
libicudata.so (libc6,x86-64) => /usr/lib/libicudata.so
libicudata.so (ELF) => /usr/lib32/libicudata.so
Thanks. Try this updated version here: https://github.com/aclist/dztui/blob/experimental/lib/yad
chmod +x yad
./yad
It should draw a small confirmation box if working correctly.
Sorry but didnt get the box
./yad: /usr/lib/libc.so.6: version GLIBC_2.34 not found (required by ./yd)
Tried to install GLIBC but always getting some keyring not writable error or something like that
I believe SD architecture is set to be read-only so that the user can't wantonly install external packages.
It's not generally a good idea to statically link glibc in a compiled binary, so I think yad
is a dead end for now. (I think zenity
could sort of fit the bill, but I was just trying to avoid having to rewrite some stuff before going that route.)
I'll make a more simple version using basic zenity
commands. In the meantime, can you confirm that zenity
displays correctly?
E.g., zenity --width=1000 --height=500 --list --text="DZGUI" --title="DZGUI" --column="Server" "My server" --column="IP" "My IP"
So it worked in Desktop Mode. Ill try it in Gaming Mode and post some footage if it works and how it looks.
EDIT: So it looks like this in Gaming Mode
OK, great. So is the part with the "44" the top of the screen? Would it be better if it covered the entire screen? Or should it be floating? I just used some arbitrary dimensions. We can make it span the entire resolution if necessary.
I'll start reworking this to support zenity and will have a better prototype in a few days.
Oh that's the fps counter :) and I've limited mine to 40. I don't think it's a big deal if the window looks like this. It doesn't bother me or something so it's up to you :) Thanks. have fun :)
I'll make some tests with different menus. One question, does the joystick/trackpad work natively on these menus, or do you have to use the touchscreen?
I tried it but joysticks don't work out the box but Touch worked fine. You can also configure to use the trackpad an the triggers as a mouse
Dm me on discord if you want so we can communicate more effectively ;)
Was a bit busy with work.
Sorry, I don't use Discord. I need to keep the log of communications in one place here for reference purposes. I appreciate your feedback and will try to make the reply cadence more predictable.
I have something for you. Try the latest dzgui.sh
on the experimental
branch: https://raw.githubusercontent.com/aclist/dztui/experimental/dzgui.sh
It relies solely on zenity
and does not use yad
anymore (some upsides gained, some fancy features lost--overall good).
Test it once just how you normally would and stop if something fails, then report it here. As before, you will need to set servers you have all the mods ready for, because I didn't finish the mod validation logic yet since I want to be sure the menus are spawning in a predictable fashion. Mod validation is the top priority before elaborating other features. If you have all the mods, it should connect with no problem (tested as working).
This version moves the config settings to a dedicated file in $HOME/.config/dztui/dztuirc
. This file will be shared across versions of DZTUI/DZGUI in the future and makes sourcing/sharing the configs across both tools easier.
If this file does not exist, the program will prompt you to create it automatically. This will create a template file, and you'll have to then fill it with your API key and server IDs.
I left the default steam path blank because I don't know what it is on the Steam Deck yet. Could you tell me?
Once you're satisfied that basic functionality is working, you should test this:
dztuirc
fileSelect
or Ok
on a list menu without first selecting any item in the list (just trying to proceed with no selection)Ok
on the dialog box that tells you servers are being queriedThere should be error handling for all of these scenarios already, but just double-checking. Re #3, I think there is some small problem here and the dialog is not being destroyed correctly. I will look into it further.
Error menus that contain some kind of useful debug output (e.g., list of malformed config file settings, dry-run of DayZ launch options, anything that would need to be shared with the developer) are formatted so that the text can be copied and pasted directly out of them.
Also try the options:
Open mod page
List system browser
The first will attempt to open a community mod page within Steam. This is a test for future mod compatibility/installation logic. The second should list what the system default browser is set at (probably Firefox out of the box). This is to test linking directly to the help file, either directly through Steam or through the system browser.
A nice thing is that we can hijack the window title area to print the version number, the "mode" (debug/normal), and list the user's favorite server so that you can quick connect to it without checking. If the fav server is set, I plan to cache its human readable name and store it for future invocations of the program after checking if it has changed.
Perhaps setting the fav server could be done within the program as well. Or we could expose the rc file by letting the app open a text editor. Or...zenity
does provide a forms dialog that could be used to let the user fill in values like you would on a smartphone. I think you could tap the fields and get an onscreen keyboard. It seems a bit overkill for now, though, since you need to paste in a long API key and server IDs, so it's assumed that some initial setup will be done at the desk. But this could definitely be used for the "Add server by ID" feature.
The main limitation is that zenity
is not flexible in the choices you have, so you have to be creative about how you structure your data (and your menus).
One other nice thing is that I can just deploy unit tests for work in progress to the main menu and have you test single features without needing complex troubleshooting.
I also hardcoded the dimensions of the SD display (for now), so menus should fill the frame correctly. Not sure if that will be occluded by the FPS counter or if text around the edges should be padded a bit.
So Ive tested it and Ive tested some servers and it worked fine with the file sitting on the desktop. It sets up the mods and joins the server. As soon as i add it to my Steam library it just didnt launch.
-Getting Errors when starting with missing things ([ERROR] Malformed game path) -Pressing OK with no selection just quits the program and says no item selected -repeatedly presing esc just quits it
open modpage opens a mod page in the steam client. List System Browser just shows empty Text Viewer Windows (maybe because not running through steam)
Ill post the config file here so you have a working config. (of course without api :))
`
steam_path="/home/deck/.local/share/Steam" workshop_dir="$steam_path/steamapps/workshop/content/$aid" game_dir="$steam_path/steamapps/common/DayZ"
api_key=""
whitelist=""
fav=""
name="HauptHakan"
debug=0
ping=1
`
As soon as i add it to my Steam library it just didnt launch.
OK. I hadn't actually tested adding it as a non-Steam game, just assumed it would work. I tested it and found the bug you described. Seems it didn't like a fancy separator character in the title of the window. Try with the latest version (1.0.2
).
-Getting Errors when starting with missing things ([ERROR] Malformed game path)
OK, that's working as expected.
Pressing OK with no selection just quits the program and says no item selected repeatedly presing esc just quits it
I added a progress bar and changed the behavior here. Try pressing OK with no selection and see if it brings you back to the main menu.
open modpage opens a mod page in the steam client
Good, working as intended.
List System Browser just shows empty Text Viewer Windows
SD must not set the $BROWSER variable then. I changed it to try to open a URL directly with the Steam browser protocol, please test again.
steam_path="/home/deck/.local/share/Steam"
Thanks, added this path to default configs. Try backing up your dztuirc
file and launching anew and see if it gets created correctly.
So I've tested it and so far it seems to be working. I can launching within the normal steam deck ui and it has no problems launching dayz with the mods. So far I've tested some servers with not that many mods. Only issue I've came across was that battlemetrics shows some mods which can't be found on the workshop ( I assume Server side mods). If I try to join these servers it just won't load in (probably because of these missing mods?). Dzgui just closes and nothing happens.
Open modpage in Gaming mode again opens the modpage. With a press on the B button it brings you back to dzgui
List system browser opens the browser with the link to this issue. Again pressing B brings you back to dzgui.
The path in the generated config file is putting in the correct path.
So far I'm really impressed of your nice work :) thanks
Only issue I've came across was that battlemetrics shows some mods which can't be found on the workshop ( I assume Server side mods). If I try to join these servers it just won't load in (probably because of these missing mods?). Dzgui just closes and nothing happens.
I haven't added the mod validation yet. This was just a prototype phase. So you'll have to be careful about what servers you connect to. Now that we confirmed basic behavior is working, I need to add the actual mod check/mod download process. Right now, if you are missing any mods, it's just going to crash and exit. I need to port over the mod check from DZTUI to DZGUI.
I'm not sure about mods not being shown in workshop. Can you link an example server so I can investigate?
Open modpage in Gaming mode again opens the modpage. With a press on the B button it brings you back to dzgui List system browser opens the browser with the link to this issue. Again pressing B brings you back to dzgui.
Looks like we can use these for navigation then, which will be helpful. I'll start redoing the menu and adding the real options in.
Hope you can play more easily for now while we work on the next version.
The missing mod link is on many modded servers
https://www.battlemetrics.com/servers/dayz/13864540
In this it's the last two mods in the list.
Yes thanks :) For now servers with all mods in workshop work flawless Tried some more and also quitting and join another right away without putting the deck to sleep or shutting it down and it worked fine
OK, looks like that issue is identical to issue #4. It was fixed in https://github.com/aclist/dztui/commit/aac5fb656c4567dda17dbc4deaec26c9b9e33a6b of DZTUI. So once I port that feature over, it will work.
DZGUI 1.1.1
is now available in the dzgui
branch (moved out of experimental
).
Basically, everything should now be self-explanatory on the app and in the main menu. We also have a changelog now that explains things:
https://github.com/aclist/dztui/blob/dzgui/changelog.md
In the main menu, you can now:
Importantly: mod validation and compatibility check is done, meaning all servers should be able to be connected to.
Also added:
Please give it a try and report anything you see behaving strangely. I tested all functionality as working and was able to connect to servers after synchronizing mods.
The manual mod install process prompts you to click a button to jump to the Steam Workshop, subscribe to a mod, then go back to the app and check for the next missing mod until they are all installed.
Nice. I'll check it out tomorrow. Just now there came something in my mind you should implement. If you install DayZ on your microSD you'll have another path. Maybe a feature where you can select your install path would be helpful. And of course post it in the steam deck subreddit or somewhere:) Thanks for your great work
You could, but then to be consistent you'd have to expose ways of adding this stuff, too:
It could be done, but I sort of assumed the config file would be created manually at first. The "Add server by ID" feature is just if you want to add an additional server after you already prepared your configs.
I guess it makes sense, though. So if it's the first time being run and there is no config, create the barebones config for the user and then prompt them to fill in their settings and choose their path. It's definitely doable, just gonna be clicking through a lot of menus.
I also wonder if it would be kind of messy, since you have to tell the user to navigate to BattleMetrics, then come back, insert API key, etc. etc. On the other hand, you can create a single menu with lots of text fields and use this to fill all of the details in (if someone doesn't want to get their hands messy with the config file).
I could make a small test for that. For now, please check the other stuff when you have time.
Oh Dear God! I read this issue from top to bottom with bated breath. This is the exactly what I am looking for! Menus? I will take all the damn menus. All of them! If there is anything that I can do to assist with a desktop version Please let me know. Here is my desktop setup:
AMD Ryzen 7 3700X 16Gs RAM Nvidia Geforce GTX 1070
OS is Linux Mint 20.3 - 64 bit
I have been using Linux for years now, as I guess what you would consider a lite to moderate type of user, not a power user. With the release of Proton I started testing DayZ periodically on Linux in a dual boot setup several years ago. Once it launched in Mint and I could play for the first time with my wife on a Official Server.....Windows was fully removed from the system.
But she has discovered modded servers and I am not quite savvy enough to follow the TUI. It just is a little to foreign for me to understand. So if I and my setup can be of any assistance I will be more than happy to provide some time in the evenings.
And I think it would really go a long way for me in another way....We home school our son that has autism, and this summer we have started a summer class to start the process of learning to code. We are using the NoStarch Press books on Python, and are starting with "Invent Your Own Computer Games with Python", since of course a teenager is all about Video Games and wants to someday be a game dev. Perhaps if he sees me assist with a real world solution to a real world problem it will make it that much more real to both of us.....
Also, what language are you writing the code in?
If there is anything that I can do to assist with a desktop version Please let me know.
Thanks for reading everything. Based on other comments, there is apparently more of a demand for a GUI version than I had anticipated.
The experimental version above was designed with the Steam Deck in mind, but only on a very superficial level: I hardcoded the size of some menus and things, but there is no reason it shouldn't work on a desktop machine (in fact, I have tested it all this time on one). The methods are generic enough to work in both cases. I do need to add some way of dynamically detecting the Steam Deck versus desktop and setting parameters that way, but that would be invisible to the end user, anyway.
So you can already grab dzgui.sh
out of this branch and run it: https://github.com/aclist/dztui/tree/dzgui
There's nothing to stop you from using it already.
On first launch, it should ask you a few things and stage a config file for you, but there was talk above of making this process more seamless for people who don't want to open a text file.
The only thing that is lacking here is additional documentation/onboarding, as the application assumes that you will fill in your config file yourself. (It's not hard.)
Anyway, in brief:
$HOME/.config/dztui/dztuirc
steam_path
key in the config file with the path to where you have Steam installed. Make sure to preserve quotation marksapi_key
key with the API key you obtained abovewhitelist
key, comma-separatedfav
key. You can quick connect to this server from the main menuplayer
key. Some modded servers use this to identify youThis is functionally the same as explained in the documentation for DZTUI, the TUI counterpart. I'm not sure what kinds of difficulties GUI users are encountering at the moment. So perhaps you can state if something was confusing. If some step of 1-12 above was difficult, I may evaluate how to simplify that.
I need to think about auto-detecting the Steam path or adding form fields into the app itself. It introduces a lot of annoying recursion and nested menus, and quite a lot of error handling versus letting the user manually roll their own config file. I think it's kind fo good to have the user become familiar with the location and format of the config file, since this is where their settings will persist, and it can be carried over and used in subsequent versions of the app, and eventually in DZTUI.
Also, what language are you writing the code in?
It's listed on the main page: 100% shell. You can inspect dzgui.sh
and see; it is not compiled code.
If vanilla DayZ is already working for you on Linux, you probably don't need to, but additional prerequisites are below:
This is so great to hear, THANK YOU! But I have a couple of questions before I continue.....
I will wait on the API token until I better understand it, guess I need a bit of hand holding to get past some anxiety...I will take another look at downloading the app while I wait for a reply.
I will be happy to record my experience and get any hardships noted!
Thank You again!
EDIT: Found the Download.Zip Link, just need some guidance on the API Token now...
EDIT-2: Decided to try and make and API Key with nothing chosen, just to see if making a 2nd key was possible, discovered that a revoke option is available after doing so. So started the testing with the "blank" API Key. Not actually expecting it to work, but at least I provided a key to put into the config file.
EDIT: 3 With that done, I did figure out how to launch the dzgui.sh file in my terminal after giving it "launch as executable" permissions.
So have the config file created. Updated the config file steam path. Left the workshop_dir and the game_dir alone for the first run after creating the config file. Updated the API key Found and updated the Server# Updated the user name to "my name of choice" Left others alone.
Results:
At this point, still would like some information about the API key and what I need to choose as permissions. Also, guess I need some insight about the paths, did I get them correct? Should I be looking for another location that is not in the DayZ installation folder?
These are really great observations. There are obviously some things I was taking for granted here.
I am fairly new to GitHub, so when you indicate to download the app, I have run into other GitHub projects where there is a "latest-build" button on the right hand side, but I do not see one on the dzgui page....what am I missing?
This being a standalone script, it is enough to simply download the dzgui.sh
file. If you prefer to clone the entire repository locally, you can do that as well, and it comes with a changelog file (also visible on GitHub), but it is not important. I probably won't add bundled releases unless there is an explicit need or if we start adding more files into it.
BattleMetrics API Key? I understand it is a prerequisite, so I logged in using my steam account. Once in, I clicked on the "New Token" Key and got a really long page of options to select? Do I need to choose all of them, or certain ones? Just asking for a friend I swear....
This service provides all of the server query information we need. I actually haven't looked at it in awhile, so didn't realize there were multiple options. You don't need to specify any additional permissions (can all be left unchecked), we just need to perform basic queries and not actually interact with servers (those options are for server admins).
Decided to try and make and API Key with nothing chosen, just to see if making a 2nd key was possible, discovered that a revoke option is available after doing so. So started the testing with the "blank" API Key. Not actually expecting it to work, but at least I provided a key to put into the config file.
Yes, this was correct, and as you saw, you did get server results back.
With that done, I did figure out how to launch the dzgui.sh file in my terminal after giving it "launch as executable" permissions.
Yes, sorry if that was non-obvious, that is standard operating procedure. I'll make a note to include this in future documentation.
2nd Run after config file creation and update -> Error, jq required: Recalled this as required form the TUI page and went back and check for anything else. Used package manager to find and install jq, then checked to ensure that util-linux is installed. Already know that Steam is installed and running.
What distribution of Linux are you using? jq
is usually installed by default on many, so this is an important data point. The dependency check is working here as intended, but I'd still like to know for reference.
3rd Run - no jq error, however received error regarding the Workshop_Dir and Game_Dir directories. (Might want to make a note in the comments of the config file that all 3 must be updated, where they are typically or if this is to point to the game folders? Being in the beginning of learning coding, and having been dual booting for years until recently, I read the paths for Workshop and Game Directories as being coded in such a way that they would be auto found because of the previous line. I think I realize now that I have to actually set this up per game? Going to try it now.
The workshop and game paths should be interpolated (expanded) based on the Steam path given, assuming your Steam and games are installed on the same drive/partition. It's a bit of an assumption in the configs, but it should be true for the majority of users. And it can be filled in if it's not the case. The default Steam path should be $HOME/.local/share/Steam
on most distributions. The workshop path (mods go here) is then below that at /steamapps/workshop/content/221100
. The game path itself resides below Steam at /steamapps/common/DayZ
.
After setting the Map Size, launched the GUI, Attempted to connect to Fav: Server. System then ran through validating mods (I want to note here, I had previously tried to connect using the DayZ provided launcher that attempted to download the mods, but it kicks out a "Mods are corrupted" error. I did not delete these file folders or anything else from within my !Workshop that I found and linked to inside my steam DayZ installation folder. Figuring that I could save a download time for each.)
It's possible for mods to become corrupted in some scenarios. Going to the Workshop and unsubbing/subbing to them should reinstate them correctly. The download process is often instantaneous.
When going back to the GUI, press OK to continue and it again directs to the same mod page....so no not present or possibly corrupt again?
Make sure the download has actually completed before proceeding. You can also just keep clicking Yes/OK and it will keep checking the pending mod to see if it exists. (This process walks through the list of missing mods one by one until they are present.) You should navigate to your Steam path, then steamapps > workshop > content > 221100 and look inside it for a directory numbered 1559212036
, which corresponds to the mod you linked. If this problem persists, you can delete that directory in its entirety and attempt to unsub/resub to the mod on Steam to resync it.
I think the main issue here is identifying your workshop path and whether the mod is present. I don't believe this is an application-side bug, but if it is, I would like to document it.
What did you put for the workshop_dir
value, and what do you see in that directory? Actually, I have reason to believe you are pointing to the wrong directory, because the initial mod check merely looks for the numerical list of mod directories and compares it to the server, so if it claims the mod is missing, it's simply not present where it's looking. This is before any consideration of corruption.
Thank you aclist, that helped clear some of it up. Was using the wrong workshop directory for one....
As stated in my first contact with you, Linux Mint 20.3 (based on Ubuntu 20.04.5 LTS), So it seems that jq is not included in their build, but it was an easy find in the package manager.
Thank you for confirming that the API Key could all be blank....guess that rules out I need to go back and revoke and create a new one...
Regarding Paths now after reading your reply: Configuration File - /home/myUserName/.config/dztui Steam_Path - /home/myUserName/.steam <- This may be wrong, it appears that I also have the /home/myUserName/.local/share/Steam as an option.... Workshop_Path - /home/myUserName/.steam/steam/steamapps/common/DayZ/!Workshop <- Pretty sure that was wrong Game_Path - /home/myUserName/.steam/steam/steamapps/common/DayZ <- Should these both be pointing to the .local folder instead? I will try making the change and then unsubscribe and delete all references to the mods, then run the GUI again.
awk: fatal: cannot open file `/home/myUserName/.local/share/Steam/steamapps/workshop/appworkshop_221100.acf/meta.cpp' for reading (Not a directory)
awk: fatal: cannot open file `/home/myUserName/.local/share/Steam/steamapps/workshop/appworkshop_241100.acf/meta.cpp' for reading (Not a directory)
awk: fatal: cannot open file `/home/myUserName/.local/share/Steam/steamapps/workshop/appworkshop_284160.acf/meta.cpp' for reading (Not a directory)
awk: fatal: cannot open file `/home/myUserName/.local/share/Steam/steamapps/workshop/content/meta.cpp' for reading (No such file or directory)
awk: fatal: cannot open file `/home/myUserName/.local/share/Steam/steamapps/workshop/downloads/meta.cpp' for reading (No such file or directory)
awk: fatal: cannot open file `/home/myUserName/.local/share/Steam/steamapps/workshop/temp/meta.cpp' for reading (No such file or directory)
Perhaps this may help shed some light on what is going on? Permissions maybe? Also! Confirmed that the newly downloaded mod is now present in .local and .steam locations, so they are linked?
Thank you so much for your effort! Hope this was helpful.
One last thing, do I need to be using a beta version of steam or anything? I know I am using the newest proton, but not using the experimental, could I be missing a step here?
As stated in my first contact with you, Linux Mint 20.3 (based on Ubuntu 20.04.5 LTS), So it seems that jq is not included in their build, but it was an easy find in the package manager.
Right, sorry about that. I had hoped Ubuntu variants would include this tool, but I guess not. Do you find the error message explanatory enough, or should we explicitly tell the user to go to their package manager?
Regarding Paths now after reading your reply: Configuration File - /home/myUserName/.config/dztui Steam_Path - /home/myUserName/.steam <- This may be wrong, it appears that I also have the /home/myUserName/.local/share/Steam as an option.... Workshop_Path - /home/myUserName/.steam/steam/steamapps/common/DayZ/!Workshop <- Pretty sure that was wrong Game_Path - /home/myUserName/.steam/steam/steamapps/common/DayZ <- Should these both be pointing to the .local folder instead? I will try making the change and then unsubscribe and delete all references to the mods, then run the GUI again.
Close, but no cigar. The problem lies here. First of all, as a general point of clarification, $HOME/.steam
is a collection of symbolic links to the actual Steam installation path. In effect, they map to the same location in the end, but the real directory is $HOME/.local/share/Steam
(capital S). If you had opted to use the symlinked path, you would have had to set it as $HOME/.steam/steam
, but I advise using the real, not symbolic, path: again, that is $HOME/.local/share/Steam
.
You got the workshop path incorrect on both counts. It should be:
<steam path>/steamapps/workshop/content/221100
You weren't actually searching in DayZ's workshop directory, just the global workshop directory.
Thus, I advise reformulating your config exactly as follows (copy and paste if you like):
steam_path="$HOME/.local/share/Steam"
workshop_dir="$steam_path/steamapps/workshop/content/$aid"
game_dir="$steam_path/steamapps/common/DayZ"
Notice that you don't have to edit the workshop_dir
or game_dir
keys once you supply the Steam path, as it will interpolate the $steam_path
variable into those. The $aid
variable corresponds to 221100
, the game's appid, and this is already defined inside dzgui.sh
at runtime. Under the hood, the full path will thus expand to /home/myUserName/.local/share/Steam/steamapps/workshop/content/221100
without your having to do anything.
I think I'll add some wording to the config file to note that the user need only edit the first path. I'd also like to add some functionality to detect whether the system is a Steam Deck or desktop PC and try to probe the default Steam path automatically and pre-fill it in the config, which would be one less thing for the user to do.
Used the terminal to set the max map count with: sudo sysctl -w vm.max_map_count=1048576 as I had previously that allowed me to play on Non-Modded maps. (yes I was aware of and already using this)
This is a persistent change, so you only need to do it once and it'll continue working in the future.
Launched the dzgui.sh from the terminal - No errors thrown using the new paths.
The initial path validation merely checks to see that the paths exist, which is why you got past this step even though they were the "wrong" paths. I think I should add an additional warning if the path supplied doesn't actually contain the expected content.
I seems to take a long time for steam to respond and get to the desired workshop page for the mod it needs to download, but it does finally get there.
I'm not sure about this, but I don't think it's related to anything we are doing.
Navigated dzgui back to the beginning and decided that I would try and list the mods that are installed. Not sure if this will help, but this got an interesting result.
Well, at least the output was noisy and descriptive. But I think I should add some validation to the list mods option so that if it can't find anything, it will gracefully alert the user. Thanks for noting this.
Also! Confirmed that the newly downloaded mod is now present in .local and .steam locations, so they are linked?
Yes, see above.
One last thing, do I need to be using a beta version of steam or anything? I know I am using the newest proton, but not using the experimental, could I be missing a step here?
At the time DayZ support was initially extended, it was only available in the experimental version, but I believe it's long since been mainlined into the default Proton. What version of Proton are you getting on the stable client? I assume it's > 7, so I think it's fine now.
Thank you for the clarifications! I had no idea that setting the max_map_count was permanent.
Updated the paths back to the way they should have been, :) So I did read that code correctly in the config file! The second and third paths were referencing the 1st path.....you have no idea how excited that made me....lol
OK, relaunched the GUI and attempted to connect to the server, upon first launch and verification of the mods this time it skipped the first mod and went right to the 2nd mod number...think we may be in business!
Regarding the error message for jq -> if I was a new user and did not have 10 years of Linux use under my belt, I would have given up right there. It will be very beneficial to new users of Linux to be told explicitly 2 options.
Such as: " Missing required software jq (a package that provides "very short description"), you can download this package by searching for it in your package manager or use a terminal and input "sudo apt-get install jq" followed by your Linux user password. If you are not familiar with these options Google is your best friend!"
I know that is a lot of text for a error message and can likely be shortened, but it ensures they have the solution (explicitly) as well as where to look to learn more and force them to make a decision, that being "Do I blindly look around, or go learn something?" which I am a big proponent of.
Of course it is possible it is only relevant to ubuntu/debian variants, but that is the one that I have ended up gravitating to after trying Knoppix, Suse, Fedora, Ubuntu and a hand full of others. So perhaps that needs to be considered and I do not realize it. Knoppix was nearly 20 years ago, and I finally settled on Mint say 10 years ago.
Regarding the Paths -> In the config file, at least while you are figuring out probing so the user does not have to do the config setup, yes by all means explicitly state in the config file that only the steam path needs to be updated. However a quick description (Hand Holding) of how to find it may be very helpful, 10 years of using mint and I did not know that the .local folder was where I needed to be. And that is even after getting many of my Skyrim Mods to work in Linux....Hell, now I wonder if I have been putting them in the wrong folder all of this time....lol.
Regarding Proton -> Was actually on Experimental when I just tried it. It seemed to download all of the mods this time and move to the next one. However, after downloading the last one, the terminal spit out a fatal, see below:
[DZGUI] Setting favorite server [DZGUI] Attempting connection to The Optimistic Army - Deer Isle [DZGUI] Verifying server modlist integrity [DZGUI] Opening https://steamcommunity.com/sharedfiles/filedetails/?id=1566911166 [DZGUI] Opening https://steamcommunity.com/sharedfiles/filedetails/?id=1602372402 [DZGUI] Opening https://steamcommunity.com/sharedfiles/filedetails/?id=1648967877 [DZGUI] Opening https://steamcommunity.com/sharedfiles/filedetails/?id=1828439124 [DZGUI] Passed mod check [DZGUI] Creating symlink for CF [DZGUI] Creating symlink for Mass_sManyItemOverhaul [DZGUI] Creating symlink for DeerIsle [DZGUI] Creating symlink for GoreZ [DZGUI] Creating symlink for VPPAdminTools
awk: fatal: cannot open file `/home/myUserName/.local/share/Steam/steamapps/workshop/content/221100/2054775140/meta.cpp' for reading (No such file or directory)
awk: fatal: cannot open file `/home/myUserName/.local/share/Steam/steamapps/workshop/content/221100/2054775140/meta.cpp' for reading (No such file or directory)
steam.sh[10888]: Running Steam on linuxmint 20.3 64-bit steam.sh[10888]: STEAM_RUNTIME is enabled automatically setup.sh[11118]: Steam runtime environment up-to-date! steam.sh[10888]: Steam client's requirements are satisfied
After this printed in the Terminal, DayZ did launch and for a moment I thought I was going to play at least for a few moments tonight, however it crashed after showing the Deer Isle Screen it then progressed to the "Loading in .....seconds" counted down and then CTD. My wife indicated that because it is an under-devlopment map that hers to crashed on first attempt. So I tried it a second time but got same results. I then changed Proton to 7.0-2 and just for giggles and because vanilla DayZ will CTD without it, I set the max_map_count just to try it......and it fully loaded and spawned in a new character and I spent a couple of moments looking around.
Could the max_map_coount be permanant if used in one way and temp if used in another? I ask because I see that some put it in the steam launch option, but I just throw it in a terminal before launching the game, could that be the difference?
I am so excited! Its bed time now! Dang it! I will not get to sleep tonight....THANK YOU so much for this tool!!!
One last thing I guess I would suggest is that a fairly good tutorial about the API Key would be very useful, so that a newb can confidently follow the instructions (more hand holding) but the list of options regarding the API permissions made me second guess if I wanted to continue. My first thought was why do you need permissions to see my email and such (I realized a few moments later it was BattleMetric asking not you, but still that red flagged the whole process).....and it just came in a fit of inspiration to try and leave it all blank and see how far I could get until I had heard from you.
Enough for tonight, thank you again!
The methodical and patient approach you are taking to troubleshooting is very good. There's very little you can actually do damage to here, so just trying stuff is great.
Thank you for the clarifications! I had no idea that setting the max_map_count was permanent.
It seems I led you astray here. Sorry, there is a lot of information to unpack at once. I thought you were editing the system file, although you did state you were using an ephemeral sudo command. If you wish to invoke it every time before launch, use sudo sysctl -w vm.max_map_count=1048576
. If you instead wish for it to be permanent, use echo 'vm.max_map_count=1048576' | sudo tee /etc/sysctl.d/dayz.conf
. It's up to you whether you want it to persist or want to set it each time.
Regarding the error message for jq -> if I was a new user and did not have 10 years of Linux use under my belt, I would have given up right there. It will be very beneficial to new users of Linux to be told explicitly 2 options.
My feeling on the matter is that this tool does not ship with DayZ; it is something you have to deliberately seek out and download in the first place, find your own servers you like, etc., so some self-selection on the part of the userbase is involved. I think we can front-load some of this by having clearer documentation and good error handling, and allowing users to submit questions. Giving an explicit, albeit terse, error message provides unambiguous troubleshooting info they can submit here that will make the problem obvious. If we get too much into the weeds with overelaborated messages, not only does it make the interface cumbersome, but it's possible it might just lead the user to get lost in another direction. Fatally exiting with a terse message may be frustrating, but it conveys one thing well: something went terribly wrong. There is also the matter of every distribution being slightly different, so crafting tutorial messages that are actually relevant is a moving target. Anyway, I need to think carefully about how to word error messages to keep them succinct and pithy while still hopefully helpful. I could also put the fatal warnings in the terminal logs and leave a more user-friendly message in the popup.
It's something I want to enhance, but getting the basic functionality (i.e., other people confirm this GUI prototype as working end-to-end all the way into launching the game) must come first.
awk: fatal: cannot open file `/home/myUserName/.local/share/Steam/steamapps/workshop/content/221100/2054775140/meta.cpp' for reading (No such file or directory)
I reproduced connecting to that server here and it did not attempt to symlink the 2054775140
mod. My surmises here is that the 2054775140 directory is left over from when you tried to download mods with the official client or some other mechanism, but I'm not sure, since you said you had cleared everything out. Can you try deleting that directory and rerunning?
So if you look at the server in question (https://www.battlemetrics.com/servers/dayz/13193240), the last mod listed is the 2054775140
one. I'll try to explain what is happening here. Server owners submit a server to be indexed by BattleMetrics and it creates a manifest of the mods attached to that server. This gets periodically updated, but isn't always an accurate snapshot of the actual mods: some of them may be defunct or no longer on the workshop. Notice that https://steamcommunity.com/sharedfiles/filedetails/?id=2054775140 resolves to nothing.
This was pointed out in issue #4, so it was fixed by first validating the upstream mods returned by the server and checking whether they in fact exist on the Workshop. If they don't, those are skipped, and the sanitized list of actual mods is used.
Therefore, the application should not try to create a symlink for that mod, as it's not part of the list. But the symlink process is currently a bit dumb, and it merely iterates through the mod directories it finds there. (Needs additional error handling.)
Again, the mod is nonexistent, so it won't impede the game launching, but I think that's the source of this error. Basically, it's a false positive. What I'll do is modify this behavior to create symlinks only against the explicitly sanitized list of mods, rather than everything it finds in the mods directory, even if some of those are empty folders. (Currently, the logic assumes that if there are directories without symlinks, they should be symlinked so that all the mods in the directory are synched at all times.)
Could the max_map_coount be permanant if used in one way and temp if used in another? I ask because I see that some put it in the steam launch option, but I just throw it in a terminal before launching the game, could that be the difference?
Yes, see above.
One last thing I guess I would suggest is that a fairly good tutorial about the API Key would be very useful, so that a newb can confidently follow the instructions (more hand holding) but the list of options regarding the API permissions made me second guess if I wanted to continue. My first thought was why do you need permissions to see my email and such (I realized a few moments later it was BattleMetric asking not you, but still that red flagged the whole process).....and it just came in a fit of inspiration to try and leave it all blank and see how far I could get until I had heard from you.
Please stay subscribed to this issue thread. You are now a beta tester. Once the basic functionality is working, I want to improve some of the other parts of the app and need testers. The app is designed to notify you if there is a new version available and prompt you to automatically download it, so it should allow for rolling out bug fixes on an ongoing basis.
I want to make sure you are able to run this end-to-end and get into games stably before we work on other stuff.
Hi aclist, my first post here — first, thank you for all the constructive advice. Just wanted to add to the above points about preinstalled packages and default paths to steam directories.
I'm running MX Linux 21.1, based on debian. jq was not installed, but as you suggest above, most people who find this page will likely be fine installing dependencies, especially as it's mentioned at the top of the readme.
My default steam path is $HOME/.steam/debian-installation. There is no steam folder at $HOME/.local/share/ and bizarrely, there is a symlinked folder at $HOME/.steam/steam which points to the default steam path.
All of this is default, as it was when installed. I think the peculiarities may be due to Steam being installed from a dedicated MX Linux repository.
I'm getting a 'false positive' error as described in an earlier comment above, but dzgui still launches the game successfully. Interestingly, when attempting to connect to the same server using dztui, the script throws up a different 'false positive' and then fails to launch. I'll open another thread for this as it's perhaps not entirely relevant to dzgui development.
For the steam deck there would be a Version with GuI nice. Thanks for this nice code. It's awesome.