Rush Buying Formula

DaveMcW

Deity
Joined
Oct 8, 2002
Messages
6,489
The formula for purchasing units and buildings is:

GoldCost = int( (30 * Cost * GameSpeedPercent)^0.75 * (1 + HurryCostModifier/100) / 10 ) * 10

Cost = The hammer cost on standard speed.
GameSpeedPercent = Modifier for game speed and starting era.
HurryCostModifier = A hidden rush-buy penalty.


Implications of the formula:

1. Expensive items are more efficient to buy than cheap items.

This is due to the cost being under a 0.75 exponent. For example, 2 workers (140:c5production:) cost 620 gold. A trebuchet (170:c5production:) costs 600 gold.


2. Rush buying is more efficient on slow game speeds and early starting eras.

This is because the game speed modifier is also under a 0.75 exponent.

Quick Speed: +10% to all
Epic Speed: -10% to all
Marathon Speed: -24% to all

Classical Start: +6% units, +4% buildings
Medieval Start: +10% units, +7% buildings
Renaissance Start: +19% units, +16% buildings
Industrial Start: +32% units, +28% buildings
Modern Start: +41% units, +35% buildings
Future Start: +53% units, +48% buildings


3. Items with a high HurryCostModifier should usually be built with hammers.

+40% modifier: Monument
+30% modifier: Caravel
+25% modifier: Work Boat, all pre-renaissance buildings, Seaport, Windmill, Military Base
+20% modifier: Settler, all classical units, Frigate, Ship of the Line
+15% modifier: University, Wat, Bank, Observatory, Satrap's Court, Stock Exchange
+10% modifier: Opera House, Theatre
 
Good work! Where did you find this data?

3. Items with a high HurryCostModifier should usually be built with hammers.

+25% modifier: Work Boat, Seaport, Windmill, Military Base, all pre-renaissance buildings.
+30% modifier: Caravel
+40% modifier: Monument

This intrigues me, that there seem to be a couple of items that the developers wanted to discourage gold buying. I do have to wonder why work boats and military bases are on this list, the others make sense to me though.
 
It seems really annoying that the dvelopers seemed to work hard to make the math complicated.

If you want cheaper things to be more expensive

$ cost = Hammer cost* Factor + Base cost
 
A horseman costs 80 hammers to build while 410 gold to rushbuy. Then a horseman should have a 20% penalty?
 
+20% modifier: Settler, all classical units, Frigate, Ship of the Line

I left them out of the article because I don't think the penalty is big enough to stop you from buying them.
 
+20% modifier: Settler, all classical units, Frigate, Ship of the Line

I left them out of the article because I don't think the penalty is big enough to stop you from buying them.

I suggest you add that info to the first post.

Is there anything else you left you? I think it's important we have all the info we can.
 
I haven't played civ5 much but I have noticed that in quick speed in classical start a worker is cheaper to rush buy than in ancient start. If I remember correctly it is 220 gold in ancient and 175in classical.

Maybe that is a bug? If they are supposed to get more expensive in later eras?
 
well the formula does make the game alot simpler.'
you see you do not rush buy early units/buildings. you just upgrade your units.
it is alot more effcient per hammer, not to mention that it has a much bigger immidiate effect.

the building i usually rushbuy are universities/public houses/factories. the remaining gold goes into upgradeing units.

if they want a strategic choise then i recomment they change the formula to flat 3gpt per hammer for buildings and 3 gpt per hammer for unit upgrade and 4 gpt per unit thats rushbought. there is a reason production is much more important then gold. The reason is that it is a really bad tactic to rushbuy early buildings.
To make this work out just remove gold from ruins and gold from eldorado.
 
I was looking at the Berserkers recently for this.

It's actually cheaper to buy a swordsman and then upgrade (440+160 = 600) than it was to buy the Berserker (700).

I'm pretty sure there's some other cheap costs hidden in the units 'buy/upgrade' vs buy path vs. 'build/upgrade'. Has anyone explored them yet?
 
Landsknect ---> Rifleman, I suspect. Also guessing Ship of the Line ---> Destroyer. I can't verify the math from work here though. I would think generally any unit that is undercosted hammerwise will recieve an effective gold upgrade reduction.
 
I was looking at the Berserkers recently for this.

It's actually cheaper to buy a swordsman and then upgrade (440+160 = 600) than it was to buy the Berserker (700).

I'm pretty sure there's some other cheap costs hidden in the units 'buy/upgrade' vs buy path vs. 'build/upgrade'. Has anyone explored them yet?

Longswords purchases are usually 580g so unless there is a particular bug in the berserker's cost you'd be better purchasing swords directly. On the other hand PA makes buying previous era units significantly godly in terms of gold/hammers saving.

Best scaling SP amongst the first 3 trees...but I think I learned that after reading one of your posts regarding PA+naval wars -_-
 
Interesting enogh is that workers have no hurry cost modifiers while library does. Thus, on a lucky potery or writing goodie hut on a beeline writing/nc start, one would be better off rush buying the worker to hard build the library immediately after scout+monument than the opposite "standard" way around.

Obv this is disregarding the relative value of ~10 ish turns w/ library out vs worker out but the net hammers vs gold of the above is a 70g saving.
 
Longswords purchases are usually 580g so unless there is a particular bug in the berserker's cost you'd be better purchasing swords directly. On the other hand PA makes buying previous era units significantly godly in terms of gold/hammers saving.

Best scaling SP amongst the first 3 trees...but I think I learned that after reading one of your posts regarding PA+naval wars -_-

I'd have to double check the Berserker hammer cost vs. a normal Longsword.

but yeah, PA makes naval wars a bit more reasonable. (still not enough, but closer)
 
While we're talking about this, what happens to the extra hammers if for example I'm halfway done with the production of a library and then I decide to purchase it?
 
The formula for purchasing units and buildings is:

GoldCost = int( (30 * Cost * GameSpeedPercent)^0.75 * (1 + HurryCostModifier/100) / 10 ) * 10

Cost = The hammer cost on standard speed.
GameSpeedPercent = Modifier for game speed and starting era.
HurryCostModifier = A hidden rush-buy penalty.

Is there a formula to calculate the hammer cost for advanced start? If I start in Classical Era, Archer costs 26 hammers. In Ancient era it's 40. Does anyone know the formula with which this is calculated?
 
Is there a formula to calculate the hammer cost for advanced start? If I start in Classical Era, Archer costs 26 hammers. In Ancient era it's 40. Does anyone know the formula with which this is calculated?

there is an advancedstartcost column in the units.xml
 
Answering my own question:

Cost = cost_defined_in_XML * multiplier_for_advanced_start * multiplier_for_game_speed

where

multiplier_for_advanced_start = {1, 0.8, 0.67, 0.5, 0.33, 0.25, 0.18} /1 = ancient era, 0.18 = future era start/

multiplier_for_game_speed = {3, 2, 1, 0.67} /3=marathon , 0.67 = fast/

I took settler, worker, artillery, mech infantry and nuke and tracked how many hammers they cost with each starting era to come up with this multipliers. All of them have different advanced start cost (worker = 20, artillery = 40, mechinf = 50, nuke = 80), but that seems to have only ~1% effect on the result.
 
Top Bottom