April 10, 2002, 05:23
|
#31
|
Firaxis Games Software Engineer
Local Time: 18:38
Local Date: October 31, 2010
Join Date: Mar 1998
Posts: 5,360
|
After some additional testing, I revised the formula for corruption due to number of cities, and updated the initial post.
It turns out that the commercial trait is equivalent to increasing the optimal number of cities by one. But for some crazy reason if you edit the percent of optimal cities in the editor, the commercial trait no longer has any effect. I was testing at Regent with 100%, that's why I missed the commercial civ effect.
It also turns out that after the optimal number of cities, the corruption due to number of cities increases at twice the rate as it does before that.
Anyway, I've had enough of this. The formula doesn't need to be 100% correct. My only goal was to investigate in what way each parameter affects corruption, not to duplicate the entire Civ3 game engine!! Besides, because of this thread I haven't been playing enough Civ lately!!
Last edited by alexman; April 12, 2002 at 09:19.
|
|
|
|
April 10, 2002, 05:35
|
#32
|
Emperor
Local Time: 16:38
Local Date: October 31, 2010
Join Date: Nov 2001
Location: orangesoda
Posts: 8,643
|
I think your formula is about as close as we can get without Firaxis actually disclosing the calculations going on. Good work Alexman! The information about how changing the Percent of Optimal Cities affects the Commercial bonus is interesting as well.
__________________
"tout comprendre, c'est tout pardonner"
|
|
|
|
April 10, 2002, 17:10
|
#33
|
Settler
Local Time: 23:38
Local Date: October 31, 2010
Join Date: Apr 2002
Location: Giessen (Germany), and anywhere I can conquer
Posts: 3
|
This is THE thread I've been looking for! Thumbs WAY up, my friends (and if I could figure out how to get those smilies in here, you'd get a few of those as well...)
GAWD, I love this site! If I didn't also "have" to play CIV once in a while, I'd be here 24/7.
TC
ME
|
|
|
|
April 11, 2002, 03:27
|
#34
|
Settler
Local Time: 17:38
Local Date: October 31, 2010
Join Date: Feb 2002
Location: Indiana, USA
Posts: 27
|
I knew it!
Marketplaces ARE the best buildings in Civ 3...Happiness enhancer, cash-producer, and now corruption-reducer? I still can't believe there was a thread a few weeks ago complaining that these things were over-priced.
Now does the presence/absence of a bank/market have any bearing on the shield output of a city? I'm still not clear on this point due to the ambiguous use of the word "corruption".
__________________
-CC
|
|
|
|
April 11, 2002, 09:07
|
#35
|
King
Local Time: 23:38
Local Date: October 31, 2010
Join Date: Jun 2001
Location: Leeds, UK
Posts: 1,257
|
I wrote a small c program to encode Alexman's findings on the civ 3 corruption model, primarily to look at what spacing between cities would work best. As it happens, the main result is that even in despotism, corruption due to number of cities is the dominant factor, and distance corruption is comparatively small. So in terms of city spacing, you don't lose anything by spreading your cities out, but you do lose out via overlap if you have them too close together, at least when your cities start to grow to respectable sizes.
Of more general applicability is the observation that since distance corruption is usually small is that courthouses have a very small effect (not that that's news to anyone). As an illustrative example, consider a democracy, standard map, cities spaced 5 squares apart., all connected by roads. The optimal number of cities on this map is 16 (so says the editor). Cities 1-9 produce 55% of the output of the empire (assuming each city in the empire is more or less equally productive, ignoring corruption - if your core cities are larger and have better developed land, this figure is larger). Corruption in these cities is less than 30%, and corruption due to distance is only about 10% in the worst case. Building a courthouse one of these cities will improve its output by all of 5% (half that if in WLTKD day) or less (that's 5% of the city's total trade - trade received plus trade lost to corruption). Cities 10-17 have 40-60% corruption, and 15-20% of that is due to distance. They produce about 35% of the total output of the empire. Building a courthouse will gain you no more than a 10% improvement, so you need about 15 trade in the squares around the city to break even or make a small gain from a courthouse. It's more worthwhile building in the further away cities, particularly the ones with a very high trade (25+). Cities 18-22 are generally highly corrupt, but can show about a 10% improvement with a courthouse (as always, half that if WLTKD is being celebrated). These will often be fairly recent cities (or ones founded by the AI in stupid places an subsequently captured) and not have enough trade to be worthwhile. Cities 23-25 are 95% corrupt, but can show some improvement with a courthouse (to 88%, 90%, 92% in this example) with a courthouse, and are probably not worth it. Cities 26 and up are terminally corrupt - the corruption due to number of cities takes it to 95% corrupt, and this is unaffected by courthouses, so nothing you can do will improve these cities.
So, if the optimal number of cities for a given map size is N, then your core of N/2 cities do most of the production, and don't have much distance corruption, so it's rarely worth building a courthouse. cities N/2 to N can generally redeem 5-10% of their total trade through building a courthouse (or WLTKD, in which case the courthouse saves a additional 2.5-5%). Cities N and up are capable of saving about 10%, until you get to the 95% corrupt ones (at about 1.5 N), but will generally have too small a total production (ignoring corruption) in the first place to make it worthwhile.
Of course, if you have the time, you can work it all out with Alexman's formula to see how much benefit you gain, but the above rule of thumb seems a reasonably good guide (subject to the proviso that Alexman is right, I didn't mess up writing the program, and that the results for the city grid also apply in actual games with different distributions).
EDIT: a few further thoughts. I just ran a comparison of what would happen if there was a government which completely eliminated distance corruption (or if courthouses were 100% effective at this) so that only the corruption due to the number of cities was left. The results, on a standard map, are as follows. For a civ of 26 cities (beyond that they are all 95% corrupt even for this ideal government), the effective number of cities in the empire is:
despotism: 10.0
democracy: 13.1
ideal: 16.2
(Each additional city past 26 adds 0.05 on to these values).
So, with the corruption model in the game at the moment, despotism averages 62% corruption over the whole empire, and even the ideal government is 38% corrupt, averaged over the whole empire. In the actual game, choice of government limits you to the 50-62% range with no improvements built (yup, that's the difference between minimal and catastrophic corruption), and building 2 improvements plus WLTKD can take you to 39-42% corruption, averaged over the whole empire (which incidentally shows that building courthouses in every city gains you about 10% in despotism and 5% in democracy).
Last edited by vulture; April 11, 2002 at 09:42.
|
|
|
|
April 11, 2002, 11:34
|
#36
|
Firaxis Games Software Engineer
Local Time: 18:38
Local Date: October 31, 2010
Join Date: Mar 1998
Posts: 5,360
|
Nice analysis, vulture. It seems to confirm what players experience with courthouses, in general: most effective at the outskirts of your productive region.
For cities close to you capital, it might be more worthwhile building a courthouse than you suggest, because of factories and plants. Unlike marketplaces, factories are taxed by corruption. So a 10% improvement in corruption translates to 5 shields if your city is producing 50 shields (quite common after power plants, especially for your initial cities). I would gladly pay 1 gold per turn for the courthouse to get 5 extra shields...
Carbon Copy: To clarify, banks and marketplaces have no effect on shield production. They also have no effect on the commerce lost to corruption. But because they increase the gold produced by the city, they reduce the percentage of commerce lost to corruption.
|
|
|
|
April 26, 2002, 03:12
|
#37
|
Firaxis Games Software Engineer
Local Time: 18:38
Local Date: October 31, 2010
Join Date: Mar 1998
Posts: 5,360
|
1.21f update
Most parts of the formula still work under 1.21f. It seems that they didn't change anything except the effect of police stations, courthouses, and WLTK on corruption due to number of cities.
For each one of those things, add one fourth [edit: of Nopt] to the optimal number of cities for that city. As always, WLTK affects shield waste only.
In the chat, Soren mentioned that the FP had a similar effect on the optinal number of cities, but I didn't see it. It looks like its effect is identical to 1.17f: a second palace with a new set of cities with low Nopt. Note that if a city is close to both the palace and the FP, there is no extra benefit. You just take the smallest Nopt of the two.
A couple more notes:
1) To clarify, marketplaces, factories, libraries, et cetera, do not affect the number of red shields or commerce, but their bonus is applied to the uncorrupted part of the city's production or commerce. This means that these buildings ARE actually affected by corruption. It just looks as though they are not because the number of red shields (or commerce) remains the same, but the number of blue shields is reduced instead.
2) I found a bug that will annoy mod-makers. If you make a custom map, the game uses the optimal number of cities for a standard-sized map, no matter what the size of your actual map. For example, a tiny user-created map will have optimal number of cites = 16 instead of 12 (if you don't change anything else in the editor). I'm pretty sure this didn't happen before 1.21f
Last edited by alexman; April 26, 2002 at 05:19.
|
|
|
|
April 26, 2002, 05:11
|
#38
|
King
Local Time: 23:38
Local Date: October 31, 2010
Join Date: Jun 2001
Location: Leeds, UK
Posts: 1,257
|
When you say 'add one fourth to the optimal number of cities for that city', do you mean add 0.25 , or add 0.25 of Nopt? On a standard map (Nopt = 16) does building a courthouse change Nopt to 16.25 or 20 for that city?
|
|
|
|
April 26, 2002, 05:17
|
#39
|
Firaxis Games Software Engineer
Local Time: 18:38
Local Date: October 31, 2010
Join Date: Mar 1998
Posts: 5,360
|
Quote:
|
Originally posted by vulture
When you say 'add one fourth to the optimal number of cities for that city', do you mean add 0.25 , or add 0.25 of Nopt? On a standard map (Nopt = 16) does building a courthouse change Nopt to 16.25 or 20 for that city?
|
That's 0.25 of Nopt. So on a standard map, the courthouse makes Nopt=20, adding a police station to that makes Nopt=24, and WLTK on top of it makes Nopt=28. Quite a difference from 1.17f!
|
|
|
|
April 26, 2002, 06:21
|
#40
|
Emperor
Local Time: 00:38
Local Date: November 1, 2010
Join Date: Sep 2001
Location: Belgrade, Serbia
Posts: 3,218
|
Only thing I think they need to adress is to tweak distance factor reduction by corthouse.
Now it's 50% reduction in distance.
However some cities are just too much far away form capitol, so this doesn't help them at all.
But, why not add an effect of "maximum distance".
Let's say that corthouse reduced distance for 50%, but also gives effect that every city more then N tiles away (should depended from map size) is treated as N tiles away from capitol.
This would effectively solve "95% corrupt cities" problem.
|
|
|
|
April 26, 2002, 08:04
|
#41
|
Deity
Local Time: 23:38
Local Date: October 31, 2010
Join Date: Sep 2001
Location: Enthusiastic member of Apolyton
Posts: 30,342
|
Quote:
|
Originally posted by alexman
That's 0.25 of Nopt. So on a standard map, the courthouse makes Nopt=20, adding a police station to that makes Nopt=24, and WLTK on top of it makes Nopt=28. Quite a difference from 1.17f!
|
Wow again. Congrats on figuring that out, since it is very different from the stuff you found before. I guess the courthouse is still most useful in cities on the periphery of either of the 2 clumps of cities though.
|
|
|
|
April 26, 2002, 10:02
|
#42
|
Emperor
Local Time: 00:38
Local Date: November 1, 2010
Join Date: Sep 2001
Location: Belgrade, Serbia
Posts: 3,218
|
Quote:
|
Originally posted by DrSpike
Wow again. Congrats on figuring that out, since it is very different from the stuff you found before. I guess the courthouse is still most useful in cities on the periphery of either of the 2 clumps of cities though.
|
This was said by Soren in recent chat.
|
|
|
|
May 2, 2002, 14:01
|
#43
|
Chieftain
Local Time: 22:38
Local Date: October 31, 2010
Join Date: Jun 2000
Posts: 90
|
Quote:
|
Distance factor, Fd
This is 3.6 times the distance divided by the map size. So for a standard map size (100x100) this factor would be 0.36 for a city 10 tiles away from the capital. For a tiny map (60x60), it would be 0.6. It looks like the capital is taken as a distance 1 tile (not zero) from itself, that's why there is some corruption there. Communism is a special case, because corruption does not depend on distance. For communism replace the distance factor by the value 1.0.
|
I went into the editor the other day and messed with the map size. I didn't like how Firaxis cut the huge map size down to something less...huge. So, I decided that I wanted to try and play on the biggest map that I could. I set the map at 240 by 240 and doubled the number of cities before corruption sets in (my value now is 64 as opposed to the normal one of 32).
Now, however, I have a bunch of cities that are *several* screens away that have about 50% waste. I don't have the actual map in front of me now, but some of my farthest cities haven't reached the crap level yet. Let's assume the value of 30 squares.
I don't believe that I've maxed out the 64 limit (but I've got more cities than I can count). So, I wonder how that optimal number of cities thng works with map sizes. So, as 240 x 240 is 57600 squares...I have to belive that the corruption factir is based on area, not linear map size. The jump between 60 and 240 seems too great to be based on a linear size function. I believe it must be a function of squares.
But... intersting post!
__________________
They're coming to take me away, ha ha...
|
|
|
|
May 2, 2002, 14:25
|
#44
|
Firaxis Games Software Engineer
Local Time: 18:38
Local Date: October 31, 2010
Join Date: Mar 1998
Posts: 5,360
|
For your map size (240x240) and optimal number of cities (64), assuming Regent level, Monarchy, and that the 50th rank city at 30 tiles away is connected to your empire and has a courthouse, the formula gives 44% corruption.
|
|
|
|
May 2, 2002, 21:30
|
#45
|
Chieftain
Local Time: 22:38
Local Date: October 31, 2010
Join Date: Jun 2000
Posts: 90
|
Thanks for the quick responce, Alexman! Great job!
My estimate was off...it's (almost) 30 by the long way of getting there (i.e.- my circuitous road network). My capital @ x=99, y=191, my city @ x=70, y=178.
However, it's producing 11 shields & has 3 waste. The level is emperor, and it's a size 8 city w/o courthouse or marketplace. It only has a temple, aqueduct, and cathedral, plus barracks and granary from wonders. I have a save, if needed for other information
Also, I was wondering if city size affected corruption. I know it sounds stupid, but if you could produce, say 20 shields in a size 5 city would it have the same rate of corruption as a size 25 city? Will a small town have more or less corruption than a big city if they are both the same distances from FP/capital? What happens? Are there disadvantages to having larger cities if they won't produce more shields?
__________________
They're coming to take me away, ha ha...
|
|
|
|
July 3, 2002, 11:35
|
#46
|
Firaxis Games Software Engineer
Local Time: 18:38
Local Date: October 31, 2010
Join Date: Mar 1998
Posts: 5,360
|
Quote:
|
Originally posted by Catt
Does the OCN factor determine which cities receive its benefits based on proximity to the palace / FP? Meaning, if the OCN is 16, do the closest 16 cities to the palace enjoy lower corruption due to OCN and due to the distance factor? Or is there some other manner of determining the OCN effects (or lack thereof). Put another way, once you've blown past the OCN, does the OCN factor largely go away and now corruption is down to pure distance / improvements / WLTKD?
|
The rank of each city for corruption due to number of cities is indeed determined by its distance to the capital/FP.
But once you blow past the OCN, the OCN factor does not go away. On the contrary, it increases at an even greater rate. At the limit, once you reach about 1.5 times the modified OCN (modified by corruption buildings, WLTK, commercial civ, etc) you will always get maximum corruption (95%), no matter what the distance from the capital.
|
|
|
|
September 14, 2002, 23:41
|
#47
|
Settler
Local Time: 22:38
Local Date: October 31, 2010
Join Date: Sep 2002
Posts: 2
|
why is my city 95% corrupt
Hi,
I have a city that is 11 sqares away from my capital. It has 22 corruption and 1 gold. I have a total of 15 cities and I'm using the standard map. I'm pretty sure I'm using the original version of Civ3 (no patches). I am playing emperor. I used your formula, and I found that the city should only have 65% corruption, but somhow it has pretty close to 95%!
here's my questions:
1) do rivers with roads over them allow you toget the 15% bonus for being connected to the capital?
2) is it possible that the optimal number of cities in the map i'm on is less than 15 (and I have gone over)?
3) could I be counting the distance incorrectly?
thanks,
Andrew
|
|
|
|
September 23, 2002, 14:26
|
#48
|
Firaxis Games Software Engineer
Local Time: 18:38
Local Date: October 31, 2010
Join Date: Mar 1998
Posts: 5,360
|
Re: why is my city 95% corrupt
Quote:
|
Originally posted by andrewlpc
1) do rivers with roads over them allow you toget the 15% bonus for being connected to the capital?
|
Good question. I have not tested this. But I would be willing to bet that roads crossing rivers does not affect connection status, just as it does not affect trade.
Quote:
|
2) is it possible that the optimal number of cities in the map i'm on is less than 15 (and I have gone over)?
|
Not unless you changed it in the editor. On a standard map the OCN is 16.
Quote:
|
3) could I be counting the distance incorrectly?
|
Actually, using the calculator for your settings in Despotism, I get 95%, so I'm not sure why you get only 65%.
Finally, although it doesn't seem to have any effect on your example, keep in mind that things have changed since the first release of the game that you have installed. Get the latest patch - it fixes lots of things and makes the game better.
|
|
|
|
October 10, 2002, 03:53
|
#49
|
Emperor
Local Time: 18:38
Local Date: October 31, 2010
Join Date: Mar 2001
Location: Orlando, Florida
Posts: 8,807
|
Formula question
by this part of your formula:
Fc = Ncity / Nopt - 0.5, if Ncity > Nopt,
Do you mean this
Code:
|
Ncity
Fc = ------- - 0.5
Nopt |
or this
Fc = Ncity / (Nopt - 0.5)
E_T
__________________
Worship the Comic here!
Term IV Deputy Foreign Minister for Trade of Apolytonia, Term V CP & Term VI DM of Apolytonia, Term VII SMC of Apolytonia - SPDGI
Minister of the Interior of the PTW InterSite Demo Game
|
|
|
|
October 10, 2002, 10:16
|
#50
|
Firaxis Games Software Engineer
Local Time: 18:38
Local Date: October 31, 2010
Join Date: Mar 1998
Posts: 5,360
|
Re: Formula question
Quote:
|
Originally posted by E_T
Code:
|
Ncity
Fc = ------- - 0.5
Nopt |
|
The above is the one (standard precedence of operators in algebra ). Fc has the same value for the two branches of the formula if Ncity = Nopt, so we get a continuous curve.
|
|
|
|
October 10, 2002, 11:34
|
#51
|
Emperor
Local Time: 18:38
Local Date: October 31, 2010
Join Date: Mar 2001
Location: Orlando, Florida
Posts: 8,807
|
Re: Re: Formula question
Quote:
|
Originally posted by alexman
The above is the one (standard precedence of operators in algebra ). Fc has the same value for the two branches of the formula if Ncity = Nopt, so we get a continuous curve.
|
Thank you. Not everyone knows operator precedence order. On forulas like this, I like to make sure. I'll be looking into putting this into a speadsheet that I'm working on, so I needed to make sure.
E_T
__________________
Worship the Comic here!
Term IV Deputy Foreign Minister for Trade of Apolytonia, Term V CP & Term VI DM of Apolytonia, Term VII SMC of Apolytonia - SPDGI
Minister of the Interior of the PTW InterSite Demo Game
|
|
|
|
October 10, 2002, 11:46
|
#52
|
Firaxis Games Software Engineer
Local Time: 18:38
Local Date: October 31, 2010
Join Date: Mar 1998
Posts: 5,360
|
Sorry, I didn't mean to sound like a smart-a$$. The spreadsheet sounds like a cool idea.
|
|
|
|
October 11, 2002, 02:04
|
#53
|
Settler
Local Time: 05:38
Local Date: November 1, 2010
Join Date: Dec 2001
Posts: 23
|
I'm playing diety on tiny map and doesn't have FP. Beside capital, assume that I have 8 other city. 4 are located at 5,1 from capital while the other 4 at 4,3. For that case, what are their ranks ? Is it :
a. 1,2,3,... based on distance and year they are founded
b. 1,2,2,2,2,6,6,6,6 or
c. 1,5,5,5,5,9,9,9,9
If the answer is c, then those 4 city is beyond Nopt of tiny deity
Great thread, btw
|
|
|
|
October 11, 2002, 10:23
|
#54
|
Firaxis Games Software Engineer
Local Time: 18:38
Local Date: October 31, 2010
Join Date: Mar 1998
Posts: 5,360
|
Good question. I would imagine it's b, but I haven't done any tests. What did you observe in your game?
|
|
|
|
October 11, 2002, 11:34
|
#55
|
Chieftain
Local Time: 22:38
Local Date: October 31, 2010
Join Date: Sep 2002
Posts: 58
|
My guess would be c as the formula seems more likely to be "number of cities of smaller or equal distance to the capitol" (c) than "number of cities of smaller distance to the capital, plus one" (b).
It could also be :
1,3,3,3,3,7,7,7,7
which would be "number of cities of smaller distance to the capital plus half the number of cities an equal distance to the capital", which would be a little more balanced.
|
|
|
|
October 11, 2002, 23:47
|
#56
|
Settler
Local Time: 05:38
Local Date: November 1, 2010
Join Date: Dec 2001
Posts: 23
|
I think it's (c). In my game last week, I cancel founding a city because on the next turn (almost) all of my other city getting more corrupt. I usually arrange my city at (4,2), (4,3), or (5,0) from capital and the one I cancel was the seventh (including capital). Btw, I haven't patch mine.
Edit : I forgot the location of the seventh city. On my last game, it doesn't occur anymore.
Last edited by Ekanata; October 21, 2002 at 23:24.
|
|
|
|
October 21, 2002, 15:03
|
#57
|
Emperor
Local Time: 18:38
Local Date: October 31, 2010
Join Date: Mar 2001
Location: Orlando, Florida
Posts: 8,807
|
I've Implemented your formula to an Excel format and have published the results for the CivIIIDG in this Construction Shack - 700AD Corruption & Waste Statistics Thread.
from my spreadsheet, It appears to be (A), for the calculations. I do have a few discrepancies that are off from expected %'s, and that might be from time of city founding or some other variable. I'll investigate it as I get time.
Alex, If you want, I'll be happy to e-mail the spreadsheet to you.
E_T
__________________
Worship the Comic here!
Term IV Deputy Foreign Minister for Trade of Apolytonia, Term V CP & Term VI DM of Apolytonia, Term VII SMC of Apolytonia - SPDGI
Minister of the Interior of the PTW InterSite Demo Game
|
|
|
|
December 24, 2002, 03:38
|
#58
|
Firaxis Games Software Engineer
Local Time: 18:38
Local Date: October 31, 2010
Join Date: Mar 1998
Posts: 5,360
|
Well, if anyone cares, I just discovered a missing detail in the formula:
Democracy and Republic add 10% to the OCN. This explains the slightly better corruption in Republic than in Monarchy, even though these two governments have the same distance corruption.
Merry Christmas!
|
|
|
|
December 24, 2002, 10:20
|
#59
|
Emperor
Local Time: 18:38
Local Date: October 31, 2010
Join Date: Mar 2001
Location: Orlando, Florida
Posts: 8,807
|
is that present in both 1.21f & 1,29f?
E_T
__________________
Worship the Comic here!
Term IV Deputy Foreign Minister for Trade of Apolytonia, Term V CP & Term VI DM of Apolytonia, Term VII SMC of Apolytonia - SPDGI
Minister of the Interior of the PTW InterSite Demo Game
|
|
|
|
December 24, 2002, 10:27
|
#60
|
Firaxis Games Software Engineer
Local Time: 18:38
Local Date: October 31, 2010
Join Date: Mar 1998
Posts: 5,360
|
Yes, it is. I just didn't detect it until now because it's such a small effect.
|
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
All times are GMT -4. The time now is 18:38.
|
|