Third-party code that Civ3 uses

Quintillus

Resident Medieval Monk
Super Moderator
Supporter
Joined
Mar 17, 2007
Messages
9,303
In case anyone ever feels like trying to contact Firaxis for the CivIII code again, I figured it might be handy to have a reference for the third-party code that Civ III is using, since as far as we can tell it's likely some third-party licensing agreement that's responsible for the sudden disappearance of communication last time. Unfortunately, it looks like there are several proprietary plugins that could be the reason for this. But better to know what they are, right?

What I've found so far:

Third-Party

  • binkw32.dll, by RAD Game Tools (link to website). This is used to play videos, such as the intro video and the spaceship video. The Mss32.dll file included with Civ is part of Bink, covering sound, and sound.dll uses Mss32.dll, and appears to also be part of Bink.
  • IFC23.dll, by Immersion Corporation. These are the Immersion Foundation Classes (link to website). From what I gather, they mainly deal with touch-sensitive technologies, including things such as joysticks, trackballs, and gamepads. It looks like this DLL wasn't present in Vanilla, so perhaps Firaxis added some joystick support in PTW? I'm not really sure what Civ uses this for.
  • SecuROM, by Sony. The infamous CD protection scheme. This isn't present in digital downloads, however, so this is unlikely to be the stumbling block. I believe this also encompasses drvmgt.dll, as they have essentially the same modification time.
  • Game Spy Arcade, which you are asked if you'd like to install if installing via the CDs. This is optional, however, so it is also unlikely to be a stumbling block. It also is only in PTW and Conquests; I believe it's for Internet multiplayer.

Bink and IFC are used directly by the Civ III PTW+ executable, and thus are the most intrinsically linked.

Microsoft

For the most part, these are included with Windows, so redistributing them shouldn't be a problem.

  • Lucida Sans font. This is included with recent (XP and later at least, maybe earlier) versions of Windows. It may not have been with 95/98, which may be why Civ includes it. But it probably could be dropped nowadays.
  • Various DLLs that are part of Windows are used. These include ADVAPI32.dll, COMDLG32.dll, GDI32.dll (graphics), KERNEL32.dll, OLE32.dll, OPENGL32.dll (graphics), USER32.dll, WINMM.dll (multimedia), and WSOCK32.dll (networking). These are present with any version of Windows Civ supports, and aren't shipped with Civ itself, so shouldn't pose a problem.

Mystery

  • jgl.dll. This one I'm not sure about. The most I can find is a post indicating it may have something to do with PCX files, and another indicating there were some pre-release bugs with it. But I don't know what it's source is, or whether Firaxis created it, or a third party. It looks like it may have been used in Sid Meier's Sim Golf, too. Update: See Rob's post #2, below, for a plausible suggestion of what this may be.

Based on what I've found so far, my guess is if it's something third-party that is restricting the code, it's Bink or IFC. Which also raises a couple of questions:

- If the game's source were released, but without these libraries, how much work would it be to get things working again? The source would be broken as released since the libraries would be missing, but the code could be modified to use alternatives instead (or just skip all the videos and joystick support?).
- Might IFC be the stumbling block? And if so, maybe just Vanilla being released would be possible? While not ideal, it would still be a nice improvement. And it wouldn't threaten Conquests revenue nearly as much.

And a question that some of our graphics gurus may know: Is Bink also used for animations in-game? If so, which I suspect it may be, that would make replacing it a lot more difficult. But it could be replaced by static images as an interim solution.

Realistically, I don't expect anything to change, but I figured why not list what we know? And I recently learned that (many years ago) Electronic Arts gave the Call to Power 2 code to Apolyton, which was encouraging. So even if there isn't a precedent with Firaxis, there is in the greater Civilization family.

It does make me wish Firaxis had John Carmack's philosophy when it came to open-sourcing old engines, and being careful not to use third-party components that would interfere with that. I read a good article on that subject recently, but unfortunately not so recently that I remember the link.
 
I found this here:

"JascCmdJGL.dll (Jasc JGL DLL) is a component from the software Jasc JGL version 9.0.0 by Jasc Software, Inc.. JascCmdJGL.dll version 9.0.0 has a file size of 143,360 bytes, and is most commonly found under the directory "Commands" with a creation date of November 27, 2004. This is not a known spyware, adware, or trojan component."

JASC made Paintshop Pro and Animation Shop pro, which I used to edit the pcx and flc files. It could be a derivative of this to use with Microsoft/Firaxis titles.
 
Very good thread :)

It is sad that Firaxis is as it is, cause an improved civIII would be vastly superior to other civ titles. But they appear to not want to help at all.

Any freesource civIII-like projects currently in production?
 
Very good thread :)

It is sad that Firaxis is as it is, cause an improved civIII would be vastly superior to other civ titles. But they appear to not want to help at all.

Any freesource civIII-like projects currently in production?

An improved Civ3 might also restrict sales of current and future Civ products. Why would they waste time giving away something they can repackage and sell?

Not saying I like it as a modder, just saying from a business perspective it does make some sense. CTP code was released, because after CTP2, Activision had no interest in continuing that product line.
 
An improved Civ3 might also restrict sales of current and future Civ products. Why would they waste time giving away something they can repackage and sell?

Not saying I like it as a modder, just saying from a business perspective it does make some sense. CTP code was released, because after CTP2, Activision had no interest in continuing that product line.

Yeah, i agree that this is most likely by far their #1 reason to not share the code.
Afterall CivIII never got an event file, which in my view is most probably so as to have the next tile keep a strong point from the start, when it was seen as very different and quite crap...
 
