Issue630

Title a new commandline option to change the "base" directory
Priority feature Status open
Assigned To Keywords
Linked issues Watchers shirishag75

Submitted on 2013-01-03 15h26 by shirishag75, last changed by Xenux.

Messages
Author: shirishag75 Date: 2013-01-03   15h26
Hi all, 
I have two instances of Freedroidrpg. One which is installed system-wide :-

$ which freedroidRPG 
/usr/games/freedroidRPG

 and the other one is at ~/games/freedroid as in :-

~/games/freedroid/src$ ./freedroidRPG

Now from what I understood from IRC both the games use by default the same
directory :-

~/.freedroid_rpg$ ls
fdrpg.cfg         jivan.shp            jk2.thumbnail.png  jk.shp           
MapEd.sav.gz
jivan.bkp.sav.gz  jivan.thumbnail.bmp  jk.bkp.sav.gz      jk.thumbnail.bmp 
MapEd.shp
jivan.bkp.shp     jk2.sav.gz           jk.bkp.shp         MapEd.bkp.sav.gz 
MapEd.thumbnail.bmp
jivan.sav.gz      jk2.shp              jk.sav.gz          MapEd.bkp.shp

Now if both use the same directory then we have a problem as it's not easy to
figure out which is what/where. Also how does fdrpg.cfg behave? Let's say in one
of the games I use the resolution 800x600 and the other one at 1024x768 or
something else. 

The best way would be to have something similar to what has been done with the
resolution thing like :-

freedroidRPG -r99

Btw just saw this dunno if it's related to the same thing or another bug/issue. 

$ freedroidRPG -r99

---------------------------------------------------------------------------------
FreedroidRPG 0.15.1 encountered a problem in function:  LoadGameConfig 
Settings file found in your ~/.freedroid_rpg dir does not
seem to be from the same version as this installation of FreedroidRPG.
This is perfectly normal if you have just upgraded your version of
FreedroidRPG.  However, the loading of your settings will be canceled now,
because the format of the settings file is no longer supported.
No need to panic.  The default settings will be used instead and a new
settings file will be generated.
The problem mentioned above is not fatal, we continue the execution.
---------------------------------------------------------------------------------
Available resolution codes:
	0 = 640 x 480
	1 = 800 x 600
	2 = 1024 x 768
	3 = 1152 x 864
	4 = 1280 x 960
	5 = 1400 x 1050
	6 = 1600 x 1200
Author: sobber Date: 2013-07-05   23h28
an even better way to handle "base" directory, at least the linux way is to use 
environment variables that could when present chose that over the standard path
Author: fluzz Date: 2013-07-06   11h57
i agree with sobber's proposal. patch welcome !
Author: matthiaskrgr Date: 2013-07-07   21h10
The problem is that incompatible (git and release (0.15.1)) versions use the
same directory to store savegames and configs, did I get this right?
Maybe, inside the config dir ~/.freedroid_rpg; we could make one folder for each
release.

~/.freedroid_rpg/git/
~/.freedroid_rpg/0.15.1/
~/.freedroid_rpg/0.15/

and let the game chose the right path according to its version.

However, what if savegames of latest release and git are actually still compatible?
Perhaps it is possible to silently check if the savegames are still compatible
and only display those which are, or just make them loadable (even if there are
errors) but save them into the newer (git in this case) version-directory.
Author: Xenux Date: 2013-08-31   00h13
Similarly, I think we should implement this standard :
http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html

I'm not in favor of the environment variable. FreedroidRPG run on window (shell-n 
ot-friendly) and in-game option are easier to customize for lambda player.
Author: Xenux Date: 2013-09-05   13h43
I'm stupid. The path to config can't be set in config.
History
Date User Action Args
2013-09-05 13:43:43Xenuxsetmessages: + msg2552
2013-08-31 00:13:34Xenuxsetmessages: + msg2548
2013-07-07 21:10:31matthiaskrgrsetmessages: + msg2488
2013-07-06 11:57:52fluzzsetmessages: + msg2487
2013-07-05 23:28:09sobbersetmessages: + msg2486
2013-01-03 15:34:05shirishag75settitle: should be able to put savegame file at an arbitary position and automatically get it from there only. -> a new commandline option to change the "base" directory
2013-01-03 15:26:22shirishag75create