Nexus-Mods / NexusMods.App

Home of the development of the Nexus Mods App
https://nexus-mods.github.io/NexusMods.App/
GNU General Public License v3.0
1.04k stars 47 forks source link

Properly support Game Locations with same or nested AbsolutePaths #658

Open Al12rs opened 1 year ago

Al12rs commented 1 year ago

Games define a list of base locations (LocationId, formerly GameFolderType) where all GamePaths are relative to (AGame.GetLocations()).

These locations could be nested to each other (e.g. Data is under Game in case of Skyrim/Data). Or they could reference the same AbsolutePath (e.g. Game and Preferences being the same folder).

This poses the problem of how to internally store GamePaths that are relative to a nested location like Data.

The entities that can generate new GamePaths are Mod Installers, Games, and the LoadoutSynchronizer. Generic Mod installers could have a hard time knowing where to properly map GamePaths.

The Synchronizer that detects new files in a folder doesn't have any information regarding where these should be placed and so can only pick either the closest parent Location (most nested), or the highest level one (TopLevelLocation). Currently the Synchronizer uses to most nested location.

An important note to make is the fact that, wile for the Steam install two game locations might be nested, that might no longer be the case for the GOG installation for example.

To maintain this portability across Game installations we might need to accept arbitrary GamePaths, TopLevel, nested, inbetween etc.

This unfortunately means that there could be two different GamePaths that actually point to the same disk location, making detection of conflicts potentially awkward.

Things to do:

Al12rs commented 5 months ago

This will be a problem for bethesda games