Probably a stupid question, but I dunno

Mr. Sulu

Liberal Democrat
Joined
May 3, 2011
Messages
193
What exactly restricts Macs from playing scenarios/mods with more than 18 civs? Also, is there any moda which change this limit? And what is a DLL? I know I'm asking alot of questions:crazyeye:.
 
Civ4 consists of a number of software components.

In Civ4 there is a central suite of software that manages all the interfaces with the graphics, sound, files and other system services on your computer. It provides a basic framework that can, in principle, run any game.

There is also a separate library of software that provides all the logic that implements the core game rules. That includes the number of civs that can play, the AI decision logic, how game saves are made and read, and lots more. In the Windows version, this bit is packaged as a separate file - a DLL file called CvGameCoreDLL.dll. Firaxis have released the source code for this library so that modders can change it and recompile the DLL. This allows them to create a very wide range of modifications to the game, including allowing more than 18 divs.

In the Mac version the code in the DLL is merged into the main application framework code as a single compiled file. So it is not possible to separately compile the game definition library, because the Mac version of the framework can't read and use a separate file.

In addition to the above compiled code, the game includes Python scripts that control the user interface screen layouts and their behaviour; graphics and sound files that are used to display all the units and terrain and buildings; and XML files that define the properties of all the game elements and the links between them. These files are identical in the Mac and Windows versions.

The Mac version can therefore only run mods that use changes to the Python, graphics, and XML files. And you can't tell Civ4 to allow more than 18 civs by changing any of these files. You have to so it within the code that only the Windows modders can change.

The Mac version of BtS installs a couple of mods that do extend the 18 civ limit. This was done by Aspyr. It could not be done by anyone else, as no one else has all the source code that is required.

Aspyr compiled two additional versions of the game software that incorporate modified CvGameCoreDLL code to play Rhyes and Fall and The Road to War. They embedded these extra compiled software files within the BtS application bundle. So the BtS application actually contains three separate copies of Civ4 BtS. You can see them if you right click the BtS application and select "Show Package Contents". The additional copies are in Civilization IV Beyond the Sword/Contents/Resources/
 
Just a minor clarification for those not familiar with programming - the differences that AlanH describes are not due to any short coming of Mac OSX or its ability to handle a dll. This is just an unfortunate choice (from our point of view) that Aspyr made. They could have chosen to write the code in the same fashion that Firaxis used for the Windows version but they did not do so.
 
The DLL (Dynamically Linked Library) is a bunch of BTS functions and information that is separate from the BTS application/executable itself. The reason it's done this way is so all those functions and information can be altered by modders without Firaxis needing to provide the entire source code for the game.

The DLL is written in the same programming language (C++) as BTS itself and has to be recompiled each time it is changed. However, for the Mac version of BTS, Aspyr did not keep the DLL separate - it is incorporated into the BTS application and is 'hard-linked' rather than 'dynamically-linked'. What this means is that even if Mac modders could compile a DLL it would be ignored completely as Mac BTS will only ever use its incorporated code.

The 18 civ limit is defined inside the DLL so Windows modders are able to change it for Mac modders it is completely impossible. The only mod that bypasses this limit is the version of Road to War included with BTS; and that's only because it has its very own version of the BTS executable.
 
I see, thanks to both of you for your replies:goodjob:.
 
Top Bottom