I've got BG, BG2 and SK (and a duckton of mods, including EasyTutu) installed on my laptop w/a intel GMA X3100 chipset (so possibly not working w/BG:EE), but I can hack on it a bit. For instance, it'd be nice to set ECHO OFF and just show the commands with @somecommand.
I know most people on Windows these days are on >= Vista, but it might be worth mentioning that mklink is NOT available on Windows XP out of the box.
Furthermore, I think SK is actually open source and includes the VS project file as well. The question is whether to fork it into SK:EE or build in support for the extra paths. Without having looked at the code, I'd suggest forking is the better option going forward, as that won't mess with the legacy-oriented SK.
EDIT: @Cuv, isn't it "Shadowkeeper" (re. title/OP)?
So, this is my stab at an improved compatibility script.
It appears to create the correct folders and symlinks, but since I can't get BG:EE to run on my laptop (not unexpected at this point in time), I haven't been able to test it with ShadowKeeper.
EDIT: Small tweaks. EDIT 2012-12-07: Escaped '>' character which was redirecting to a file instead of displaying text on the screen. EDIT 2012-12-09: Added ShadowKeeper workaround to remove the dependency on BG2.
:: designed to be run as administrator from the BG:EE installation folder :: Note that mklink does NOT exist on Windows XP (*tut* *tut* *tut*)
:: Command processing extensions are very useful @SETLOCAL EnableExtensions :: Useful for checking the value of variables inside FOR loops @SETLOCAL EnableDelayedExpansion
:: Ensure that we change back to the BGEE installion folder from which we were run. :: In some cases, we end up in \windows\system32 due to being run as administrator :: "%~dp0" means 'the directory from which this file was executed' CD /D "%~dp0" @ECHO. @ECHO ^* Working folder is %CD% @ECHO.
IF EXIST "%userprofile%\Documents\Baldur's Gate - Enhanced Edition" (goto yours) IF EXIST "%userprofile%\My Documents\Baldur's Gate - Enhanced Edition" (goto mine)
GOTO none
:yours
:: set up user data folder variable (note that we're quoting it here) SET BGEE_USERDATA="%userprofile%\Documents\Baldur's Gate - Enhanced Edition"
GOTO setup
:mine
:: set up user data folder variable (note that we're quoting it here) SET BGEE_USERDATA="%userprofile%\My Documents\Baldur's Gate - Enhanced Edition"
GOTO setup
:setup
:: If you have a *really* non-standard Documents folder, you can set it up below :: -- remove the REM to make it active REM SET BGEE_USERDATA="x:\My Custom Path to\BGEE"
@ECHO ^* User data folder is %BGEE_USERDATA% @ECHO.
:: check for and create folders only if they don't already exist :: and when those folders are created, create links if they're not already present
@ECHO Setting up folders and symbolic links... @ECHO.
:: We absolutely need an override folder IF NOT EXIST .\override ( MKDIR .\override && @ECHO ^* Created .\override )
:: Ensure that we have an .ini file symlink as well IF NOT EXIST .\baldur.ini ( MKLINK /H .\baldur.ini %BGEE_USERDATA%\baldur.ini )
:: ShadowKeeper looks for BGMain.exe in the root folder, so make BGMain.exe a hardlink to baldur.exe IF NOT EXIST .\BGMain.exe ( MKLINK /H .\BGMain.exe .\baldur.exe )
:: ShadowKeeper also looks for folders which now reside in the User's profile folder, so symlink them FOR %%F IN ( save characters Portraits ) DO ( IF NOT EXIST %BGEE_USERDATA%\%%F ( MKDIR %BGEE_USERDATA%\%%F && @ECHO ^* Created %BGEE_USERDATA%\%%F ) IF NOT EXIST .\%%F ( MKLINK /D .\%%F %BGEE_USERDATA%\%%F ) )
:: replace the en_US part of this command with the appropriate folder for non-English installs IF NOT EXIST .\dialog.tlk ( @ECHO. @ECHO * Localized dialog needs to be set up. @ECHO ^'-^> by default, we will attempt to use en_US dialog. @ECHO.
MKLINK /H .\dialog.tlk .\lang\en_US\dialog.tlk )
@ECHO. @ECHO If you use a language other than en_US, delete the symlinked .\dialog.tlk @ECHO and run the following command _as administrator_ : @ECHO. @ECHO mklink /H dialog.tlk .\lang\YourLanguage\dialog.tlk @ECHO.
goto end
:none @ECHO Cannot find Documents folder, not making links
If someone wouldn't mind indulging my ignorance, how are things looking with DLTCEP? This is such an exceptionally powerful tool and, as far as I understood the situation, it was meant to be compatible with BGEE. However, for my part I haven't managed to get it to work: since there isn't a dialog.tlk, a whole host of issue are cropping up with my use of DLTCEP. Am I completely missing something or is this actually a problem?
@Boston1112 It's not a problem. Just like for all the other tools, make a copy of your dialog.tlk and put it in your main 00766 install folder. Then point DLTCEP to your 00766 folder.
@ermo Just tried it and have the same problem that I had before (Cam made me a special one). I have an SSD and it only has the OS on it... everything else is on another drive including my profiles with My Documents. Don't suppose there is a way to check for that and find the folders? For example: My OS is on C: but User\My Documents is on It's a pretty standard SSD setup... the wave of the future.
@Cuv, could you please open a cmd.exe instance, type in 'echo %userprofile%' without the quotes and paste the result here?
The script I made checks for your %userprofile% variable, but if you haven't manually changed that, it will still use C: as its root.
In fact, it would be even better if you could paste the entire output from just typing 'set' in your cmd.exe prompt. That way, I can easily deduce what needs to be done.
If you'd rather not do all that, you can just do like so:
BEFORE:
:setup
@ECHO ^* User data folder is %BGEE_USERDATA% @ECHO.
AFTER:
:setup
:: set up my (Cuv's) non-standard documents folder SET BGEE_USERDATA="D:\Users\My Documents\Baldur's Gate - Enhanced Edition"
@ECHO ^* User data folder is %BGEE_USERDATA% @ECHO.
I believe the idea here is to make it easy for people who might not be as technically minded. For people who don't mind getting their hands dirty, the link shell extension is a great tool (I've been using it for years myself).
Guys, if a BG2 installation is required, would it not be simpler just to move the BG:EE saved game to the BG2 save folder, edit it and move it back? It's what i did and it beats doing any scripting, hardlinking etc.
You won't be able to give your character BG:EE exclusive items and edit BG:EE exclusive variables, but it does work for simple things.
Right, so I've taken a quick look at the ShadowKeeper C++ source and since it basically searches for BGMain.exe and sets a global, persistent path variable based on that, it looks as if we can use a fairly straightforward hack to get it to work with no complaints without BG2 installed:
The hardlink hack
Create a new hard link called BGMain.exe right next to baldur.exe in your BG:EE game folder:
mklink /h .\BGMain.exe .\baldur.exe
OR The copy hack (if you can't use the hardlink hack)
Copy baldur.exe to BGMain.exe
copy .\baldur.exe .\BGMain.exe
ShadowKeeper will still look for Chitin.key and Dialog.tlk in the root of the installation folder, which necessitates either copying or linking the appropriate Dialog.tlk from the .\lang\YourLang\ subfolder as outlined in the OP in this thread.
@CamDawg / @Cuv: I'd like to hear back from you if this works on your systems (it does on mine).
In all honesty, I got mine to work after all the folder/baldur.ini/dialog.tlk linking without bgmain.exe. The only difference is, I think, SK will whine that it's not sure it's an actual BG2 install--I made some test edits to a save game and everything worked.
When you repair or patch your installation, the launcher removes all the hardlinks by deleting them--which also has the undesired effect of deleting the Characters and Saves folders, meaning that you'll lose all your exported characters and all your saved games.
So remember to back those folders up before patching.
You don't need BG2 installed. I don't have it installed on my PC. I have SK in it's own folder in my downloads folder (Win7) It all works by transferring files manually and transferring them back. I can be more specific if it helps, but I just wanted everyone to know that BG2 IS NOT required.
@ermo Interesting! Might give it a try but I also have mine working without a problem. I don't use SK all that often, its just good to know it will work.
I got comfused by reading the post in the beginning of this thread. I think it needs to be updated, as it is clearly stated there that a BG II installation is required. From the comments i understand it is only needed so that SK will not complain, but will otherwise run fine. Unless it is required for the current solution, in which case it should be made clear that another one (that doesn't require BGII) is in the works.
Also, it is stated in the same post that you need to install SK in the same folder (at least that is what i understood). I keep it in an entirely unrelated folder (win7) and always did (winXP and Win98) and it always worked fine. Is there a "current solution" reason to install it there? Do you need any files from that installation, or can it be removed?
EDIT: According to the FAQ found on the forum the Baldur.exe is at [Path to your BeamDog folder]/BeamDog/Games/00766. However, i think this is the case if you used the beamdog installation. I used the custom installer and the 00766 folder is hidden inside another [Path to your BG:EE folder]/data one. The "solution" developers are obviously aware, but perhaps this is the cause of some misunderstandings.
You don't need BG2 installed. I don't have it installed on my PC. I have SK in it's own folder in my downloads folder (Win7) It all works by transferring files manually and transferring them back. I can be more specific if it helps, but I just wanted everyone to know that BG2 IS NOT required.
Heya @PinkRose Yes please... be more specific and I will update the top post with the information you provide. Sorry... I am all over the place and will get to this.
This is all a big waste of time. There is a super simple solution. Download Shadowkeeper, put it in the install directory, the 0766 folder or wherever your baldur.exe is located. Copy bladur.exe and rename it BGMain.exe and put it back in the folder. Go into your lang/en_US copy the dialog.tlk and put it in the install directory. Then go into you documents and copy your save folder. Put that in the install folder as well. Open up Shadowkeeper and direct it to the install directory. You will then be able to open any saved game and edit the characters in it. Just make sure to take the edited save file and put it back in the original save location. Open game and BOOM! done.
IMHO, there is a certain elegance to setting up a combination of hard links and symbolic links, especially considering that updates will nuke whatever the update routine doesn't think belongs in the game folder (at least when using the beamdog client).
A script, when properly written and debugged, ensures that a simple, well-tested method exists which minimizes the risk of operator error. Avoiding manual errors in repetitve tasks is, after all, the main reason why programmable computers were invented in the first place.
For those of you that have gotten ShadowKeeper to work, do you find that the game will load your editted saves? I'm managed to get it working but when I try to edit an iPad save, the game will not recognize it as a valid save. I've verified that I can moved unedited saves to and from the iPad without any issue. But as soon as I change anything in the save the iPad will not show it in the list of valid saves.
@Cuv -Copy your dialog.tlk from language directory (Program Files (x86)\Baldur's Gate Enhanced Edition\Data\00766\lang\en_US) to your 00766 directory (Program Files (x86)\Baldur's Gate Enhanced Edition\Data\00766) -Copy your Baldur.ini from Documents (Users\PinkRose\Documents\Baldur's Gate - Enhanced Edition) to your 00766 directory (Program Files (x86)\Baldur's Gate Enhanced Edition\Data\00766). -Copy your portraits folder from Documents (Users\PinkRose\Documents\Baldur's Gate - Enhanced Edition) to your 00766 directory (Program Files (x86)\Baldur's Gate Enhanced Edition\Data\00766) to see them displayed. -Run ShadowKeeper.exe (Users\PinkRose\Documents\ShadowKeeper) but change your settings to 00766 folder. It will holler at you, but still do it. -Move/copy your save games (Users\PinkRose\Documents\Baldur's Gate - Enhanced Edition\save) and/or characters (Users\PinkRose\Documents\Baldur's Gate - Enhanced Edition\characters) to the 00766 (Program Files (x86)\Baldur's Gate Enhanced Edition\Data\00766) folder. -Edit and move back to documents (Users\PinkRose\Documents\Baldur's Gate - Enhanced Edition). -Start up game and either load your edited save game or import your edited character. -Have fun!
IMHO, there is a certain elegance to setting up a combination of hard links and symbolic links, especially considering that updates will nuke whatever the update routine doesn't think belongs in the game folder (at least when using the beamdog client).
A script, when properly written and debugged, ensures that a simple, well-tested method exists which minimizes the risk of operator error. Avoiding manual errors in repetitve tasks is, after all, the main reason why programmable computers were invented in the first place.
To each his own I guess.
That is true, but setting up all those scripts is not only difficult for beginners and casual gamers, but it gets overwritten when the game updates anyways (unless you get into incredibly complicated ones). The method I laid out is super simple. It involves copying 2 whole files and a folder and then just putting the folder back when your done editing. Nothing gets messed up during an update, you are not overwriting any files (since Keeper saves the edit as a separate game). Even if you somehow managed to fuck it up, it would not mess with the game at all.
Comments
I've got BG, BG2 and SK (and a duckton of mods, including EasyTutu) installed on my laptop w/a intel GMA X3100 chipset (so possibly not working w/BG:EE), but I can hack on it a bit. For instance, it'd be nice to set ECHO OFF and just show the commands with @somecommand.
I know most people on Windows these days are on >= Vista, but it might be worth mentioning that mklink is NOT available on Windows XP out of the box.
Furthermore, I think SK is actually open source and includes the VS project file as well. The question is whether to fork it into SK:EE or build in support for the extra paths. Without having looked at the code, I'd suggest forking is the better option going forward, as that won't mess with the legacy-oriented SK.
EDIT: @Cuv, isn't it "Shadowkeeper" (re. title/OP)?
So, this is my stab at an improved compatibility script.
It appears to create the correct folders and symlinks, but since I can't get BG:EE to run on my laptop (not unexpected at this point in time), I haven't been able to test it with ShadowKeeper.
EDIT: Small tweaks.
EDIT 2012-12-07: Escaped '>' character which was redirecting to a file instead of displaying text on the screen.
EDIT 2012-12-09: Added ShadowKeeper workaround to remove the dependency on BG2.
You probably want to rename the existing links and compatibility folders in your game and documents folders first.
The script I made checks for your %userprofile% variable, but if you haven't manually changed that, it will still use C: as its root.
In fact, it would be even better if you could paste the entire output from just typing 'set' in your cmd.exe prompt. That way, I can easily deduce what needs to be done.
If you'd rather not do all that, you can just do like so:
BEFORE: AFTER: I hope that makes sense.
The %userprofile% variable defaults to %systemdrive%\Users as far as I can tell, and this is why the original script didn't work for you.
http://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html
especially when having BG:EE and %homepath% on different partitions.
It really speeds things up and makes cmd's mklinking obsolete.
You won't be able to give your character BG:EE exclusive items and edit BG:EE exclusive variables, but it does work for simple things.
The hardlink hack
Create a new hard link called BGMain.exe right next to baldur.exe in your BG:EE game folder: OR The copy hack (if you can't use the hardlink hack)
Copy baldur.exe to BGMain.exe ShadowKeeper will still look for Chitin.key and Dialog.tlk in the root of the installation folder, which necessitates either copying or linking the appropriate Dialog.tlk from the .\lang\YourLang\ subfolder as outlined in the OP in this thread.
@CamDawg / @Cuv: I'd like to hear back from you if this works on your systems (it does on mine).
When you repair or patch your installation, the launcher removes all the hardlinks by deleting them--which also has the undesired effect of deleting the Characters and Saves folders, meaning that you'll lose all your exported characters and all your saved games.
So remember to back those folders up before patching.
I don't have it installed on my PC.
I have SK in it's own folder in my downloads folder (Win7)
It all works by transferring files manually and transferring them back.
I can be more specific if it helps, but I just wanted everyone to know that BG2 IS NOT required.
Also, it is stated in the same post that you need to install SK in the same folder (at least that is what i understood). I keep it in an entirely unrelated folder (win7) and always did (winXP and Win98) and it always worked fine. Is there a "current solution" reason to install it there? Do you need any files from that installation, or can it be removed?
One should also check this thread, as they seem to be working on a similar solution:
http://forum.baldursgate.com/discussion/11130/editing-saved-games-with-shadowkeeper#latest
EDIT: According to the FAQ found on the forum the Baldur.exe is at [Path to your BeamDog folder]/BeamDog/Games/00766. However, i think this is the case if you used the beamdog installation. I used the custom installer and the 00766 folder is hidden inside another [Path to your BG:EE folder]/data one. The "solution" developers are obviously aware, but perhaps this is the cause of some misunderstandings.
IMHO, there is a certain elegance to setting up a combination of hard links and symbolic links, especially considering that updates will nuke whatever the update routine doesn't think belongs in the game folder (at least when using the beamdog client).
A script, when properly written and debugged, ensures that a simple, well-tested method exists which minimizes the risk of operator error. Avoiding manual errors in repetitve tasks is, after all, the main reason why programmable computers were invented in the first place.
To each his own I guess.
-Copy your dialog.tlk from language directory (Program Files (x86)\Baldur's Gate Enhanced Edition\Data\00766\lang\en_US) to your 00766 directory (Program Files (x86)\Baldur's Gate Enhanced Edition\Data\00766)
-Copy your Baldur.ini from Documents (Users\PinkRose\Documents\Baldur's Gate - Enhanced Edition) to your 00766 directory (Program Files (x86)\Baldur's Gate Enhanced Edition\Data\00766).
-Copy your portraits folder from Documents (Users\PinkRose\Documents\Baldur's Gate - Enhanced Edition) to your 00766 directory (Program Files (x86)\Baldur's Gate Enhanced Edition\Data\00766) to see them displayed.
-Run ShadowKeeper.exe (Users\PinkRose\Documents\ShadowKeeper) but change your settings to 00766 folder. It will holler at you, but still do it.
-Move/copy your save games (Users\PinkRose\Documents\Baldur's Gate - Enhanced Edition\save) and/or characters (Users\PinkRose\Documents\Baldur's Gate - Enhanced Edition\characters) to the 00766 (Program Files (x86)\Baldur's Gate Enhanced Edition\Data\00766) folder.
-Edit and move back to documents (Users\PinkRose\Documents\Baldur's Gate - Enhanced Edition).
-Start up game and either load your edited save game or import your edited character.
-Have fun!