1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  3. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  4. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  5. Dismiss Notice
  6. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

Stop starvation? Help?

Discussion in 'Civ4 - Creation & Customization' started by MrPinchyPants, Apr 14, 2006.

  1. MrPinchyPants

    MrPinchyPants Chieftain

    Joined:
    Dec 13, 2004
    Messages:
    61
    Is there a way to totally stop starvation/growth in your mod or at least limit starvation so it goes by very slowly? Or will I have to create a new resource that gives the exact amount of food for each city in the scenario to be self-sufficient?
     
  2. MrPinchyPants

    MrPinchyPants Chieftain

    Joined:
    Dec 13, 2004
    Messages:
    61
    So is there any way of doing this?
     
  3. surt

    surt Chieftain

    Joined:
    Jan 6, 2006
    Messages:
    354
    It's not exactly clear to me how you want this to behave. If you wanted all cities to grow up to some fixed size and never starve, you could set the food cost per population to 1, turn off all food from tiles, and give the city default N food, where N is the max size you want to grow to. Then set the pace of growth by setting the growth food required.

    In GlobalDefinesAlt.xml:
    PHP:
      <Define>
        <
    DefineName>BASE_CITY_GROWTH_THRESHOLD</DefineName>
        <
    iDefineIntVal>80</iDefineIntVal>
      </
    Define>
      <
    Define>
        <
    DefineName>FOOD_CONSUMPTION_PER_POPULATION</DefineName>
        <
    iDefineIntVal>3</iDefineIntVal>
      </
    Define>
    In civ4YieldInfos.xml, you want the iMinCity value (the minimum you are granted at the center of your city, regardless of where it is placed).
     
  4. Agent 009

    Agent 009 Civ 4 Addict

    Joined:
    Mar 28, 2006
    Messages:
    336
    Location:
    In a virtual Civ 4 Environment.
    There is no way I know of to completely remove starvation. Setting food consuption to 1 certainly helps but it won't get rid of it. There are actually two other factors that can cause a city to starve.

    - Sickness. I believe this factor is also dependant on how much food is consumed per pop. For arguments sake, if it is 1 per pop, then if the city sickness is 10, and the health is 2, then that city will use up 8 extra food. So, technically a city that is growing with 1 extra food can suddenly start to starve upon growth because it uses 1 extra food for the 1 extra pop and another extra food for the +1 sickness due to pop.

    - Lastly, if a player gets invloved in a war, some turns after it starts, the player's city's laborers start refusing to work the tiles they were already working, thus causing cities to starve.

    I have no idea if the SDK can remove starvation however, if you are wanting to do this for a scenario, I think the best thing to do is make it with no food yields and set each city to the desired size, and make them use 0 food per pop.

    Don't know if that will actually work but it might be worth a shot. ;)
     
  5. DedlyCobraMonky

    DedlyCobraMonky Chieftain

    Joined:
    Jul 12, 2009
    Messages:
    8
    how to you set the food cost per citizen to 1
     
  6. General Tso

    General Tso Panzer General

    Joined:
    Oct 12, 2007
    Messages:
    1,513
    Location:
    U. S. of A.
    You can set the food cost per citizen by changing the FOOD_CONSUMPTION_PER_POPULATION field in XML\GlobalDefines.xml.
     

Share This Page