# The fact about hurry production cost (a bug?)

Discussion in 'Civ4 Strategy Articles' started by predacon, Dec 3, 2005.

Not open for further replies.
1. ### predaconChieftain

Joined:
Dec 2, 2005
Messages:
19
Hi, everyone, I have tested the production hurring of civilization 4 and drawn a striking

conclusion. As far as I known, no post have mentioned this on this forum.
This test is carried out on version 1.09.
In civilization 4, there are two methods to hurry production. Universal suffage enables the

hurry production by spending gold and slavery enables it by population.
The amount of gold and population spent are multiples of the amount of "hammers" to finish the

production. That is

Gold = a * hammers or Population = b * hammers

Here after, we call the coefficient "a" the hurry coefficient.
Basically b = [a/90]+1 . The "+1" term is noticable and you should wait for one more turn to

save 1 population when the gold cost displayed is a mutiple of 90 gold. (it is always displayed

when you move your mouse over the button even such a hurry is not enabled and the button is

greyed out.)
The hurry coefficient "a" is determined by several factors.

1> The base hurry coefficient is determined by the sum of all "+xx% production" factors

EXCEPT forges, factories, power and ironworks.
These factors include:

a> Orgnized religion +25% for all buildinds.
b> Some leader trait adds +100% for some buildings i.e. finacial for bankings,

industrious for forges and so on.
c> Industrious trait add +50% for wonders.
d> Police state civic add +25% for military units.
e> Dry docks add 50% for navy units
f> Hero Epic add 100% for military units.
g> Stone +100 for pyramid, walls, Hanging Garden ..., marble +100% for Oracle, Great

Library ... and so on.

2> For a world wonder the base hurry coeff is multiplied by a factor of 2, for a national

wonder, the factor is 1.5 .
3> The hurry coefficient is multiplied by a factor of 2 when the production is just started.
4> Normally, the hurry cost is reduced by world wonder Kremlin by 50%. If the production is just started, the cost is only reduced by 25%.

The relation between basic hurry coefficient and the sum of all +XX% proction" factors are

listed as following.

Sum of factors -- Base hurry coefficient
0% -- 3
25% -- 2.5
50% -- 2.25
75% -- 2.1
100%-- 2
125%--1.928
150%--1.875
175%--1.833

For an example , a city of QinShiHuang try to build a pyramid , it have access to stone, the civic is orgnized relgion and the city is with the national religion.
The hammer cost for pyramid is 450, and the sum of factors is 175% ( 100% from stone, 50% from industrious trait, 25% from orgnized religion civic ). So the base hurry coefficient is 1.8333, and for a world wonder it is magnified to 3.6667. It is magnified to 7.3333 for the first turn of building. So the cost for first turn is 7.33333*450 = 3300 gold conis and it is reduced to a bit smaller than 3.6666*450 = 1667 gold coins for the next turn. (The exact number is a little smaller or bigger in real games, the error comes form rounding in calculation and is very little however.)

The coefficents list above is in Normal game speed.
Finally, the surprising thing is that the coefficients in Epic games are 1/3 smaller and in

Quick games 1/2 greater than Normal games!
So a settler cost 67, 100 and 150 hammers in quick, normal and epic games respectively, but

for hurry producing it costs 600 gold coins for any game speeds ( i.e. less than 300g after 1

turn passed).
The conclusion is that hurry production with gold is cheapest in Epic games and most expensive

for quick games and the differences is great. So if anybody hurries production with gold a lot,

builds cottages everywhere possible, adopts univeral suffage, free speech very often, the epic

games are much easier. The reason is in slower games the hammers costed to build unit and

buildings, beakers to research technologies, breads for cities to grow up, turns for workers to

build improvements and even turns for cottage/hamlet/villiages to grown up are all 150% more than

an adjacent quicker level, BUT the money spent to hurry producing same unit/buildings is the

same. That is you hold 150% or 225% more gold coins and still spend the same for a hurry

production.
Is this a bug? I think so. Any ideas?
(sorry for the re-post, but i think it is more suitable to this board and i can not remove the one posted on str&tips board)

2. ### KrikkitTwoImmortal

