Here I want to explain all about the tracking tool I use for our PBs. How it works; where you can find it; how the different values are acquired and what they mean.
Where?
The tracking tool writes all of its stuff into a simple text file, which you can find here: CtHBalance.log
When running a pitboss game this is written by the server itself and Ramk normally provides me with a link to it. But you can also use it in a singleplayer game. Theoretically it would also work in a PBEM, but because that runs on multiple computers, you would have to collect all the CtHBalance.log files from all players.
How does it work?
The central peace of code managing the tracking tool is found here: ...\Assets\Python\CvEventManager.py
In there look for the onEndGameTurn method. As the name suggest the tracking tool writes all of its data after the turn has ended. There is a call to f.write for every single value in the tracking tool. All the values are separated by a pipe symbol ( | ) and are written in a particular order, so that they later can be differentiated. The order can also be found in a comment above the first relevant f.write. I normally import convert the CtHBalance.log file into a csv and import it into a spreadsheet using the pipe symbol separator.
What do the different values mean?
Score: The score of the player in case you are playing without score
GoldenAgeTurns: Is the player in a golden age currently
ActualGold: The gold gathered as shown in-game in the above left. This of course includes everything contributing to the gold income including the slider
ActualScience: The science gathered as shown in-game in the above left. This of course includes everything contributing to the gold income including the slider. This does not include the bonus beakers from KTB or multiple tech-requirements. These are left out to ensure that these values can be easily compared between players.
Food: Here I collect all the food from all the cities worked tiles (and specialists and other direct food source like the stable quest) that goes towards growth. This specifically does not include the food kept from granaries. To give an example imagine a city working tiles worth 14 food. That city is of size 3, therefore needs 6 food to sustain population. It can put 8 food into growth towards the next pop point and these 8 food go into my tracking.
FoodKept: This is the food kept after growth thanks to the special ability of granaries.
CurrentProduction: A bit more complicated and you better read how Production and TotalProduction work first. Here I collect three stats per city separated by a slash ( / ) here an example:
/Settler/8/12/Warrior/4/4
The first data point is what the first city is working on, the second point is the unmodified production that city puts into the object and the third is the modified production (think forges, traits and/or resources). To return to the example above. The first city worked a settler putting 8 production into which thanks to IMP are increased to 12. The second city is putting 4 production into a warrior, which are not modified. Keep in mind that the order of cities does not correspond to the same city in game all the time. Imagine you loose your capitol (the first city). In that case the new first values are actually from the second city.
TotalProduction: This is all the base production of all the cities collected. It does not include any additional hammers via modifiers like forges, traits or ressources. What it does include are extra hammers from whips and chops. The extra chop hammers from Mathematics and Coal Power are included.
ModifiedProduction: Same as TotalProduction but this time all modifiers are included.
TotalSpecialist: Amount of specialists worked in all cities. Includes settled Great People.
CivicProduction: Total sum of all extra hammers gained from tiles powered up by civics. Think Caste system extra hammer for workshops or Serfdom extra hammer for windmills.
TotalWhip: Total sum of all hammers generated by whipping.
TotalChop: Total sum of all hammers generated by chopping including modifiers from Mathematics and Coal Power.
TotalCommerce: Total sum of all direct commerce generated from worked tiles.
TotalCommerceGold: Amount of Gold that would be generated by the commerce alone by running 100% gold slider. Notably this does not include direct gold income like shrines, corporations, specialists, banks etc. This together with the TotalCommerce can be used to recalculate the gold modifier across the whole civ.
VirtualGold: Similar to ActualGold. Amount of gold that would be acquired if the slider is set to 100%
VirtualScience: Similar to ActualScience. Amount of science that would be acquired if the slider is set to 100%. Everything else from ActualScience still applies.
GoldPerTurn: Sum of all the gold the player receives or gives from or to other players.
City Count: Total amount of cities
Total Pop: Total amount of population
Inflation: Cost of inflation
Financial Bonus Lighthouse: Sum of all the extra commerce that are generated by FIN in it's current implementation (1 extra commerce on land tiles with 3 commerce, 1 extra commerce on water tiles with 2 commerce and a lighthouse). Note that this also calculates the would be extra commerce for players that are not FIN.
Financial Bonus: Sum of all the extra commerce that are generated by FIN in it's previous implementation (1 extra commerce on land tiles with 3 commerce, 1 extra commerce on water tiles with 2 commerce). Note that this also calculates the would be extra commerce for players that are not FIN.
Financial BtS Bonus: Sum of all the extra commerce that are generated by FIN in it's BtS implementation (1 extra commerce on tiles with 2 commerce). Note that this also calculates the would be extra commerce for players that are not FIN.
Foreign Trade Routes: Amount of trade routes towards foreign cities
Foreign Trade Income: Sum of all extra commerce that all the foreign trade routes generate
Domestic Trade Routes: Amount of trade routes between your own cities
Domestic Trade Income: Sum of all extra commerce that all the domestic trade routes generate
Domestic 75 Protective Bonus: Sum of all extra commerce generated by the old PRO 75% domestic trade bonus. Note that this also calculates the would be extra commerce for players that are not PRO. The actual caluclation is a bit more complicated. I calculate the trade income for each player twice. Once with and once without the PRO bonus. The delta between that is summed up here.
Domestic 100 Protective Bonus: Sum of all extra commerce generated by the PRO 100% domestic trade bonus. Note that this also calculates the would be extra commerce for players that are not PRO. The actual caluclation is a bit more complicated. I calculate the trade income for each player twice. Once with and once without the PRO bonus. The delta between that is summed up here.
Aggressive Maintenance Bonus: Sum of all gold being saved by the AGG -50% unit maintenance bonus. Note that this also calculates the would be extra commerce for players that are not AGG.
City Maintenance: Sum of all the gold payed in maintenance for cities. This includes the distance and total city maintenance. Notably the extra maintenance caused by corporations goes into this value.
Unit Cost: Sum of all the gold payed in maintenance for units.
Unit Supply: Sum of all the gold payed in maintenance for units outside your borders.
Civic Maintenance: Sum of all the gold payed in maintenance for civics. Note that the maintenance is calculated for each of the 5 columns separately and then summed up like in the game itself.
ORG: Sum of all gold being saved by the ORG -50% civic maintenance bonus. Note that this also calculates the would be extra commerce for players that are not ORG.
Gov Civic: Which government civic is being run at the end of the turn
Leg Civic: Which legal civic is being run at the end of the turn
Lab Civic: Which labor civic is being run at the end of the turn
Eco Civic: Which economic civic is being run at the end of the turn
Rel Civic: Which religion civic is being run at the end of the turn
Wonders: Wonders being finished at the end of this turn. Writes down the internal name of the wonder.
Great Person: Great people generated at the end of this turn. Writes down the internal name of the great person generated.
Tech Tracking: Techs gained this turn or at the end of it. If there are multiple techs finished they are concated. This can happen if you are barbarian, built Oracle, researched Liberalism or bulbed a tech.
WW: Sum of war weariness. This is being collected even if you play without it. You can calculate the unhappiness caused by it with =(((([War Weariness]*([Reduction towards WW]+100))/100)*[Citysize])/1000)
TotalEspionage: Sum of espionage points.
Important notes
The way the tracking tool is implemented it does not know about dead players. Meaning if you have 3 players written into the tool in the order of
1
2
3
and the second player dies then that second player is just dropped for the following turns. You will instead find the third players date in the position of the second.
Where?
The tracking tool writes all of its stuff into a simple text file, which you can find here: CtHBalance.log
When running a pitboss game this is written by the server itself and Ramk normally provides me with a link to it. But you can also use it in a singleplayer game. Theoretically it would also work in a PBEM, but because that runs on multiple computers, you would have to collect all the CtHBalance.log files from all players.
How does it work?
The central peace of code managing the tracking tool is found here: ...\Assets\Python\CvEventManager.py
In there look for the onEndGameTurn method. As the name suggest the tracking tool writes all of its data after the turn has ended. There is a call to f.write for every single value in the tracking tool. All the values are separated by a pipe symbol ( | ) and are written in a particular order, so that they later can be differentiated. The order can also be found in a comment above the first relevant f.write. I normally import convert the CtHBalance.log file into a csv and import it into a spreadsheet using the pipe symbol separator.
What do the different values mean?
Score: The score of the player in case you are playing without score
GoldenAgeTurns: Is the player in a golden age currently
ActualGold: The gold gathered as shown in-game in the above left. This of course includes everything contributing to the gold income including the slider
ActualScience: The science gathered as shown in-game in the above left. This of course includes everything contributing to the gold income including the slider. This does not include the bonus beakers from KTB or multiple tech-requirements. These are left out to ensure that these values can be easily compared between players.
Food: Here I collect all the food from all the cities worked tiles (and specialists and other direct food source like the stable quest) that goes towards growth. This specifically does not include the food kept from granaries. To give an example imagine a city working tiles worth 14 food. That city is of size 3, therefore needs 6 food to sustain population. It can put 8 food into growth towards the next pop point and these 8 food go into my tracking.
FoodKept: This is the food kept after growth thanks to the special ability of granaries.
CurrentProduction: A bit more complicated and you better read how Production and TotalProduction work first. Here I collect three stats per city separated by a slash ( / ) here an example:
/Settler/8/12/Warrior/4/4
The first data point is what the first city is working on, the second point is the unmodified production that city puts into the object and the third is the modified production (think forges, traits and/or resources). To return to the example above. The first city worked a settler putting 8 production into which thanks to IMP are increased to 12. The second city is putting 4 production into a warrior, which are not modified. Keep in mind that the order of cities does not correspond to the same city in game all the time. Imagine you loose your capitol (the first city). In that case the new first values are actually from the second city.
TotalProduction: This is all the base production of all the cities collected. It does not include any additional hammers via modifiers like forges, traits or ressources. What it does include are extra hammers from whips and chops. The extra chop hammers from Mathematics and Coal Power are included.
ModifiedProduction: Same as TotalProduction but this time all modifiers are included.
TotalSpecialist: Amount of specialists worked in all cities. Includes settled Great People.
CivicProduction: Total sum of all extra hammers gained from tiles powered up by civics. Think Caste system extra hammer for workshops or Serfdom extra hammer for windmills.
TotalWhip: Total sum of all hammers generated by whipping.
TotalChop: Total sum of all hammers generated by chopping including modifiers from Mathematics and Coal Power.
TotalCommerce: Total sum of all direct commerce generated from worked tiles.
TotalCommerceGold: Amount of Gold that would be generated by the commerce alone by running 100% gold slider. Notably this does not include direct gold income like shrines, corporations, specialists, banks etc. This together with the TotalCommerce can be used to recalculate the gold modifier across the whole civ.
VirtualGold: Similar to ActualGold. Amount of gold that would be acquired if the slider is set to 100%
VirtualScience: Similar to ActualScience. Amount of science that would be acquired if the slider is set to 100%. Everything else from ActualScience still applies.
GoldPerTurn: Sum of all the gold the player receives or gives from or to other players.
City Count: Total amount of cities
Total Pop: Total amount of population
Inflation: Cost of inflation
Financial Bonus Lighthouse: Sum of all the extra commerce that are generated by FIN in it's current implementation (1 extra commerce on land tiles with 3 commerce, 1 extra commerce on water tiles with 2 commerce and a lighthouse). Note that this also calculates the would be extra commerce for players that are not FIN.
Financial Bonus: Sum of all the extra commerce that are generated by FIN in it's previous implementation (1 extra commerce on land tiles with 3 commerce, 1 extra commerce on water tiles with 2 commerce). Note that this also calculates the would be extra commerce for players that are not FIN.
Financial BtS Bonus: Sum of all the extra commerce that are generated by FIN in it's BtS implementation (1 extra commerce on tiles with 2 commerce). Note that this also calculates the would be extra commerce for players that are not FIN.
Foreign Trade Routes: Amount of trade routes towards foreign cities
Foreign Trade Income: Sum of all extra commerce that all the foreign trade routes generate
Domestic Trade Routes: Amount of trade routes between your own cities
Domestic Trade Income: Sum of all extra commerce that all the domestic trade routes generate
Domestic 75 Protective Bonus: Sum of all extra commerce generated by the old PRO 75% domestic trade bonus. Note that this also calculates the would be extra commerce for players that are not PRO. The actual caluclation is a bit more complicated. I calculate the trade income for each player twice. Once with and once without the PRO bonus. The delta between that is summed up here.
Domestic 100 Protective Bonus: Sum of all extra commerce generated by the PRO 100% domestic trade bonus. Note that this also calculates the would be extra commerce for players that are not PRO. The actual caluclation is a bit more complicated. I calculate the trade income for each player twice. Once with and once without the PRO bonus. The delta between that is summed up here.
Aggressive Maintenance Bonus: Sum of all gold being saved by the AGG -50% unit maintenance bonus. Note that this also calculates the would be extra commerce for players that are not AGG.
City Maintenance: Sum of all the gold payed in maintenance for cities. This includes the distance and total city maintenance. Notably the extra maintenance caused by corporations goes into this value.
Unit Cost: Sum of all the gold payed in maintenance for units.
Unit Supply: Sum of all the gold payed in maintenance for units outside your borders.
Civic Maintenance: Sum of all the gold payed in maintenance for civics. Note that the maintenance is calculated for each of the 5 columns separately and then summed up like in the game itself.
ORG: Sum of all gold being saved by the ORG -50% civic maintenance bonus. Note that this also calculates the would be extra commerce for players that are not ORG.
Gov Civic: Which government civic is being run at the end of the turn
Leg Civic: Which legal civic is being run at the end of the turn
Lab Civic: Which labor civic is being run at the end of the turn
Eco Civic: Which economic civic is being run at the end of the turn
Rel Civic: Which religion civic is being run at the end of the turn
Wonders: Wonders being finished at the end of this turn. Writes down the internal name of the wonder.
Great Person: Great people generated at the end of this turn. Writes down the internal name of the great person generated.
Tech Tracking: Techs gained this turn or at the end of it. If there are multiple techs finished they are concated. This can happen if you are barbarian, built Oracle, researched Liberalism or bulbed a tech.
WW: Sum of war weariness. This is being collected even if you play without it. You can calculate the unhappiness caused by it with =(((([War Weariness]*([Reduction towards WW]+100))/100)*[Citysize])/1000)
TotalEspionage: Sum of espionage points.
Important notes
The way the tracking tool is implemented it does not know about dead players. Meaning if you have 3 players written into the tool in the order of
1
2
3
and the second player dies then that second player is just dropped for the following turns. You will instead find the third players date in the position of the second.
Mods: RtR CtH
Pitboss: PB39, PB40, PB52, PB59 Useful Collections: Pickmethods, Mapmaking, Curious Civplayer
Buy me a coffee
Pitboss: PB39, PB40, PB52, PB59 Useful Collections: Pickmethods, Mapmaking, Curious Civplayer
Buy me a coffee