Page 1 of 2 1 2 LastLast
Results 1 to 30 of 53

Thread: Unit Hurry Cost Revisited!

  1. #1
    Santiago_Claus
    Warlord
    Join Date
    16 Mar 2004
    Posts
    184
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 20, 2013
    Local Time
    14:31

    Unit Hurry Cost Revisited!

    Just when you thought you'd seen it all ... just when you thought the poor old nag of a dead horse had been beaten into soap ... out pops another UNIT HURRY COST FORMULA! WOOHOO!

    Everything I've done here is based on what others did before, I just made it work in a spreadsheet. How it works is that you enter the hurry cost and base production, and the spreadsheet returns 2 costs: minimum build cost & 10-surplus build cost.

    Okay, so you've hit "hurry" on a unit and a cost pops up. How many minerals does that represent? We know we can look it up on the chart, but a formula would be better for a spreadsheet.

    Let the full hurry Cost be "C". Inverting the famous x^2 / 20 + 2x equation means we must take the positive root of the quadratic formula:

    10 * ((C / 5 + 4) - 2)

    Rounded to the nearest integer, this exactly matches the chart!

    The actual spreadsheet formula (where "B4" is the cell containing variable "C") looks like this:

    ROUND(10 * (SQRT(B4 / 5 + 4) - 2))

    Let's call that answer "M". (Mineral cost remaining.)

    Now the Unit Cost = C / M, call that "U".

    Let base production be "P".

    Now the Exact Cost = ROUNDUP((M - P) * U)
    And the 10-Over Cost = ROUNDUP((M - P + 10) * U)

    The formulas I've given should be easy to plug into a spreadsheet (considering I just read them off mine to post this). Never look stuff up on tables again!

    P.S. If you're under 10 stored minerals you'll have to halve the input cost and double the output cost for the formulas to work, and for prototype rush-builds you're on your own.

  2. #2
    Skanky Burns
    Apolyton Sage No. 3 Skanky Burns's Avatar
    Join Date
    15 Aug 2001
    Location
    Skanky Father
    Posts
    16,558
    Country
    This is Skanky Burns's Country Flag
    Thanks
    4
    Thanked 4 Times in 1 Post
    Local Date
    May 21, 2013
    Local Time
    00:31
    Nice work.
    I'm building a wagon! On some other part of the internets, obviously (but not that other site).

  3. #3
    Jamski
    Deity Jamski's Avatar
    Join Date
    02 May 2002
    Location
    lol ED&D is officially full PvP LOL
    Posts
    13,229
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 20, 2013
    Local Time
    14:31
    I have a faster, simpler and easier way to do it in my head without counting a single mineral.

    And I'm not going to share it with you*

    Ok, my way is only 95% accurate, but I can live with 2-3 wasted ecs.

    *Well, I think you can guess anyway...

    -Jam
    1) The crappy metaspam is an affront to the true manner of the artform. - Dauphin
    That's like trying to overninja a ninja when you aren't a mammal. CAN'T BE DONE. - Kassi on doublecrossing Ljube-ljcvetko
    Check out the ALL NEW Galactic Overlord Website for v2.0 and the Napoleonic Overlord Website or even the Galactic Captians Website Thanks Geocities!
    Taht 'ventisular link be woo to clyck.

  4. #4
    Maniac
    Apolyton Sage No. 5 Maniac's Avatar
    Join Date
    08 Jul 1999
    Location
    Gent, Belgium
    Posts
    10,731
    Country
    This is Maniac's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 20, 2013
    Local Time
    16:31
    I haven't got a clue what you're talking about. If I have to deal with an unrounded number of credits for one mineral, I just take a calculator and divide the hurry cost by the amount of minerals left. Much easier.
    Contraria sunt Complementa. -- Niels Bohr
    Mods: SMAniaC (SMAC) & Planetfall (Civ4)

  5. #5
    Lazerus
    King Lazerus's Avatar
    Join Date
    09 Jul 2002
    Location
    Empires were built by dictators, not democracies.
    Posts
    2,870
    Country
    This is Lazerus's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 20, 2013
    Local Time
    15:31
    24minerals left to build , 48 ec cost ... my base is producing 12 minerals that leaves 12 so if i spend 24 then i'll get it done next turn !

    .........

    WTF !?!?!?!? 2 turns left to build
    "Cannot make more then one hurry payment per turn"

    ****ing mofo gimme my 24ec back !!!



    Learn to overcome the crass demands of flesh and bone, for they warp the matrix through which we perceive the world. Extend your awareness outward, beyond the self of body, to embrace the self of group and the self of humanity. The goals of the group and the greater race are transcendant, and to embrace them is to acheive enlightenment.

  6. #6
    Santiago_Claus
    Warlord
    Join Date
    16 Mar 2004
    Posts
    184
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 20, 2013
    Local Time
    14:31
    The purpose of the formula is to simplify the inputs as much as possible.

    You look at the base's production and plug that into one cell. You hit the "Hurry" button and put the number that comes up into another cell. The answers appear.

    In order for that to happen the spreadsheet must calculate backwards from the energy cost to how many minerals are being purchased, and for that you must use the quadratic formula.

    The end result is clean and elegant: put the cost and production in, get the 2 optimized costs out (exact and +10).

  7. #7
    Sikander
    King Sikander's Avatar
    Join Date
    19 Jan 2000
    Location
    Boulder, Colorado, United Snakes of America
    Posts
    1,417
    Country
    This is Sikander's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 20, 2013
    Local Time
    07:31
    I simply do the whole thing in my head. Even when I'm completely exhausted I don't make a mistake. Base production minus ten divided by two, which is subtracted from the hurry cost. Pay the man. For SPs divide by four and don't subtract the ten from base production.
    He's got the Midas touch.
    But he touched it too much!
    Hey Goldmember, Hey Goldmember!

  8. #8
    Chaos Theory
    Emperor Chaos Theory's Avatar
    Join Date
    03 Oct 2002
    Location
    Missouri / Misery; CC
    Posts
    3,042
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 20, 2013
    Local Time
    13:31
    Sure, facilities and SPs are easy, but unit costs are more complicated and involve division with decimals. You can do the math in your head, but it takes a few seconds and getting it wrong by even 1 can cost a turn of production.

  9. #9
    anarchie
    Chieftain
    Join Date
    01 Jan 2004
    Posts
    44
    Country
    This is anarchie's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 20, 2013
    Local Time
    14:31
    C = M^2 / 20 + 2M
    U = C / M

    U = M/20 + 2

    M is available from the F4 screen. This is much easier than you make it out to be.

    EC = (M - P) * U

    EC = C - P*U

    EC10 = C - (P - 10)*U

  10. #10
    Jamski
    Deity Jamski's Avatar
    Join Date
    02 May 2002
    Location
    lol ED&D is officially full PvP LOL
    Posts
    13,229
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 20, 2013
    Local Time
    14:31
    You can do the math in your head, but it takes a few seconds and getting it wrong by even 1 can cost a turn of production.
    Which is why I do a rough estimate and then add one to make sure.

    Its not like the overpayment is wasted, you get the minerals towards the next item anyway

    -Jam
    1) The crappy metaspam is an affront to the true manner of the artform. - Dauphin
    That's like trying to overninja a ninja when you aren't a mammal. CAN'T BE DONE. - Kassi on doublecrossing Ljube-ljcvetko
    Check out the ALL NEW Galactic Overlord Website for v2.0 and the Napoleonic Overlord Website or even the Galactic Captians Website Thanks Geocities!
    Taht 'ventisular link be woo to clyck.

  11. #11
    Snowflake
    Princess Snowflake's Avatar
    Join Date
    18 Apr 2003
    Location
    falling, once again
    Posts
    8,823
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 20, 2013
    Local Time
    08:31
    I don't understand why all the hassle. When I do the hurry I always use the full hurry cost, less 2*(base production - 10), if the base production is greater than 10. Is that not right?

    For example, if the full hurry cost is 48 and my base production is 18, I put in 48-2*(18-10)=32.

    Why do you need a spreadsheet to do that?
    Be good, and if at first you don't succeed, perhaps failure will be back in fashion soon. -- teh Spamski

    Grapefruit Garden

  12. #12
    Enigma_Nova
    King Enigma_Nova's Avatar
    Join Date
    07 Nov 2003
    Posts
    2,988
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    00:31
    Go go gadget mathematics!

    It costs x ECs to rush y remaining minerals of a project.
    your base is producing z minerals.

    If you want to avoid wasting minerals but want the most complete rush possible, take
    (y - z + 10)*(x/y)
    So indeed you are incorrect.

  13. #13
    Skanky Burns
    Apolyton Sage No. 3 Skanky Burns's Avatar
    Join Date
    15 Aug 2001
    Location
    Skanky Father
    Posts
    16,558
    Country
    This is Skanky Burns's Country Flag
    Thanks
    4
    Thanked 4 Times in 1 Post
    Local Date
    May 21, 2013
    Local Time
    00:31
    Originally posted by Jamski
    Its not like the overpayment is wasted, you get the minerals towards the next item anyway

    -Jam
    It is if you calculate it to have exactly 10 minerals left over.
    I'm building a wagon! On some other part of the internets, obviously (but not that other site).

  14. #14
    Snowflake
    Princess Snowflake's Avatar
    Join Date
    18 Apr 2003
    Location
    falling, once again
    Posts
    8,823
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 20, 2013
    Local Time
    08:31
    Originally posted by Enigma_Nova
    Go go gadget mathematics!

    It costs x ECs to rush y remaining minerals of a project.
    your base is producing z minerals.

    If you want to avoid wasting minerals but want the most complete rush possible, take
    (y - z + 10)*(x/y)
    So indeed you are incorrect.
    (y - z + 10)*(x/y) = x - (z-10)*(x/y)

    The only difference then is I suppose x/y is not necessarily 2. I know that for SPs it is 4. But under normal circumstances wouldn't that formula apply to most cases?

    Let's see. My formula will make sure I get the production done by the next turn. However it may mean some waste if (x/y) is greater than 2. So that is what Jamski meant, since most of the times it is not much greater than 2 so the end result is that the waste is not bigger than a couple minerals most of the time, if any. And not having to open up a spreadsheet or try to look up what y is and do a calculation precise to the second decimal point, the savings of ones time and brain is certainly worth it.
    Be good, and if at first you don't succeed, perhaps failure will be back in fashion soon. -- teh Spamski

    Grapefruit Garden

  15. #15
    Net Warrior
    King
    Join Date
    28 Sep 2003
    Location
    Long Island, New York
    Posts
    1,594
    Country
    This is Net Warrior's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 20, 2013
    Local Time
    09:31
    HongHu,

    I use a variation on your formula to figure out the hurry cost with no minerals left over:

    48-2*18

    This formula has never failed me, but I never figured out how to adjust it for 10 minerals leftover.

    Sikander,
    Thanks for the heads up on the SP hurry formula. I was never able to figure that one out either.

    geesh, this is my 3rd edit

    4th edit : : HongHu, I've thought about it some more and now I agree with you. This is the last time I post from work without playtesting my ideas.
    Last edited by Net Warrior; May 17, 2004 at 15:56.

  16. #16
    Jamski
    Deity Jamski's Avatar
    Join Date
    02 May 2002
    Location
    lol ED&D is officially full PvP LOL
    Posts
    13,229
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 20, 2013
    Local Time
    14:31
    My point exactly HongHu

    I mean if I have 120 bases, and say 40 rushes each turn, I want it simple. With my method I can do the math instantaniously in my head (its just practice) and maybe waste 1 or 2 ecs in a turn. Rushing facs and SPs means there is never any waste.

    -Jam
    1) The crappy metaspam is an affront to the true manner of the artform. - Dauphin
    That's like trying to overninja a ninja when you aren't a mammal. CAN'T BE DONE. - Kassi on doublecrossing Ljube-ljcvetko
    Check out the ALL NEW Galactic Overlord Website for v2.0 and the Napoleonic Overlord Website or even the Galactic Captians Website Thanks Geocities!
    Taht 'ventisular link be woo to clyck.

  17. #17
    Snowflake
    Princess Snowflake's Avatar
    Join Date
    18 Apr 2003
    Location
    falling, once again
    Posts
    8,823
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 20, 2013
    Local Time
    08:31
    What you got there is that you won't have any mineral carry over NW.

    [edit] And this is my 3rd edit too.
    Last edited by Snowflake; May 17, 2004 at 15:19.
    Be good, and if at first you don't succeed, perhaps failure will be back in fashion soon. -- teh Spamski

    Grapefruit Garden

  18. #18
    Net Warrior
    King
    Join Date
    28 Sep 2003
    Location
    Long Island, New York
    Posts
    1,594
    Country
    This is Net Warrior's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 20, 2013
    Local Time
    09:31
    lol HungHu, I already edited my post

  19. #19
    Snowflake
    Princess Snowflake's Avatar
    Join Date
    18 Apr 2003
    Location
    falling, once again
    Posts
    8,823
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 20, 2013
    Local Time
    08:31
    Say you need 48 ecs to fully rush a production.

    If your base production is less than 10 you rush it for 48 ecs and carry the min over.

    If your base production is 10 you rush it for 48 ecs and carry the 10 min over.

    If your base production is 11 you rush it for 46ecs (=48-2*(11-10)) and use 1 mineral and carry the rest 10 min over.

    If your base production is 12 you rush it for 44 ecs (=48-2*(12-10)) and use 2 mineral and carry the rest 10 min over.

    If your base production is 13 you rush it for 42 ecs (=48-2*(13-10)) and use 3 mineral and carry the rest 10 min over.

    ...

    If your base production is 18 you rush it for 32 ecs (=48-2*(18-10)) and use 8 mineral and carry the rest 10 min over.
    Be good, and if at first you don't succeed, perhaps failure will be back in fashion soon. -- teh Spamski

    Grapefruit Garden

  20. #20
    Snowflake
    Princess Snowflake's Avatar
    Join Date
    18 Apr 2003
    Location
    falling, once again
    Posts
    8,823
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 20, 2013
    Local Time
    08:31
    Originally posted by Net Warrior
    lol HungHu, I already edited my post
    And I edited mine too.
    Be good, and if at first you don't succeed, perhaps failure will be back in fashion soon. -- teh Spamski

    Grapefruit Garden

  21. #21
    Santiago_Claus
    Warlord
    Join Date
    16 Mar 2004
    Posts
    184
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 20, 2013
    Local Time
    14:31
    I don't like counting mineral rows. You'd have to be a fighter pilot to enjoy distinguishing between bright blue, blue, and dull blue blocks on a dark blue background.

    It is much easier on my eyes for me to take the ec figure from clicking "Hurry" as one of my inputs (and the equally easy-to-read "net mineral income" number on the right of the city resource display as my other.)

    Buildings and SP's are, as someone else noted, "trivial", but units are ugly; I'd sooner extract a tooth than a root every time I want to rush a unit, so I let the spreadsheet do it for me.

    However, I'm always open to new ideas, so ... here's the challenge:

    Devise an approximating formula for optimized unit payments simple enough to do in one's head which takes ONLY hurry cost and production as inputs. The formula must be fail-safe: it must never under-pay!

    HongHu gets the ball rolling, taking advantage of the fact that unit cost will never be less than two:

    Approximation = Cost - 2 * Production

    Using a test case 30-production base, 50-cost unit, 10 minerals pre-paid, we want to buy 10 more minerals to finish the unit early. (C - 2P) buys 25, which causes a waste of 5 units (20 ec).

    I'll amend HH's formula with a "look-up table": 60, 160, 300 ec use production coefficients 3, 4, and 5. That is, at 60 ec the unit cost reaches 3, so you may safely discount 3 * P. You can remember the 60, 160, 300 breakpoints by remembering the pattern (3, 4, 5), (2, 4, 6):

    3 * 2 * 10 = 60,
    4 * 4 * 10 = 160,
    5 * 6 * 10 = 300.

    Or you could just buy me a better pair of glasses ...
    Last edited by Santiago_Claus; May 17, 2004 at 20:13.

  22. #22
    Enigma_Nova
    King Enigma_Nova's Avatar
    Join Date
    07 Nov 2003
    Posts
    2,988
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    00:31
    F4 - production
    You see the minerals made / total
    Total - made = minerals left.

    count them ECs and mins ya lazy bastards!

  23. #23
    Snowflake
    Princess Snowflake's Avatar
    Join Date
    18 Apr 2003
    Location
    falling, once again
    Posts
    8,823
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 20, 2013
    Local Time
    08:31
    There is no way I will look up production using F4 40 times per turn. Lazy or not is discussable but I could always find better ways to utilize my time.
    Be good, and if at first you don't succeed, perhaps failure will be back in fashion soon. -- teh Spamski

    Grapefruit Garden

  24. #24
    Enigma_Nova
    King Enigma_Nova's Avatar
    Join Date
    07 Nov 2003
    Posts
    2,988
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    00:31
    You mean you play your turns imperfectly?

    You don't have time to count your mins, you don't have time to play your turns...
    Why the hell are you still at Apolyton? Do you have a point to prove?

    If so, I'll eagerly spend 72 hours waiting for you to prove it.

  25. #25
    anarchie
    Chieftain
    Join Date
    01 Jan 2004
    Posts
    44
    Country
    This is anarchie's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 20, 2013
    Local Time
    14:31
    If you start by managing all your rush-buying from the F4 screen, it's not anything of a bother to note the remaining minerals before opening a base, and that's only to check the base's production.

  26. #26
    Snowflake
    Princess Snowflake's Avatar
    Join Date
    18 Apr 2003
    Location
    falling, once again
    Posts
    8,823
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 20, 2013
    Local Time
    08:31
    Hmmm do I have to prove a point to be at Poly?

    /me reads the member agreement.

    Nope.

    Best wishes with your 72 hours.
    Be good, and if at first you don't succeed, perhaps failure will be back in fashion soon. -- teh Spamski

    Grapefruit Garden

  27. #27
    GeoModder
    Deity GeoModder's Avatar
    Join Date
    18 Jan 2004
    Location
    amongst equals.
    Posts
    12,956
    Country
    This is GeoModder's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 20, 2013
    Local Time
    16:31
    Hear hear...
    He who knows others is wise.
    He who knows himself is enlightened.
    -- Lao Tsu

    SMAC(X) Marsscenario

  28. #28
    Minute Mirage
    Prince
    Join Date
    17 Aug 2003
    Location
    Helsinki
    Posts
    898
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 20, 2013
    Local Time
    17:31
    Is there a problem with just using Nethog's table? I have it printed beside me when I play and it takes me only a few seconds to look up the cost of rush building.

  29. #29
    Jamski
    Deity Jamski's Avatar
    Join Date
    02 May 2002
    Location
    lol ED&D is officially full PvP LOL
    Posts
    13,229
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 20, 2013
    Local Time
    14:31
    Why don't you have it memorised

    -Jam
    1) The crappy metaspam is an affront to the true manner of the artform. - Dauphin
    That's like trying to overninja a ninja when you aren't a mammal. CAN'T BE DONE. - Kassi on doublecrossing Ljube-ljcvetko
    Check out the ALL NEW Galactic Overlord Website for v2.0 and the Napoleonic Overlord Website or even the Galactic Captians Website Thanks Geocities!
    Taht 'ventisular link be woo to clyck.

  30. #30
    Enigma_Nova
    King Enigma_Nova's Avatar
    Join Date
    07 Nov 2003
    Posts
    2,988
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    00:31
    Makes me wonder why you can't count the ECs manually, but using a table is an okay idea.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Replies: 5
    Last Post: November 26, 2012, 16:34
  2. What's the formula for HURRY cost?
    By Frankie in forum AC-General/Help/Strategy-Archive
    Replies: 81
    Last Post: April 25, 2004, 19:11
  3. Max Unit cost 18?
    By Palaiologos in forum Scenario League / Civ2-Creation -Archive
    Replies: 7
    Last Post: July 27, 2003, 06:51
  4. Repost of Hurry cost summarization
    By Fitz in forum AC-General/Help/Strategy-Archive
    Replies: 12
    Last Post: October 7, 2000, 04:45
  5. Max unit COST
    By Dragoon in forum Scenario League / Civ2-Creation -Archive
    Replies: 11
    Last Post: July 14, 1999, 05:44

Visitors found this page by searching for:

Nobody landed on this page from a search engine, yet!

Bookmarks

Posting Permissions