Jump to content

Detecting non-steam/gog/epic games


AtomicTEM

Recommended Posts

Well, you can just return a rejected promise from your queryPath function like this: "return Promise.reject(new ProcessCanceled('detection not supported'))"

 

(I use ProcessCanceled here because we use it to indicate non-error exceptions but it could also just be Error('detection not supported') in this case)

 

This will then not apply any registry/game store based detection.

 

For the second part of your question:

This is what "requiredFiles" is for. Vortex will check for those files to exist in the game folder. This happens both when the user manually selects the directory as well as the when they click "Scan for Games", Vortex will search for a directory containing those files.

Link to comment
Share on other sites

I'm not 100% sure what you mean. The queryPath function needs to have a way to directly figure out where the game is, through the registry or a game store. It has to already know where to start looking, it doesn't _search_ the disk for files. queryPath is run every startup and it shouldn't take longer than a few milliseconds.

 

Searching the hard disk happens only when the user manually hits the "Scan for Games" button, this will look for the "requriedFiles" files and it can take ages depending on the hardware.

 

Once a game has been discovered with queryPath Vortex will still check if that directory actually contains the files listed in requiredFiles.

This means that these files have to be there in every installation of the game and they have to be there in only that game. If your requiredFiles is just "game.exe" then "Scan for games" will find the first directory containing a file called "game.exe" and assume that is your game, even if it's something completely differnt.

 

This is a problem with your half-life 2 game extensions btw, the vanilla "Half-Life 2", "Half-Life 2 Update" and "HL2 CinematicMod 2013" all seem to have basically the same requiredFiles so when Scanning for games Vortex has no way of telling these games apart

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...