Multiple Health Resources

Ksi

Warlord
Joined
Jan 1, 2008
Messages
272
Location
Paris/France
I would like to have your opinion on this you guys. Sometimes when settling it is possible to have lots of one resource and not much else (i.e 4 pig, 3 cows.) However after one resource the health benefits go away.

In order to remedy this we can rely on trade but the value of the resources gets weaker over time to the ai and you cannot always get what you need.

I would like to suggest counting multiple resources but not as powerfully as before. Ex 1X (X being any health resource) = 1 health, 2X = 1.5 health... etc. Something along those lines. The logic being along the lines of: by having more of this resource (take pigs) we can afford to serve only the healthiest pigs

I like how mana has benefits for have multiple one so I was wondering about health resources. This could also work with happiness but that is up to you guys as I am not sure if it is a good idea.
 
I'm been asking for an implementation of the Law of Diminishing Marginal Utility for a long time (not that I've been adamant about it because I personally don't know how to implement it).

It would probably be best if you could set formulas for the marginal utility of each resource separately. Some might drop slowly, some quickly, some may cause more harm than good after a point, and some might be almost useless until you have enough of it. The formulae should be set separately for different types of bonuses (health/happiness), so resources can be more useful for health at one level and more useful for happiness at another.

Of course, setting formulae like this would probably be difficult (if not impossible) in a mere mark up language like XML, and hardcoding everything in Python/C++ doesn't seem like a good idea. I don't suppose having the formulae as strings to be parsed and calculated work work well, would it?
 
Of course, setting formulae like this would probably be difficult (if not impossible) in a mere mark up language like XML, and hardcoding everything in Python/C++ doesn't seem like a good idea. I don't suppose having the formulae as strings to be parsed and calculated work work well, would it?

I like your approach here. If polynomials will work, then you can store just a list of coefficients in order as that would be easy to work with and parse at runtime. If you disparately needed negative powered terms, then you can solve that problem by either having two lists one (for the natural number terms and one for the negative number terms) or just store the degree of the lowest power term. If other functions are needed, you can always use a taylor expansion to approximate the function. While this would require work for the person doing data entry, it would minimize the effort of parsing at runtime. And since resource counts even very large maps are going to be reasonably small, the expansions need only be reasonable over a limited range.
 
One thing I wish is that universal resources would give local benefits with the right buildings.

For example:

Smokehouse gives food per pig, cow, and sheep
Granary gives food per wheat, corn, and rice
Forge gives production for metals
Hunting lodge gives food for deer

etc.

The one thing I've never liked about the Civilization games is that each city has to provide its own food, instead of food being distributed across the empire. It would be nice if one city was dedicated to food, one to production, etc. This would also be more realistic imo if implemented properly.
 
BTS corporations added the ability to turn resources into food/hammers/commerce in exchange for paying corporation upkeep costs. If this were added to FFH it should definitely include an upkeep cost; allowing buildings to enable +1 food for every food resource in your empire is way too powerful.
 
One thing I wish is that universal resources would give local benefits with the right buildings.

For example:

Smokehouse gives food per pig, cow, and sheep
Granary gives food per wheat, corn, and rice
Forge gives production for metals
Hunting lodge gives food for deer

etc.

The one thing I've never liked about the Civilization games is that each city has to provide its own food, instead of food being distributed across the empire. It would be nice if one city was dedicated to food, one to production, etc. This would also be more realistic imo if implemented properly.
I find your views interesting and would like to subscribe to your newsletter.

Seriously though your proposal sounds interesting, but what would tile yields be like when population works a tile? Would a city have to work a tile to gather the resource? Would tiles still have to be worked at all or would all cities end up being specialist hubs? Would the surrounding tiles be a limit to the numbers of specialists you can pick (i.e. a farmland in the fat cross gives the city two serf slots)? I imagine in such a system the civics would heavily influence specialist yields. It definately would need many more types of specialists that the current six.

I wouldn't mind collaborating on such a project.
 
