Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure to Install Properly: Plugin Does Not Support or Recognize Custom Path Installations of Dota 2 #26

Open
Thornic opened this issue Oct 12, 2023 · 5 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@Thornic
Copy link

Thornic commented Oct 12, 2023

Where can I find the stream_deck_plugins_dota_2.cfg?

The Pause, runes and game clock buttons don't work.

@adrian-miasik
Copy link
Owner

Hey there @Thornic ,

The CFG file gets generated on application start and can usually be found inside your steam apps folder.

Here's a more detailed path:
C:\Program Files (x86)\Steam\steamapps\common\dota 2 beta\game\dota\cfg

Can you please confirm you've followed the appropriate installation instructions? Specifically setting the correct launch options for Dota 2.

Any more information on OS, plugin version, notes/context on the matter would be appreciated. Has the plugin worked for you in the past?

@Thornic
Copy link
Author

Thornic commented Oct 13, 2023

Hi Adrian,

I fixed it. So the files generated were indeed in C:\Program Files (x86)\Steam\steamapps\common\dota 2 beta\game\dota\cfg.

But the game installation folder for Dota for me is in D:\SteamLibrary\steamapps\common\dota 2 beta.

When I moved the stream_deck_plugins_dota_2.cfg file and gamestate_integration folder including the gamestate_integration_stream_deck_plugins_dota_2.cfg file to D:\SteamLibrary\steamapps\common\dota 2 beta\game\dota\cfg folder it worked.

@adrian-miasik
Copy link
Owner

adrian-miasik commented Oct 13, 2023

Ah, very well! I'm glad you managed to get it fixed for your setup.

However, this probably highlights an issue in how the app is generating the CFG and GSI files. Specifically not supporting or recognizing custom path installations of Dota 2.

I'll have to re-work a couple methods to support this:

private static void CreateGSIFile(RegistryKey regKey)
{
string gsiFolder = regKey.GetValue("SteamPath") +
@"\steamapps\common\dota 2 beta\game\dota\cfg\gamestate_integration";
Directory.CreateDirectory(gsiFolder);

private static void CreateCFGFile(RegistryKey regKey)
{
string cfgFolder = regKey.GetValue("SteamPath") +
@"\steamapps\common\dota 2 beta\game\dota\cfg";

Thanks for bringing this to my attention!

@adrian-miasik adrian-miasik changed the title The Pause, runes and game clock buttons don't work. Failure to Install/Init: Plugin Does Not Support/Recognize Custom Path Installations of Dota 2 Oct 13, 2023
@adrian-miasik adrian-miasik changed the title Failure to Install/Init: Plugin Does Not Support/Recognize Custom Path Installations of Dota 2 Failure to Install/Init: Plugin Does Not Support or Recognize Custom Path Installations of Dota 2 Oct 13, 2023
@adrian-miasik adrian-miasik changed the title Failure to Install/Init: Plugin Does Not Support or Recognize Custom Path Installations of Dota 2 Failure to Install Properly: Plugin Does Not Support or Recognize Custom Path Installations of Dota 2 Oct 13, 2023
@adrian-miasik adrian-miasik added bug Something isn't working help wanted Extra attention is needed and removed Support labels Oct 13, 2023
@adrian-miasik adrian-miasik self-assigned this Oct 13, 2023
@icelotuskun
Copy link

icelotuskun commented Feb 25, 2024

I also just had this issue, glad i saw the bug as it was totally the issue I had :)
And moving the 2 files fixed it up nicely.

If it helps... each library folder has a libraryfolders.vdf file inside it, including the default library in the steam install folder.
It's located in the root of the SteamApps folder, either a XML or JSON file (both i guess? ^^).

Conveniently, each one contains all the library's that steam knows about and what games are in each, as well as the path of each

As an example, a snip from my install..

{
		"path"		"G:\\Games"
		...
		"apps"
		{
			"570"		"53914165386"
			"244850"		"42069296063"
			"255710"		"16604106585"
                   ...
                }
}

Searching the file/collections for 570 will give the the correct library and path for the dota install that steam will start up.

Some quick logic, at 2am, if i get a moment I'll make a pull and write it up if you want or just use as you like (or not) :)

 private static void GetDotaInstallPath(RegistryKey regKey) 
 { 
     string install_locations = regKey.GetValue("SteamPath") + @"\steamapps\libraryfolders.vdf";
     
     #covert vdf to object/collection -> library's
     #search object/collection for 570 - search library.apps return library_path for 570, or not installed
     #OR 
     #Just run through the file line by line doing the search, not as pretty but would work just as easily

     return library_path + @"\steamapps\common\dota 2 beta\"; 
}
private static void CreateCFGFile(RegistryKey regKey) 
 { 
     string cfgFolder = GetDotaInstallPath(regKey) + @"game\dota\cfg"; 
...
}
private static void CreateGSIFile(RegistryKey regKey) 
 { 
     string gsiFolder = GetDotaInstallPath(regKey) + @"game\dota\cfg\gamestate_integration"; 
     Directory.CreateDirectory(gsiFolder); 
...
}

@adrian-miasik
Copy link
Owner

adrian-miasik commented Feb 27, 2024

Heya @icelotuskun, sorry you ran into the bug as well. The latest release of GSI should handle file generation for us, but I haven't gotten around to updating and implementing it yet. Though I appreciate the more in-depth context and how to properly get custom install paths through the vdf file. Seems like a valid way to get the install path as well. If you want to make a PR for it, by all means. I've been busy with other things recently, but hopefully I'll circle back to the plugin seeing as more people seem to be using it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants