Announcement

Collapse
No announcement yet.

How Supply and Demand Lists Are Determined

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

  • Using the patched version of Civ2 that fixes the Dye/Copper bug, I was finally able to determine the correct demand formulas for Dye and Copper. Here they are:


    Copper

    Demand = Rivers + Roads
    Techs: Electricity: 3/2 Computers: 1/4
    CitySize: 1-2: Demand = 0 3-4: 1/2 5-7: 1x 8-12: 2x 13-17: 3x
    18-22: 4x ... etc.
    City Improvements: Marketplace: x 3/2 Bank: x 3/2


    Dye

    Demand = SupplyQuotientOfCloth + Roads
    Techs: Chemistry: 1/2 Mass Production: 1/2



    The factor they have in common (and which no other commodities use) is a dependency on the number of squares within the city perimeter which have Roads (or Railroad) terrain improvements. This must be the source of the D/C bug.

    It's also interesting to note that the demand for Dye is directly dependent on the supply quotient of Cloth for that city. This is only relationship of its kind between commodities discovered so far.



    samson

    Comment


    • The Dye-Cloth relationship makes you want to smack your head "duhhh...". I was expecting it to have something to do with coastal tiles, as most purple dye in the Mediterranean region came from shellfish. Oh well.

      So why is copper demand influenced by rivers?

      Comment


      • It is what it is.
        Perhaps the thinking was that the demand for copper (a coin metal) increased more in areas where trade blossomed.

        Comment


        • By that reasoning, Silver and Gold should have even more powerful Trade influences.

          Now those of us who have adjusted to the bug need to decide whether to patch and relearn our bad habits!

          Comment


          • Andu Indorin over at CFC believes the Manhattan Project increases the demand for Uranium. Samson, did you test for Wonders influencing each of the S/D formulas?

            Comment


            • How about city style influencing supply and demand?

              I know that these depend upon the techs possessed, so that when your city style changes to Industrial, oil and coal become more popular, and when it changes to Modern you start to get Uranium demanded.

              Just a thought.....

              Comment


              • Duke,

                City styles are another thing triggered by tech discoveries, which also account for some supply and demand changes.

                Samson did test wonders and found that the demand for Uranium doubles after SDI is built. (I assume he also tested the Mahattan Project and concluded it had no effect.)

                Once the demand for Uranium is enabled by Nuclear Fission, this demand is based on the number of techs squared, usually resulting in a huge number. As commodity trades and city cycle updates occur, Uranium is almost sure to appear on every city's demand list. Any help from the SDI wonder is probably just overkill.

                Comment


                • SDI is a city improvement, not a wonder, but I get your drift. Another one of those "feels like it" myths.

                  Comment


                  • I just want to say thanks for all those that have contributed to this thread. When we play MP, we move a bit quick to get real anal about this, but some of the simple things have actually made of difference. It has influenced some city placements, and pop size related issues. Nothing better than delaying a delivery to your trade city a turn, having a good clue that the commodity will be demanded the next turn when it's currently not. It's an extra edge.

                    Thanks again.
                    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


                    • Elephant,

                      I was thinking of SETI, a dumb mistake, although in my defense I'll note that at least 2 letters do match (S and I)!

                      So it could be that Duke is right after all. Now that I think about it more, I do not recall if Samson tested for wonders or not, but suspect he did since his research was usually quite thorough.

                      Comment


                      • I think both Duke and Andu are commenting on things that are connected, like particular techs changing city "style", which is more noticable when playing than checking the S/D lists every turn. I vaguely remember something about Wonders, just can't find it in the threads right now. Wish I had that kind of time to do my own tests.

                        Comment


                        • (Shameless bump.) Thanks again to samson, solo and all those who spent time computing these formulas.
                          Clash of Civilization team member
                          (a civ-like game whose goal is low micromanagement and good AI)
                          web site http://clash.apolyton.net/frame/index.shtml and forum here on apolyton)

                          Comment


                          • I have some problems with the formulae.

                            EXAMPLE in the attachement
                            Russian city Melbourne
                            on (142, 82) Map: 120x150

                            Values I calculated:
                            Wildcards: Gold/Gold

                            SQ/DQ:
                            Silver 102/64
                            Cloth 54/29
                            Gems 10/0

                            Spice -44/2
                            Salt -3/4
                            Hides 1/17
                            Beads -3/25,25
                            Wool 32/35
                            Wine -24/72
                            Silk 140/176
                            Coal 82/240
                            Gold Wildcard (6/72)
                            Copper/Dye (Bug)


                            Theoretically there should be Demand for Copper/Dye, Gold and Coal, and Supply for Silver, Cloth and Gems. Demand is right, but Supply is Silk, Cloth and Gems!!

                            Here the other values of the city and Civ:
                            Spoiler:

                            #of cities: 28?
                            Continent#: 23
                            ContinentSize: 19
                            Civ Technologies: 55+1
                            discovered: Pottery, Iron Working, Chemistry, Economics, Electricity and Combustion by another Civ
                            City Terrain:
                            Grassland: 14
                            Plains: 9
                            Hills: 1
                            Forest: 1
                            Ocean: 2
                            All Landsquares: 19
                            Special: yes
                            Roads: 10
                            City Improvements:
                            Just Cathedral by Michelangelos Chapel

                            Other calculated values (maybe are some wrong numbers???):
                            Spoiler:
                            # of Techs 56
                            DistanceToEquator 22
                            TemperateZoneOffset 8
                            LongitudeEast 67
                            LongitudeWest 0
                            DistanceToMeanMeridian 67
                            DistanceToPole 38
                            DistanceToDateline 8
                            PolarCircle 0


                            Help!
                            Attached Files

                            Comment


                            • Okay, so I got the decompiled data from FoxAhead and figured I'd correct this with that data, since this thread's in the Great Library. I omitted a few cases where the supplied formula is basically correct but the rounding can be slightly off due to multiplication/division not being in the supplied order. I can rewrite the full post, getting everything in the right order, if somebody asks, but I don't want to step on any toes.

                              If a particular commodity's Demand Quotient is higher than its Supply Quotient, it goes on a roster of demanded commodities. If not, it goes on the supplied commodities roster. (This prevents a commodity from being both supplied and demanded by the same city, as a rule.) The top three commodities on each roster become the city's supply and demand list.

                              If either the supply or demand roster does not have enough commodities to fill its list, then the commodity with the highest ID number that is enabled and not already on the list is used.
                              Replace these paragraphs with:

                              If a commodity's Demand Quotient is higher than its Supply Quotient, the Supply Quotient is reduced to 0 if higher. Otherwise, the Demand Quotient is reduced to 0 if higher. The top three Supply Quotients (after this reduction) become the city's supply list, and the top three Demand Quotients (after this reduction) become the city's demand list; in case of ties, the highest ID-number commodity comes first.


                              Hides

                              Demand = Forest + Mountains x 2 + Tundra x 5 + Glacier x 5
                              Location: + DistanceToEquator x 3/2
                              City Size: 1-2 2x
                              Techs: Industrialization: 1/3 Mass Production: reduces demand to 1
                              # of Techs: 1-9: 4x 10-19: 2x 20-47: 1x >47: 1/2

                              Wine

                              Supply = LesserOf (Plains x 4, Rivers x 5 - Grass) minimum 0
                              Location: +DistanceToDateline/4 If NorthernHemisphere: x 2
                              Continent#: If RemainderOf(Continent# /4 ) = 2: x 3/2
                              CitySize: 1-2: 1/2 8-10: 2x
                              Civ: If FRENCH: 2x

                              Silk

                              Supply = (Forest x 2 + Jungle + 1) x (Hills + 1)
                              Location: + LongitudeEast x 2
                              Continent#: Multiple of 5: 2x
                              Civ: If CHINESE or AZTECS: 2x

                              Silver

                              Supply = Mountains x 8
                              Location: If NON-ZERO: + DistanceToMeanMeridian + Hills
                              Continent: >8: 3/2
                              Techs: If Iron Working not discovered, 1/2
                              # of Techs:
                              City Size: 1-4: 1/2

                              Demand = CitySize x 8
                              Location: RemainderOf( (Horizontal + Vertical) / 3): 0 = silver, 1 = gems, 2 = gold
                              Techs: Economics: 1/2 Computers: 1/2
                              Civ: If SPANISH: 2x
                              City Improvements: Bank: x 3/2 Cathedral: x 3/2

                              Special Note: The remainder from the division by 3 of the sum of the city's map coordinates determines which commodity the formula is applied to. If the location is 0 mod3, the city demands Silver at the given rate, else the Demand Quotient is CitySize * 8. If the location is 1 mod3, the city demands Gems at the given rate, else the Demand Quotient is 0. If the location is 2 mod3, the city demands Gold at the given rate, else the Demand Quotient is 0.

                              Spice

                              Supply = (Desert + Swamp + Jungle x 3/2 ) x (Ocean + Rivers)
                              Location: If NON-ZERO: (DistanceToEquator < 10: 2x; - DistanceToEquator)
                              Continent#: 1: 1/2
                              ContinentSize: <26: 3/2x >300 1/2

                              Demand = ContinentSize/10 - max(Techs - 12, 0)
                              Location: If ContinentSize > 400 and CitySize > 7: 2x
                              If ContinentSize > 400 and (Horizontal + Vertical) /2 is EVEN: demand is zero
                              Techs: Refrigeration: 1/2
                              CitySize: < 4: 1/2 5+: 1x

                              Oil

                              Supply = Desert x 10 + Tundra x 8 + Glacier x 8 + Swamp x 6
                              Techs: If Combustion NOT discovered by anyone: 1/8
                              Location:
                              Continent#: 17: 3x If RemainderOf(Continent#/8) = 1 but Continent# not 1 or 17: 3/2x
                              # of Techs:
                              CitySize: >37: 2x
                              If Supply = 0, it becomes -1

                              Demand = Techs/3 * ((CitySize + 2)/5 + 2)
                              Special: If SupplyOf(Oil) > current value, 1/2x

                              CitySize: (ignore if Factory present) 1-4: 1/8x 5-9: 1/4x 10-19: 1/2x 20+: 1x
                              CityImprovements: Factory: 3/2x Superhighways: 2x Mass Transit: 1/2x Recycling Center: 1/2x
                              Techs: Automobile: 3x; Enabled by Industrialization (if not present, demand = -1)

                              Special Note: Oil can appear as a supply wildcard after Industrialization if the regular wildcard is not expressed, though not if the city already supplies Oil or Uranium.

                              Uranium

                              Supply = (Desert + Tundra + Glacier + 1) x (Mountains + 1) x (Hills + Rivers + 1)
                              Location:
                              Continent#: If multiple of 10, 3/2x
                              # of Techs:
                              CitySize: 1-2: x0 3-7: 1/6 8-12: 1/3 13-17: 1/2 18-22: 2/3 23-27: 5/6 28+: 1x
                              Techs: Enabled by Nuclear Fission (if not present, becomes -1)

                              Demand = 0
                              Location:
                              # of Techs: + techs squared
                              CitySize: 1-2: 1/8 3-7: 1/4 8-12: 1/2 >12: 1x
                              City Improvements: Nuclear Plant or SDI: 2x
                              Techs: Enabled by Nuclear Fission (if not present, becomes -1)

                              Special Note: Uranium can appear as a demand wildcard after Nuclear Fission if the regular wildcard is not expressed, though not if the city already demands Oil or Uranium.
                              Last edited by magic9mushroom; January 16, 2026, 06:56.

                              Comment

                              Working...
                              X