I Don't Understant Corruption

Sorenroy

Chieftain
Joined
Apr 22, 2012
Messages
6
Location
United States
After playing several games of Civ 3 I have never used the Communism government type. Part of this is that I'm not a huge fan of having forced labor as the hurry production method, but a far larger reason for this is that I just don't understand the corruption mechanic. On searching up how corruption is calculated I ran across this old thread by alexman. However, no matter how many times I try to read it over, I am at a loss for how all the calculations are done and I can't piece together what I don't understand without context clues/examples. And everyone in the comments seems to understand perfectly what is being said. I apologize for my ignorance, but can anyone here help me understand what some of these equations mean?

The equation solving for distance (d) is shown as d = max(x,y) + min(x,y)/2. From reading the precursor thread, it appears that this equation is as simple as the number of tiles between (including?) the two cities. That makes sense, but I don't know how that translates into something like the above equation. A city 12 tiles SE of the capital would be d = 12, but how would I get max(x,y) + min(x,y)/2 to equal 12?

Also, I am having a ton of trouble figuring out what commas mean in these equations. Adjusted distance (da) has an equation of da = 0.5^Ni * min(Gd * t * d, MaxD). Does that mean da is either 0.5^Ni * min(Gd * t * d) or da = 0.5^Ni * min(MaxD)? And what do the max/mins mean in these later equations?

If someone could hook me up with a couple of examples, that might be the best way for me to wrap my head around this.

And, apologizes again for hitting the forum with back-to-back questions, but I haven't found the solution anywhere I've looked and I know there are a lot of veterans on here that know this stuff like the back of their hands.
 
  • Like
Reactions: 777
From reading the precursor thread, it appears that this equation is as simple as the number of tiles between (including?) the two cities.

If a unit needs to move 5 times SE in order to get from your capital to the other city, than the distance is 5.

A city 12 tiles SE of the capital would be d = 12, but how would I get max(x,y) + min(x,y)/2 to equal 12?

You just have to read the definition supplied in there. x is moving NE or SE. y is moving orthogonal to it and thus NE or SW.

In your example it is x = 12 and y = 0. max(12,0)=12. min(12,0)=0. d = 12 + 0/2 = 12.

If you move N, W, S or E, than you move a distance of 1.5 per step(x=1 and y=1), at least in terms of corruption and also in terms of cultural border expansion. Corruption and culture follow the same pattern.

Also, I am having a ton of trouble figuring out what commas mean in these equations. Adjusted distance (da) has an equation of da = 0.5^Ni * min(Gd * t * d, MaxD). Does that mean da is either 0.5^Ni * min(Gd * t * d) or da = 0.5^Ni * min(MaxD)? And what do the max/mins mean in these later equations?

max gives you the greater of the 2 values. min gives you the smaller of the 2 values. The 2 values are seperated by the comma.

If Gd * t * d < MaxD, than min(Gd * t * d, MaxD)=Gd * t * d, else min(Gd * t * d, MaxD)=MaxD.

In practise Gd * t * d is expected to be smaller than MaxD. Thus the minimum function gives MaxD only for very large distances.
 
Thanks for helping me through this!

Just to make sure I understand:

Communal governments will always have at minimum 6.25% corruption from distance corruption assuming they are connected to a trade network and house two anti-corruption buildings.

Looking at Number of Optimal Cities (Nopt) on a Standard map size, on Emperor difficulty, as a non commercial civ, with Fascism government, with the Forbidden Palace, and two anti-corruption buildings yields:

Code:
Nopt = max(OCN * (L/100 * (1 + c + Gr + Gp*Nwe) + 0.25*Ni), 1)

20*(80/100*(1+0+0.1+3/8*1)+0.25*2) = 33.6

Looking at Nopt with the same map, difficulty, civ, but with Communism, the Forbidden Palace and the Secret Police HQ, and two anti-corruption buildings yields:

20*(80/100*(1+0+2+3*2)+0.25*2) = 154

So essentially, the balance is distance Cd+Cr where the 6.25% flat distance rate is balanced with a rank rate that is far, far lower than all other governments?

Am I getting it right or am I totally off the mark?

Also, as one last question: if rank is over the optimal number of cities, what does the equation become? Is it just double (rank/number of optimal cities) or is it something different? It says "(2 * R – Nopt) / (2 * Nopt) otherwise" but I'm not sure what that first Nopt means inside of the parenthesis.
 
Communal governments will always have at minimum 6.25% corruption from distance corruption assuming they are connected to a trade network and house two anti-corruption buildings.

Pending how you read it this statement is true. The one relevant restriction is that the capital still has zero corruption and the 2 secondary capitals can lower their maximum corruption to zero, thus up to 3 cities will enjoy zero corruption. So technically they donnot have a minimum corruption of 6.25%.

So essentially, the balance is distance Cd+Cr where the 6.25% flat distance rate is balanced with a rank rate that is far, far lower than all other governments?

It seems you got it all right. :)

Also, as one last question: if rank is over the optimal number of cities, what does the equation become? Is it just double (rank/number of optimal cities) or is it something different? It says "(2 * R – Nopt) / (2 * Nopt) otherwise" but I'm not sure what that first Nopt means inside of the parenthesis.

I see that there is an error, probably an update of the forum software ate the minus. The correct formula is:
Code:
     Cr = R / (2 * Nopt), if R < Nopt
         (2 * R –- Nopt) / (2 * Nopt) otherwise

So for R = Nopt the 2 formulas give the same result. For R > Nopt the increment in rank corruption is doubled. This means that after this threshold corruption will soon increase to maximum corruption. Close to R = Nopt is also where building a courthouse or a policestation will yield the greatest reduction in corruption.

Once corruption exceeds maximum corruption by large margin adding a courthouse or a policestation will only lower maximum corruption, thus building them yields only a reduction of about 10 percentage points. Rounding matters because maximum corruption cannot be exceeded.
 
Last edited:
Awesome! Thank you so much! I kind of figured that there was something missing from that last bit of code, but everything else was intact so I assumed it was just another lapse by myself.

Edit: One last question: rounding is mentioned exactly once is alexman's post: for calculating the rank of cities under a communal government. Is this the only time rounding is done in the corruption calculation process (besides the specific number of shields and commerce lost at the very end)?
 
Last edited:
For rank corruption a distance of 4.5 is greater than 4. For distance corruption however a distance of 4.5 is rounded down to 4. The later is specified by the article.

Maximum corruption is a hard maximum. This corruption is always rounded down. If the maximum is 90%(and relevant), than the first, the eventh, the 21st unit of commerce and shields is not corrupt. So if there is just one unit in total, than a corruption of 0.9 is rounded down to zero.
 
Top Bottom