Announcement

Collapse
No announcement yet.

Unit Hurry Cost Revisited!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    Nice work.
    I'm building a wagon! On some other part of the internets, obviously (but not that other site).

    Comment


    • #3
      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.

      Comment


      • #4
        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)

        Comment


        • #5
          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.

          Comment


          • #6
            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).

            Comment


            • #7
              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!

              Comment


              • #8
                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.
                "Cutlery confused Stalin"
                -BBC news

                Comment


                • #9
                  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

                  Comment


                  • #10
                    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.

                    Comment


                    • #11
                      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

                      Comment


                      • #12
                        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.

                        Comment


                        • #13
                          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).

                          Comment


                          • #14
                            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

                            Comment


                            • #15
                              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, 15:56.

                              Comment

                              Working...
                              X