Freeciv
Advertisement

Goodbye Freeciv
or How I Learned to Stop Worrying and Play DDR Instead

Post scriptum: this article is about Freeciv up to and including 1.14. For Freeciv 2.x and warserver in particular, city smallpox is no longer the winning strategy. (This continues to be the case in 3.x bundled rulesets.)

Since this article was first written (8 May 2004), I haven't been playing much Freeciv. A couple of weeks ago, I finally got around to rewrite the patches for 1.14.0, and actually implemented all the changes mentioned in the article, plus a few more tweaks to the ruleset. And I thought it worked out pretty well.

Then someone came along and showed me that smallpox is still possible under these rules. It's not easy, but it is still possible to keep expanding. Although those new cities can hardly grow because the sole citizen has to be turned into an entertainer due to excessive unhappiness, it nonetheless contribute enough trade and shields to give the smallpoxer a substantial lead in research and production.

Post scriptum: this is no longer the case after the concept of the "angry" citizen was introduced.)

In short, it is still easier to keep building new cities than growing cities to bigger sizes, which is hardly surprising because these rules didn't change the underlying cause of smallpox at all.

The failure has led me to believe that the game mechanics is fundamentally broken, and smallpox can't be fully cured unless major changes are made to how the game works. For instance. it might be worthwhile to reconsider taking out the free city center, thus removing the biggest advantage smallpox has over other strategies.

It is certainly possible to further reduce the effectiveness of smallpox by other means. In fact, many ideas have been proposed and a few are already implemented in the code. However, none of them addresses the real cause of smallpox, and this "band-aid" approach to fixing the problem is not very satisfying.

Furthermore, nobody seems to care about it anymore. I did get a few requests for the patch over the last few years. But nowadays it is more or less accepted on the public servers that smallpox is the only viable strategy in freeciv, and maybe even the preferred one. It looks like the civ builders have moved away from freeciv, and all those left are smallpoxers, either by choice, or simply out of necessity.

So it's probably a good time for me to stop worrying about it and move on to other things as well. Freeciv is a great game, but smallpox simply took all the fun out of it for me. My latest obsession is Dance Dance Revolution, or DDR for short. It is an arcade dancing game originated from Japan. And you can play it in the comfort of your own home by downloading the excellent simulator pyDDR. Meanwhile, I hope the original article that follows might prove useful to someone who would like to tackle the problem in the future.

Mike Jing
July 1, 2003



The Pursuit of Happiness

or How Smallpox Was Cured in Freeciv


100

What Is Smallpox?[]

Smallpox is the unofficial term used to describe the most prevalent strategy used in Freeciv today. To seasoned Civ2 players, it is known as ICS — Infinite City Sprawl/Sleaze. It refers to the practice of building lots of small cities, normally no bigger than size 2 or 3, often close together, with only one space in between. It is wildly popular because it enjoys several distinct advantages over other civ building strategies, especially at the early stages of the game. These advantages include, but are not limited to:

  • since the city center is worked for free, and also gets free roads and irrigation, a size 1 city can work 2 tiles, while a size 2 city can work only 3, therefore it makes sense to build a settler at the expense of 1 citizen (1 used tile) and got 2 used tiles in a new city rather than trying to grow the city to a bigger size.
  • small cities grow faster than bigger ones due to their smaller foodbox, therefore you can grow faster by founding new cities than trying to grow your cities to a bigger size.
  • small cities do not suffer from unhappiness, therefore there is no need for temples or luxury.
  • because most of the land is covered by cities, there is little need for terrain improvement except for short roads to connect the cities, so the effort can be concentrated on building new cities and military units.
  • because there is no need for city improvements, there is no upkeep to pay.
  • because the cities are close together, there is less corruption.

Due to these reasons, this is practically the only way to win a Freeciv game as it is now. If you don't follow suit, you are dead meat. IMHO, this makes the game very boring, because it reduces the game to an ICS slugfest. Some people do not consider this to be a problem, but many others do wish it could be fixed.

There have been many suggestions on how to solve this problem. But I think most of them wouldn't work because they all address the symptoms rather than the cause. To me, smallpox is an indication of a much bigger problem: there is no constraint on expansion. And since smallpox is by far the most effective way to expand, it makes all other strategies obsolete. In order to cure smallpox, first you have to curb expansion. As an added benefit, it brings balance back into the game.