I was thinking along these lines:

- Tiles are still worked as usual
- All cities with connections to the capital share a common food source, while unconnected cities only use local yields.
- Each resource gives some yield to all cities with a local building in each city, which stacks for each resource.
- Local resource yields are decreased for all resources.
- Trade routes give small food/hammer bonuses in addition to commerce.
- Building costs increased slightly, since each one becomes more important.
- Can set amount of food sent to each city.

Basically the empire acts as a unified source for all resources and food yields and allows players to specialize one city in food production to support their entire empire. This makes protecting trade routes vital however, as losing connection to that city would spell disaster.

I'd settle for a XML tag for buildings that allows players to:
- set resource yields for resources (both f/h/c and g/s/c)
- set whether or not this resource stacks for this building
 
Strong ideas, Mailbox....but perhaps they should be tied to Civic options? I would think that a player utilizing City States should NOT be able to share food between cities, God King should probably allow one-way food transit from other cities to the capital, etc...

Some civics just make it thematically inappropriate to share food the way you decribe.
 
Strong ideas, Mailbox....but perhaps they should be tied to Civic options? I would think that a player utilizing City States should NOT be able to share food between cities, God King should probably allow one-way food transit from other cities to the capital, etc...

Some civics just make it thematically inappropriate to share food the way you decribe.


Was it Civ II that allowed for building Freight? As I recall, when you built one, you would permanently lose one food production from the city where it was built. You could then "settle" the freight in a different city to increase its food production by one. Something like that might be useable, but only under certain civics (Republic?). Maybe under God King the Freight unit could only be settled in the capital city.

I like the potential for increased city specialization, but I worry that this mechanic might be seriously exploitable. *coughCalabimcough*
 
Strong ideas, Mailbox....but perhaps they should be tied to Civic options? I would think that a player utilizing City States should NOT be able to share food between cities, God King should probably allow one-way food transit from other cities to the capital, etc...

Some civics just make it thematically inappropriate to share food the way you decribe.

I was actually thinking that a whole new set of civics would be the most appropriate for this, each one allowing different sets of economy utilization. I had originally wanted to add this to my improvement mod-mod for different types of economy focus but it was a bit hard to decide what to put for each one and decide what kind of balance would be required.

Was it Civ II that allowed for building Freight? As I recall, when you built one, you would permanently lose one food production from the city where it was built. You could then "settle" the freight in a different city to increase its food production by one. Something like that might be useable, but only under certain civics (Republic?). Maybe under God King the Freight unit could only be settled in the capital city.

I like the potential for increased city specialization, but I worry that this mechanic might be seriously exploitable. *coughCalabimcough*

This is actually a good idea. I see it this way.

- All cities get a "food transfer hub" (tenative name of course :P) on the completion of the research of some technology (most likely trade but trade is already a strong tech. In all seriousness, I was thinking of renaming the archery techs to wood working techs and thus allow windmills/watermills earlier in addition to "wagon trains" which would justify this building)

-Each city can then build a unit (requiring only a handful of hammers) that subtracts food from the building on build and when added to a city, gives food to that building. However this doesn't take into account trade routes and thus is a bit weaker in my opinion.

My ideal implementation of this idea would be as follows:

- XML tag that allows yields per resource for buildings.

- New screen "Food transfer", enabled by a tech. (Likely woodworking tech as mentioned)

- Gives the total amount of excess food within your trade route connected empire
- Gives the amount of food dedicated to each city (default is tile yields)
- Gives amount of excess food not dedicated to any city (wasted if not assigned with one exception, given below)
- Allows the leader to transfer food between cities via a simple +/- bar
- Transfer of food is dependant on certain economy civics (need a better name than economy)
- Keeps track of where food is coming and going

- If food is lost in one city, via major disruption like pillaging or city capture, the food transfer from that city is stopped and the city (cities) receiving food lose it (duh) causing them to rely on other cities or the next item

