RFC: BtS Bug Reports

A rather strange thing: I've recently bought a new PC, and Civ is working fine here, RFC included, with one exception: I can't play as the Khmer, or more precisely: the game runs really slowly - units moving slow, the screen "moving" slow, and it doesn't happen with the other civs? :confused: Well, I haven't played through ALL others but a number, and the problem is just with the Khmer. The Civ files were on an external harddrive, and it is really weird that the problem just starts now, with a new pc, but everything else - no problems.

Anybody have any idea about what is going on?
 
In Stability.py, I noticed the following inconsistency in adjusting for iPopulation -

-> iDifference = (iIndustry*1000000/iPopulation) - (iEconomy*1000000/iPopulation)

as compared to:

-> iNewBaseStability += min(8,max(-8,(iAgriculture*100000/iPopulation - 8 + (iEraModifier - 3)*2)))

-> iNewBaseStability += min(iMaxEconomyGain,max(iMaxEconomyLoss,(iEconomy*100000/iPopulation - 5 + (iEraModifier - 3)*2)))

etc...


If you notice, the numerator over iPopulation is 100,000 for most of the calculations; however, with iDifference it is 1,000,000.

I'm wondering if this is the intention as it will exaggeraturate the iDifference calculations by a magnitude of 10. (which would lead to greater iDifferences and thus more Great Depressions)

I'm not sure if this is the intention or not.
 
would seem to be. IME great depressions happen at an apropriate rate in RFC.
 
Another area that looks problematic is the way iEconomy value is calculated which yields a NEGATIVE value even in a thriving and strong economy (i.e. one with a research rate at 70 to 80 % and still garnering a steady net profit.)

-> iEconomy = pPlayer.calculateTotalYield(YieldTypes.YIELD_COMMERCE) - pPlayer.calculateInflatedCosts()

iEconomy is used in the subsequent calculations to determine "Great Depression" criteria as follows.

-> iDifference = (iIndustry*1000000/iPopulation) - (iEconomy*1000000/iPopulation)

Again, this is leading to "Great Depression" occurences being artificially high
 
Probably the only way to defeat the economic instability is to have a large enough empire, which explains why early civs never get to get past Renaissance unless played really cautiously (e.g. China) and get stability buildings up relatively early. Inflation just becomes impossibly high later on in game (probably should be adjusted).
Curiously, I've never had a problem with economy with Russian, Germany, France, England, etc, but Vikings yes, probably because the former have such large endowments in land for empire expansion.
 
I have been working to identify and track down some of the inconsistent "Great Depression" occurrences and calculations. I have made modifications to the CvInfoScreen.py script to display more key data that is used in Stability.py script to determine when "Great Depressions" occur.

The most relevent information I have been interested in are those used in the final calculations of "iDifference (Stability.py)".

These would include the following -

-> pPlayer.calculateTotalYield(YieldTypes.YIELD_COMMERCE)
-> pPlayer.calculateTotalYield(YieldTypes.YIELD_PRODUCTION)
-> pPlayer.calculateInflatedCosts()
-> pPlayer.calculateTotalCommerce()

Note - "calculateTotalCommerce" is not used to calculate "iDifference", but used to calculate & display "GNP (Gold)" in the demographics and graph screens. In actuality, it is a highly inflated value that is not solely reflective of Gold (or even GNP), but is more of a summization of Gold, Research, Culture & Espionage; to include all the static culture bonuses acquired from wonders and buildings.

"iDifference" is roughly calculated in Stability.py as the difference of "iEconomy" and "iIndustry", adjusted for population.

