View Full Version : Some simple Mac modding questions...


Aurelia
Jan 28, 2007, 11:13 AM
I've played Civ for over a decade, but this is the first time I've attempted to create my own scenario. I have a couple of Mac-related modding questions:

1) In the modding discussions, everyone talks about clearing the cache by deleting an invisible folder. I've looked everywhere, but I can't find the Mac equivalent of the folder they're talking about.

2) This really nice member (TRN2) has started helping me with my scenario by building a Python script for a custom victory condition (thread here (http://forums.civfanatics.com/showthread.php?t=204465)). If TRN2 is building it on a PC, will the Python script work on a Mac?

Thanks, in advance, for the help.

Skippy_Kangaroo
Jan 28, 2007, 03:36 PM
I've played Civ for over a decade, but this is the first time I've attempted to create my own scenario. I have a couple of Mac-related modding questions:

1) In the modding discussions, everyone talks about clearing the cache by deleting an invisible folder. I've looked everywhere, but I can't find the Mac equivalent of the folder they're talking about.

2) This really nice member (TRN2) has started helping me with my scenario by building a Python script for a custom victory condition (thread here (http://forums.civfanatics.com/showthread.php?t=204465)). If TRN2 is building it on a PC, will the Python script work on a Mac?

Thanks, in advance, for the help.

I have limited techinical ability and no modding experience in Civ. Nonetheless, there are a number of invisible folders and files in OS X. The easiest way to see them is to open up the terminal (Terminal utility in the utilities folder) and poke around there. Some basic commands for you: 'ls' gives you a listing of the contents of the current folder; 'ls -l' gives you a long listing which tells you lots of useful information about the files (like whether they are a directory or a file); 'cd' changes directory. With those commands you should be able to track down the cache folder. Also, try typing 'man [command]' to get some instructions about these commands.

Welnic
Jan 28, 2007, 04:16 PM
I searched and didn't find any invisible folders, at least any I could see. :) If you go to your home directory and hit Command-F then you can search for files. One of the things that you can search for is visibility, I didn't find anything. I also searched in the Home\Documents\Civilization IV Warlords which is where that stuff should end up using ls -alrt in the terminal and didn't find anything. I do know that you can make it not use the cached XML by holding shift down when you start up.

It does look to me that the changes that are going on in that thread are not going to work on a mac. You can change the .py files since those are python, but the .cpp files get compiled using the SDK and make a custom .dll file which is useless on a mac.

Aurelia
Jan 28, 2007, 04:22 PM
I searched and didn't find any invisible folders, at least any I could see. :) If you go to your home directory and hit Command-F then you can search for files. One of the things that you can search for is visibility, I didn't find anything. I also searched in the Home\Documents\Civilization IV Warlords which is where that stuff should end up using ls -alrt in the terminal and didn't find anything. I do know that you can make it not use the cached XML by holding shift down when you start up.

It does look to me that the changes that are going on in that thread are not going to work on a mac. You can change the .py files since those are python, but the .cpp files get compiled using the SDK and make a custom .dll file which is useless on a mac.

Thanks for the advice. I'm going to make a note in the other thread about this compatibility issue.

AlanH
Jan 28, 2007, 04:46 PM
The cache is the least of your problems. I've never had to worry about it when investigating mods. You can force the software not to load from the cache by holding down Shift during launch, but this is only necessary if you sever see (cached) indicated during the load sequence.

FWIW, the cache folder is in ~/Library/Application Support/Civilization IV or ~/Library/Application Support/Civilization IV Warlords, depending on the version of Civ4 you are using.

There are several major Mod compatibility issues that I am aware of:

1. The mod maker you are talking to assumes you can run a mod created using the SDK, and is talking about changes to the C code to be compiled into a custom CvGameCoreDLL.dll file. You can't use a custom dll with the Mac version.

2. If the mod can be made to work using Python and XML changes, then Mac OS X currently runs Python 2.3, and that's what Civ4 expects to find on OS X. A lot of Windows mods are created using Python 2.4 level language capabilities, so they have to be modified to run on a Mac.

3. Windows Mod makers often use Windows Registry calls from Python in order to link into the directory structures in the file system. These will fail on a Mac. They have to be replaced by Mac OS X-compatible Python calls.

4. Windows Mod makers, particularly non-English speakers, seem to be able to get away with murder in their XML files. They put all sorts of illegal characters in them, and Windows shrugs its shoulders. OS X sticks to the rule book and complains, and fails to load the XML file.