Stop starvation? Help?

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?
 
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).
 
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. ;)
 
You can set the food cost per citizen by changing the FOOD_CONSUMPTION_PER_POPULATION field in XML\GlobalDefines.xml.
 
Top Bottom