(I already posted this on unofficial patch forum before I noticed that there was a bug reports forum...)
The bug is that the maintenance totals displayed in the financial advisor will be inaccurate if any of your cities are in anarchy, and probably if they have "we love the king" day. The bug does not affect the gameplay the problem is just that the breakdown of the maintenance costs displayed in the financial advisor are wrong. ie. "Distance maintenance" + "City maintenance" + "Colony maintenance" + "Corporation maintenance" all add up to the correct total, but are individually inaccurate.
I've attached a multiplayer save game. If you join the game as player one, the AI will (immediately) be in the process of capturing one of your cities. If open the financial advisor and point to the city maintenance section to get the mouse over text then you'll see some inconsistencies. The # of cities maintenance cost is actually negative (!) before the city is captured, and very small after it is captured. Further tests can be done by giving away other cities that are in anarchy and then checking how the maintenance costs change. What should happen is that none of the costs should change. What actually happens is that the number of cities cost goes up and the other costs go down.
In this thread I posted a fix for the problem.
For convenience I'll just copy the last part of that thread here:
The bug is that the maintenance totals displayed in the financial advisor will be inaccurate if any of your cities are in anarchy, and probably if they have "we love the king" day. The bug does not affect the gameplay the problem is just that the breakdown of the maintenance costs displayed in the financial advisor are wrong. ie. "Distance maintenance" + "City maintenance" + "Colony maintenance" + "Corporation maintenance" all add up to the correct total, but are individually inaccurate.
I've attached a multiplayer save game. If you join the game as player one, the AI will (immediately) be in the process of capturing one of your cities. If open the financial advisor and point to the city maintenance section to get the mouse over text then you'll see some inconsistencies. The # of cities maintenance cost is actually negative (!) before the city is captured, and very small after it is captured. Further tests can be done by giving away other cities that are in anarchy and then checking how the maintenance costs change. What should happen is that none of the costs should change. What actually happens is that the number of cities cost goes up and the other costs go down.
In this thread I posted a fix for the problem.
For convenience I'll just copy the last part of that thread here:
I've managed to fix the bug. Here's how I did it:
In CvGameTextMgr.cpp, CvGameTextMgr::buildFinanceCityMaintString, it calculates the maintenance costs for distance, colonial, and corporations, on a city by city basis and adds them all up. Then, to get the number of cities maintenance, it just subtracts all the other types of maintenance from the total maintenance (which is known by some other means). The problem is that when it is adding up all the maintenance from each city it does not take into account that some cities are completely exempt from maintenance.
So here's my fix:
I copied the conditions of that if statement from the function which is used to calculate the total city maintenance.Code:/* Old BTS code iDistanceMaint += (pLoopCity->calculateDistanceMaintenanceTimes100() * std::max(0, (pLoopCity->getMaintenanceModifier() + 100))) / 100; iColonyMaint += (pLoopCity->calculateColonyMaintenanceTimes100() * std::max(0, (pLoopCity->getMaintenanceModifier() + 100))) / 100; iCorporationMaint += (pLoopCity->calculateCorporationMaintenanceTimes100() * std::max(0, (pLoopCity->getMaintenanceModifier() + 100))) / 100; */ if (!pLoopCity->isDisorder() && !pLoopCity->isWeLoveTheKingDay() && (pLoopCity->getPopulation() > 0)) { iDistanceMaint += (pLoopCity->calculateDistanceMaintenanceTimes100() * std::max(0, (pLoopCity->getMaintenanceModifier() + 100))) / 100; iColonyMaint += (pLoopCity->calculateColonyMaintenanceTimes100() * std::max(0, (pLoopCity->getMaintenanceModifier() + 100))) / 100; iCorporationMaint += (pLoopCity->calculateCorporationMaintenanceTimes100() * std::max(0, (pLoopCity->getMaintenanceModifier() + 100))) / 100; }
An alternate fix would be to just calculate the number of cities maintenance in the same way as all the others, but that would probably be slightly less efficient.