No announcement yet.

How Supply and Demand Lists Are Determined

  • Filter
  • Time
  • Show
Clear All
new posts

  • #46

    (It also looks to me that demands are a bit different in other respects, too, between the two versions of the game, but first I have a problem you might want to look at)

    I tried the formulae on my first city, Rome, but seem to be having a problem with the formula for silk.

    Here are Rome’s stats:

    Location: (75,51)
    Standard map size makes Rome fall in the western hemisphere and below the equator
    Wildcards: (beads,salt)
    Continent #: 13
    Tech level: 17 until 1050 BC, then 18 (Pottery included)
    City size: 2200BC – size 2, 1000BC – size 3


    Ocean: 9 regular + 1 whale = 13 total
    Forest: 1 regular + 1 silk + 1 pheasant = 9 total
    Plains: 1 regular + 1 buffalo = 5 total
    Grass: 6

    (No rivers and no other terrain types for Rome)

    Supply lists:

    2200 hides,beads,silk
    1000 beads,hides,silk

    Top 5 commodity values using supply formulae:

    Hides: 144 until 1000BC, then 72
    Beads: 93
    Dye: 50
    Salt: 37 until 1000BC, then 36
    Silk: 19

    (Other commodities are all 12 or lower. Spice is actually -11!)

    From the formulae, one would expect:

    2200 hides,beads,dye
    1000 beads,hides,dye

    Now if Rome were in the Eastern Hemisphere, then silk would gain 50 points and be equal to 69, putting it in 3rd place. Since Rome is from an MGE game, I used the map editor to set up an identical city, which I used with a 2.42 game, but still got the same starting commodities in the same order, so I do not think the problem with silk is due to different game versions. My guess is that silk gets the bonus for longitude in both hemispheres, or that you meant western for silk, or that my understanding of hemispheres is backwards.

    Edited a little later... It must be a hemisphere thing, since I just set up a similar city in the eastern hemisphere, which is supplying hides,beads and dye.
    Last edited by solo; November 19, 2002, 21:21.


    • #47

      You've got the hemispheres backwards. Start a game on the standard World map and reveal it. 75,51 is in the middle of the Indian Ocean, clearly the Eastern Hemisphere where Silk gets the bonus for LongitudeEast. The Americas are Western Hemisphere. The confusion comes from the fact that the Dateline on Civ maps is meridian 0 unlike our world. The "mean meridian" is Mapwidth/2 or 50 in your game. It runs through England. Anything with a horizontal coordinate >50 is Eastern Hemisphere, less than 50 is Western.

      Also, remember you have to calculate both the SQ and the DQ for each commodity to determine the Supply list. If a commodity's Demand is greater than its Supply then the SQ is 0 and vice versa. I know there's still a few undetermined demand formulas, so you can't do those. Dye and Copper DQs may never be known.


      • #48
        Thanks for that clarification.

        I was also forgetting that some SQ's may be lower than corresponding DQ's. Thanks for that reminder.

        However, it is Civ II that has its hemispheres backwards, because if my understanding of hemispheres were backwards, I would have to be living somewhere in Kyrgyzstan to be where I am right now!

        My opinion of CivII's design only goes down one notch. The game still got the top and bottom of the world in the right places!


        • #49
          Yeah, I agree the coordinate system in civ2 has problems. But using the World does help orient the geographic terms. Keep me posted on your test results. There are bound to be problems with some of the formulas and there may be other factors we haven't found yet. Spice certainly shows some strange behavior, not in the buggy Copper/Dye way either.


          • #50
            Update: A formula that approximates the demand for Cloth had been added.


            • #51
              Yes, when dealing with the Earth, the term zero meridian has a precise meaning. For latitudes, the zero meridian is the Equator where all latitudes are zero, and for longitudes the zero meridian, which passes very near Greenwich, England, is where east and west longitudes are zero. The zero (aka Prime) meridian marks the boundary between the Eastern and Western Hemispheres. The "dateline" is on the opposite side of the Earth from the zero meridian, and is where east and west longtitudes reach their maximum values of 180 degrees.

              The zero coordinates of CivII system used to represent latitudes and longtiudes do not align with the zero meridians defined above. Instead, it is the midpoints of these systems that meet at the point where the Equator intersects the Prime Meridian (the (0,0) location of longtiudes and latitudes).

              For latitudes, CivII puts the zero coordinate at the North Pole and the maximum coordinate at the South Pole. In any map (random or world) being used for a game of CivII, there is no mistaking where these locations are. For example, the CivII zero coordinate and the North Pole are always at the top of the map.

              For longitudes, CivII puts its zero coordinate at the dateline, but a typical game of CivII uses a randomnly generated map, where the locations of Eastern and Western Hemispheres are not at all obvious. Unless a special observation is made from Civ's world map, it would be quite natural and logical to assume that the zero coordinate is aligned with the zero meridian.

              This assumption is made by us civers. We have loosely (and incorrectly) use the geographical term, zero meridian, when referring to the boundary between zero and the maximum coordinates that CivII employs to represent differences in longtitude. It would be more accurate for us to call this boundary the dateline.

              So CivII's system is different, and the game benefits because civ's coordinate system is easier for the game's programmers to work with and because the minor problems the game does have with the zero/maximum coordinate boundary are minimized by aligning it in the middle of oceans, which on Civ's world map conveniently coincides with Earth's dateline through the Pacific.

              I apologize for such a long story, but accurate calculations depend on precise terminology, and I think the distinction between "zero meridian" and "zero coordinate" should be made clearer when dealing with matters of longitude such as Eastern and Western Hemispheres.

              Okay, I'm almost back to normal now, and will get on with the tests.


              • #52

                Thanks for the lengthy explanation, I didn't mean to slight your knowledge of geography with my remarks about hemispheres. I understand the differences between the civ map system and the real world and the difficulty of choosing the the correct terms for a civmap.

                Despite the uniqueness of the World map from randomly generated maps, I still think it is an appropriate reference point for this discussion. The historical trade patterns of the commodities are most closely associated with that map. However, the important thing here is that we have a common understanding of how the formulas work.

                If you have suggestions for renaming the geographic terms I've used, please let me know. I want the formulas to be clear and usable. Of course, they could all be done with simple arithmetic based on the city's coordinates and the map dimensions. But I thought defining them as geographic constructs would he helpful.


                • #53
                  No feeling of being slighted at all. Most of the formulas are perfectly clear and well presented. I just saw a possible source of confusion coming from "hemisphere" ones that I thought needed some clarification.

                  What bothered me personally, is that a move towards the East away from civ's zero coordinate means a step into the world's West Hemisphere, and vice versa, a step to the West puts you into the Eastern Hemisphere.

                  Things are more consistent at the Prime Meridian, where heading East from it actually puts you there!


                  • #54

                    A few questions:

                    1) Have your tests included observations of AI cities? In my observations so far in SP games, the extra demand for dye and copper is tied to them, with copper increasing in popularity as populations increase. For dye, the first cycle may just arbitrarily set the AI demand at a high level, which may become known with some more tests.

                    2) When testing commodity formulas for Veii, I'm finding that the demand for silver is putting it into the Demand roster, but the game is listing silver as supplied by Veii, twice in a row so far, when silver's DQ exceeds its SQ. Is that special note for silver accurate, when saying that cities always demand it at size x 8? Veii is (80,54) with wildcards (salt,copper), no bank, no cathedral, plus:

                    grass =5
                    forest = 4 + pheasant = 8
                    swamp = spice = 4
                    jungle = 2
                    mountain = 2
                    ocean = 6

                    Romans have knowledge of iron working & Pottery but lack knowledge of chemistry. Continent # is 13. Lists on first two cycle turns are:

                    silk,salt,silver dye,copper,beads size 3, 17 techs
                    (silk),salt,silver dye,copper,spice size 4, 18 techs

                    After fooling with terrain some in trying to alter commodity lists, I am wishing that there was a neutral terrain type having no effect on any commodities!


                    • #55

                      #2) Your testing found 2 problems with the Silver supply formula. First, the Continent# modifier is ">8" not "9 or 10". I originally tested only 10 contintents, so there may by other continental anomalies.

                      The second problem is with "Longitude West". Coming after Silk, I thought this was a parallel to "Longitude East". But with silver you get the bonus in both hemispheres. This should read "DistanceToMeanMeridian" or something like that. It means the absolute difference between the city's horizontal coordinate and MapWidth/2. Also, this is only added to Silver Supply formula IF the terrain formula is NON-ZERO. If Mountains*8 + Hills is zero, then there is no silver supply.

                      As for the Silver demand formula, the remainder of the sum of the coordinates divided by 3 determines whether the modifiers of the demand formula apply to Gold, Gems or Silver. If the remainder is 1, gems; if 2, gold. For Gold and Gems, demand is always 0 if the remainder does not indicate them. But all cities demand Silver at Size * 8, and those with a remainder of 0 also apply the modifiers to silver. This seems to a bug, in my opinion. It seems the intend was that a city demands Silver or Gems or Gold exclusively. If it is a bug, then it may have been fixed in MGE.

                      #1) No, I haven't tested AI cities extensively. But when I looked at the save you posted for Uranium, I found almost all of the Human civ cities demanding Copper as well. I'm back to thinking there is a serious Dye/Copper bug. I think I'm going to investigate them more under 2.4.2 with Reveal Map on. This appears to eliminate the "infinite demand" problem. I'll see if it's possible to derive formulas for these 2 demands under Cheat mode conditions.

                      Spice Demand is other mystery. Any cities you see demanding Spice, please take notes and observations. If you have any idea what the demand is based on, let me know.


                      • #56
                        Checking briefly through some saves, i noticed all spice demanding cities were adjacent to ocean squares (one was next to a one tile lake). All were on grassland, with just a couple forest squares in the city radius (all other squares grassland or ocean).


                        • #57
                          Thanks, DrFell, but I've already tried to correlate Spice demand with known factors like terrain. It seems to be dependent on something we haven't thought of yet. Either some entirely different property of the game, or a combination of known factors in an unknown manner.


                          • #58
                            Thanks, samson, now silver supply is high enough to put it on the supply roster both times.

                            I have noticed an interesting coincidence in my game about demand for spice. 4 out of the 5 cities now demanding it are on continent #13, two of those cities being Rome and Veii, the other two being Bangalore and Delhi. Spice joined the demand lists in all four cities after they reached size 4, although in Rome, spice appeared for awhile at size 2. Babylon, the other city with spice, did not get it until after reaching size 4, too.
                            Except for Babylon, the cities are all seaports. Babylon does sit on a river tile, giving it proximity to the water, too. This tallies with Dr. Fell's observation that the central tile is on or near water. I am getting grass for many of these center tiles, too, but also plains for another.

                            I checked again, even Babylon is on continent #13. None of the cities on other continents are wanting it now. Looks like a trend!
                            Last edited by solo; November 21, 2002, 13:51.


                            • #59
                              Interestingly enough, the one Babylonian city demanding spice in another game sits on a river (not adjacent to ocean). The city is on continent 2, the largest continent on the map by far. The spice demand in the other game seems to be equally distributed between continents 3 and 6, but they are the only large continents on the map.
                              Last edited by DrFell; November 21, 2002, 15:26.


                              • #60
                                #13 is my largest continent, too.