Announcement

Collapse
No announcement yet.

Food Trade--Mod Concepts (discussion)

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

  • Food Trade--Mod Concepts (discussion)

    The current oddity in specializing cities is that all cities must provide all of their own food. This is quite unlike reality where, in the US, food travels a great distance (food eaten in chicago travels an average distance of over 1,500 miles!)

    As such I think a mod to simulate this is in order. I plan on making this mod, but the exact mechanics of it I haven't decided upon yet. I was hoping a discussion might flesh things out a bit.

    On the simplist level food is going to be gathered up and distributed in some manner. There are a few ways to do this.

    1. Some food stays in the city where it is made and some other food is "drawn away" to other cities according to some mechanism.

    2. All food generated everywhere is pooled together. Then this food is divied up somehow.

    3. Each city has a radius in which its food can spread to other nearby cities. As technology progresses this radius increases (this is somewhat similar to 1).

    As for how food is allocated I have some ideas, but I am not sure which is best.

    1. Food is allocated to cities based on trade those cities generate. As in real life cities bustling with trade tend to grow fastest. This probably wouldn't be linearly proportional to trade (given how some cities can produce very little trade). Cities would shrink and grow based on how much trade they generated relative to the rest of the civilization (so a new trade city might draw food, and hence population, away from other cities).

    2. Food is allocated based on trade and production. The more trade or production a city has, the more food it will draw. Like 1, but more supportive of cities devoted to industry.

    3. Like 1 or 2, but also allow a mechanism to manually adjust food intake in a city. This will probably require a certain technology or civic to use of course.

    4. Use a combination of 1 and 2, depending on the civics selected.

    This of course leads the problem of producing food. Traditionally food production has become more and more efficient, to incrediable degrees, as time has passed. As such a "realistic" food producing city should have a relatively small population. There are a few ways to handle this.

    1. One way to handle this is to make a "farmer specialist". This specialist acts as 2 or more working citizens, but these "virtual citizens" only work farmed tiles (or perhaps only gather food). This way in the modern era a population of 6 or so might be able to work all the tiles around a city (assuming they are all farming tiles). This encourages stretches of farmed land of course, which is how things often are.

    2. Another method of the farming specialist, but have him work a smaller number of tiles (still probably more than 1), but increase how much food is generated from those tiles. This could probably be handled simply by using 1 and having higher yeilds modded in based on technological gains.

    3. Simply having a farming specialist increase total food production from a city by some percentage. This has the disadvantage of encouraging large farming cities however.

    4. Use the "crawler" mod being made by PJayTycy to make "farmers". This unit can be sent to a region with a farm and farm it (sending the food either to the nearest city or to the civilization stockpile depending on which implementation is chosen above). Potentially it could be given the ability to make farms as well (like a worker, but only farms). This makes farming "free" in terms of population and would be at least an industrial tech as such, I think.

    5. Some combination of 4 and the "farmer specialist".


    Thoughts on the best way to go?

    -Drachasor
    "If there's a child on the south side of Chicago who can't read, that matters to me, even if it's not my child. If there's a senior citizen somewhere who can't pay for her prescription and has to choose between medicine and the rent, that makes my life poorer, even if it's not my grandmother. If there's an Arab American family being rounded up without benefit of an attorney or due process, that threatens my civil liberties. It's that fundamental belief -- I am my brother's keeper, I am my sister's keeper -- that makes this country work." - Barack Obama

  • #2
    I'm surprised no one has responded to this thread. The lack of food for some of my cities annoys me.

    How about having a building that can only be built in a handful of cities and allows the creation of farmer specialists that create only food (but no great person points)?

    Also, that all this "packaged" food created by these specialists all go into the pool?

    Food is allocated by making up only the shortfalls first, regardless of which city. Then, any remaining extra food is split evenly to only cities with a certain building.

    Or, something simpler might be that certain resources do more than just give health and happiness. With a certain building, a wheat resource will give that city an extra three food.

    Comment


    • #3
      I completely agree with your concerns about how cities really work and how they work in Civ. However, your proposal is extremely complicated.

      In Civ 3, I partially solved the problem by granting cities food from near-by trade-producing tiles. For example, gold generated both trade and food in equal proportion.

      I made grasslands and plains generate practically no food unless farmed and delayed the advent of farming (to simulate advanced farming techniques). I also made farming require access to a new resource called "phosphate" (phosphate-based fertilizers are largely responsible for the increadible yeilds of modern farms).

      These changes, combined with an inflated food and trade yeild from the oceans, kept the majority of my cities on the coasts until late in the game, except for those outposts near special trade items. Only in the late 17th century did my cities truly start to expand into the heartlands of the continents and they never reached the massive sizes of my coastal super-cities.

      I also managed to get a naturally-evolving "age of discovery" in which continents like Africa remained "dark" right into the 18th century. I won't get into how I did that but I'm having trouble doing the same in Civ 4 (it's very frustrating!).

      Comment


      • #4
        One of the problems that this mod is going to face (the biggest one that I foresee) is that surplus food has potential use: funding specialists/Great People generation.

        Which means that if you are sort of automatically evening out food, you will be negating the ability to specialize a food-rich city into a GPP producer. I think this will be extremely critical to address somehow: seperate specialist support from food perhaps, or extract great people to the civ-wide level instead of making them city specific (though then the player has less control over the type of GP they produce).

        I feel that the best way to address this problem at a high-concept level is to ensure that player choice is involved in this process--players sort of dynamically assign food shipping routes (cities can ship food to only one other city--but that city can ship to another, and thus all the food can end up passed up the chain to wherever).

        Of course, then you get into the problem of this mod potentially being TOO useful, as players can suddenly have 20 specialists in one of their cities and get a GP every other turn. Similarly, it could be unfair to the AI until the SDK is out to mod them to use this system.

        Anyway, I like the idea of the mod Drachasor (I've even been waiting for a brave soul to try it), but it's going to be quite the can of worms...

        Comment


        • #5
          Well, I am going to start working on this. Hopefully I'll be able to get it done before the end of the month.

          My plan is to implement (at least to begin with) this as follows:

          1. Farmer Specialists that can collect food from more than one resource square--Hopefully I can make it so they collect only food, but I'll start with just normal collection.

          2. Food moves along trade networks, but remains in its original empire.

          Naturally I'll be able to work on some of these things seperately before I join them all together.

          One issue I have to work on is how to divy up the food. Roughly my idea is this:

          1. The trade and production a city generates helps determine this amount. Naturally this is relative to other cities in the empire. So if two cities are the same in all respects save the second one generates more trade/production than the first, then the second one will get more food.

          2. Size 1 cities always get at least 2 food.

          3. In some way I'd like to have city "potential" taken into account, but I am not sure how to do this just yet. This will probably be the trickiest thing. Basically this would give a bonus to smaller cities that varies based on how "good" the city radius is. This would ensure that larger cities wouldn't starve out the smaller ones. If all else fails this could simply be implemented by a bonus that decreased based on city size -- this would share some of the characteristics of a "potential" metric, such as cities with more potential trade/production will grow faster compared to similar cities of the same size, and the bonus would ensure that they would indeed grow.

          4. Ideally the ability to "buy" food could be brought in. A city could trade one commerce or one production for one food out the the communal food pool. This extra food wouldn't be counted when divying up the food among cities.

          5. I would modify granaries, and perhaps some other buildings, to give a city more protection against starvation. So if a city lost trading with the other cities due to war, it wouldn't immediately suffer massive starvation -- it would take a few turns.

          6. A city will automatically spend production/trade to "buy" extra food to prevent starvation, larger cities having preference over smaller cities if starvation can't be prevented (e.g. not enough food is being generated for all the citizens). This can be turned off manually. It would generate no excess food however, so the city would keep its current size. The city would shrink if it didn't have enough trade/production to "buy" enough food to feed itself.


          Did I miss anything here?

          Hmm, perhaps I should increase the food bonus for farms as ages progress. Starting at +1 is fine, but perhaps I should change it to end at +3. I guess I'll look at how games play when I get all the other stuff done. This change is pretty trivial and can be added later if needed/desired.

          Hmm. I might also try to see if I can make it so farming specialists can only work Farmed areas and Windmills -- perhaps the banana and some other special resources too. Then perhaps I could make it so that all or half of all non-food production is converted to food (and the rest discarded so only food is produced). Thoughts?

          -Drachasor


          PS. Eventually I'd probably use this to help implement troop supply in some fashion. That's a project for a later date however.
          "If there's a child on the south side of Chicago who can't read, that matters to me, even if it's not my child. If there's a senior citizen somewhere who can't pay for her prescription and has to choose between medicine and the rent, that makes my life poorer, even if it's not my grandmother. If there's an Arab American family being rounded up without benefit of an attorney or due process, that threatens my civil liberties. It's that fundamental belief -- I am my brother's keeper, I am my sister's keeper -- that makes this country work." - Barack Obama

          Comment


          • #6
            thanks Drachasor, this is going to be a much, much needed change. it is soooo unrealistic that you can't trade food between your cities... I'll be waiting for this mod

            Comment


            • #7
              First, I like you idea about food trading. I was really hoping this would be implemented in Civ4, but no...

              Second, keep it simple. I really liked how it was in Civ2 with food caravans. Something simular should be done. By allowing food to be traded as other resources, cities can also be blocked off causing starvation (as with other resources). If you think of the distances, just imagine the food is wheat or something else that last. It will anyway limit itself by the fact that expansion is not the same now as in Civ1, 2 and 3. Its more diffictult now meaning you will often have more advanced techs before you have cities far away. This can a sort of simulate that you need more techs to transport food long-distance.

              Originally posted by Drachasor
              5. I would modify granaries, and perhaps some other buildings, to give a city more protection against starvation. So if a city lost trading with the other cities due to war, it wouldn't immediately suffer massive starvation -- it would take a few turns.
              No, you shouldn't. Starvation was a cruel weapon used when sieging cities in the old times. A siege could last for several years (turns in civ terms), but in modern times, a city is taken a lot faster, within a turn or two. And if it will be sieged and blocked off... Well, that's how war works I'm afraid... People starve, end of line

              Comment


              • #8
                How about a "click-box" on each city screen which allows you to decide how much of a city's surplus food goes into a general "food-pool", and, by clicking down (a negative donation) how much food the city takes from the food-pool. Any food left in the pool each turn would be converted to gold (traded away on the markets) so you couldn't stockpile it to insta-grow new cities.

                I'd cap the amount of food that cities could send to or take from the food pool at the size of the city i.e. a size 3 city could donate 3 surplus food or gain 3 extra food each turn from the pool.

                A "quick-click" manager to set a city to always give as much as possible, or always to take as much as possible would be handy, as would a global distribution button which would attempt to balance food surpluses across the empire (yay no micromanagement)

                Oh, cities not connected to the trade network would be disconnected from this service, clearly, so starvation can be achieved by pillaging roads
                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


                • #9
                  We are getting there! But, and there is a big but, how would you handle it if the city that exports food get blocked off? What will decide which city to suffer from this? *pause, am thinking* Maybe the nearest city? Or cities, like if the sieged city exports 5 food, the target cities will first loos their surplus (in order of nearest) and if the food get below this, then starvation kicks in following the same order.

                  This is a lot more advanved programmingwise I think, but is a nice idea

                  Comment


                  • #10
                    I'm trying to avoid adding a lot of micromanagement, hence I lean towards implementations that generally don't require a lot of tiny manipulations by the player. The basic idea is that it should encourage cities specialized in food production.

                    No, you shouldn't. Starvation was a cruel weapon used when sieging cities in the old times. A siege could last for several years (turns in civ terms), but in modern times, a city is taken a lot faster, within a turn or two. And if it will be sieged and blocked off... Well, that's how war works I'm afraid... People starve, end of line
                    Right, but food storage is extremely poor in the current game since a city produces all of its own food. A deficit of -20 food for a size 10 city would shrink it immediately, and extremely rapidly at that (it would shrink by one size each turn). That's a little too harsh to my mind.

                    We are getting there! But, and there is a big but, how would you handle it if the city that exports food get blocked off? What will decide which city to suffer from this?
                    If implemented as I plan, then the food already in the "market" would simply redistributed itself among the cities still in the network (this might result in some starvation, but certainly slower growth at the very least).
                    "If there's a child on the south side of Chicago who can't read, that matters to me, even if it's not my child. If there's a senior citizen somewhere who can't pay for her prescription and has to choose between medicine and the rent, that makes my life poorer, even if it's not my grandmother. If there's an Arab American family being rounded up without benefit of an attorney or due process, that threatens my civil liberties. It's that fundamental belief -- I am my brother's keeper, I am my sister's keeper -- that makes this country work." - Barack Obama

                    Comment


                    • #11
                      Hmm, it seems like this mod might not be possible at the current time. The code governing city growth appears to be compiled (e.g. not part of the editable python). All one has access to are some functions that let you look at city food production and consumption rates, but not change them. It also seems there is no access at all to how much food the city has eaten.

                      There might be a way around this. I think there are some functions called when cities grow. I could change one to shrink the city down one. Then I could have some new variables keep track of the growth rate on my own. I'd have to change the City and Domestic Advisor Screens to look at these new variables however. Messy, but I think it is possible.

                      If I have too much trouble with this method then I'll wait until the tools are released that allow greater game configuration--that's supposed to happen in January, yes?

                      -Drachasor
                      "If there's a child on the south side of Chicago who can't read, that matters to me, even if it's not my child. If there's a senior citizen somewhere who can't pay for her prescription and has to choose between medicine and the rent, that makes my life poorer, even if it's not my grandmother. If there's an Arab American family being rounded up without benefit of an attorney or due process, that threatens my civil liberties. It's that fundamental belief -- I am my brother's keeper, I am my sister's keeper -- that makes this country work." - Barack Obama

                      Comment


                      • #12
                        Well, I can successfully stop cities from growing. I know I can make the part to govern city growth seperately as well. So I can handle dividing up food--though I need to make sure I am handling city shrinkage as well. Of course, this is essentially a hack as all the normal food calculations will still be done; they're just stopped from affecting the game.

                        I haven't fully decided on how to split up food. I figure a That X% of all food will be split proportionately based on commerce (so if a city produced 10% of your civ's commerce then it would get +X%/10 of the food your civ produces). Another X% would be similarly divided up based on production. Then 100%-2X% would be based on the number of cities (probably divided completely evenly).

                        I'm not yet sure how I will break down those percents, however. The nice thing is that by having a certain amount of food divided up based on city population automatically gives a boost to smaller cities as this is a much larger relative food increase for them.


                        The farming city situation is a bit more tricky. If it is possible to do at all before the SDK comes out it will require some clever chicanery. There are very few tools to manipulate the relevent factors.

                        Hmm, one way does come to mind. The population size of the city could be adjusted if there is a farmer specialist. Extra citizens then working squares in the city radius. Since I am already handling all food aspects I could make the food needed to grow and the food consumed remain unchanged. Then if I can finagle a way to make it so only food is collected (since I am pretty sure I can't manage to force these extra citizens to only work farms), that will handle it nicely. Tricky though, since individual citizen manipulation and identification is very limitied (for instance, I am not sure if I can get information on what plots are being worked in a city). It may not be possible to fully realize for now.

                        Alternatives would be using a crawler made to enable the building of "farmers" who simply add food to the overall pool or to make farming specialists just make food directly--but the latter has serious problems and could be exploited. Neither is ideal, I think.

                        Well, I'll continue to report my progress.

                        -Drachasor
                        "If there's a child on the south side of Chicago who can't read, that matters to me, even if it's not my child. If there's a senior citizen somewhere who can't pay for her prescription and has to choose between medicine and the rent, that makes my life poorer, even if it's not my grandmother. If there's an Arab American family being rounded up without benefit of an attorney or due process, that threatens my civil liberties. It's that fundamental belief -- I am my brother's keeper, I am my sister's keeper -- that makes this country work." - Barack Obama

                        Comment


                        • #13
                          Am looking forward to see how this will end I'm really keen on doing some modding myself but don't have the time, at least not yet (I always worked on tuning and improving (for my part) Civ3, but never finish it 100%)

                          Comment

                          Working...
                          X