How to fix "corrupted" save files

Beamup

Higgs boson
Joined
Jun 8, 2001
Messages
1,318
Location
Boston
Okay, as most people around here probably know, some people experience a problem where other people's save files, when downloaded from the forums, are not recognized by Civ 3. I spent a couple minutes looking into this problem.

I don't know what causes it (my guess would be the programs used to zip and unzip the file don't do it quite right) but I do know how to fix it. Start ResEdit (can be obtained from here) and "Get File/Folder Info" on the .SAV file. Enter "GAMs" (without quotes, of course) into the "type" field and "Civ3" (again without quotes) into the "creator" field. These are almost certainly case sensitive, but I have not checked. Close the window and save changes. At any rate, once you do this, the file will have the normal savegame icon and will be recognized by Civ3.

WARNING: Unless you know EXACTLY what you are doing, messing around with ResEdit should be done VERY cautiously. Working with backup copies of the files being changed is an obvious precaution. However, even if you do this, it is not impossible to get yourself into a situation where all you can do is format your hard drive and reinstall everything from scratch. Especially if you try to change any files in the system folder!

(Note that this was also posted in the djb-3 OSG thread, I am reposting here to make sure people see it)
 
Originally posted by Beamup
Okay, as most people around here probably know, some people experience a problem where other people's save files, when downloaded from the forums, are not recognized by Civ 3. I spent a couple minutes looking into this problem.

I don't know what causes it (my guess would be the programs used to zip and unzip the file don't do it quite right) but I do know how to fix it. Start ResEdit (can be obtained from here) and "Get File/Folder Info" on the .SAV file. Enter "GAMs" (without quotes, of course) into the "type" field and "Civ3" (again without quotes) into the "creator" field. These are almost certainly case sensitive, but I have not checked. Close the window and save changes. At any rate, once you do this, the file will have the normal savegame icon and will be recognized by Civ3.

WARNING: Unless you know EXACTLY what you are doing, messing around with ResEdit should be done VERY cautiously. Working with backup copies of the files being changed is an obvious precaution. However, even if you do this, it is not impossible to get yourself into a situation where all you can do is format your hard drive and reinstall everything from scratch. Especially if you try to change any files in the system folder!

(Note that this was also posted in the djb-3 OSG thread, I am reposting here to make sure people see it)

Yech. I had a nice writeup about all this (also in the dojoboy thread) but navigator quit on me. O well, from the top...

You are completely right about what to do. I messed around with Resedit a while back as well, when i was still under OS 9. The capitalization does, in fact, matter. There are several dozen files with the same letters for their type, but with different capitalization. Yeah, it can be dangerous if you have no idea what you are doing (learned that the hard way...). I have a solution to that though. A completely safe solution. Note that it will NOT fix already-'corrupted' files, just prevent future corruption.

The zip format cannot properly handle the Macintosh resource forks. These are used by OS 9 in place of extensions, so that we didn't have to deal with them. This obviously failed, and was pretty much scrapped in OS X. OS X will still utilize them from time to time. It usually won't add a resource fork to a new file, though. Civ 3, on the other hand, still utilizes them, and always adds the type/creater. Although under OS X Civ doesn't require the file to have them, under 9 it does. Therefore, Beamup's solution works great. But, if you don't want to have to mess with that, you need a way for the zips to preserve it.
If you use Aladdin DropZip to zip the files, you have the option for it to preserve the resource fork. Just go to preferences, MacBinary. Click the 'Always' button, and you are ready to go. What it does is first make the file into binary, and then zips it, which leaves the type/creater untouched. Problem solved.

Now, you can also use Dropstuff and SIT the files. Although the forum doesn't allow .sit, this would work out nice if you want to email the file. .sit is a Mac compression format, so it keeps the resource fork.

Edited several times just to clean it up a bit.
 