(I'm going to leave out the population adjustments for simplicity)

iIndustry = pPlayer.calculateTotalYield(YieldTypes.YIELD_PRODUCTION)

iEconomy = pPlayer.calculateTotalYield(YieldTypes.YIELD_COMMERCE) - pPlayer.calculateInflatedCosts()

iDifference = iIndustry - iEconomy

I'm not going to argue if this is a correct approach to model a "Great Depression" occurrance and will presume it is.

The "iIndustry" calculation appears to be dead-on accurate, to include all the "hammers" produced by city specialists.

However, the "iEconomy" calculation is way too low and does not include any of the "coins" produce by city specialists.

So, adding "merchants" to a city will have no effect on the "iEconomy" component of the "iDifference" calculation. While, on the contrary, adding "engineers" to a city will directly increase the "iIndustry" calculation and lead to an exaggerated "iDifference" result. This, in-turn, is another factor in excessive "Greater Depression" occurances.

To put all of this into context, here are some numbers in my test-case game, where I have a very robust and booming economy, yet on the brink of a "Great Depression".

1. GNP (Gold) : 3626
2. Mfg. Goods (Prod) : 838 (used in iIndustry calculation)
3. Commerce Yield : 643 (used in iEconomy calculation)
4. Inflated Costs : 979 (used in iEconomy calculation)

** NOTE: the following leaves out the population adjustments for simplicity **

iIndustry would be derived solely from (2) as follows

iIndustry = 838 (Mfg. Goods)

iEconomy would be derived from the difference of (3) and (4) as follows:

iEconomy = 643 (Commerce Yield) - 979 (Inflated Costs)
iEconomy = -336

iDifference would be derived from the difference of iIndustry and iEconomy calculations as follows:

iDifference = 838 (iIndustry) - -336 (iEconomy)
iDifference = 1174

OUCH! A negative economy? My democracy has the largest economy in the world and is running a steady and consistent profit even at 70% research rate and accounting for the noticable inflation expense of 600 (out of 900). Even with only 30% of commerce flowing into my coffers, my economy is robust enough to easily meet the fiscal demands.

So, an "iEconomy" calculation of "-336" makes absolutely no sense. (even without adjusting for population)

Just from "eyeballing" the numbers, it is clear that "iDifference" is going to be calculated to trigger a "Great Depression" as soon as the (GameTurn mod 3) condition is met in stability.py.

The contributing factors to this are:
1. Calculation using an undervalued "Commerce Yield" that does not take into consideration "Merchant" specialists and appears to further ignore the multiplicative bonuses of forums, banks, etc, as well. This, in-turn is causing "iEconomy" to be artificially low.
2. A potentially overvalued "Inflated Costs" that does not appear to scale appropriately over time.
3. A rather counter-intuitive implimentation of calculateTotalYield(YieldTypes.YIELD_COMMERCE) & calculateTotalYield(YieldTypes.YIELD_PRODUCTION) that are inconsistent in their use of specialists and building modifiers. Unfortunately, one is NOT the counterpart to the other in this case.
 
It appears that the Export / Import calculations are working exactly opposite as expected.

As an example, consider the current US trade "deficit" with many other countries, to include China.

In general, this is a product of a net surplus of goods flowing from China into the US and a surplus of $$$ flowing from the US into China.

Using the same analogy in Civ, I would expect the export of resources and goods from my country in exchange for $$$ from neighboring countries to result in a trade surplus and be reflected as a "positive" value, NOT "negative" as it is currently being displayed.

As an example, Net Foreign Income is listed as "54" on the Interior Advisor Screen, but listed as "-62" on the Info - Demographics screen.

http://en.wikipedia.org/wiki/Trade_deficit
 
I never export anything, I DEMAND stuff from my vassals. (explains my booming economy) :D
Communism and police state rule. :assimilate:

But seriously, all the calculations you've done have just confirmed why I've never run free economy in RFC.:goodjob:
 
dorian: that situation is not analogous to the game in any way. In the game there is no debt. You cannot borrow money from another country. The only thing that keeps Americans buying Chinese products is the fact that china is balancing the deficit by lending. Otherwise the dollar would loose value massively.

I don't think the entire trade system of itself really reflects modern international trade at all. In fact the modern eras are where civ falls apart the worst.

On the other hand you may be on to something with your long post about how stability is calculated. I have no real idea. Like pacifist I avoid free market and find it is not so difficult.
 
I've experienced what I think was a BUG in Babylonian UHV. I got the, "Make Babylon the Most Cultured City in the World by turn 86th." But the other UHV, "Make Babylon the most populous city in the world by the same turn (86th) says "Not Yet". And the last turn before I finished researching CoL, I failed that UHV. Even though my Pop at turn 86th is 8 and the Demographics says I'm the first in Population among all cities.

It's the latest version BTW.
 
AFAIK, the cultural requirement is now triggered some turns later, which would mean that you are not playing the latest version. Someone might have been able to research Code of Laws before you, which would explain why you've failed that condition. Also, beware that Persia gets Monarchy quite early (on spawn), so that they might have been earlier.
 
And Greece also gets writing when they spawn.
 
No. I've finished the 2 UHV's, but I failed the "Most Populous One" few turns after I accomplished the "Most Cultured One". Then I have accomplished the Discover CoL, Monarchy & Writing before anybody else.

Is it with the version? But the victory conditions are wrong in my version.

[I Forgot to mention]: AFAIK I have the latest version which I downloaded recently (About 2 or 3 weeks)
 
I've seen a size 8 Delhi or Beijing before, are you sure you encountered these civs with your scouts or warriors?
(Just to be sure, go in WB and see if any city has size 8 other than Babylon--you have to have a pop LARGER than any other city)
 
Scav,

dorian: that situation is not analogous to the game in any way.

My post is a rather simplified example of what could be a complex scenario and only addresses key elements as modeled in Civ. (without debt and borrowring, etc.)

However, there are numerous reports and examples of "Trade Deficit" being described in virtually the same simple terms.

I do not think it is unreasonable to expect the display of these "simplified" economic indicators to be consistent with publicly accepted reporting formats, as has been attempted with GNP, Life Expectency, etc...

Never-the-less, at the least, it should be consistent within the same scope and context of the Civ game itself, don't you think? To have it displayed as NET income on one page, yet as a NEGATIVE value on another makes no sense.
 
No. I've finished the 2 UHV's, but I failed the "Most Populous One" few turns after I accomplished the "Most Cultured One". Then I have accomplished the Discover CoL, Monarchy & Writing before anybody else.

Is it with the version? But the victory conditions are wrong in my version.

[I Forgot to mention]: AFAIK I have the latest version which I downloaded recently (About 2 or 3 weeks)

What AP said: I bet China or India actually have a bigger city than Babylon. The UHV condition isn't the problem, it works for me just fine.
 
Oh. I will take a look at WB, but doe's it usually trigger few turns after the Most Cultured City coz the UHV says both of them should be accomplished in turn 86th, during the arrival of the Persians?

And also Japan UHV ,I think has an error, I can't win the; No Foreign Culture on Hoshu, and It says "NO" few turns after 1650... even though there's no foreign culture on Honshu, BTW It's the 600AD start for JAPAN. :(
 
And also Japan UHV ,I think has an error, I can't win the; No Foreign Culture on Hoshu, and It says "NO" few turns after 1650... even though there's no foreign culture on Honshu, BTW It's the 600AD start for JAPAN. :(

The Japanese UHV checks each tile to see if there is any foreign culture, not just whether a foreign civ controls the tile.

To see this ingame, hover your mouse cursor over each tile and if you don't see Japanese 100% for every tile, this will be why you failed the UHV condition. You may find that one tile has mostly Japanese culture but a few % of a foreign culture, if another civ (e.g. China) is sending a lot culture your way.
 
But it doesn't say that I failed it, the UHV says "Not Yet" even though it is 1700's already.

*Forgot to mention, I checked the WB in my Babylon game and I have the highest POP city. And the Culture UHV triggers at turn 85 not 86th. The timing of the UHVs is wrong.
 
Back
Top Bottom