2
« on: December 01, 2008, 09:42:18 pm »
For those of you using Planeshift from a usb device(or some method of external storage), sure it runs but is far from portable. Let's do something about this shall we?
There are a couple methods for doing this. We COULD change environment variables(on a session only basis) in order to redirect where data is saved. But that is too much work and is just silly considering what I'm about to show you.
Let's do this the right way. Using a method native to the client itself. Command switches ahoy!!! And please read the whole thing before jumping into it as you may miss something important.
I found this looking through psclient.cfg
; Custom configuration directory path
; You can also start planeshift applications with the command line option
; "-cfgset=PlaneShift.UserConfigPath=/home/<user>/.PlaneShift2", for example
;PlaneShift.UserConfigPath = /home/<user>/.PlaneShift2
So we can either use the command switch -cfgset=PlaneShift.UserConfigPath=<something_portable>1 2 4
Or we could just change a line in the file itself. From this:
;PlaneShift.UserConfigPath = /home/<user>/.PlaneShift2To this:PlaneShift.UserConfigPath = \PSdataOr:PlaneShift.UserConfigPath = /PSdata (Slash or backslash is fine, just don't mix them.)
That slash(/) or backslash(\) puts the data in a directory(PSdata) at the root of the drive.3 But the path must EXIST first, mkdir or something, just make sure your folder/directory exists!!!!
What's that? You want to put the data in the same directory(aka 'appfolder') as The Planeshift client? Of course you can do that. Just put a dot before /PSdata. It'll look like this.
PlaneShift.UserConfigPath = ./PSdata
And that will put it in <PSDIR>/PSdata
Am I missing anything? Thoughts? Ideas? Translations?
BTW for you windows users, if you mod the cfg file instead of using the switch slashes or back slashes will work. And as I stated this can use root path or relative path.
Footnotes
1. "<Something_Portable>" won't work, you must put a real path there. Something that exists. Even just a root backslash will do.
2. If you are doing this in windows it is best to use the backslash instead of the slash. Because windows command line recognizes slashes are flags/switches.
3. Root of the drive Planeshift is running from. And PSdata doesn't have to be PSdata, that too is an example.
4. Special note for you modders, that command switch can be used for other things too you know. Like if you wanted to test new skins. Or something along those lines. Just peek inside psclient.cfg and you'll see what I mean.