I think the real solution lies in the way happiness is handled. Under current default rules, happiness almost never enters into the equation. As a game feature, it has long been neglected, and considered a mere nuisance by many. I happen to believe that it is an essential game balancing feature, and only a few simple changes of the rules is needed to cure smallpox.

How Happiness Works in Freeciv[]

By default, in any city, each new citizen after the 4th starts out unhappy. This is adjustable through the server option "unhappysize". This number is reduced by 1 once you reach a certain number of cities. This threshold is determined as follows: another server option "cityfactor" (14 by default) plus a parameter called "empire_size_mod", which is defined in government.ruleset depending on the form of government (Anarchy: -5; Despotism: -4; Monarchy: -3; Communism: -2; Republic: -1; Democracy: 0). Therefore, the magic number is 11 for Monarchy, and 13 for Republic. Once you go over the threshold, i.e. after building the 12th city under Monarchy, or the 14th under Republic, the 4th citizen in each city becomes unhappy.

Next, happiness from luxuries is calculated. Each happiness conversion (unhappy->content or content->happy) costs two luxuries. First, content citizens are made happy. After converting all content citizens to happy citizens, unhappy citizens are converted to content and then to happy one by one. This is done until all luxuries are exhausted.

Third, the effect of city improvements, including temples, cathedrals (or Michelangelo's Chapel), colosseums, and (under democracy) courthouses, is considered. They make a certain number of unhappy citizens content.

Fourth, depending on government, if martial law is in effect, military units in the city can make unhappy citizens content. Under a Republic or a Democracy, however, military units can cause unhappiness.

Finally, the effect of happiness Wonders (Hanging Gardens, J.S. Bach's Cathedral, Shakespeare's Theatre, Cure for Cancer) is added.

By default, you always have at least 3 initial content citizens in your city, without needing any luxuries, city improvements or wonders. Therefore, happiness is not a problem for smallpox players because their cities are normally under size 3.

How to Use Unhappiness to Cure Smallpox[]

The idea is very simple: the more cities you have, the more unhappy your citizens are. Therefore, you simply can't afford to build too many cities, because then you will run into serious happiness problems. Instead, you have to grow your cities much bigger once the initial expansion is over. Smallpox no longer works.

Under the default rules, there is only a one time penalty for going over the threshold. However, there is a little known parameter in government.ruleset called "empire_size_inc", which is zero by default and thus has no effect. What it does, when it's non-zero, is that, for every empire_size_inc number of cities over cityfactor+empire_size_mod, the initial number of content citizens is reduced by one. In order to cure smallpox, government.ruleset has to be modified and empire_size_inc set to non-zero, either to 1 or 2, depending on government.

However, as the code stands now, this change alone is not enough. This is because the empire size penalty is applied before all other happiness factors, and the number of content citizens can't be reduced any further once it goes down to zero. For example, suppose unhappysize=4 and cityfactor=14, and empire_size_inc=2 for the Republic. So at the beginning, the first 4 citizens in your city start out content, and each one after the 4th will be generated as unhappy. Once you get to 14 cities as a Republic, the 4th one will also become unhappy. After that, for every 2 additional cities you build, that number is further reduced by one, until you reach 20 cities, when all your citizens are generated as unhappy from the very beginning. From then on, any additional cities you build will have no effect on happiness, simply because the number of initial content citizens can't be reduced to below zero. Therefore, if you have built the Michelangelo's Chapel wonder, every city will have at least 3 content citizens, no matter how many cities you have, and smallpox is again possible.

Fortunately, this loophole can be easily closed by allowing the number of initial content citizens to actually go below zero, in a way. Instead of throwing away leftover unhappiness caused by large empire size, it can be saved as "potential" unhappy citizens, which has to be dealt with first before any citizen in a city can become content or happy. So in the above scenario, for every 2 cities you build after the 20th, you will get one potential unhappy citizen in every city. This way, the effect of Michelangelo's Chapel is offset by 6 additional cities and it won't allow smallpox as it would before. This only requires a very small patch for the server.

I have modified the rules a little further to make it less restrictive, and bring it closer to Civ2 behavior at the same time. Now the penalty is applied only to those cities which are above the threshold. This way, these additional cities will still be hard to manage, but at least they would no longer bring down the whole empire, because they won't affect your "core" cities. Conquest will again be a viable option.

The preferred settings are unhappysize=1, cityfactor=12 and empire_size_inc=2. This would allow you to build around 10 cities (9 for Monarchy, 11 for Republic) before the empire size penalty kicks in. Since each city covers up to 21 tiles, this will give you around 200 tiles to work with. Suppose 3/4 of those are on land, each player should be allocated about 150 land tiles, which means 500 total with a default landmass of 30%. So the ideal map size should be the number of players times 500. With these settings, smallpox is no longer a viable strategy.

It can't be stressed enough that these settings are absolutely necessary. Yes, they seem harsh, but loosen any of them and smallpox will come back. This is because it still enjoys all the advantages mentioned above at the critical initial stage of the game, and the benefit of city improvements won't become significant until the city is fully developed. If more cities were allowed to be built at the beginning, it would still be able to overrun people who choose not to use smallpox. Therefore, unhappysize has to be 1 to slow down the initial expansion, and also give Monarchy its rightful place. And empire_size_inc can't be bigger than 2, because otherwise the happiness wonders would become way too powerful and would also allow smallpox to return.

How to Build an Empire without Smallpox[]

People are asking, how in the world is it possible to build a powerful empire with fewer than a dozen cities? Well, you have to grow them to much bigger sizes, which is the exact opposite of smallpox. In order to do that, you have to build city improvements. Temples, cathedrals, colosseums can keep people content. So do marketplaces, banks and stock exchanges, through luxuries, in addition to boosting tax revenue. You also have to build terrain improvements: roads, irrigation and mine. In general, each city should have its own settler to improve the land, unless it is a very poor food producer. With the help of all the necessary infrastructure, a city can grow to huge sizes, typically around 25-35 under normal circumstances. And they can be extremely powerful, because the bigger the city, the bigger the benefits of all the city improvements.

Your first research priority should be Monarchy. Unlike in a game with default rules, going Republic early can be problematic due to an unhappysize of 1. With Monarchy, you can build military units and use martial law to prevent revolt, without suffering the food and production penalties under Despotism. Quickly expand to 9 cities and change to Monarchy as soon as possible. Space the cities far enough apart to allow enough room for future growth.

After the initial expansion phase, each city should have a military unit for martial law and defense. Next, build a settler to improve the land. After the settler, start building a temple, and then library and marketplace. Meanwhile, build roads and irrigation on selected tiles to increase trade and food production. Once you have marketplaces in all your cities, you may consider switching to Republic and raise luxury rate to prevent revolt. By now, your cities should be at least size 3, and you can grow them by celebration if they have enough trade and food surplus.

Next you want banks to boost luxuries even further, so that you can lower the luxury rate and get more cash to buy aqueducts to grow to bigger than size 8. Stock exchanges serve a similar function. Use the extra cash to buy all the improvements you need: cathedrals, colosseums, universities, harbors, etc. Then you will need sewer systems in order to grow to over size 12. With a large population, the city improvements should pay for the themselves very quickly.

In order to grow even further, farmland and supermarkets will be needed to produce more food. When all grasslands and plains are turned into farmland, cities can easily grow to size 30 and above. And from size comes power. Now it's the time to build factories, offshore platforms, super highways, etc. Go ahead, you can afford them now.

How to Wage War[]

Some people are worried that it would be impossible to conquer the world under these rules due to excessive unhappiness, that's simply not true. It is true, however, that you can't win by conquest so early in the game anymore. If you do choose to go to war early, it may hurt your growth and cause you to lose later. Real war comes much later, with modern technologies and weapons, when most of the research are done and all resources can be directed towards luxuries to keep people happy and gold to buy advanced military units. If you are far enough ahead, military conquest shouldn't be much of a problem at this late stage of the game. And remember, luxuries make people happy!

The fact of the matter is, it is far too easy to wage war in Freeciv, because there is no senate to negotiate and enforce peace treaties. You can go to war as a Republic without worrying about the senate tying up your hands, while still enjoy the full benefit of the trade bonus. Therefore, it almost always makes sense to attack your enemy early and often. And because the benefit of city improvements comes about rather slowly, an expansionist warlord may well catch a perfectionist civ builder off guard. So the senate is desperately needed to restore game balance in this respect.

In short, there is still too much war in Freeciv. In order for real civ builders to thrive, there has to be a way to ensure peace. Although smallpox is no longer possible, warmongers can still run amok, and that's just not right. Unfortunately, fixing that problem is beyond the scope of these rules.

It is important to remember that Freeciv is not just about war. Sure, war does have its place, but Freeciv is much, much more than just a war game. Some people simply do not enjoy civ building as much as they enjoy warfare, but that doesn't change the fact that civ building is at least half of what the game is all about. It may well come down to war at the very end, but all I am saying is give peace a chance (sorry John). At least for a while.

Why the Game Is Better This Way[]

First and foremost, no more smallpox. Even with happiness wonders, it is no longer possible to win by building dozens of small cities. Granted, smallpox still enjoys the same kind of advantages early in the game, but without growing your cities to bigger sizes, you are bound to lose sooner or later. This is because large cities are extremely powerful, and once they are fully developed, smallpox won't stand a chance against them.

Second, the playing field is more level. Instead of expanding like crazy and trying to cover as much ground as possible, players can concentrate on managing their existing cities once they have enough room to grow. It is much harder to grab large pieces of land by building more and more cities, therefore, players have a more equal chance of development, and it makes a more balanced and interesting game.

Third, unlike in a default smallpox game, all game features are involved. You actually have to build temples, marketplaces, libraries, or even a bank or two. You actually have to set the luxury rate above zero. You may actually see a stealth bomber or a nuke. And the space race is now actually a realistic possibility instead of just a running joke.

Fourth, diplomacy plays a much bigger role. Because research is much slower early in the game, exchanging critical techs makes much more sense. Because conquest is harder, alliances are more welcome. And because of the slower pace of the game, it is actually possible to meet most of the other players before you are destroyed.

Finally, the solution is simple and elegant. It doesn't require any significant change of the existing code, and there is no need for extra features. In addition to curing smallpox, it also balances the game naturally.

Some say the empire size penalty is unrealistic, but it is a game balancing feature, just like large cities have more unhappy citizens. Besides, it can be argued that large empires do suffer from more insurgencies. In the case of war, it is even more so, because most often the occupied territory do not change their allegiance so readily, and it may well cause unrest back at home.

Others say the limit on number of cities is artificial, but the game is full of this kind of "artificial" limits. Why is the unhappysize 4 anyway? Why is rapture size 3? Why can't I have scientists until size 5? The purpose of this limit is to curb expansion, and thus encourage city development. And it's not even a hard limit: you can still build as many cities as you want, you just have to deal with the consequences.

Still others complain that too much micromanagement is required to play under these rules. But with fewer cities, it is really not that bad. Let's face it, micromanagement is unavoidable in a game like this. Until better AI agents become available, you always have to manage the cities by yourself. And if you follow the right strategy, it can be done very efficiently. Granted, a little more help in this area would be nice, but in the end, micromanagement can't be eliminated entirely, short of ceding control to an AI player, who wouldn't feel bored under any circumstances.

It is true though, that the game takes much longer now because research is much slower at early stages of the game and military conquest is much harder. But isn't that the way it should be? Is steam engine before 600 BC realistic? Is an endgame before 1 AD really desirable? Freeciv is a slow game by nature, because it takes time to build a great civilization, and thus doesn't lend itself well to a quick pickup game. A possible solution would be to make it possible to save and load games on public servers, so that a group of players can play and finish a long running game over time. Another possible option is to double food and production, as done in CivII Multiplayer. When push comes to shove, smallpox would still be the default and good for a quick game for those who want it.

Final Words[]

I am by no means an expert in Freeciv gameplay, but I do feel very strongly that this is the way the game is supposed to be played. You have to make use of all the game features in order to win, and the end result is much more cohesive and enjoyable. Sure, it's not easy to learn how to deal with the new rules, but trust me, it is well worth it.

Comments and criticism are welcome. You can contact me at miky40@hotmail.com.

Further Reading[]

  1. To see how smallpox is practiced in Freeciv, read Introduction to Freeciv#Winning strategy.
  2. To learn how ICS works in CivII, see DaveV's ICS Strategy Guide.
  3. For a non-ICS approach, see Octagon's Strategy for CivII.
  4. To learn how to wage war effectively, study Mark Fisher's Thesis: Fire! Making War in Civilization II.
Advertisement