1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Rush Buying Formula

Discussion in 'Civ5 - Strategy & Tips' started by DaveMcW, Oct 23, 2010.

  1. DaveMcW

    DaveMcW Chieftain

    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
     
  2. Trickster7135

    Trickster7135 Chieftain

    Joined:
    Aug 30, 2010
    Messages:
    321
    Location:
    954, Florida
    Good work! Where did you find this data?

    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.
     
  3. KrikkitTwo

    KrikkitTwo Immortal

    Joined:
    Apr 3, 2004
    Messages:
    12,316
    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
     
  4. PJyang

    PJyang Chieftain

    Joined:
    Apr 5, 2006
    Messages:
    33
    A horseman costs 80 hammers to build while 410 gold to rushbuy. Then a horseman should have a 20% penalty?
     
  5. DaveMcW

    DaveMcW Chieftain

    Joined:
    Oct 8, 2002
    Messages:
    6,489
    +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.
     
  6. Trickster7135

    Trickster7135 Chieftain

    Joined:
    Aug 30, 2010
    Messages:
    321
    Location:
    954, Florida
    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.
     
  7. Indiansmoke

    Indiansmoke Chieftain

    Joined:
    Dec 12, 2006
    Messages:
    4,124
    Location:
    Athens, Greece
    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?
     
  8. DaveMcW

    DaveMcW Chieftain

    Joined:
    Oct 8, 2002
    Messages:
    6,489
    They are supposed to get cheaper in :c5production: in later eras. But that messes up the gold ratio.
     
  9. Knut_Are_M

    Knut_Are_M Chieftain

    Joined:
    Aug 15, 2008
    Messages:
    322
    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.
     
  10. MadDjinn

    MadDjinn Chieftain

    Joined:
    Jan 28, 2011
    Messages:
    4,554
    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?
     
  11. Lokos451

    Lokos451 Chieftain

    Joined:
    Dec 23, 2010
    Messages:
    77
    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.
     
  12. Deau

    Deau Chieftain

    Joined:
    Apr 17, 2011
    Messages:
    1,367
    Location:
    Quebec, Can
    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 -_-
     
  13. Deau

    Deau Chieftain

    Joined:
    Apr 17, 2011
    Messages:
    1,367
    Location:
    Quebec, Can
    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.
     
  14. MadDjinn

    MadDjinn Chieftain

    Joined:
    Jan 28, 2011
    Messages:
    4,554
    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)
     
  15. SolemnEagle

    SolemnEagle Chieftain

    Joined:
    Jun 13, 2011
    Messages:
    10
    Location:
    Houston, Texas
    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?
     
  16. GenjiKhan

    GenjiKhan Chieftain

    Joined:
    Apr 29, 2011
    Messages:
    1,117
    You'll lost the hammers if you do this.
     
  17. Redox

    Redox Chieftain

    Joined:
    Jun 15, 2011
    Messages:
    134
    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?
     
  18. vexing

    vexing knows

    Joined:
    Dec 24, 2010
    Messages:
    2,668
    there is an advancedstartcost column in the units.xml
     
  19. Redox

    Redox Chieftain

    Joined:
    Jun 15, 2011
    Messages:
    134
    I know, but AdvancedStartCost is a single number, and the actual hammer cost is different in every starting era. For Archer, this cost is 15. So, how do you take 40, 15, 2 (classical) era and get 26?
     
  20. Redox

    Redox Chieftain

    Joined:
    Jun 15, 2011
    Messages:
    134
    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.
     

Share This Page