Joined:
Apr 3, 2004
Messages:
12,296
Well the hurry bonus for gold is definitely a bug, although I'd imagine the same thing applies for population, where it is not a bug.

Summing up
its not: b=[a/90]+1 (that would means something that cost 10 hammers would need at Least 10 population units)

its: Population cost=[Gold Cost/90]+1

Also the 'Gold Cost' formula
Gold Cost=Hammer cost*3*Kremlin*Wonder*Startup*(1+s)/(1+2s)

where s is the special production bonus
Startup, Wonder, and Kremlin are the modifiers for those.

3. ### predaconChieftain

Joined:
Dec 2, 2005
Messages:
19
Good formula ,
But the kremlin and startup factor should be added up first,
that is:

Gold Cost=Hammer cost*3*(Kremlin+Startup)*Wonder*(1+s)/(1+2s)

4. ### KhaimChieftain

Joined:
Oct 7, 2005
Messages:
394
Also, are you sure that all the bonuses are mutliplied? Nearly everywhere else in the game, all % modifiers are additive and only the sum is applied to the base cost. The difference is usually small, but it might be something to check.

Nice information to have in any case. The key point is probably that 1 shield is roughly 3 gold.

5. ### KrikkitTwoImmortal

Joined:
Apr 3, 2004
Messages:
12,296
May need to be revised with 1.52 (there are undocumented changes perhaps they caught the gold rush bug) It would also help to know which bonuses are added and which are subtracted.

6. ### LordTerrorChieftain

Joined:
Sep 9, 2005
Messages:
73
This is patched in v1.52.

7. ### DaviddesJChieftain

Joined:
May 5, 2003
Messages:
4,341
Location:
Burlingame CA
In v1.52, the extra cost for rushing construction on the first turn is only +50%, not +100%.

The adjustment for game speed looks right, now; e.g., for Epic speed, pop cost = [gold cost/135] + 1.

8. ### DaviddesJChieftain

Joined:
May 5, 2003
Messages:
4,341
Location:
Burlingame CA
Although the cost of pop rushing seems to be correct in v1.52, the results after pop rushing don't seem to be correct.

E.g., in an Epic game, I was building an Axeman, with 10/43 completed so far. The game correctly told me that it would cost 1 pop to rush it. I clicked on the button, and then, after losing 1 pop, I had 70/43 completed on the Axeman. I.e., 1 pop can only rush a unit with less than 45 hammers needed, but, it's giving +60 hammers when I do rush it!

In a different town, I have a Worker with 72/75 completed. When I pop rush, I lose 1 pop and I go to 102/75 completed; i.e., I'm only getting +30 hammers!

My guess, from the above two examples, is that it's a rounding problem that shows up at Epic speed because of the fractional 1.5 multiplier. I.e., you're supposed to get +45 hammers from pop rushing, but sometimes you get +30 and other times you get +60. This can happen because it's rounding off an intermediate result, to an integer.

It appears that you get +30 hammers if you need 30 or less. If you need more than 30 (but less than 45), you get +60 instead!

9. ### ancestralChieftain

Joined:
Nov 9, 2001
Messages:
181
Location:
Motion City
As far as I know, in Civ IV, it's 1 population point sacrificed for every 30 hammers. So if your production has between 31 and 60 hammers left, that will be two people sacrificed. The extra hammers, as you experienced, are eaten up. (Yes, the fraction is greater than 1, but really it's inconsequential. The important part is the hammers don't roll over to the next item in production when production is hurried.)

