Code changes by (un-)official patches, expansions on GitHub

f1rpo

plastics
Joined
May 22, 2014
Messages
1,706
Location
Germany
To document the C++, Python and XML changes made by Firaxis between the release of the Civ 4 base game in 2005 and the final BtS patch in 2009 – and the contributions of modders through unofficial patches and the Better AI mod –, I've committed the relevant files in a chronological order to a Git repository, resulting in this network chart: https://github.com/f1rpo/Civ4CE/network
It also covers Colonization and a demo released in 2005.

Apart from this overview of the game's post-release history, the repository can be used to e.g. determine which (code) changes exactly were made by each of the patches (the patch notes are usually incomplete); which changes from the unofficial patches were adopted; whether there are additions in Colonization that might be useful in BtS; or to look at the change history of a particular file. (All not terribly useful I admit.) The size on disk is about 100 MB.

Most of the code was already available online, either through the patch installers or through mods that include modified versions. That said, those files had obviously not been made available in a single place like this, and some (fairly short and simple) files arguably had not been available for free at all because no patch or mod has had a reason to modify them. Doesn't worry me with regard to intellectual property rights, but if that's a problem for the forum, then I will of course delete the link (or whatever it takes).
 
Is there a fix somewhere in there for the anti air strike animations not playing in game? Am at work so can't check.
 
whether there are additions in Colonization that might be useful in BtS

Look at all the great stuff Colonization added for e.g.
  • UI (a lot more Drag&Drop and other improvmenet) - both in Python and in DLL
  • the awesome new concept of Professions that adds a second layer of complexity and possibilities
  • Trade and Production (e.g. Europe Screen and Production Chains ..)
  • all the great stuff they did for Yields (being "physical" and transportable ...)
  • ...
Maybe some of that may be interesting for one of the Civ4BTS mod as well. ;)
If you want to know more, let us Colonization modders know. :thumbsup:

-----

Sadly Colonization also removed code and features from Civ4BTS that we could have used for our mods ... :sad:
(Techs, Religions, ...)

Thus we have been adapting Civ4BTS code (vanilla or mods) to our Civ4Col mods since the first days.
So why should a Civ4BTS mod not also adapt CivCol code (vanilla or mods) ?

-----

@f1rpo
Thanks a lot for this. :hug:

(All not terribly useful I admit.)
Hm, I am not yet sure about that - but I also have not seen the GIT history yet - depends on commenting. :think:
Maybe at least some interesting "high level" info can be filtered out ...

Especially for us Civ4Col modders it woul be very interesting to figure the actual diff between Civ4BTS and Civ4Col.
(We have been massively rebuilding and reusing code from Civ4BTS as I already said.)
 
Last edited:
At one point I was considering dropping the Colonization exe and port an entire mod to BTS. Not to change functionality, but rather to link the BTS and Colonization communities better. However I quickly learned that differences in the EXE files makes this impossible. You can't have Colonization in BTS.exe and you can't have BTS in Colonization.exe. The mods are 99% compatible and we can share knowledge and often code as well.

Sadly Colonization also removed code and features from Civ4BTS that we could have used for our mods ... :sad:
(Techs, Religions, ...)
While those are big and useful features, they do exist in the realm of the DLL, hence can be made. I'm more concerned with the functionality moved from the DLL into the EXE.
CvGameTextMgr::assignFontIds takes care of mapping GameFont. Rather than being able to create our own layout, we are stuck with whatever the exe decides for it. We can create our own, but the exe still decides where to place symbols. Also we would need a workaround for the exe setting and reading during startup. If we ignore the exe's set calls, then the exe will crash.

We lost the entire CvMessageControl class. This defines how to make network traffic. If BTS wants to create a new type of package containing 42 ints, it can based on what I can tell. Colonization is stuck with the predefined packages. If we had access to CvMessageControl, then we would have avoided some trade route bugs as adding an extra int argument would be doable.

It might not be as bad as it sounds though. We can accomplish what we need. It's just that it takes some extra creativity to do so and apparently bugs prior to figuring out how it should be done.


In general I find it good that we now have focus on the differences because that will also highlight everything, which isn't different. Since that is the vast majority, we really should drop the us and them view, which seems to have always existed.
 
Last edited:
The mods are 99% compatible and we can share knowledge and often code as well.
Exactly. :thumbsup:

While those are big and useful features, they do exist in the realm of the DLL, hence can be made.
Also true. It is just a bit of effort. :thumbsup:

Since that is the vast majority, we really should drop the us and them view, which seems to have always existed.
More common projects and cooperation between Civ4BTS modders and Civ4Col modders would benefit us all. :thumbsup:
 
Last edited:
@PPQ_Purple: I've responded in your unit art thread.

Look at all the great stuff Colonization added for e.g. [...]
I assume that drag-and-drop needs to be enabled in the EXE, and I also assume that something has been done in Col's EXE that makes it much easier to add new yield types; in BtS that's a significant technical challenge (as Asaf's Fourth Yield mod component demonstrates).
So why should a Civ4BTS mod not also adapt CivCol code (vanilla or mods) ?
I'm certainly open to it. Since I'm not looking to implement new features though, I've so far only found two small utility functions in Col – which I had already implemented myself in BtS (CvInitCore::getScenario, and a template version of CvXMLLoadUtility::SetVariableListTagPair). That said, Nightinggale has written plenty of "under-the-hood" code for Col that can work just as well for BtS mods.
Hm, I am not yet sure about that - but I also have not seen the GIT history yet - depends on commenting. :think:
Maybe at least some interesting "high level" info can be filtered out ...
I didn't review the diffs carefully before committing the patches and expansions, so the commit messages don't point out what the specific changes are. I did try to make sure that the diffs aren't too badly polluted with meaningless changes; for example, I've put the removal of the "Exposed to Python" BtS comments into a separate commit. Hopefully, the repo could be a starting point for someone who wants to review and possibly document certain changes in detail.
While those are big and useful features, they do exist in the realm of the DLL, hence can be made. I'm more concerned with the functionality moved from the DLL into the EXE.
Patch 3.19 added the following files (presumably moved from the EXE) to the DLL:
Spoiler :
CvDllPythonEvents.cpp
CvDllPythonEvents.h
CvDllTranslator.cpp
CvDllTranslator.h
CvEventReporter.cpp
CvEventReporter.h
CvMessageControl.cpp
CvMessageControl.h
CvMessageData.cpp
CvMessageData.h
CvStatistics.cpp
CvStatistics.h
CyMessageControl.cpp
CyMessageControl.h
CyMessageControlInterface.cpp
plus some relevant additions to CvDLLInterfaceIFaceBase.h
and patch 3.17 added CvGameInterface.cpp – a collection of UI functions that were previously hidden inside the EXE (or at least some of them). My hypothesis is that the development of Col started at BtS version 3.13 and so Col missed out on those new modding capabilities.
Especially for us Civ4Col modders it woul be very interesting to figure the actual diff between Civ4BTS and Civ4Col.
So - a caveat about that: The repository shows a diff between BtS 3.13 and Col, and it shows diffs of 3.13 and 3.17 and of 3.17 and 3.19. All minus the artwork – which doesn't overlap very much as far as I can tell; some (restyled) unit, terrain and leader graphics, some UI stuff, but mostly original work it seems. So that ought to also be an opportunity for exchange between Col and BtS mods (I suppose it has already been; I don't follow artwork mods much).
 
Top Bottom