Quantcast
Channel: Modding — Beamdog Forums
Viewing all articles
Browse latest Browse all 11774

Enhanced Edition User Directory Detection

$
0
0
How is the user-space directory path determined? I'm thinking of cross-platform and cross-language scenarios here. Last week, I could safely assume on Windows 7 that my directory was "C:\Users\Bardez\Documents\Baldur's Gate - Enhanced Edition". I have no knowledge of OS X or possible Linux releases. Now that BG2:EE is out, it's a toss up between adding a " II" in the middle of the directory or not.

Determining if the install target is an Enhanced Edition is easy enough, but I'm curious how one could safely differentiate between BG2:EE and BG:EE, starting from chitin.key to find the user-space directory. Since the executables are running off of a code base maintained in parallel, the installs look a lot more similar than before. So how is the user directory determined? Is it hard-coded, registry written, etc.? Is there a 2DA file that defines it?

Working off of memory from when I did BGT, Near Infinity used the movies to differentiate the Infinity Engine installs. I recall from 2002 or so asking Jon Olav Hauglid to actually update the way he was doing it for NI due to BGT (I ran into trouble with NI thinking a BGT install was BG1), which he was kind enough to do. Using that same thinking, and applying it forward, what distinguishes the two games that no one would ever really want to copy between engine instances? Most media assets, creatures, etc. would be excluded from consideration due to the above concept. While snooping at the BG2:EE install, I see new resources of type 0x03FF that are not present in BG:EE, and those appear to be at least related to the tutorial videos in BG2:EE.

Is there a set way to determine, regardless of platform and language, what the related user-space directory for either game is going to be? Basically if you have, say a portrait pack mod or want to write something that detects assets available for a current user, how would one safely determine which user directory to use?

EDIT: Typo fixes, rewording for clarity.

Viewing all articles
Browse latest Browse all 11774

Latest Images

Trending Articles



Latest Images