Increase policy cost inc by 20%. How?

WesW

Creator of the Medmod
Joined
Mar 14, 2002
Messages
145
Location
Florence, AL.
I want to increase the increase in policy costs by 20%.
I have found the code in the globaldefines.xml that pertains to this, but I can't make out the formula they used. Perhaps someone with a good math vocabulary can set up the formula for me. The code is:

<Row Name="BASE_POLICY_COST">
<Value>25</Value>
</Row>
<Row Name="POLICY_COST_INCREASE_TO_BE_EXPONENTED">
<Value>6</Value>
</Row>
<Row Name="POLICY_COST_EXPONENT">
<Value>1.70</Value>
</Row>
<Row Name="POLICY_COST_VISIBLE_DIVISOR">
<Value>5</Value>
</Row>
 
Perhaps someone with a good math vocabulary can set up the formula for me.

Pretty sure it's 25 + 6*(N^1.7), where N is the number of policies you have, rounded down to the nearest multiple of 5.

So if you want to increase the costs by ~20%, then you'd have to change the 25 to a 30 and the 6 to a 7. But I'm in the middle of tweaking this myself, so I'll test it a bit myself.
 
Unless the formula has changed since that part of the Number Crunching Topic was posted, the base formula is actually
25 + (6*N)^1.7
There are also further modifiers, most notably number of cities, as discussed in the linked topic.

Thanks for the link, Mousey. Geez that got complicated. I was having flashbacks to all those engineering courses I took back in the day. Anyway, it seems like the key modifier in all this is the exponent, and increasing that by 20% equals 2.04, which I'll round down to 2.0 for safety's sake.
Thanks to you, too, Spatz, for caring enough to post.
 
Anyway, it seems like the key modifier in all this is the exponent, and increasing that by 20% equals 2.04, which I'll round down to 2.0 for safety's sake.

No, that's WAY more than a 20% increase. Exponents don't work that way. Even rounding it down to 2.0, the cost of a policy would be double the old value after only 3 policies, triple after 7, and by the time you got to 30 policies it'd be 5 times the vanilla value.

If you want to increase the costs by a flat percentage, you need to change the 25 and the 6. Because the 6 is exponented, changing it from 6 to 7 would multiply costs by almost exactly 1.30. (27.332 vs 21.031) on the high end. You really don't need to increase the 25, because it gets drowned out SO quickly; your sixth policy will cost ~500 culture, so adding another 5 to that will do nothing.
 
No, that's WAY more than a 20% increase. Exponents don't work that way. Even rounding it down to 2.0, the cost of a policy would be double the old value after only 3 policies, triple after 7, and by the time you got to 30 policies it'd be 5 times the vanilla value.

If you want to increase the costs by a flat percentage, you need to change the 25 and the 6. Because the 6 is exponented, changing it from 6 to 7 would multiply costs by almost exactly 1.30. (27.332 vs 21.031) on the high end. You really don't need to increase the 25, because it gets drowned out SO quickly; your sixth policy will cost ~500 culture, so adding another 5 to that will do nothing.

Thanks, Spatz. I loaded up my Ind.-era game a few minutes ago, and did a double take. It's sad how much of my math training that I've gotten so rusty on.
 
Guys, I found some weird results when I played around with the numbers. First, my total cost was only about 12,700, not the 22,500 or so that it should've been. Also, when I increased the 6 to a 7, my total cost went from about up to about 16,500. This would be about a 30% increase only if the entire cost were coming from the base cost, and none from the number of cities, which I know isn't true. (I have 33 cities, and increasing them by 1 adds about 300 points to total costs. I also don't have any policy cost modifiers.)
Changing the exponent from 1.7 to 2.0 increased the cost to 46,000, which is roughly the 4-fold increase Spatz mentioned, but again only if the entire amount were coming from the base cost. (I have 15 policies and play on large maps on Emporer setting.)
 
How many of your cities are puppets? And, though it may not matter, what game speed?

edit: Assuming 30 non-puppets I come up with the following numbers.

Unmodded: (25 + (6*15)^1.7)(.2*30) = approx 12,745

Multiplier of 7: (25 + (7*15)^1.7)(.2*30) = approx 16,520

Exponent of 2.0: (25 + (6*15)^2.0)(.2*30) = approx 48,750
 
Changing the exponent from 1.7 to 2.0 increased the cost to 46,000, which is roughly the 4-fold increase Spatz mentioned, but again only if the entire amount were coming from the base cost.

I don't see a problem here. The costs are multiplicative, as so:

X = 25 + (6*N_policies)^1.7
Y = (7 + 3*N_cities)/10 (so 1.0, 1.3, 1.6, 1.9...)
Z = X*Y
The cost you pay is Z. So yes, changing the exponent to a 2.0 would change the cost by a factor of 4, regardless of how many cities you have, because it'd multiply X by 4 and leave Y unchanged. Likewise, changing the 6 to a 7 would multiply the cost by 1.3 regardless of how many cities you have.
 
Thanks again guys. I got the 22,500 from the table in the number crunching thread. I'm not sure what I had the wrong idea about in regards to how the costs were all connected. I guess it was the multiplicative part that had me confused. Thanks for explaining things.
 
This is just a thought, but Cristo Redentor decreases policy costs by 33%. You could copy this effect from the appropriate file, modify it so it increases by 20%, and tack it onto the Palace, so that all civs would get the effect right from the start. This may me much more ad hoc than you desire though.
 
You could copy this effect from the appropriate file, modify it so it increases by 20%, and tack it onto the Palace

This'd be okay, except that if you then built Cristo Redentor, policies would cost (100+20-33)= 87% of their original values, instead of the 80% they'd be supposed to be.

The better solution would be to take one of the existing base tables that has a culture or policy multiplier and adjust that. For instance:

> The HandicapInfos table has a "PolicyPercent" variable. Chieftain is 67, and Prince is 100. So all you'd need to do is multiply all of these by 1.2, to where Chieftain is 80 and Prince is 120. This'd be an easy SQL mod, and not too bad for XML either.
(I've used a similar mechanism for Unhappiness. The Unhappiness-per-population variable in GlobalDefines is cast as an Integer, and I wanted 1.2 unhappiness per population on Prince, so all I needed to do was multiply all of the PopulationUnhappinessMod variables in HandicapInfos by 1.2.)

> The Eras table has a "CulturePercent" variable that works similarly, multiplying the cost of all policies by a scaling factor if you start a game in an era later than Ancient.

I think there are others, but either of the above would do exactly what you want. The only problem would be if any other mod decided to also adjust these PolicyPercent/CulturePercent variables, and that's really unlikely.
 
The effect is additive? I had just assumed it was multiplicative. The tooltip is ambiguous I guess.
 
The effect is additive? I had just assumed it was multiplicative. The tooltip is ambiguous I guess.

Every asset-linked modifier is additive in Civ5.

If a unit has two +25% promotions, they add to a +50%. If a terrain gives -50% to combat, then it cancels that +50%, it doesn't multiply to x0.75. This applies to the effects of terrains, wonders, promotions, buildings, etc.

The ONLY modifiers that are multiplicative are the ones that set up the base values, which are the ones I've described: the HandicapInfos table, the Eras table, the map sizes tables, et cetera. These tables aren't linked to a specific asset, and are purely multiplicative. (So if you adjust CulturePercent to 150 in one table and PolicyPercent to 150 in the other, then they'll cost x2.25.)
 
Back
Top Bottom