Announcement

Collapse
No announcement yet.

Carvan Delivery Payoff formula

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

  • #46
    Yes, I found the distance formula to be thoroughly unintuitive too. But if I can explain it to you properly, it's really pretty simple.

    First, it may help to imagine the game map rotated 45 degrees so that it looks like a checkerboard instead of a collection of diamonds.

    In that orientation, if you move horizontally or vertically, you're moving from one square to a square that shares an edge with it. That move is a distance of 1. (Thus, in your Xexample, the distance is 8. Your example is the rare simple case where straight-line movement gets you there without any diagonal adjustment.) If you move diagonally, to a square that shares only a corner, the distance is 1.5, rounded down. Thus, in the actual orientation of the game map, the diagonal edge-to-edge move is 1, and the horizontal or vertical corner-to-corner move is 1.5. If I'm counting along that line, I just count "1,3,4,6,7,9,10,12....)

    There is a second way to calculate the distance, mathematically equivalent, but more intuitive or less intuitive according to individual mindset. Measure the lengths of the sides of the right triangle formed by moving from one space to the other space via edge-to-edge squares. Add the length of the longer side plus one half the length of the shorter side: L + S/2. (In your example, of course, it's a straight line; the longer "side" L = 8.)

    I have not tried to determine a formula for calculating distance just based on Civ2's thoroughly unintuitive tile-numbering system, although I suspect it wouldn't be too hard. I just count it out manually in view mode.

    Does this help?

    Comment


    • #47
      Oh, and I think I wasn't clear: I was asking whether you've done any work on a formula for the ongoing trade route bonus. I find that your delivery bonus formula is already good, though usually inexact (usually a bit too high). Whatever factors need to be altered there, they're nothing major.

      Comment


      • #48
        william
        debeest's explanation is perfectly correct.
        Perhaps I can try to explain it my way (the result is exactly the same and I have tested it many times):
        You can always join 2 cities by travelling NW then NE (or NE then NW). Combining those 2 routes always give you a rectangle.
        Each square (or tile or rhomboid) along the longer side of the rectangle has a value of 1. Along the shorter side this value is reduced to 0.5 (and you don't forget to round down the result if needed).
        Example:
        I join my cities by travelling 8 squares NW + 5 squares NE.
        The distance is 8 + 5*0.5 = 12.5, rounded down to 12.

        AFAIK all distances in civ2 are measured that way.
        Aux bords mystérieux du monde occidental

        Comment


        • #49
          Originally posted by William Keenan
          Roundown ((BTA of SC + BTA of DC + 1) * (D +10) * FD / 48.5)

          BTA = Base Trade Arrows
          SC = Source City
          DC = Destination City
          D = Distance
          FD = Foreign Delivery
          I suggest some changes for the formula:

          Roundown ((BTA of SC + BTA of DC) * (D +10) * FD / 48)


          It works with basic conditions (no foreign delivery, undemanded commodity, no halving factor, no multiplier) perfectly. I attach my test world and the spreadsheet that shows results of testing.

          Should be verified with various multipliers: is the rounddown function placed correctly?
          Attached Files
          Last edited by SlowThinker; October 21, 2001, 15:52.
          Civ2 "Great Library Index": direct download, Apolyton attachment

          Comment


          • #50
            Originally posted by William Keenan
            Continental Multiplier
            X1 source and destination cities are on the same continent
            X2 source and destination cities are on different continents

            Airport Multiplier
            X1 neither city has an Airport
            X1 one city has an Airport
            X1.5 cities are on the same continent and both have Airports
            X2 cities are on the different continents and both have Airports
            Do both multipliers work together or not? In other words, is there a x4 bonus if the cities with Airports are on different continents?
            Last edited by SlowThinker; October 21, 2001, 15:08.
            Civ2 "Great Library Index": direct download, Apolyton attachment

            Comment


            • #51
              I found out that my suggested formula is very similar to the Scrolls one:
              Originally posted by Scrolls of Ancient Wisdom
              Payment = ( ( distance + 10 ) x ( trade of both cities ) ) / 24
              I suppose there is 24 in place of 48 because of halving factor included.
              Civ2 "Great Library Index": direct download, Apolyton attachment

              Comment


              • #52
                Do both multipliers work together or not? In other words, is there a x4 bonus if the cities with Airports are on different continents?
                yep.


                The formula is constructed to minimize the number of fractional numbers created, thus eliminate rounding errors.

                Comment


                • #53
                  Like i said, trade routes are 2x is big if the 2 cities are on the same landmass. Soon as you put one on a island its /24 not 48
                  Join the army, travel to foreign countries, meet exotic people -
                  and kill them!

                  Comment


                  • #54
                    Originally posted by William Keenan
                    The formula is constructed to minimize the number of fractional numbers created, thus eliminate rounding errors.
                    See the .xls file in the caravan payoff.zip attachment.
                    There are both formulas (your and mine) compared in the sheet: My formula has no rounding error, everything is accurate.

                    But I didn't test it with various multipliers: did you choose BTA+1 and 48.5
                    because of multipliers?
                    Civ2 "Great Library Index": direct download, Apolyton attachment

                    Comment


                    • #55
                      Originally posted by markusf
                      Like i said, trade routes are 2x is big if the 2 cities are on the same landmass. Soon as you put one on a island its /24 not 48
                      Markusf, if a foreign continent payoff is /24 rather than /48, doesn't that mean it's twice the value, not half the value? I've been checking William Keenan's formula with every freight I deliver, and using a 2x multiplier for foreign continent, and finding the formula to be in the general vicinity of accurate.

                      Have you had time to generate an example of a 60+ trade route yet?

                      Comment


                      • #56
                        Originally posted by William Keenan
                        Distance = (length of longer side of rectangle) + 0.5 * (length of shorter side of rectangle)
                        You should note that the distance is (always - AFAIK in all the civilization) rounded down.

                        Originally posted by William Keenan
                        Railroad Multiplier
                        X1 if Railroad has not been discovered
                        Flight Multiplier
                        X1 if Flight has not been discovered
                        better: source civilization has not discovered ...
                        Civ2 "Great Library Index": direct download, Apolyton attachment

                        Comment


                        • #57
                          Originally posted by debeest


                          Markusf, if a foreign continent payoff is /24 rather than /48, doesn't that mean it's twice the value, not half the value? I've been checking William Keenan's formula with every freight I deliver, and using a 2x multiplier for foreign continent, and finding the formula to be in the general vicinity of accurate.

                          Have you had time to generate an example of a 60+ trade route yet?
                          cash bonus to another continent is 2x normal and the ongoing route is X. If its on the same landmass cash bonus is x and the on going route is 2x.

                          I created a real simple save. one city pair has +47 trade, another has +55 trade to get more you would need 4 gold mines in each city and rivers. I think the max was +70 or something.
                          Attached Files
                          Last edited by markusf; October 22, 2001, 21:05.
                          Join the army, travel to foreign countries, meet exotic people -
                          and kill them!

                          Comment


                          • #58
                            Aaarrgh! I downloaded your file and saved it to disk, but my 2.42 tells me it isn't a saved game. You're probably using some other version of Civ, and 2.42 is all I've got. I don't suppose you can post a 2.42 version for me? If not, I'll just have to continue to wonder.

                            Comment


                            • #59
                              mines the march 26 patch from 1999 for MPG
                              Join the army, travel to foreign countries, meet exotic people -
                              and kill them!

                              Comment


                              • #60
                                Markusf, you are right.

                                Comment

                                Working...
                                X