- A national wonder: "The Great Granary" ( :lol: ) that allows the nation to store excess food (some number say 50-75 food) and thus if food supplies are lost, food can can be temporarily assigned to cities in need.

- The farther food is shipped, the higher the maintence costs become.

This means that a flood plain city in the most incredibly rich valley in your nation can supply food for the entire nation, allowing you to devote other cities fully to specialists or production. Of course, this could also be used to accelerate the growth of new cities which helps earlier on, but as the game goes on, the larger populations of the core cities and even the farm cities themselves require large amounts of food to stay afloat.

Of course, such a thing would require extensive tweaks to work.
 
How about Caravans where workers transport food between Cities? Should be easy enough to automate that.
 
I was actually thinking that a whole new set of civics would be the most appropriate for this, each one allowing different sets of economy utilization. I had originally wanted to add this to my improvement mod-mod for different types of economy focus but it was a bit hard to decide what to put for each one and decide what kind of balance would be required.



This is actually a good idea. I see it this way.

- All cities get a "food transfer hub" (tenative name of course :P) on the completion of the research of some technology (most likely trade but trade is already a strong tech. In all seriousness, I was thinking of renaming the archery techs to wood working techs and thus allow windmills/watermills earlier in addition to "wagon trains" which would justify this building)

-Each city can then build a unit (requiring only a handful of hammers) that subtracts food from the building on build and when added to a city, gives food to that building. However this doesn't take into account trade routes and thus is a bit weaker in my opinion.

My ideal implementation of this idea would be as follows:

- XML tag that allows yields per resource for buildings.

- New screen "Food transfer", enabled by a tech. (Likely woodworking tech as mentioned)

- Gives the total amount of excess food within your trade route connected empire
- Gives the amount of food dedicated to each city (default is tile yields)
- Gives amount of excess food not dedicated to any city (wasted if not assigned with one exception, given below)
- Allows the leader to transfer food between cities via a simple +/- bar
- Transfer of food is dependant on certain economy civics (need a better name than economy)
- Keeps track of where food is coming and going

- If food is lost in one city, via major disruption like pillaging or city capture, the food transfer from that city is stopped and the city (cities) receiving food lose it (duh) causing them to rely on other cities or the next item

- A national wonder: "The Great Granary" ( :lol: ) that allows the nation to store excess food (some number say 50-75 food) and thus if food supplies are lost, food can can be temporarily assigned to cities in need.

- The farther food is shipped, the higher the maintence costs become.

This means that a flood plain city in the most incredibly rich valley in your nation can supply food for the entire nation, allowing you to devote other cities fully to specialists or production. Of course, this could also be used to accelerate the growth of new cities which helps earlier on, but as the game goes on, the larger populations of the core cities and even the farm cities themselves require large amounts of food to stay afloat.

Of course, such a thing would require extensive tweaks to work.

I think this is a cool idea, if only as an intellectual exercise (it would probably be beyond the ability of the AI to utilize, making it effectively a micromanaging exploit for players). I have a couple of ideas on how to implement this.

The absolute simplest is to have a unit built by food which can be sacrificed at another city to add to their food stores. Since we don't have a good way to have a unit be built exclusively by food (nor would we want such a unit tying up the cities build queue) we can instead have a building called Export Food which lowers the cities food income by two and spawns a unit every 5 turns. This unit can be sacrificed in a city for ten food. However, this is very micromanagement intensive. We can do better.

Alright, you've researched your food-trading technology and all of your cities automatically receive a Food Hub building. You can also build a zero strength, worker-style Food Caravan unit which has two spells: Import Food and Export Food. Export Food is only castable in cities size 2 or larger and triggers an event which makes the Food Hub produce two less food per casting (going into the negatives). Each casting gives the Food Caravan unit 1xp. Import Food is only castable in cities and triggers an event which makes the Food Hub produce two more food per casting. Each casting removes 1xp from the Food Caravan and is uncastable if the unit has zero xp. While this requires some micromanagement, it's certainly less than the previous version.

