Updated on 19/12/2013 (date/month/year) This thread intention is to gather the most complete set of articles about how the game works. The Civilization® Serie is known for a long time to be abstruse in revealing how the game actually works. The great particularity of CivIV over CivIII for instance is the release by the developers of the uncompiled code, allowing everyone to judge by their own eyes how the game works and adjust it to their own way (modding). Through the code only as piece of justification, I will lay out the very building pieces of CivIV for the common player. Somehow, an attempt to How Civ4 works for dummies. Game Mechanics Spoiler : City Mechanics Spoiler : Holy City location How does the granary really work? City Resistance and Occupation Period. Emancipation Unhappiness inner working. Checked. Option to disband/raze a city: When enabled/disabled? DRAFT MECHANICS: How many population points are needed to be spent for a specific unit draft? Unit Mechanics Spoiler : How many war success points worth a sunken ship along its load? Spoiler : EDITED: I haven't been able to find the SDK dealing with exact mechanics of war success definitions, but a quick testing showed the cargo of a ship drowning is NOT counted towards war success. I think that is good implementation if that was intended as it avoids possible AI abuses. Miscellaneous Spoiler : Does one beakers equate to one gold in tech trade? I'll test perhaps later. Answered. It is not 1 beaker for 1 gold at all! I think I've seen cases of peacevassaling when the master DoW you and the master makes automatic peace with you. Does the later case exist? Or the master needs to DoW you to get rights to have a vassal. Spoiler : Master always DoW to have the right to get a peacevassal. What I discovered with experience is many aspect of the game is ordered. Just like the AI's and the player themselves IBT in a SP game. Some type of orders are understood (still I will list them for people's information), but some are still unknown to me. Sometimes, it can be gamebreaker or just annoying. Spoiler : Beakers versus hammers. Beakers are always compiled before hammers from cities. That means monasteries in construction cannot be finished while getting SM IBT. Same for outdated units. That means settling on marbe and chopping a bunch of trees 1 turn before getting Masonry leads to more hammers than expected for a marble wonder or National wonder. Golden Age from TaJ Mahal. How is it compile? Before all cities compile their hammers IBT (in between [two successive] turns) or something else? I lost my chance to milk more fail gold from Sistine Chapel because of a Taj golden Age (the wonder went two turns left to one turn). Forests outside cities BFCrosses. If distant equally, the oldest city (according to the list of cities) gets the hammers. For instance, between the capital or another secondary city, the capital gets the chop unless it got captured by barbs and then retaken, which screwed the "founding dates". There is a small trick with building culture. If the city will border pop next turn (thanks or not to building culture) and queue something else than wealth or science (because they are considered same category as beakers), then you get the built culture and same value after multpliers for the unit or the building. Bug created by beakers first, then hammers compiled. GPeople are spawning in the order the cities are founded/captured. For instance, if you have London, Oxford and Paris, although Paris is older in world foundation, you captured it, so comes third in your city list. So, if London and Oxford has the same GPeople bar filled and same GPeople rate, then London comes first. To get two GPeople within a turn, Oxford should have humongous GPeople to catch up the margin created by each additional GPeople. Early in the game, it is usually 100 :GP: points per additional GPeople. Gold trade are by increments of 10 golds since CIV. Later in the game, it is reduced to increments of 5 gold. And sometimes even to increments of 3 gold. What does trigger this? NOW EXPLAINED. ====================================================================== AI Mechanics Spoiler : CvCityAI.cpp - AI City Mechanics Spoiler : CvPlayerAI.cpp - AI Leader Mechanics Spoiler : When the AI decides to create a colony? What is the trigger or the combination of many parameters? AI bragging about their strongest unit available. Checked. Demands to player's vassals that lead to a war. You have shared your technological discoveries with us. AI under some finance problems and aftermath. Fair trade plusmods secret unveiled. AI and world projects. When will they decide to start one? How to become a moderate Beggard! Foreign source because redundant to make my own mini-article. Diplo Actions triggered by the AI itself AI propensity to make external and internal spreads of their available religions LUMP SUM : How the available AI gold is calculated? Permanent Alliances: How to trigger it and its conditions? CvTeamAI.cpp - AI Team Mechanics Spoiler : Vassals (either peacevassal or a capitulee) get free technologies from their master. How does it work? Spoiler : Peacevassalings to a master and the master gives you free techs. Well, what does rule the AI in leaking his technological secrets? And given the master is not always a FRIENDLY dude, he doesn't necesserily gives all his techs. On FRIENDLY, I think the master gives all but perhaps wonder techs if (s)he starts a wonder the turn he gets the tech. I think the tech leakage comes with "We don't want to trade it away just yet!". What does mean "We'd rather win this game..." when I want to bribe the AI off a war? Directed Victory condition? AI stomping another AI badly? Spoiler : There are two reasons, but the most common is when the human player has few land tiles compared to the AI. If the AI you want to put a stop in his war has more than 2.5 your land value, then (s)he returns an excuse: "We'd rather win this game...". Can be found in CvTeamAI.cpp. [*] AI gifting free techs inner working. Checked. CvUnitAI.cpp - AI Unit Mechanics Spoiler : For the future... [*] How war tribute works in detail? When vassals revolt? NEW Strike and Automatic Unit Disband Process NOT longer intended to ask questions to the community. Even those knowing deeply the code refuses to help. Only archives under dust here. BUT you can ask questions to me.