The Ur-Quan Masters Discussion Forum

The Ur-Quan Masters Re-Release => Technical Issues => Topic started by: jaylweb on September 14, 2004, 08:09:36 am



Title: Change Saved Games path
Post by: jaylweb on September 14, 2004, 08:09:36 am
How do I change the saved games path?  I have UQM 0.3 installed on a flash drive, which allows me to play it on any computer without installing it, but the saved games always go to the application data folder regardless of the command line parameters.  

Both -n and --contentdir don't seem to work on WinXP.

I have found a work around, by copying my saved games from the application data folder to my content folder.  I just have to do this everytime I save.  lol

Any suggestions?   ???


Title: Re: Change Saved Games path
Post by: meep-eep on September 15, 2004, 03:35:19 am
You can't specify the application path on the command line. There are a couple of ways you could work around this. On Windows the user dir is %APPDATA%\uqm\. This is evaluated at run time, so by changing the environment variable APPDATA before starting UQM, you could change the location where your save and content files are stored. Alternatively, you could build the game from the source yourself. When building from MSVC, the user dir is specified in src/msvc++/config.h.
-n and --contentdir specify the directory where the game content is to be found. It isn't used for the saved games. Also, there are defaults which in the 0.3 release are always used if the specified dir fails. This is changed in the CVS version.




Title: Re: Change Saved Games path
Post by: Matthew on September 19, 2004, 03:42:31 am
Make a batch file that does that for you.

name it something.bat (like renuqm.bat) and make the content look like this:

@echo off
copy d:\source_path\*.source_extension c:\destination_path\*.*
game
copy c:\source_path\*.source_extension d:\destination_path\*.*

If you understood the lingo... it copies the files when you start to the hard drive location that UQM uses.  Then it runs the game.  When you exit the game, it archives the files back to your flash drive.

If that made no sense at all, send me a email with the names of the directories you use and the disks they are on... and remind me what the dos name of ur quan masters and where it runs from.  I will send you a batch file.


Title: Re: Change Saved Games path
Post by: jaylweb on September 21, 2004, 10:23:50 am
You guys gave me some good suggestions.  I created a batch file called UQM.BAT.  Basically, it changes the variable for APPDATA while the game is running, in that environment only.  So Windows is unaffected because it doesn't see the change, only the game does.  I can open and save games to the new path, which is on my usb flash drive.  I can now safely play this on any WinXP computer without losing or having to copy my save games, probably will work on Win2k as well but I haven't tested.

Here's the syntax for my batch file in case anyone else is interested in doing this.

@echo off
set APPDATA=b:\The Ur-Quan Masters
b:
cd \The Ur-Quan Masters
start /w uqm.exe

Note:  Drive B is my usb flash drive.  Make sure you set this to whatever drive letter you use.   ;)

Thanks everyone for your help.   ;D


Title: Re: Change Saved Games path
Post by: meep-eep on November 23, 2004, 04:37:39 am
In the latest CVS version, there's now a command-line switch (-C) to specify the user config dir.