Civ3 File Fixer

AlanH

Mac addict, php monkey
Moderator
Hall of Fame Staff
GOTM Staff
Supporter
Joined
Jan 9, 2003
Messages
29,699
Location
England
If you play Succession Games or Games of the Month then you often have to download .SAV files that were created on Windoze machines. You can't open these files using the Mac OS file selection dialogs because they are not correctly identified as CIv3 game files, so you have to use the Civ3 internal Load Game dialog. But this has its problems if, like me, you have multiple copies of the Civ3 application and need to move from one to another.

So attached is a small AppleScript. Download it and save it into your "/Library/Scripts/Folder Action Scripts" directory. Right click (or Control click) the directory you download files to - maybe your ~/ Desktop folder or a specific Downloads directory - enable Folder Actions if they are not already, and then select "Attach a Folder Action". Attach the script to the downloads folder and you are set.

Now, whenever you download a file to that directory, the script will run automagically to see if it has a .sav or .SAV extension. If the extension is .sav it is changed to .SAV, as the file selector is case sensitive. The file type and creator are changed to "GAMd" and "Civ3" and the file can be loaded using the Mac OS Load Game dialog from a Civ3 copy anywhere on your hard drives.

[Update] Attached is a new version of this script, superceding the previous copy. The new script scans downloaded folders to look for .sav files. It can also be used as a Droplet. Drop a .sav file on it and it will convert it to .SAV with the correct creator and type. Drop a folder on it and it will convert all the .sav files contained in the folder and its subfolders. It can also run as an application. Double click it and you can select a folder full of files for conversion.

Replaced by a zipped disk image (20 October, 2004)

Previous versions downloaded 86 times.
 

Attachments

  • Civ3SaveFileFix.dmg.zip
    26.7 KB · Views: 282
Done. Thanks Alan!

Now, where does it go? :confused:

I'm not as acquainted w/ my mac as some.

I have a "scripting additions" folder in my library.
 
Originally posted by AlanH
If you play Succession Games or Games of the Month then you often have to download .SAV files that were created on Windoze machines. You can't open these files using the Mac OS file selection dialogs because they are not correctly identified as CIv3 game files, so you have to use the Civ3 internal Load Game dialog.

FWIW, the final 1.29f patch fixes it so that you won't need a "fixer" app.
 
Originally posted by Brad Oliver


FWIW, the final 1.29f patch fixes it so that you won't need a "fixer" app.
Happy Holidays, Brad.

Yes, I was aware of that, but the final 1.29f patch seems to be stuck in the works somewhere. Who knows when it will see the light of day? Meanwhile this works now, and it won't do any harm even after 1.29f is released, as far as I know.
 
Originally posted by dojoboy
I have a "scripting additions" folder in my library.
You may be looking in /System/Library instead of /Library. Don't go there :eek:

FWIW:

/Library, at the top level of your hard drive, is where you will find all sorts of settings and data that are shared by all users of your Mac.

~/Library, the one in your Home folder, is where you find equivalent settings anf files that are only active when you are the logged in user on your Mac. Applications look in there first for Preferences, for example, and then in /Library.

You can put my script in either of the above, but if it's in ~/Library no one else will be able to use it.

/System/Library is a bit like the System Folder in older Mac OS versions, but far more dangerous, and you shouldn't go there without suitable protective clothing and an experienced guide.
 
Originally posted by Brad Oliver


FWIW, the final 1.29f patch fixes it so that you won't need a "fixer" app.

Here's hoping we see it in 2004!

Happy New Year, Brad! :band: [dance]
 
Originally posted by AlanH

You may be looking in /System/Library instead of /Library. Don't go there :eek:

Yep, you were right. I located the correct spot. :goodjob:
 
This script assumes an item that arrives in the download folder is a separate file. Unfortunately, the GOTM start file is delivered inside a folder called "Map Development" so the script doesn't know what to do with it, and you will get an error message. Fear not, I will fix the script. Meanwhile, just go to the "Map Development" folder, and drag the file out of it. It will then be seen by the script and processed correctly.
 
Originally posted by AlanH
This script assumes an item that arrives in the download folder is a separate file. Unfortunately, the GOTM start file is delivered inside a folder called "Map Development" so the script doesn't know what to do with it, and you will get an error message. Fear not, I will fix the script. Meanwhile, just go to the "Map Development" folder, and drag the file out of it. It will then be seen by the script and processed correctly.

A side question Alan, did you ever get the mod installer to run MOO3 mods? IIRC, there was a discussion between you and Rubel(?) about this.
 
Originally posted by dojoboy


A side question Alan, did you ever get the mod installer to run MOO3 mods? IIRC, there was a discussion between you and Rubel(?) about this.
I've replied via PM to avoid the wrath of the Chieftess.
 
New version uploaded to handle folders correctly. Also works as a Droplet or a double-click Application. See first post for details and download link.
 
Originally posted by AlanH
New version uploaded to handle folders correctly. Also works as a Droplet or a double-click Application. See first post for details and download link.

I',m confused as it doesn't have .scpt attached. Should I add it?
 
No, it's compiled as an application, and has a (probably hidden) .app extension. You should still be able to attach it as a Folder Action as before.
 
Originally posted by AlanH
No, it's compiled as an application, and has a (probably hidden) .app extension. You should still be able to attach it as a Folder Action as before.

Okay, but I'm simply placing it in the 'Folder Action Script' folder. Am I to assign a command?
 
It can also be used as a Droplet. Drop a .sav file on it and it will convert it to .SAV with the correct creator and type. Drop a folder on it and it will convert all the .sav files contained in the folder and its subfolders. It can also run as an application. Double click it and you can select a folder full of files for conversion. That doies not work with me and so could ya help me ALanh becouse i would like to play GOTM
 
Cybie said:
It can also be used as a Droplet. Drop a .sav file on it and it will convert it to .SAV with the correct creator and type. Drop a folder on it and it will convert all the .sav files contained in the folder and its subfolders. It can also run as an application. Double click it and you can select a folder full of files for conversion. That doies not work with me and so could ya help me ALanh becouse i would like to play GOTM

Which bit doesn't work? All of the above? Just the last one (double click)?
 
All above doen't work and this doesn't work also: the script will run automagically to see if it has a .sav or .SAV extension. If the extension is .sav it is changed to .SAV, as the file selector is case sensitive.
 
Thanks for clarifying the question. I'm at work at the moment, surrounded by PeeCees :(, but when I get home I'll investigate. I know that it works fine for me as a folder action, because I have it attached to my download destination directory and it works every time. I haven't tried the other modes for a while.

What version of Mac OS are you using?
 
Cybie said:
All above doen't work and this doesn't work also: the script will run automagically to see if it has a .sav or .SAV extension. If the extension is .sav it is changed to .SAV, as the file selector is case sensitive.

I've replaced the linked file wth a zipped disk image. I apologise that the copy that was there before was not behaving correctly, as it had a resource fork that got lost in the zip process.
 
Top Bottom