From what I gather, they mainly deal with touch-sensitive technologies, including things such as joysticks, trackballs, and gamepads. It looks like this DLL wasn't present in Vanilla, so perhaps Firaxis added some joystick support in PTW? I'm not really sure what Civ uses this for.
This is probably for trackball support, rather than joystick. As to how it's used - maybe for proper scrolling at map edge?
 
An improved Civ3 might also restrict sales of current and future Civ products. Why would they waste time giving away something they can repackage and sell?
i don't know. i was still playing Civ3 and 4 when 5 came out. The only reason i didn't buy it was cuz of steam. i am still playing Civ3 and 4 thanks to mods. Was still playing 3 when 4 came out. If GOG.com were able to sell Civ2, i'd play it, and still play 3 and 4. Different games, different mods.

Civ3 is my favorite, but it still needs work. i'd love it if modders could do yet more with it!
 
Im new to this stuff but by having the code are u implying that the game can be changed? for example adding religion like in civ 4? That would be amazing!!!!!
 
This is probably for trackball support, rather than joystick. As to how it's used - maybe for proper scrolling at map edge?

That could be. Unfortunately, the only computer I have access to that has a trackpad is too old to run PTW/Conquests, so I won't be able to compare Vanilla/PTW in that respect.

i don't know. i was still playing Civ3 and 4 when 5 came out. The only reason i didn't buy it was cuz of steam. i am still playing Civ3 and 4 thanks to mods. Was still playing 3 when 4 came out. If GOG.com were able to sell Civ2, i'd play it, and still play 3 and 4. Different games, different mods.

Civ3 is my favorite, but it still needs work. i'd love it if modders could do yet more with it!

I'm still experimenting with it from time to time.

Im new to this stuff but by having the code are u implying that the game can be changed? for example adding religion like in civ 4? That would be amazing!!!!!

With enough effort and the code, that could be possible, although it might still be quite difficult.

CallToPower2 has released the code, but i don't know if anyone tries to make it close to CivIII.

I'm not sure about that, either. I haven't dug enough into the Apolyton Call to Power 2 project to know what all has been done with it.
 
Im pretty sure its about the money, but heck i'd buy the game over again if they release a new civ 3 with the coolest additions done to civ 4 and 5, and also adding civil wars from civ 2. It cant be called civ 6 cuz they will drift from the idea. They need to make a 'Civilization Conquests 2.0'
 
- If the game's source were released, but without these libraries, how much work would it be to get things working again? The source would be broken as released since the libraries would be missing, but the code could be modified to use alternatives instead (or just skip all the videos and joystick support?).

At first this looks like a problem, but I think, it will not be a real problem. Of course, the usual way of linking third-party libraries into executables is something like this (and I assume this is exactly what Firaxis did with their third-party components like binkw32.dll):
  • You have your own C/C++ code (which will in the end correspond to your executable "Civ3Conquests.exe")
  • You want to call functions in that third-party lib "binkw32.dll"
  • The third-party vendor usually does not want to give you his own source code, but instead gives you three things:
    1. A header file containing the necessary signatures of the available functions: binkw32.h
      This file gets used in your C/C++ coding so that you know the names of the functions, which arguments to pass and what return parameter they have. The compiler uses that infomration to generate the correct call syntax, stack variables etc.
    2. A library file containing a "mapping" from function names to their "addresses": binkw32.lib
      The linker uses this file in order to find the correct "entry address" inside the binkw32.dll. E.g. If your code calls a function name HelloWorld(), then the linker knows "ok, I need to leave Civ3Conquests.exe now and jump into binkw32.dll at address 0x0010F37A"
    3. And the Library itself, which contains the executable code: binkw32.dll
  • So in your make process, you use binkw32.h and binkw32.lib to enable Civ3Conquests.exe to call into binkw32.dll, and then you ship binkw32.dll together with the executable.

So now you may say "well, but we only got binkw32.dll and not the other two files, so we will be unable to re-compile our Civ3Conqests.exe executable, once we have modified its source code!" But these problems can be overcome:
  • From the existing code we should be able to reverse-engineer the header file or at least those portions coresponding to the functions that the source actually calls. Also Microsoft tools like "dumpbin" are able to discover some of the function information just from the DLL file.
  • And the linker that is part of the Cygwin/GNU compiler collection for Windows is able to link directly from the .dll without needing the .lib! Don't know, how they are doing it, but it works, just like in Linux/Unix, where the concept of separate .lib files does not exist anyway.

So if you really get the source code, the external third-party DLLs won't be a (technical) problem. The Windows gurus among us will be able to work just with the DLLs we got.
 
If we cannot have the source code of Civ3, why not use the source code of call to power 2 to make an improved Civ3?
In otherwise, can't we modify the code of call to power to make a "Civ3-like" game with new features?
 
I've never played Call to Power, but I assume it's more like Civ2 than Civ3, isn't it? Then that wouldn't help much. It would be more like: "We have a nice color TV, but it has a few shortcomings. We can't get the construction blueprint of that TV, but we have the blueprint of a radio, so why don't we just turn that radio into a TV that's better than the TV we currently have?"

Bear in mind: this would be a major piece of complicated work, and nobody here probably has any experience with that, so naturally we would make quite a number of mistakes and probably introduce more bugs in the process than Civ3 currently has.
In my opinion, people who are not games developers with years of experience in the business will have to be content with doing some slight modifications here and there and just fixing a few well-known bugs, but otherwise leave everything as untouched as possible in order not to introduce more bugs and instabilities than they fixed... ;)
 
Back
Top Bottom