Brett's Games

Civilization IV
Log Files & Commerce Graphs

Commerce Visualized

Mission Statement

So, like, a bunch of graphs will follow... or at least, one or two. I haven't really decided what or how many graphs to include, yet. But before that, a quick intro.

I like playing games, goofing off, and in general wasting my life. There is little I enjoy better than strolling around (walking around aimlessly) doing nothing, poking my head in there, while checking out the cracks in the side-walk there. But I also desire to look back on my life and see a wide range of accomplishments. So as I wander around, passing my days in hedonistic splendour, I (often) try to work on a project, say by putting together a web page or two in my mind. And as I play computer games, the same sort of rational holds true. In the end, I want output, a deliverable, a web page, something to show the world at the end of the game.

Or if that's still not clear, this web page is part of my Trophy Shelf.

And in this particular Feather in my Cap sort of endeavour, I did a little preliminary poking around into the CIV IV BUG Mod Logging Files.

Not that any of the following version numbers matter to an understanding of this article, but this is what I am currently running:

Beyond the Sword 3.19
BUG Mod 4.5 [Build 2221]
BULL 1.4 [Build 243]
BAT Mod 4.1

The Log Files

The log files that BUG outputs are simple text files with sequential entries for every turn.

Sample log files may be found at:

The log files contain a lot of detailed information (Attitude Changes, Diplomatic Offers, Combat Results, and so on). And I recommend clicking on at least one of the above links to briefly look at the referenced file, which, since they are text files, should be viewable in your browser.

Of course (as is inevitable), the log files do not track all that I would have them track. For instance, unless the logging player builds a Wonder, the Wonder's completion date is unknown, even though any player in the game can tell when any Wonder has been completed, as you both get a pop-up when the Wonder is completed and the completion date is noted in the Wonder Demographic Screen.

That said (the relative incompleteness of information), what information is included in the BUG log files is (relatively) easy to parse, as all the log entries (of the same type) are consistently formatted.

And with the introduction now almost over, the rest of this page will concern itself solely with commerce log entries of the form:

0% Research: 253 per turn
70% Culture: 2524 per turn
0% Espionage: 82 per turn
30% Gold: 88 per turn

The Graphs

A Picture Being Worth a Thousand Words

Note: Vertical Scale Varies From Graph to Graph!

The different forms of commerce are graphed, research, gold, espionage, and culture, this is the full graph, all five hundred turns, even if this game only lasted 325 or so turns, notice the upward slope of the blue research line, this is how things should look, well, maybe even more so
Winning Game
Full 500 turn graph of a losing game, the research is flat
Losing Game

I think (so far) this page has been mostly for me. Well, let's be honest, the entire page is almost entirely for me. But I like to (at least) pretend to give value. So (above and below), please find the output of my initial foray into the log files as they relate to Commerce (Research, Gold, Espionage, & Culture) for two of the Civilization IV: Beyond the Sword games that I have previously written up.

I won the Quad Gold game (left); and in that, Research soared into the thousands of beakers per turn. I lost the Monty's Revenge game (right); and in that, Research never made it over a couple of hundred beakers per turn. Though to be fair, in Monty's Revenge, I was going for a Cultural Victory. And my Cultural output was in the thousands. Still, I lost. And a major reason for that was having a piss-poor research engine.

Quad Gold, winning, first 100 turns, flat for the first fifty or so, it will be flat for a while, but maybe not this flat
Increasing Research
In this, the research only looks better, because the scale is different, it is actually flat for the first 100 turns, or actually, dipping downward, for gold production, likely to fund a second city, with no increased culture
Static Research

The difference in the research progression is even clearer if one only looks at the first hundred turns. In the winning game (left), research doubles; and then, doubles, again. In the losing game (right), research is flat.

Thus (although I am sure it is an oversimplification), I am willing to bet that early rates of ever increasing research are both keys to and predictors of a successful (i.e. winning) game.

I, therefore, think that in my next game of Civilization IV, I should try to ramp up the research as soon as possible, you know, to attend to it. But the truth is I do not know what a reasonable research rate is... and I doubt I will for some time to come. Still, let's try to do better, shall we?