Food Distribution

Jupin

Chieftain
Joined
Aug 24, 2009
Messages
8
Location
Czech Republic
After digging through Requests Thread I liked the idea to be able to redistribute food among cities :

You can send 1-4 ( i have no idea about which formula i should by using to determine maximum amount of food you are able to send, so its 4 hardcoded ) from one city to another - in target city this route takes ones trade route place ( so the number of routes is limited by available number of trade routes ) and you lose the commerce trade yield

Because it can get confusing i had to add food widged which was missing:





Currently conducting food export occurs from city screen when Ctrl+X is pressed - i wish there was button or something but i'm unable to do so :cry:

Modcomp comes with
Great Generals from Barbarians and
Great People Threshold per city
by The Lopez reworked to 319
( Now both turnable off as gameoptions )

For those interested hopefully all code changes are preceded with:

//GreatPeopleThresholdPerCity
//GreatGeneralsFromBarbarians
//FoodDistribution

Hope you enjoy! :)
 

Attachments

  • Screen1.jpg
    Screen1.jpg
    116.3 KB · Views: 2,573
  • Screen2.jpg
    Screen2.jpg
    114.1 KB · Views: 2,651
  • mod2.rar
    1.3 MB · Views: 378
Very Interesting. This could be useful for those cities trapped in hills. But any idea on/if the AI uses it?
 
Very cool function. Now you just need to teach the AI how to use it :p
 
But any idea on/if the AI uses it?

Unfortunately something completely new like this the AI wol't know about unless you programmed the AI apropriat behavior about how to use it. That'll be the toughest part to get this to work. It is a cool feature though, love the concept.
 
Unfortunately something completely new like this the AI wol't know about unless you programmed the AI apropriat behavior about how to use it. That'll be the toughest part to get this to work. It is a cool feature though, love the concept.

The AI part shouldn't be that part. Just tell the AI, that if they have a city that is shrinking, to import food from a city that has lots of extra food.
 
I was thinking about some weighting function which would determine cities where food (bigger population) is useless and where needed but that would also need ai to specialize its cities - i dont know whether it does and i if doesnt it would be realy lot of work to make it use it ..
 
Thanks ! but it's not complete work - no ai as statet above and also i forgot to note that there's currently no way to cancel food route :blush:
 
Have you thought about making it possible to "trade" food? Like an alternative to corps.

EDIT: I mean like from civ to civ...
 
This is something I really think Civ4 needed. I would like to make a suggestion for any SDK modders to expand the modcomp's idea if possible; on the city screen when you get a trade route for a city, have it where you can click on the route and set it to generate either food, production or commerce; this way you can tailor your trade to fill specific city needs (for example extra hammers for an agricultural city with few hammers or extra food for a production city with insufficient food).
 
This is something I really think Civ4 needed. I would like to make a suggestion for any SDK modders to expand the modcomp's idea if possible; on the city screen when you get a trade route for a city, have it where you can click on the route and set it to generate either food, production or commerce; this way you can tailor your trade to fill specific city needs (for example extra hammers for an agricultural city with few hammers or extra food for a production city with insufficient food).

There should be some kind of modifier for distance though. I can't ship tons of food half way around the world in the medieval era without some of it spoiling.
 
There should be some kind of modifier for distance though. I can't ship tons of food half way around the world in the medieval era without some of it spoiling.
Good point there. Maybe a -1 food per route for cities farther than a certain number of tiles?
 
:lol: Imagine the kind of monster production cities you could create with this?? The lack of food becomes much less of a problem.
 
@yared94

with trableble food among civs that would be easier with something like food pool ( there is some modcomp which incorporated this feature )

@The_J

Well thanks :) but i've been lurking there for long time ...

@Highwayhoss

i would love to be able to work through interface but i hate python and it hates me ...

@Afforess

Food spoiling added : -1 food per 15 tiles ( will soonly make it so that something like refrigenerations will cancel the effect .. )

@Zuul

Yeah i went through request and make up notes about interesting ideas but forgot to add authors :( and then i'm too lazy to go through it again ... i'm sorry and Youre welcomed :)
 
Fixed some errors but made new :(

some screens now cant be closed by clicked and escape must be used
this is i guess because of my python lameness :(
 
Maybe another way to do this is piggyback existing institutions rather than creating new ones. Bonuses represent exportability. Say Alexandria has two Wheat going out to the Roman Empire as two Wheat bonuses in every city. As is, you can use one in the normal way to increase the health of all cities with granaries and the other to trade to Persia. Maybe it could be made so that the city of Rome could instead "trade" one of the bonuses to itself for a food yield plus. Once you built this principle it could be used for many things. Civs with surplus Iron might choose to use it to increase production in a favored city.

The only thing required for this is to do it as a building. All you have to do is make a building "consume" a bonus rather than merely require it. The AI will build buildings without needed modification, though it might be good to make them national wonders (and do something to make that silly limit on the number of national wonders per city slide depending on the uniqueness of the wonder so that 3 per civ wonders (as if they work) would only use up 1/3 of a wonder towards the limit) so they don't use up ALL of the bonus and leave some for granaries and trade. So, you have the Wheat Route national wonder which you can build in a city to increase its food (add the yield bonus of the Bonus to the target city, increasable with refrigeration tech) at the cost of consuming a bonus. This only requires adding an XML tag to BuildingInfos: bConsumesBonus and dll support for it. And TechYieldIncreases for buildings like for Improvements, so that Refrigeration and Railroad would both increase the yield of the building. Maybe with later techs you could have a Cannery building that places a bonus building in every city.

However, I'm talking about something else completely than your modcomp. Oops, I used your thread anyway. Somebody is putting off working on his own mod.
 
Top Bottom