45°38'N-13°47'E
Deity
Take any save where some city has some extra capital commerce ( for example 1 is from WheelWright, 5 from Great Lighthouse etc., so with Great Lighthouse it will be easily visible )
Look at base commerce in City Screen ( when you click on commerce to describe it ).
Run CTRL+SHIFT+T - look how baseCommerce decreased.
If you run it several times you will see it negative.
( this is of course should be done on version before my fixes ).
Yeah, I got it in the meantime; never experienced negative values because I very seldom use recalc but I see that if I do it multiple times I get negative values. Ok, that's clear now and it looks like your fixes are working. Now I'm trying to understand why percentages of domestic and foreign commerce aren't properly calculated in the help inside the city screen. For example I have
123 base commerce
1 from capital connection
8 from domestic connection
20 from foreign connection
-10% from domestic connections from Post Scarcity
+10% from foreign connections from Post Scarcity
+10% from Power
+25% from Civics
+25% from Capital
Total is 243.20, which is correct if I don't take into account that -10% domestic and +10% foreign connections (they are different because one is domestic and the other is foreign connectedness commerce). For some reason, it doesn't calculate that percentage coming from domestic and foreign connectedness. At least it looks so, I'm checking the code now.
Edit: mmm, I think I start to understand; Afforess made this part of the code long ago, from what I can see, there's something weird in
void CvGameTextMgr::setYieldHelp(CvWStringBuffer &szBuffer, CvCity& city, YieldTypes eYieldType)
it looks like iDomesticConnectednessCommerce and iForeignConnectednessCommerce already include civics modifiers, as they are calculated in CvCity.cpp. What is displayed inside the city screen are those values without modifiers but in the process it's probably being rounded, so that value is sometimes wrong. And I'm still not sure the calculation is right toward the end of this function. I need more time (which I'm short of, actually)l
Last edited: