Feature - Rejected Change 'default' folder locations

Donavin69

Member
I don't know if it would be more work than it is worth, but I know I'm not the only one that runs multiple instances of mafia, to keep all my settings separate.

There are some features that would be really nice to share across the installations (scripts, relay, data) Currently I robocopy over the other installations regularly, but it would be nice to be able to make changes from within any location and have it all be one.

It would even be nice if you could have a 'general' and a 'per user' folder, but that is probably a lot more effort.
 

Theraze

Active member
What's your OS? If it's anything newer than Windows XP, you can fairly easily use junctions and symbolic links to accomplish this already.

I think this is best handled by the user, rather than having additional mafia code.
 

Donavin69

Member
Hmm...I hadn't thought of that...I'll have to play with it and see if I can link something like Dropbox into the folder, that would be quite useful

Thanks Theraze!
 

Donavin69

Member
That works if you want to sync ALL of your mafia on Dropbox. I want to only sync the scripts folders.

Theraze's idea works great I just set up a new folder in Dropbox, KOL-Shared-Scripts, went to a command prompt to the mafia\scripts folders and :
mklink /D /H /J KOL-Shared-Scripts %userprofile%\Dropbox\KOL-Shared-Scripts

This links in the folder from Dropbox, and I'm able to use the 'shared scripts' and still have per-installation scripts. This really is a better solution than what I was asking for.
 

Theraze

Active member
As a quick example, say you're using Windows 7 64-bit, your user name is Donavin69, your Dropbox folder is located in a "My Dropbox" folder in your user profile folder which is located on your C drive, and you have unique folders in it named KoLmafia1 through KoLmafia3. The stable files are in the KoLmafia folder in your 32-bit Program Files folder.

From command prompt... only going to do KoLmafia1, because it's already getting long:
rd /s /q "C:\Users\Donavin69\My Dropbox\KoLmafia1\buffs"
rd /s /q "C:\Users\Donavin69\My Dropbox\KoLmafia1\ccs"
rd /s /q "C:\Users\Donavin69\My Dropbox\KoLmafia1\data"
rd /s /q "C:\Users\Donavin69\My Dropbox\KoLmafia1\images"
rd /s /q "C:\Users\Donavin69\My Dropbox\KoLmafia1\relay"
rd /s /q "C:\Users\Donavin69\My Dropbox\KoLmafia1\scripts"
mklink /j "C:\Users\Donavin69\My Dropbox\KoLmafia1\buffs" "C:\Program Files (x86)\KoLmafia\buffs"
mklink /j "C:\Users\Donavin69\My Dropbox\KoLmafia1\ccs" "C:\Program Files (x86)\KoLmafia\ccs"
mklink /j "C:\Users\Donavin69\My Dropbox\KoLmafia1\data" "C:\Program Files (x86)\KoLmafia\data"
mklink /j "C:\Users\Donavin69\My Dropbox\KoLmafia1\images" "C:\Program Files (x86)\KoLmafia\images"
mklink /j "C:\Users\Donavin69\My Dropbox\KoLmafia1\relay" "C:\Program Files (x86)\KoLmafia\relay"
mklink /j "C:\Users\Donavin69\My Dropbox\KoLmafia1\scripts" "C:\Program Files (x86)\KoLmafia\scripts"
This removes your local account's buffs, ccs, data, images, relay, and scripts folders and links them to the local shared editions. The rd /s /q means to nuke the existing folders, because mklink needs a hole to connect to... can't link to a folder location that already exists. Then we create directory junctions to those folder locations.

Note that you WILL want to move/consolidate any files in those folders to the shared locations before you wipe them, since they're not coming back. :) Alternatively, you could rename the folders rather than remove them and then you could always move files in later.
 

Catch-22

Active member
Just to add to some of the useful information Theraze has provided, for anyone who might stumble across this thread in the future. NTFS junction points came in with NTFS 3.0, so Windows 2000 and Windows XP can use them provided you're redirecting to a directory on the same disk volume.

If you're using Windows Vista or newer, I would recommend you use the symlink method that has already been described.
 

lostcalpolydude

Developer
Staff member
For people using something that's not Windows, keeping all the global settings separate for each character requires jumping through extra hoops to begin with, which would make the overall discussion started here even more complicated if anything was actually going to change.
 
Top