Ah, a good explanation of exactly what causes the problem. Thanks, DnG. As well as a prescription for keeping it from happening with DropZip. So I'd say that between us we've presented the full solution - how to keep it from happening with the files you upload and how to fix it if whoever uploaded the file didn't do that.
 
Wow! Great information. Question: Would MacZip offer the same benefit as DropZip?

Beamup, would this be worth having stickied in the Mac General forum? I feel so. Please PM this thread to gonzo_for_civ and ask. I feel this could be an ongoing experience for new visitors.
 
Originally posted by dojoboy
Wow! Great information. Question: Would MacZip offer the same benefit as DropZip?

I wouldn't know... have never used it, let alone heard of it :p. If it has the option to encode in MacBinary, then it probably should. If you would give me a link to download it, that would work too.
 
Ok. I located MacZip. Waited for classic to start up... While waiting, I read the read-me. Turns out, MacZip automaticly includes the resource fork, that will turn out to be a seperate file if opened on a PC. So yes, it does offer the same benefits as DropZip, only in a different way.

However, when testing the program, I had mixed results.

When I unzipped it using Maczip, worked fine, file popped up in its own folder, and had its lil icon. However, when I used Stuffit Expander to unzip it, I got the blank-sheet-o-paper icon. Bad news, it seems as though they are incompatible.

More bad news. If you try to open a file zipped by Dropzip using Maczip, it'll unzip it, but then leave you with the Binary file, which you'll have to open some other way. Unzipping the file with Stuffit Expander works correctly, though.
 
Thanks a lot, guys. I assume that anyone can now open my corrupt" OSG file, and I will email the game to anyone who wants it, "dropstuffed."
 
I did it, but the file was still corrupted. The save went from the document icon to the earth map, but it still said "corrupted." Txurce's and tao's saved games.

???
 
Originally posted by dojoboy
Beamup, your .1.bin save opened easily. What type of save is this? How is it done?

All I did was drop it on ZipIt (with, as DnG noted, the MacBinary pref set to 'always'). As for Txurce and Tao's games, when I download them I get precisely the behavior you've described initially. But, when I do the steps I outlined, the file then works. If things aren't working for you, you might try reinstalling the StuffIt suite - especially if you are currently using 7.0, which was known to corrupt certain types of files.
 
Ahh, just a lil sidenote here. If you ever need to send a zip to a PC user, switch the MacBinary back to 'never.' Haven't really checked it out, but PC users may have trouble opening the Binary file.

And yes, of course, make sure you have the latest version of stuffit. Although I'm not sure about the bugs, keeping the program up to date will at least rule out any proplems having to do with difference in versions.
 
Originally posted by Beamup


All I did was drop it on ZipIt (with, as DnG noted, the MacBinary pref set to 'always'). As for Txurce and Tao's games, when I download them I get precisely the behavior you've described initially. But, when I do the steps I outlined, the file then works. If things aren't working for you, you might try reinstalling the StuffIt suite - especially if you are currently using 7.0, which was known to corrupt certain types of files.

I downloaded Stuffit Expander 7.0.1 update last night. So, all my "corrupt" errors were produced while I had 6.0. Does the corruption occur when the files are stuffed? I think so, because I get corruption errors when trying to load emailed nonzipped saved games..
 
Let's assume, you downloaded the file, and it does not show the correct icon (i.e. does not have the correct Type/Creator codes assigned). here is what you do:

decode it
If it's name ends in .sit or .zip, drop it on the free Stuffit Expander (you do have version 7.0.1 or newer, do you?).

and then

for MacOS 9.x:
use the "More File Info CMM Plug-in" by Hide Itoh to set type and creator in one easy step

for MacOS X:
ctrl-click on the file and set "open with..." to Civilization III

This worked for me all the times. :goodjob:

PS: If you are interested in the how and why, read "Type and Creator Codes" in Chapter 4 of David Pogue's "MacOS X - The Missing Manual". Did you just miss the chance to get this great book as a Christmas gift? :)
 
Back
Top Bottom