The number of hammers per turn shouldn't change between game speeds; otherwise, hurrying production in slower game speeds would certainly be faster. The idea is that it takes longer between epic and normal speeds to build everything, but the production doesn't change to compensate (as there actually is no compensation

10. ### DaviddesJChieftain

Joined:
May 5, 2003
Messages:
4,341
Location:
Burlingame CA
As I said in my posting, that's not how it works. If you are going to claim that I'm wrong, you should first try it for yourself.

I don't really understand what this means. As discussed above, 1 pop is worth 30 hammers at Normal speed and 45 hammers at Epic speed, in v1.52. This is as it should be: it costs 1.5 times as much food to create 1 pop; it should be worth 1.5 times as many hammers, in return. Before the patch, 1 pop was always worth 30 hammers (before adjustments for production multipliers), which was a bug.

It's plausible, though, that it's effectively using the code from Normal speed to decide how many hammers to add. So, the number of pop used to rush is computed differently at different speeds, but the number of hammers added is always the smallest multiple of 30 that is sufficient to bring the total up to the target cost. That would mean that in Quick games, rushing with 1 pop would add +30 hammers, when it should only add +20. I did a quick test, and that seems to be true.

11. ### Zombie69Chieftain

Joined:
Nov 22, 2005
Messages:
1,898
Actually, they do carry over in the overflow.

12. ### DaveMcWChieftain

Joined:
Oct 8, 2002
Messages:
6,489
Edit: This post applies to patch 1.52. All bugs were fixed in 1.61.

Here is a table of pop rush results. I assume you have at least one hammer invested, to avoid the 50% penalty when rushing from zero.

Column 1 = Hammers needed to finish production
Columns 2-5 = Citizens killed ... Hammers gained

Code:
```Needed	Quick	Normal	Epic	Marathon
1	1&#8230;30	1&#8230;30	1&#8230;30	1&#8230;30
2	1&#8230;30	1&#8230;30	1&#8230;30	1&#8230;30
3	1&#8230;30	1&#8230;30	1&#8230;30	1&#8230;30
4	1&#8230;30	1&#8230;30	1&#8230;30	1&#8230;30
5	1&#8230;30	1&#8230;30	1&#8230;30	1&#8230;30
6	1&#8230;30	1&#8230;30	1&#8230;30	1&#8230;30
7	1&#8230;30	1&#8230;30	1&#8230;30	1&#8230;30
8	1&#8230;30	1&#8230;30	1&#8230;30	1&#8230;30
9	1&#8230;30	1&#8230;30	1&#8230;30	1&#8230;30
10	1&#8230;30	1&#8230;30	1&#8230;30	1&#8230;30
11	1&#8230;30	1&#8230;30	1&#8230;30	1&#8230;30
12	1&#8230;30	1&#8230;30	1&#8230;30	1&#8230;30
13	1&#8230;30	1&#8230;30	1&#8230;30	1&#8230;30
14	1&#8230;30	1&#8230;30	1&#8230;30	1&#8230;30
15	1&#8230;30	1&#8230;30	1&#8230;30	1&#8230;30
16	1&#8230;30	1&#8230;30	1&#8230;30	1&#8230;30
17	1&#8230;30	1&#8230;30	1&#8230;30	1&#8230;30
18	1&#8230;30	1&#8230;30	1&#8230;30	1&#8230;30
19	1&#8230;30	1&#8230;30	1&#8230;30	1&#8230;30
20	2&#8230;30	1&#8230;30	1&#8230;30	1&#8230;30
21	2&#8230;30	1&#8230;30	1&#8230;30	1&#8230;30
22	2&#8230;30	1&#8230;30	1&#8230;30	1&#8230;30
23	2&#8230;30	1&#8230;30	1&#8230;30	1&#8230;30
24	2&#8230;30	1&#8230;30	1&#8230;30	1&#8230;30
25	2&#8230;30	1&#8230;30	1&#8230;30	1&#8230;30
26	2&#8230;30	1&#8230;30	1&#8230;30	1&#8230;30
27	2&#8230;30	1&#8230;30	1&#8230;30	1&#8230;30
28	2&#8230;30	1&#8230;30	1&#8230;30	1&#8230;30
29	2&#8230;30	1&#8230;30	1&#8230;30	1&#8230;30
30	2&#8230;30	2&#8230;30	1&#8230;30	1&#8230;30
31	2&#8230;60	2&#8230;60	1&#8230;60	1&#8230;60
32	2&#8230;60	2&#8230;60	1&#8230;60	1&#8230;60
33	2&#8230;60	2&#8230;60	1&#8230;60	1&#8230;60
34	2&#8230;60	2&#8230;60	1&#8230;60	1&#8230;60
35	2&#8230;60	2&#8230;60	1&#8230;60	1&#8230;60
36	2&#8230;60	2&#8230;60	1&#8230;60	1&#8230;60
37	2&#8230;60	2&#8230;60	1&#8230;60	1&#8230;60
38	2&#8230;60	2&#8230;60	1&#8230;60	1&#8230;60
39	2&#8230;60	2&#8230;60	1&#8230;60	1&#8230;60
40	3&#8230;60	2&#8230;60	1&#8230;60	1&#8230;60
41	3&#8230;60	2&#8230;60	1&#8230;60	1&#8230;60
42	3&#8230;60	2&#8230;60	1&#8230;60	1&#8230;60
43	3&#8230;60	2&#8230;60	1&#8230;60	1&#8230;60
44	3&#8230;60	2&#8230;60	1&#8230;60	1&#8230;60
45	3&#8230;60	2&#8230;60	2&#8230;60	1&#8230;60
46	3&#8230;60	2&#8230;60	2&#8230;60	1&#8230;60
47	3&#8230;60	2&#8230;60	2&#8230;60	1&#8230;60
48	3&#8230;60	2&#8230;60	2&#8230;60	1&#8230;60
49	3&#8230;60	2&#8230;60	2&#8230;60	1&#8230;60
50	3&#8230;60	2&#8230;60	2&#8230;60	1&#8230;60
51	3&#8230;60	2&#8230;60	2&#8230;60	1&#8230;60
52	3&#8230;60	2&#8230;60	2&#8230;60	1&#8230;60
53	3&#8230;60	2&#8230;60	2&#8230;60	1&#8230;60
54	3&#8230;60	2&#8230;60	2&#8230;60	1&#8230;60
55	3&#8230;60	2&#8230;60	2&#8230;60	1&#8230;60
56	3&#8230;60	2&#8230;60	2&#8230;60	1&#8230;60
57	3&#8230;60	2&#8230;60	2&#8230;60	1&#8230;60
58	3&#8230;60	2&#8230;60	2&#8230;60	1&#8230;60
59	3&#8230;60	2&#8230;60	2&#8230;60	1&#8230;60
60	4&#8230;60	3&#8230;60	2&#8230;60	1&#8230;60
61	4&#8230;90	3&#8230;90	2&#8230;90	1&#8230;90
62	4&#8230;90	3&#8230;90	2&#8230;90	1&#8230;90
63	4&#8230;90	3&#8230;90	2&#8230;90	1&#8230;90
64	4&#8230;90	3&#8230;90	2&#8230;90	1&#8230;90
65	4&#8230;90	3&#8230;90	2&#8230;90	1&#8230;90
66	4&#8230;90	3&#8230;90	2&#8230;90	1&#8230;90
67	4&#8230;90	3&#8230;90	2&#8230;90	1&#8230;90
68	4&#8230;90	3&#8230;90	2&#8230;90	1&#8230;90
69	4&#8230;90	3&#8230;90	2&#8230;90	1&#8230;90
70	4&#8230;90	3&#8230;90	2&#8230;90	1&#8230;90
71	4&#8230;90	3&#8230;90	2&#8230;90	1&#8230;90
72	4&#8230;90	3&#8230;90	2&#8230;90	1&#8230;90
73	4&#8230;90	3&#8230;90	2&#8230;90	1&#8230;90
74	4&#8230;90	3&#8230;90	2&#8230;90	1&#8230;90
75	4&#8230;90	3&#8230;90	2&#8230;90	1&#8230;90
76	4&#8230;90	3&#8230;90	2&#8230;90	1&#8230;90
77	4&#8230;90	3&#8230;90	2&#8230;90	1&#8230;90
78	4&#8230;90	3&#8230;90	2&#8230;90	1&#8230;90
79	4&#8230;90	3&#8230;90	2&#8230;90	1&#8230;90
80	5&#8230;90	3&#8230;90	2&#8230;90	1&#8230;90
81	5&#8230;90	3&#8230;90	2&#8230;90	1&#8230;90
82	5&#8230;90	3&#8230;90	2&#8230;90	1&#8230;90
83	5&#8230;90	3&#8230;90	2&#8230;90	1&#8230;90
84	5&#8230;90	3&#8230;90	2&#8230;90	1&#8230;90
85	5&#8230;90	3&#8230;90	2&#8230;90	1&#8230;90
86	5&#8230;90	3&#8230;90	2&#8230;90	1&#8230;90
87	5&#8230;90	3&#8230;90	2&#8230;90	1&#8230;90
88	5&#8230;90	3&#8230;90	2&#8230;90	1&#8230;90
89	5&#8230;90	3&#8230;90	2&#8230;90	1&#8230;90
90	5&#8230;90	4&#8230;90	3&#8230;90	2&#8230;90
91	5&#8230;120	4&#8230;120	3&#8230;120	2&#8230;120
92	5&#8230;120	4&#8230;120	3&#8230;120	2&#8230;120
93	5&#8230;120	4&#8230;120	3&#8230;120	2&#8230;120
94	5&#8230;120	4&#8230;120	3&#8230;120	2&#8230;120
95	5&#8230;120	4&#8230;120	3&#8230;120	2&#8230;120
96	5&#8230;120	4&#8230;120	3&#8230;120	2&#8230;120
97	5&#8230;120	4&#8230;120	3&#8230;120	2&#8230;120
98	5&#8230;120	4&#8230;120	3&#8230;120	2&#8230;120
99	5&#8230;120	4&#8230;120	3&#8230;120	2&#8230;120
100	6&#8230;120	4&#8230;120	3&#8230;120	2&#8230;120
```
It looks like the pop cost is modified correctly (20, 30, 45, 90), but the result jump points are not modified at all!

Another issue is that for round numbers of hammer needed, an extra citizen is needlessly killed.

13. ### Zombie69Chieftain

Joined:
Nov 22, 2005
Messages:
1,898
Conclusion : unless you play at standard game speed, you're playing on a buggy, yet to be complete game mode.

14. ### DaviddesJChieftain

Joined:
May 5, 2003
Messages:
4,341
Location:
Burlingame CA
So, you think that paying 2 pop for 30 hammers, at Normal speed when you have exactly 30 hammers needed, is a "non-buggy, complete" game mode?

15. ### Zombie69Chieftain

Joined:
Nov 22, 2005
Messages:
1,898
True, even standard speed is somewhat buggy, but the others are totally out of whack!

16. ### Qitai.

Joined:
Jan 22, 2002
Messages:
1,177
Location:
SG.MY.TW.US
Did some test and would rather have a formula the other way around due to some micro-management so as not to waste hammers.

I am more interested in pop-rush, so here it is for hammer per pop.

Hammers per pop = speed base hammer * Kremlin bonus * Zero Penalty * National Wonder Penalty * World Wonder Penalty * (1 + Sum of all production bonuses as appear on the screen)

Speed Base hammer = 20, 30, 45, 90
Kremlin Bonus = 2
Zero Penalty = 2/3
National Wonder Penalty = 2/3
World Wonder Penalty = 1/2
Production bonuses includes resource, civ traits, forge, factory etc.

E.g. Epic game with Kremlin Bonus building a National World with the required resource and only a forge would give you

45*2*2/3*(1+0.25+1) = 135 hammers per pop

The total hammers generated is always remaining hammer required round up to the nearest 30 hammers. So, it is always more profitable to have the remaining hammers as just a little above a multiple of 30 so you get the extra overflow hammers. So, in the above case, it would be optimal to hurry at say when there is 121-134 hammers remaining in order to get 150 hammers out of one pop.

17. ### syndicatedragonChieftain

Joined:
Nov 14, 2003
Messages:
135
Location:
St. Louis
You guys should post this over in the bugs forum

18. ### DaviddesJChieftain

Joined:
May 5, 2003
Messages:
4,341
Location:
Burlingame CA
Your math is wrong; this is only 135 hammers.

19. ### Qitai.

Joined:
Jan 22, 2002
Messages:
1,177
Location:
SG.MY.TW.US
Getting old

Original text corrected.

20. ### WoebearerChieftain

Joined:
Jan 13, 2006
Messages:
103
I did some experiments on poprushing and was coming up with some very strange results.

I had results from 30, 45, and even 60! hammers per population killed. In one instance I decided to test the difference between city populations and a pop of 5 (sacing 2 population for University) was giving me 60 hammers and every other pop (including 4) gave me 90 hammers?!?