Announcement

Collapse
No announcement yet.

Trade Roads – Determination of the Bonus Road and Railroad Connection

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

  • Trade Roads – Determination of the Bonus Road and Railroad Connection

    It is well known that a qualified trade road adds to the trade bonuses, both to the permanent trade bonuses (source to destination trade road) and to the delivery bonus (destination to source city). The source to destination trade roads are the most valuable especially when connecting a SSC.
    It is also well known that a (bonus) trade route connection can be determined by sending a unit that disregards terrain (one move unit or explorer) with the go to order to the destination city and back. The best way usually is to send a settler building the road on the way. This does not work if there are already other road connections on the way. The unit takes the fastest way, the trade road does not. It would also be helpful to know in advance if the trade road has to be build on easy or on difficult terrain or if it crosses a river field that needs bridge building. An explorer not only needs resources to build but also needs seafaring. To determine a trade road from an AI city to your source city you also have to know at which field the trade road leaves the AI city.
    Searching for advice I found only a few known facts like a direct diagonal path between two cities giving a qualified trade route. Therefore I did a little research to find out how these traderoutes could be known. This is what I found:

    I. General Rule

    The following rules always describe the trade road from the source city to the destination city, which gives the additional permanent trade route bonus. To determine the way back which triggers the delivery bonus, just exchange source city and destination city and repeat the rules.

    1. Shortest Way

    The trade route is always on the shortest way (measured in steps without regard of terrain). If there is only one shortest way (e.g. two cities on opposite sides of a bay) this is the trade route.


    2. Direct Paths (step 2)

    If there is a

    - direct diagonal path
    - direct straight (nondiagonal) path from South West to North East

    from the source city to the destination city this is the trade route.

    3. One crossroad (step 3)

    If step one and step two do not give a trade route a crossroad point is needed. It is helpful to remind that trade roads in these cases usually go clockwise around a fictitious center point between the two cities. This is not a general rule, though, as there are exceptions.

    The possible (destination city) Crossroad Points are on a diagonal path leading out of the destination city. This destination diagonal is determined by the diagonal field adjacent to the destination city that is next (measured in steps) to the source city.

    If there are two possible diagonals it is – seen from the destination city – the one determined by the first crossroad point on the righthand side. Exception: if a direct path from South West to North East from the Source city or from the source city diagonal to the other possible crossrad points (on the „left“ diagonal) is possible it is the left point that determines the destination diagonal.

    The crossroad points are only at uneven numbers on the diagonal seen from the destination city (1,3,5,...)

    The source city diagonal leaves the source city on the diagonal field that is next to the destination city. If there are two possibilities it is – seen from the source city – the one on the left side.

    3.1 regular connection (no SouthWest to North East path possible)

    3.1.1 If there is a direct straight (non diagonal) path from the source city to one of the destination city crossroad points and this crossrad point is left of the source city diagonal (seen from the source city) the trade route is determined by connecting the source city with this crossroad point and the destination city.
    3.1.2 If there is a source city diagonal that leads to the first diagonal crossroad point of the destination city this determines the trade route
    3.1.3 if 3.1.1 and 3.1.2 don´t give a trade route a possible secondary crossroad point has to be checked: it is the nondiagonal field adjacent to the destination city, that is next to the source city. If there is a source city diagonal that leads to a non diagonal field adjacent to the destination city and the destination city is right of the diagonal (seen from the source city) a one crossroad trade route connection can be established.

    3.2 Irregular path (Southwest to Northwest connection possible)

    3.2.1 If there is a direct straight path from the source city to one of the destination city crossroad points (on a „left“ diagonal) the trade route is determined by connecting the source city with this crossroad point and the destination city.
    3.2.2 3.1.2 does not apply if any (even a two crossroad) South West/North East connection is available.
    3.2.3 3.1.3 does not apply if any (even a two crossroad) South West/North East connection is available.

    4. Two Crossroads (step 4)

    If neither step 1 nor step 2 nor step 3 leads to a traderoute a second crossroad point has to be determined. This second crossroad point is on the source city diagonal.

    It is determined by the shortest way (measured in steps on the source city diagonal) from the source city to a direct nondiagonal path that leads to a crossroad point of the destination city.


    II. Obstacles

    If the trade route according to the general rule is permanently not available (e.g. there are ocean fields on the way) there are the following rules:

    1. Determination Point or crossroad point not available

    If a determination or a crossroad point is not available (e.g. the one determining the destination city diagonal) it does not affect the General Rule. In a first step the trade road is calculated as if it was available.

    2. Obstacles on the trade route

    If there is an obstacle the trade route is regular until it reaches the obstacle. From there the next step goes
    - to the field (measured in steps) next to the destination city
    or if there is still a choice
    - to the field that is next measured in trading distance
    or if there is still a choice
    - to the field on the left seen in direction to the destination city, unless there is a field to Northeast available. If a direct Southwest to Northeast route is blocked the righthand field is chosen.

    From this point a new trade route to the destination city is determined according to the General Rule.

    If there is - again - an obstacle on the (newly determined) trade route this set of rules is repeated.

    I am not completely happy with this set of rules. I always thought that there should be an easier way to describe the trade route paths. But it seems that the creators of civ tried to cover the rules like in many other cases concerning trade. I can´t see a reason why something like a Northeast preference should be programmed.

    However, they seem to work in the cases I found so far. It helps to keep the preferences in mind:
    - shortest way
    - Southwest to Northeast preference
    - the trade routes usually go clockwise around a (fictitious) center point between the two cities.

    I´ll try to add some examples in my next post.

    Any comments are welcome.

    Zenon

  • #2
    Wasn't there a diagram posted awhile back that showed all possible "non obstructed" paths?
    It's almost as if all his overconfident, absolutist assertions were spoonfed to him by a trusted website or subreddit. Sheeple
    RIP Tony Bogey & Baron O

    Comment


    • #3
      Zenon, I did a similar tests during my ELG #2 two weeks ago, but I wanted to express my results later. You forced me to post them now.

      I will post a detailed post tomorrow, but a quick question now. Do points 2. - 4. correspond to Civ 2.42 Pathways Version 1.0 picture (see 'Caravans' section in GL index #2)?
      I tested the picture also with MGE and it works perfectly.

      Edit: I think rah means the same picture. But the picture don't solve obstructions (=water).
      Civ2 "Great Library Index": direct download, Apolyton attachment

      Comment


      • #4
        YES, that was posted by markus f....the diagram anyways...awhile back....but its not always correct either
        Boston Red Sox are 2004 World Series Champions!

        Comment


        • #5
          ST, I have done a comparison with this diagram and haven´t found any differences so far. If I had known this thread I certainly could have saved some time on my research. On the other hand it was fun to solve this puzzle.
          The diagram is better than any examples I could give. So I try to attach Quantum Satis work in this thread, too.

          Zenon
          Attached Files

          Comment


          • #6
            I have that diagram.........it's very useful and mostly correct.

            Comment


            • #7
              War, DrSpike, can you post examples in which the diagram is not correct?
              Civ2 "Great Library Index": direct download, Apolyton attachment

              Comment


              • #8
                General algorithm (bug-free situations)

                So I post my version of the goto algorothm. I'm not sure about everything, since only quick tests were done.

                I will use the word Path in place of trade route, because Paths are important not only for caravan deliveries, but also for blocking barbs for example (see my post in partisan barbarians won't attack your partisans ).

                First of all, I want to add rule 0. It looks it is self-evident but it is good to express it:

                There is always just one Path from point A to point B.
                If Path goes from A through B to C, then Path from B to C is the corresponding sub-Path. In other words, in order to understand the complete Paths between any pair of points A and B on a given map you need to know only the 'direction' from A to B (for any pair of points A and B), i.e. only one step from square A to B. Then if you want to know the whole Path between A and B you can construct it step by step.


                Now we can suppose we have a general situation - point A is the starting point and B is the destination, and there may be obstructions on the map. Point A has 8 neighbours and the question is: which one represents the direction to B?

                Step 1
                Say the distance (the 'movement' distance - i.e. number of steps of a Warrior) from A to B is Dist. Candidates for the directon are all neighbours with distance to B equal to Dist-1. If there is only one such a neighbour then this one represents the direction.

                (This is equal to Zenon's point '1. Shortest Way'. But I claim this is valid also for a map with obstacles (see paragraph 'Obstacles' at end of this post: I tested Ocean only). So I disagree with Zenon's sentence:
                2. Obstacles on the trade route: If there is an obstacle the trade route is regular until it reaches the obstacle. )

                Step 2
                Otherwise (i.e. if there is more than 1 shortest direction) the direction is chosen in accordance with the Civ2 Pathways diagram.
                If this square is obstructed a 'secondary' direction is chosen. 'Secondary directions' are defined firmly for each square - you can imagine there is a diagram of 'Civ2 Secondary directions' - analogous to the Civ2 Pathways diagram.
                If secondary direction is obstructed then a tertiary direction is chosen (again you can imagine there is a diagram of 'Civ2 Tertiary directions') and so on.

                (This step was not tested thorougly.
                I didn't have time to be able to compare Step 2 with Zenon's paragraph 2.Obstacles on the trade route and to test differences)


                Obstructions:
                A square with an obstruction can be Ocean or enemy unit or enemy ZOC (any other?). I tested Ocean only: Civ2 counts with Ocean in advance, i.e. Civ2 chooses a shortest way with respect to Ocean squares. I have a feeling that enemy units are taken in advance also, but enemy ZOCs are ignored until they are reached by the unit. Can you confirm if this is true?
                A note: I suppose enemy units don't destroy a Path (and a trade route with bonus) completely but they only redirect it. Is this true? It could be exploited: to block an AI unit on a specific square...
                Civ2 "Great Library Index": direct download, Apolyton attachment

                Comment


                • #9
                  Bugs

                  The Paths don't always correspond to the algorithm in my last post. There are some bugs in the behavior of Civ2:

                  1. Civ2 remembers previous maps. If you reload a different map the Civ2 still 'thinks' about an old one:
                  Load the nolake.sav, GoTo Rome (5 steps are enough). Then load lake.sav and GoTo Rome again: The Warior will move as would be moving on a map without the lake.
                  Now quit Civ2 completely, run Civ2.exe again, GoTo with lake.sav first then GoTo with nolake.sav.

                  2. Civ2 remembers previous movements and adapt present movement to them.
                  (I wasn't able to repeat the test. I need more time or I was wrong.)

                  Warning: Also trade route are affected temporarily by these bugs.
                  Attached Files
                  Civ2 "Great Library Index": direct download, Apolyton attachment

                  Comment


                  • #10
                    I have noticed that the presence of rivers can alter routes from the more direct paths that might normally be followed. For example, the route can move diagonally to a river, follow it a way, and then move on a diagonal back towards the other city.

                    From a practical viewpoint, the idea of using "station" cities, located just outside cities for which establishing the route bonuses are important, ends up being more useful in actual games. Besides simplifying and speeding up the setup of the route bonuses, station cities located close to the Source can serve multiple Destinations, too.

                    Comment


                    • #11
                      Solo,
                      "station" cities are good, but it would be very useful to know the exact GoTo algorithm so that you needn't to waste warriors that trace routes in early stages of the game.
                      Don't you have an example of a river rerouting a route?

                      Zenon,
                      I start to think that your article 'II. Obstacles' is affected by Bug nr. 1, wasnt'it?
                      Civ2 "Great Library Index": direct download, Apolyton attachment

                      Comment


                      • #12
                        ST,

                        Okay, here is an example. Most of the Atlanta to Rome route is along the river. Here the river is parallel to the normal path, so is not hard to figure, but when a river meanders, it can get more complicated. You may have to research many possibilities involving rivers for the complete answer to the routing algorithm.
                        Attached Files

                        Comment


                        • #13
                          It will be difficult to make the right road a science for every situation.........from a practical gameplay point of view you just use the diagram or warriors and learn how to use stations when it is practical.

                          Probably part of the problem is due to the bugs you discussed..........perhaps the diagram is correct for non-obstructed paths without bugs.

                          The path with obstructions is pretty much anyone's guess; creating rules for these cases would be tricky, (though there are some tentative ones in old threads IIRC) so that's where warriors come in.

                          Comment


                          • #14
                            Why use warrriors, just use the goto command on the settlers building the roads. They move a square then clear the goto command.
                            It's almost as if all his overconfident, absolutist assertions were spoonfed to him by a trusted website or subreddit. Sheeple
                            RIP Tony Bogey & Baron O

                            Comment


                            • #15
                              Sure do that too. If I have a few turns spare with a policing warrior I use them..........'s funny really, who would have thought the buggy goto command would be useful?

                              Comment

                              Working...
                              X