The increased finesse and complexity of the Food Caravan implementation causes a few edge cases that need to be addressed. Namely, if a Food Caravan is destroyed while it still has XP, if a city is lost which is importing or exporting food or if you intentionally make a city export more food than it generates (I don't think a city, once it has starved down to size 1 can actually be destroyed by starvation). The simplest solution is to have a Reset Food Trade spell/event which resets all Food Hubs to yield +0 food. This spell can be cast manually by the player (which they would want to do when they lose a Food Caravan with XP) and is automatically cast whenever a city is lost or a city loses a population. While this requires the player to manually rebuild their food trade every time a city is sacked or Blight causes a city to starve, it neatly closes all harmful edge cases and exploits that would otherwise exist.

Other implementations certainly exist but I think the above would work reasonably well and wouldn't require too much over-the-top coding since it's all borrowing from established concepts.
 
How about make a new process (like research, gold, or culture) that (using python probably) causes the food gained in the city that turn to be distributed among other cities instead?
 
Alright, you've researched your food-trading technology and all of your cities automatically receive a Food Hub building. You can also build a zero strength, worker-style Food Caravan unit which has two spells: Import Food and Export Food. Export Food is only castable in cities size 2 or larger and triggers an event which makes the Food Hub produce two less food per casting (going into the negatives). Each casting gives the Food Caravan unit 1xp. Import Food is only castable in cities and triggers an event which makes the Food Hub produce two more food per casting. Each casting removes 1xp from the Food Caravan and is uncastable if the unit has zero xp. While this requires some micromanagement, it's certainly less than the previous version.
I think we are straying far out from FFH, but I find the concepts interesting.

Why not just create a set of new global variables for each civ (like Good-Neutral-Evil is in FFH) called excess food, hammers, etc. Have a button in each city next to the specialists called export food, etc and import food. Then when the city adds one to export the number is reduced in the city, import increases the number one. The each global variable can never go below 0 and numbers above 0 at the end of the turn produce excess gold (a la MOO). In effect you could sell excess food, prevent growth and produce a little income (less than having a cottage rather than a farm though)
 
Can trade routes (:traderoute:) provide food?

Another option is to reduce the yield of a tile by 1 :food:, but cause the resource (and/or possibly buildings) to provide 1 :food:. This results in an effective redistribution of resources without introducing a lot of complicated code that the AI won't manage well.

Of course, if you're going to do this, you may want to do something similar with strategic resources.

I'm opposed to any options that are not automatic, because the AI won't be able to manage these decisions without serious work, and there is far higher priority AI work at hand.
 
Yes, trade routes have a certain numeric value, and they happen to only be set to convert 100% of it to :commerce:, in Vehem's Fall Further under one of the new race's Civ specific Civic the trade routes also provide :food:, I can't recall if they provide any :hammers:, but they readily could.

It would be nice if there were a couple of civics in the main game which allowed trade routes to provide more than just :commerce:, it is certainly an enjoyable touch.
 
Does the building AI make a distinction between low-food cities and high-food cities? Or low-hammer and high-hammer cities?
 
In Master of Orion your food was automatically distributed among all the planets in your empire. Of course, they made you pay the freight costs. Not growing food locally was possibly, but got really expensive really quickly.
 
One thing I wish is that universal resources would give local benefits with the right buildings.

For example:

Smokehouse gives food per pig, cow, and sheep
Granary gives food per wheat, corn, and rice
Forge gives production for metals
Hunting lodge gives food for deer

etc.

The one thing I've never liked about the Civilization games is that each city has to provide its own food, instead of food being distributed across the empire. It would be nice if one city was dedicated to food, one to production, etc. This would also be more realistic imo if implemented properly.

Actually old Civ games did allow you to do this. You could build trucks that would subtract 2 food from the home city and would carry +2 food to any city you like (kinda like how now a merchant can add food to a city now). This was back when you could also use workers to bump the city pop by one. It was very handy for keeping cities form going into the red when they had an odd number of foods. Also helped with power building new cities.
 
Back
Top Bottom