Comments (8)
Okay I made a steam-path
branch. Checkout your own copy of that. Just worry about getting the path working on your preferred OS then I'll do a pass for the other OSes afterwards.
Looks like .vdf and .acf can be parsed the same so I've made a SteamKeyValueFile for that. It should check if the file is valid to parse; maybe it could count the number of open and close curly braces.
Feel free to use any std
types and anything in C++17.
SteamUtils.h should eventually have some std::vector<std::string> getLibraryDirectories()
so we can iterate all the places the The Elder Scrolls Arena
installpath might be.
Later I think the ArenaPath behavior I want is, we use ArenaPath if it points to a valid ARENA/ARENACD directory, otherwise we try looking for the Steam install. Because we want Steam to be what most people use UNLESS they specify their own ArenaPath. Maybe don't need to change it to ArenaPaths yet.
from opentesarena.
Hi,
I don't know how to look up the user's Steam folder but there's probably a way to get that environment variable on Windows/Linux/macOS.
I've been looking this up, I'm not convinced there's a simple, reliable way to do it, beyond the easy cases. Steam itself can be installed anywhere, and it can manage multiple data folders. With the Steam install path, Steam config could be read and from it, the data folders extracted, but then that's code which would break whenever Steam changes anything in this regard.
Maybe having a good set of default paths, across all platforms, would work for 80+ % of the users, and then if the engine doesn't find Arena data going through all the default folders, it can point the user to the relevant config entry for manual edition.
from opentesarena.
Seems fairly doable tbh. Steam on linux tends to house a file called libraryfolders
in $HOME/.local/shader/Steam/steamapps/share/Steam/steamapps/
. In here there is a list of APPIDS
and the folder those APPIDS
are stored in. The file for that is similar to JSON but not the same.
For Steam the install location of Steam is in the Registry Keys
- 32-bit:
HKEY_LOCAL_MACHINE\SOFTWARE\Valve\Steam
- 64-bit:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Valve\Steam
From here you can find the libraryfolders.vdf
in the same way.
I'd be willing to make a solution for this if this is a way people want to do it. After this there is no real other way to find a path to ARENA outside of a defined default position or just getting the user to supply a path.
from opentesarena.
A not-quite-JSON format and registry keys don't sound appealing on the surface. I mean we can try but it's not in the spirit of this project to depend on anything more complex than like an environment variable. See my next comment
If we can cover 90% of Windows players with a Steam install by providing
ArenaPaths=C:/Program Files (x86)/Steam/steamapps/common/The Elder Scrolls Arena/ARENA;D:/SteamLibrary/steamapps/common/The Elder Scrolls Arena/ARENA
and something similar for Linux and macOS, that seems reasonable to me.
Beyond that I would probably just want a file dialog to let the player point to their custom ARENA/ARENACD folder. Not sure how to implement that, I think it's either Qt or GTK, the former which is a big dependency I don't want, and the second isn't quite Windows native. Doing an in-engine dialog could work but I'd need a couple things like an open-source font and a way to render it with SDL. I wonder how Daggerfall Unity does it.
from opentesarena.
I tried looking in the registry but it doesn't have my D drive SteamLibrary path, just the place where Steam the executable is installed on my C drive.
Oh whoops I forgot about libraryfolders, there's probably a way to find the games path.
Okay, I spent some more time thinking and I would be okay going with the more comprehensive solution to work with Steam's files and whatnot. Seems like there is enough documentation around to make it work.
from opentesarena.
Arena's app ID is 1812290 and its appmanifest_1812290.acf starts like this:
"AppState"
{
"appid" "1812290"
"Universe" "1"
"LauncherPath" "C:\\Program Files (x86)\\Steam\\steam.exe"
"name" "The Elder Scrolls: Arena"
"StateFlags" "4"
"installdir" "The Elder Scrolls Arena"
OpenTESArena would use that installdir
to find ARENA
.
from opentesarena.
Would you like me to work on it?
from opentesarena.
Yeah, I'm setting up some stuff on a branch, will advise in a while.
from opentesarena.
Related Issues (20)
- Mountains are floating HOT 6
- Rename default branch from master to main HOT 6
- Improving first-time contributor experience on Windows HOT 1
- Software renderer redesign for 0.15.0 HOT 6
- A Question about the capablities of OpenTESAreana HOT 1
- Is this still being worked on? HOT 2
- [Future Enhancement] Fan translations support (and improved .EXE unpacking) HOT 11
- Hit Chance Calculation. Clarification/Verification requested for wiki HOT 1
- Is external MIDI supported? HOT 1
- Switch to GitHub Actions HOT 4
- C++20 HOT 3
- Change Travis CI badge in Readme to GitHub Actions HOT 2
- Mysterious performance hiccup every ~3 seconds HOT 1
- Job system
- Very slow performance HOT 5
- -march=native not supported on Apple M1 HOT 2
- Game world palette documentation HOT 11
- Triangle clipping improvement HOT 1
- Revise Readme to prioritize obtaining game files from Steam HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opentesarena.