Extra villagers, llama or sheep in the Town Center

Another implementation worth explaining for later on, when we reuse it for Burgundians and Sicilians, and because it takes a while to unravel without help. Here we are going to look at the extra villagers or llama Chinese, Mayans and Incas get, and how the Tatar bonus is also an implementation of the first idea.

Since these bonuses are related to the town center, let’s look at it in the code. If you write “town center” in the filter box, you get 20 different units. There are actually 5 town center versions for each age, you can read this page to learn more about how it works. The unit that interests us is number 109, the dark age town center, the one where villagers and techs are created. If we scroll down to the “Annex units” section, bellow the resources we can see that unit 109 has four different annex units attached to it. The first three are parts of the town center (see the page cited above). The fourth one, “Empty