Quantitative Resources

I absolutely loathe the idea of planting wheat and cows all over the place. While realistic, it seems to me to be a micromanagement nightmare. If I wanted to figure out which crops would yield me the best economic bonuses, I'd play Sim Farm.

But maybe he's onto something with horses as as special case. Especially combined with some kind of tile penalty, this would be an interesting strategic choice. "How many horses can I afford to maintain? How many do I really need?" Each tile could support X horse units. Although, strategically speaking, most players will probably just put horses everywhere between cities. And let's be honest, there's a lot of dead space in between cities so this would be a no-brainer decision.

I've got a better idea.

The Stables building in your cities currently requires a horse resource. But let's change it so it also provides a horse resource. In other words, you need a horse tile to start your horse supply... but once you have that one tile, you can build lots of stables to breed a nearly limitless supply.

This is both realistic and strategic. Just like in real life, the only time you'll see someone attempting a horse monopoly is in the ancient or classical era. Just like in real life, they would become abundant by the middle ages. And just like in real life, a continent deprived of horses will find it easy to get horses from another continent and quickly start their own breeding grounds.
 
I absolutely loathe the idea of planting wheat and cows all over the place. While realistic, it seems to me to be a micromanagement nightmare. If I wanted to figure out which crops would yield me the best economic bonuses, I'd play Sim Farm.

Yeah, I agree. What I was working on with the BonusClass Modifiers was that Farms would only produce +1 Food without a supply of either Wheat, Rice, Corn or any additional grain crops that might be added, but once you hook up one of these the Farms get +2 Food from having a Bonus from that Grain BonusClass... this would represent the change from trying to grow only marginally nutritious indigenous crops to growing the much more productive and nutritious crops that now cover the globe. So it's a relatively simple yet realistic system.

But maybe he's onto something with horses as as special case. Especially combined with some kind of tile penalty, this would be an interesting strategic choice. "How many horses can I afford to maintain? How many do I really need?" Each tile could support X horse units. Although, strategically speaking, most players will probably just put horses everywhere between cities. And let's be honest, there's a lot of dead space in between cities so this would be a no-brainer decision.

I've got a better idea.

The Stables building in your cities currently requires a horse resource. But let's change it so it also provides a horse resource. In other words, you need a horse tile to start your horse supply... but once you have that one tile, you can build lots of stables to breed a nearly limitless supply.

This is both realistic and strategic. Just like in real life, the only time you'll see someone attempting a horse monopoly is in the ancient or classical era. Just like in real life, they would become abundant by the middle ages. And just like in real life, a continent deprived of horses will find it easy to get horses from another continent and quickly start their own breeding grounds.

Works for me... I don't particularly care whether the Horses come from an improvement or a building... just as long you're not relying on that one plot of wild horses for the entire game to satisfy your horse needs... I mean, iron can't make baby irons and thus can't be transplanted elsewhere... such is not the case for horses and plants.
 
That sounds good to me. To break the food resources down into realistic terms, those special tiles just happen to be exceptionally fertile soil. You can still grow wheat and rice everywhere, but those are the tiles that are ideal and hence supply a bit more food.

So, to summarize...

Building Resources: Iron, Copper, Aluminum, Marble and Stone will improve the speed of various units, buildings, and wonders in X cities. X will vary based on what makes for the best strategy. If you're using X+1 cities to produce something that requires one of those resources resource, one of those cities is gonna be producing it at the normal (slower) rate.

Health Resources: Each one will add one health to X cities. X will vary based on what makes strategic sense.

Luxury/Happiness Resources: You know the drill. Each one will add one happiness to X cities. X will vary based on what makes strategic sense.

War Animals: Horses will be able to support X mounted units. Stables require horses, but will also generate more horses. I guess Ivory should work the same way too, no? And stables could generate additional elephants assuming you have one hooked up?

Fuel Resources: Uranium, Coal, and Oil will be the true "quantifiable" resources. Each one will generate X "power" or "fuel" per turn, perhaps with power plants or some other building. Either way, the more you have, the more you'll be able to do. Fuel/power will definitely be required for certain units and buildings. It may even be consumed by higher population and tile improvements. This is definitely open to tweaks and changes.

... oh, and hooking up your first farmed resource will improve the yield of all farms.
 
War Animals: Horses will be able to support X mounted units. Stables require horses, but will also generate more horses. I guess Ivory should work the same way too, no? And stables could generate additional elephants assuming you have one hooked up?

Elephants, actually, while they can be tamed, are not domesticable... or at least not easily... the preferred method of acquiring more elephants is still to today to capture them in the wild. I don't know if the North African forest elephant used famously by Hannibal to cross the Alps was domesticable, but odds are considering that they're now extinct... they weren't.

So I'd just leave that as is... Camels, however, assuming we ever get around to including them, could also be generated from Stables.

But it sounds like we've hashed out all the details... meeting adjourned! :D
 
Horray! (And the mostly-silent entourage cheers with wild enthusiasm.)

Just as a side note, probably isn't important, but do the different food resources really serve any purpose? I mean, is there any functional difference between Corn and Wheat or between Crabs and Fish? If there isn't, could Corn and Wheat be consolidated to a simple Grain resource? Perhaps there are others like that which would make it simpler to manage.
 
Just as a side note, probably isn't important, but do the different food resources really serve any purpose? I mean, is there any functional difference between Corn and Wheat or between Crabs and Fish? If there isn't, could Corn and Wheat be consolidated to a simple Grain resource? Perhaps there are others like that which would make it simpler to manage.

Considering that they really have no difference, as you said, I think leaving this as is would be fine... you really don't have to "manage" them separately... you only have to manage the yield they produce: Food. They're basically there for ambience.

The only thing they do is that each adds +1 health in your cities... which might seem excessive since, as you say nutritionally there's little difference, but a diverse diet is important. I assure you, if there were nothing but gruel to eat, the health of the people around me would take a decided turn for the worse ;)
 
Well, I have to say I'm very disappointed. I was really looking toward a Colonization-type mod (I know several people who'd use it immediately for that ;)) and it looks like it's now out the window. I cannot see any real advantages over the current binary system.

Building Resources: Iron, Copper, Aluminum, Marble and Stone will improve the speed of various units, buildings, and wonders in X cities. X will vary based on what makes for the best strategy. If you're using X+1 cities to produce something that requires one of those resources resource, one of those cities is gonna be producing it at the normal (slower) rate.

What's the difference? This is basically how the binary system works--"double production speed with marble" and such. In fact, I think this system is even worse, because there are no limitations on what you can build, only on how fast it gets done. Iron, copper, stone, et al., might be very plentiful in the real world, but if you're planning a complete overhaul of the resource system (a la Colonization) this doesn't do any good.

Health Resources: Each one will add one health to X cities. X will vary based on what makes strategic sense.

Luxury/Happiness Resources: You know the drill. Each one will add one happiness to X cities. X will vary based on what makes strategic sense.

War Animals: Horses will be able to support X mounted units. Stables require horses, but will also generate more horses. I guess Ivory should work the same way too, no? And stables could generate additional elephants assuming you have one hooked up?

This I like. It's easier to deal with, and it makes more sense. I would prefer to put war animals in the truly quantitative category, but I suppose I can do that myself. ;)

Fuel Resources: Uranium, Coal, and Oil will be the true "quantifiable" resources. Each one will generate X "power" or "fuel" per turn, perhaps with power plants or some other building. Either way, the more you have, the more you'll be able to do. Fuel/power will definitely be required for certain units and buildings. It may even be consumed by higher population and tile improvements. This is definitely open to tweaks and changes.

Am I to understand that in this system oil = coal? That is, you can have either one or the other? How will that work for a steel mill, which requires coal and iron to make steel? Will oil substitute? That would be absurd.

This is where Colonization again comes in: lets say you have 4 tobacco produced on a tile per turn, and you want to "refine" that into cigars with the tobacconist shop. The problem I forsee here is that we have to be careful with the OR distinction, so as not to lump together an entire class of disparate resources. In this example, you wouldn't want the game to treat the tobacco the same as, say, cotton, when it looks at the production chain. Otherwise the entire raw materials-->building-->manufactured products system collapses.

Having politely put forth my complaints now ;), I ask this: once this is finally done, could I simply mod everything (except food) to be in the last category, the fully quantified one, without too much trouble if I wished? If so, then I withdraw all my complaints. :D It becomes a modder's preference.

EDIT: If you want a more concrete description of how I feel, this post says it all. :D
 
As I understand it, the categories listed are the ones that will be provided and the resources which will be included under each by default. By going into the XML, I believe that you should be able to assign whatever resources (including additional modded resources) to whatever categories you wish. That again, is just my understanding, but it's hard to believe, given the description, that these categories could be hard-coded in.
 
That's how I understood it, but I have the bad luck of not reading the fine print sometimes...

Anyway, so long as I can set all of the "strategic" resources to a completly quantitative way, I'll be happy. None of that "slot" business. :)

"No slots for you!"
 
I imagine some people will want to have more quantitative resources than others. I think this is the most "thrifty" way to do it. Hopefully people won't go overboard with 40 different kinds of quantitative resources, though. Still, I guess that's their prerogative.

In theory, you might even get more thrifty... The only reason Firaxis has multiple resource types, it seems, is to create a 'collect them all' mechanic. There's no benefit to having 3 corns. But there's a benefit to collecting the wheat-corn-rice trifecta. In here, we've gotten rid of that "collect them all" mechanic, thus making all resources equally valuable. If we wanted to just have "Grain", we could go that route. If we wanted to turn Gold, Silver, and Gems into "Precious Stones", we could do that too. But people are used to it, and it's nice for flavor, I'm hardly going to push for it.

You've convinced me, Dom Pedro, on Elephants too. It seems to me that Elephants could just be like Horses without the stables bonus, and that would make sense. It would also be more fair for gameplay, seeing as Elephants are quite powerful (strategically) and were not used in any wide spread manner (realistically). Every reason to keep them more reasonable.
 
Gaius Octavius, I have no intention of changing the Reactions system as mentioned in my earlier post... to me this is the best way to do things... I still maintain that it's a sound idea. This would not be integrated into but rather would be instead of TheLopez's system, which while it broke new ground had the flaw that you couldn't set multiple production chains effectively for one building...

So if you wanted to say that Factories could take Pigs and turn them into Porkchops OR take Steel and Rubber and turn it into Cars, you couldn't do it... setting "or" values would've just made it so that you could turn Pigs and Rubber into Cars or take Steel and make it into Porkchops or some other crazy combination... my reactions system handles each conversion as a separate action and allows for the creation of more than just resources....

In fact, I'm going to take a hard look at the possibility of being able to consolidate as much existing code as possible into this system since I think there's a lot of stuff that will become redundant with this...

The real issue I'm having now is with what might be called the "true quantitative system" vs. the "abstract quantitative system"... before we were basically working towards a dual system with truly quantitative resources and totally binary resources... what's now being discussed is a system in which ALL resources are abstractly quantitative...

Definition: True Quantitative Resources would be a system in which resources are extracted and stored in a player's inventory. They would work much like the existing Yields system in that they would represent real units of a commodity and could be stored and spent as needed.

Advantages:
  • Allows for saving and storing of resources for later use.
  • More precisely represents a real working production economy.
  • Allows for precise trading of resources to other civilizations rather than handing over an entire source of a particular resource.

Disadvantages:
  • Requires massive reworking of the SDK code.
  • Potentially complicated for players to manage effectively. (Of course, without a working system, there's no way to know how hard this will be)
  • Makes it extremely difficult for Bonus Modifiers to be applied to other areas such as Yield increases, Unit and Building production speed, Tech researching speed, etc.
  • Requires a separate set of rules and mechanics for luxury and health resources.

Definition: Abstractively Quantitative Resources (why can't we have shorter names? :shake: ) basically means that we have moved away from a strictly binary system where one resource satisfies all needs and instead opens up the possibility of opportunity-cost for Resources. In this case, a source of Iron represents a finite number of opportunities per turn. This includes the opportunity to be used in a reaction to produce additional yields, commerces or other resources, to be spent towards modifying another game aspect (such as tech research, changing improvement yields, route speeds, unit production speeds, or improvement builds), or to satisfy the prerequisite for production of a unit, building or wonder.

Advantages:
  • Requires considerably fewer alterations to the game code.
  • Offers greater simplicity of resource management.
  • Allows easily for Bonus Modifiers.
  • Offers a unified system of resources where all resources are bound by the same rules.

Disadvantages:
  • Allows for no "rainy day" storage of resources for later use.
  • Requires existing all-or-nothing resource trading with other civilizations where a whole source of a resource must be traded.
  • Offers a less realistic model of a working economy.

I know you're not crazy about this idea, Gaius... but it seems to me like the disadvantages of this system are out-weighed by the advantages... which do I like better? I, of course, like the truly quantitative system better... but when it comes to which one do I think could reasonably accomplish most of the goals, I think a more abstract system is the way to go.

A game must have abstraction somewhere. Without any abstraction, it's not a game... it's reality, and even if we wanted to make a virtual reality, we certainly lack the technology to do it at this point in time.

For me, any system that is implemented has to be able to satisfy that bonus modifiers issue that I mentioned. TheLopez, my modding hero, made a great little modcomp that added tech resource modifiers to the game... with this, having a supply of Copper would reduce the research time to produce Bronze Working and Iron to produce Iron Working... and these resources would become available sooner... The development of working gold and copper greatly impacted the later ability to work iron. Gold and copper are much softer metals and have a much lower melting point than Iron, and it's gold that most civilizations that developed metal working at all started working with. Horseback Riding is another example... I find it's easier to ride a horse when you actually have a horse. It's much more difficult when all you're getting are stories of horses in some other country. I want resources to be able to impact technological development... Currently, if you have a supply, the modifier is applied and if you don't, it isn't... but with a quantitative system, it's not a "have or have not" question. It's a question of consumption... I don't see a way to be able to add this with a truly quantitative system.

Similarly, the issue also applies with the other bonus modifiers I mentioned in previous posts. To me, these are just as crucial to an economic model. The economy is more than just production chains... it's also about the real direct impact the bonus has on the society and economy. It's about the real changes it brings in the way things are done, and these bonus modifiers are crucial to me to represent these factors. It also gives a greater total reward to the player for having these resources.

But it's a lot easier to say that one slot of a given resource is reserved for these things than to say 1 unit of Horse consumed per Farm or 1 unit of (Iron, Copper, or Bronze) per Mine. Similarly, just having 1 unit of a resource in your inventory to satisfy all improvements would make no sense either... No, the "have or have not" factor cannot be applied here. Again, consumption is king in any quantitative system.

If you can come up with a system that will allow me to have these modifiers which can already be easily applied with even the existing binary system that will justify the complete gutting and rewriting of large sections of game code to make the system you want, I will do it. But I need more than just vague ideas. I need concrete math and a clear and distinct layout of any proposed game mechanics. Remove those items from the disadvantage list and I will make it... but at the moment, I'm suffering from a loss of creativity as to how to make this work. It seems to me like it can't be done.

That said, I think we all have agreed on one point: luxuries should be abstractly quantitative and not strictly binary. So that's something I can work on now while the debate continues to rage over the strategic resources. I can also develop the reactions system although precisely what the final shape will be is uncertain until after we settle this other problem.

I want something to satisfy everybody here... especially since this was Gaius Octavius's thread, but at the moment at least, a truly quantitative system doesn't seem the best route to me... prove me wrong. I'd rather have the truly quantitative system to be totally honest.
 
Reading your last post, Dom, it occurred to me that perhaps some kind of combination of the two systems would ultimately prove to be most useful. On to your question about bonus modifiers and techs…

Believe it or not, I think I may have the solution!

The problem is this: we want to have techs influenced by resources, e.g. bronze working is speeded if you have access to copper, and the problem comes in how to deal with the quantitative aspect. I see three options.

# 1. You could always opt for a pseudo-binary system, where so long as you had a supply of a resource you get the bonus. In pseudocode, this would be something like “if iCopper != 0 then iTechBonus = X” where X is the bonus you specify in XML. Not very creative, I admit, but it’s a fallback option.

# 2. Now this is where it really gets interesting: tie the research bonus into your stockpiles. More concretely, let’s say you have a copper mine that makes 10 copper per turn. You aren’t doing anything with it yet, because you don’t have the technology to make bronze. So the copper is just sitting there at the moment, being stockpiled. Well, we could imagine that with all that spare metal to experiment on, people will suddenly begin to realize, “Hey! I can make bronze.” This would be reflected by your stockpile.

The tech bonus would be applied per X copper in the stockpile (and probably based on game speed or map size, too, but that’s a non-issue here). Example: For every 100 copper in your stockpile you gain a 10% reduction in the cost of bronze working. If you have lots of spare copper for people to experiment on, bronze working is cheaper… scarce copper therefore means higher bronze working cost. If you have 500 copper, bronze working comes at 50% of its normal cost. You could also set an upper limit on it if you wished.

# 3. This is my favorite one. Following the idea of #2, instead of basing it solely on how much you have already stored, you could base it on how much (gross) copper you are producing each turn. Let’s say you have 3 mines, each making 10 copper. This is a broader supply than just one source, representing diffusion throughout your empire, so you get a research bonus per every X units produced per turn. This is almost like a hybrid between the binary and slot systems, but not quite, as it allows us to retain the rest of the true QR features that you like. For that reason I think this is the best option.

This option also best reflects reality IMO. I think of blacksmiths who are busy forging iron in their workshops. It stands to reason that if you have more of them doing it, which is represented by more production per turn in the game, there’s a much higher chance that somebody will figure out how to combine it with coal to make steel. Hence, you get a set bonus to the steel tech per X resource made each turn.

Example: you have 3 mines making 10 copper, as we said before, and you've already specified in XML that 5 copper produced each turn = 10% research bonus toward Bronze Working. Hence, you get a 60% bonus from all three mines. With only 1 mine, you get just 20%... with 10 mines, you get a 200% bonus. More is better.

A World War II example: suppose I wanted to give a research bonus to Fission from uranium. If my enemy pillages or bombs all my uranium sources, I have nothing to work with... hence no bonus. If I have only one small source making 5 per turn, that's not a lot for my scientists to work with, so I get a measly 10%. If I have 10 sources spread all across the country, however, I can sustain a bigger research effort like the U.S. did, meaning a higher bonus. I think you get the picture.

There are several similar ways to do this: you could base it on the net production instead of gross; e.g., if you get 15 raw copper per turn, but you’re using 10 of it for some reason (we won’t ask what for in this example) then you have a surplus of 5 per turn. Therefore, your scientists have only 5 net to experiment with, so only 5 go towards the BW bonus. However, I don’t like this as much as the gross method, because it doesn’t take into account all the discoveries made by accident in history, like the iron-steel example I gave.

What do you think?
 
BTW, Dom, I happened to look at the Age of Man website in your signature, and I noticed there are some very similar ideas about resources there. Has anything ever come of that mod?
 
BTW, Dom, I happened to look at the Age of Man website in your signature, and I noticed there are some very similar ideas about resources there. Has anything ever come of that mod?

Well, the website is in terrible need of updating... I created it for a college web design project and then never really maintained it after that.

The short answer is that I'm still working on it. It's why I want to make a quantitative resource system. There's a lot of game mechanics I need to add or change before I can even really think about putting it all together. Unfortunately, I'm just one lone amateur coder trying to do all of it :(

Thankfully at least some of the stuff has been added by Firaxis (vassal state in particular) and other stuff has been created by other modders...

But my very ambitious internal political system is still mostly on the drawing board and has also changed quite a bit since I last updated the website.
 
The best way to sum it up is you have a stockpile system (build up a reserve supply of a resource) and a capacity system (allows you to run up to X units/buildings). The capacity system would be simple: a tile provides 3 iron, so you can gain a maximum of 3 simultaneous benefits (whatever consumes iron).

Let me add one more quick thing about the capacity system:

Definition: Abstractively Quantitative Resources (why can't we have shorter names? ) basically means that we have moved away from a strictly binary system where one resource satisfies all needs and instead opens up the possibility of opportunity-cost for Resources. In this case, a source of Iron represents a finite number of opportunities per turn. This includes the opportunity to be used in a reaction to produce additional yields, commerces or other resources, to be spent towards modifying another game aspect (such as tech research, changing improvement yields, route speeds, unit production speeds, or improvement builds), or to satisfy the prerequisite for production of a unit, building or wonder.

Advantages:

* Requires considerably fewer alterations to the game code.
* Offers greater simplicity of resource management.
* Allows easily for Bonus Modifiers.
* Offers a unified system of resources where all resources are bound by the same rules.


Disadvantages:

* Allows for no "rainy day" storage of resources for later use.
* Requires existing all-or-nothing resource trading with other civilizations where a whole source of a resource must be traded.
* Offers a less realistic model of a working economy.

The capacity system doesn't require all or nothing resource trade. It's simple. Say, each iron tile unlocks 3 iron resources (hey, it could even vary by one or two either way, to offer some randomness). You use 2 out of those 3 iron resources to build 2 swordsmen faster (or build 2 swordsmen at all). The third iron resource, you trade it off in order to make some extra cash.


That means that of the two remaining disadvantages, one of them is realism. I love realism, but I'm also willing to throw it under the bus for game play: why implement breakfast-lunch-and-dinner when you get most of the same game play from just food? The only disadvantage of any consequence is the lack of strategic stockpiles. That's the only loss of game play that we need to deal with.

I have a few suggestions for dealing with strategic stockpiling under the "capacity" system:

(1) Explain it away: "Capacity" suggests that you can push to a maximum level, beyond which you don't receive the same benefit. There's also the idea that you can run at less than full capacity. Running at half capacity doesn't imply a benefit. When you don't need as much iron, you just mine less. When you aren't building tons of iron units, it's not like those mines are pumping out iron that you put on the shelf. And, in real life, does anyone ever really run out of iron or copper? No. Capacity just tells you how far you can push before you see diminishing returns.

(2) Abstract it: Let's say you find a tile that supplies 3 iron. If you're constantly pumping out swordsmen 3 at a time, eventually that tile might randomly downgrade to providing 2 iron. Or, vice versa, if you're not using that tile at full capacity, you might get lucky and that mine starts supplying 4 iron. This simulates the idea that running at full capacity will drain a resource, while staying at only half capacity might actually save more of that resource for a rainy day.

(3) Selective Stockpiles: Would this really be that bad? Fuel, Aluminum, Iron, and Copper are the main ones we want to stockpile. Marble, Stone, Horses, and Elephants could still work on a capacity system, like health and luxury resources. If we're selective, we can avoid the complications of stockpiling too many different resources. As for bonus modifiers, they could be simply computed in this way: each tile/building/unit drains whatever it needs from the stockpile. If you still have more than 1 left in the stockpile, then the bonuses work. Once you hit 0, the bonuses stop. It's almost like the binary system, except 12000 oil is the same as 1 oil when it comes to the bonuses. 0 is still 0.

Just my two cents. I definitely want to be helpful.
 
Interesting ideas, as always dh_epic. I think we’re very close to having this figured out. I’ll throw in my two cents…

The capacity system doesn't require all or nothing resource trade. It's simple. Say, each iron tile unlocks 3 iron resources (hey, it could even vary by one or two either way, to offer some randomness). You use 2 out of those 3 iron resources to build 2 swordsmen faster (or build 2 swordsmen at all). The third iron resource, you trade it off in order to make some extra cash.

This sounds very close to the existing binary system, which means it would be easy to code. As it stands now, if you have 4 or just 1 iron supplies it doesn’t change anything. All we’d have to do is set it so that a city producing an iron-based unit would subtract one iron from your supplies, similar to depletive resources. Hence, if you have 4 iron supplies, you can build 4 iron units OR build 2 and trade 2 away, and so on.

The only problem I see is that having a Capacity System (thank you for the shorter name!) and a Quantitative Resource Stockpile is that it would be redundant. UNLESS, that is, you were going to use one system for one type (luxuries) and QR for another (oil, steel, copper, stone…) as you suggested.

Selective stockpiles might be the way to go. I’m not sure if that would complicate the coding aspect of it, but at least this way the user could define in XML what you wanted to be “binary-ish” and what is QR. The trouble would come in with diplomacy trades and the AI coding--we’d have to make the game know when to trade quantities and when to trade more abstract binary supplies.

The other option, if this is an issue, is to make everything fully quantitative, but arrange it so that you never have to worry about certain resources (luxuries). They’d always make more than you could use, so in practice it would work just like the current binary system. This has a lot of other problems though.

…each tile/building/unit drains whatever it needs from the stockpile. If you still have more than 1 left in the stockpile, then the bonuses work. Once you hit 0, the bonuses stop.

This is how I see us getting around the luxury issue. Let’s imagine you have a plantation which makes 10 silk per turn, and 5 cities with markets that retail 1 silk each. You have a surplus of 5 per turn, which gets stored, so the user never has to worry about it. But once he exceeds 10 cities, his net flow is negative, so when that counter hits 0 the happiness bonus stops in all cities. This is why you’d need the ability to turn buildings on/off (which is what Dom is doing IIRC) so you could deactivate the use of silk in some cities with markets, e.g. by using a toggle button. That way, you could direct where the resource is getting used and some cities, though not all, would get the bonus.

Of course, the much easier way is with the capacity system, where one luxury supplies happiness to X cities. The problem I see is, which cities does the game choose if your demand exceeds supply? It’s the same problem either way.

I have some very concrete examples from other games that I believe we could use. I’m going to think about this a bit and try to come back later with a grand unified theory of resources…
 
We definitely agree we want a stockpile (true quantity) system for fuel. And we definitely agree we want a capacity system (abstract quantities) for luxuries and health resources. It's the other strategic resources that we're really debating.

But otherwise, I don't think there's a problem of going with two different systems in the same game. It's just a question of which will be the lucky resources that get the true quantity stockpile system.

Allocating bonuses in the capacity system will be tricky. It's no problem if you're consuming less than you have. It's only an issue when you're running a deficit. I suggested that luxuries are spread out between your cities to minimize unhappiness. That is, a deficit will result in 4 cities with one unhappiness, rather than one city with 4 unhappiness. Dom Pedro seemed to think he should/could allocate it by proximity -- with more distant cities getting cut off of a resource should a deficit occur.

The stockpile system is just as tricky, if not more so. Okay, so once you run your stockpile down to zero, cities and units start getting cut off. Which cities and units feel the heat? You'll still be generating *some* of that resource next turn -- just not enough to build any kind of stockpile, and not enough to satisfy all your consumption needs. I guess proximity to the capitol might work?

The only thing currently in Civ 4 along those lines is the "strike" system, when you run out of money, and your tax slider is at 0, and you're still losing cash. I'm not sure if that offers us much insight.
 
I believe I have successfully sketched out a framework which will combine everything we have been wanting, but is still possible to code using existing game features as a base. And to quote someone else on this forum, “No, I don’t blame anyone who thinks this is sickeningly long.”

These are the current Civ 4 resources (35 altogether):

Strategic (9):
Aluminum, Coal, Copper, Horse, Iron, Marble, Oil, Stone, Uranium

Luxury (15):
Dye, Fur, Gems, Gold, Hit Movies, Hit Musicals, Hit Singles, Incense, Ivory, Silk, Silver, Spices, Sugar, Whale, Wine

Food (11):
Banana, Clam, Corn, Cow, Crab, Deer, Fish, Pig, Rice, Sheep, Wheat


Broadly speaking, they are divided into three categories as shown. However, they are all fundamentally the same--they are all resources. They are all tradable in the same way, they are all binary, and they all provide some kind of bonus (happiness, health…) to every city connected to them. They are treated exactly the same.

We’ve talked about splitting them up before, and what I propose here is just that, with one major difference: the game recognizes each category as fundamentally the same, so it solves all the coding issues. The categories are largely user constructs. Only one category will be true (strategic) Resources; the others will be Food and Luxuries. It’s a no-brainer.

The problems we have been having for so long stem from trying to reconcile Stockpiled Resources and Capacity Resources. My proposal, which is not new, is to split them into three categories. Food resources will be non-quantitative and non-stockpiled; luxuries will be quantitative but not stockpiled; and only strategic resources will be both quantitative and stockpiled.


Here’s how it will work. Food resources will be set up basically like they are now--not quantified, not stockpiled. If you have access to one, that’s all that’s necessary to get health bonuses throughout your empire. My reasoning is that food resources can be grown on demand, unlike most luxuries and all strategic resources. So having access to one farm might seem silly if it can provide an empire-wide bonus, but you’ve got to remember that there may be 100,000 people working there on a area of many hundreds of square miles. A farm can expand and grow as much as you need in real life (within geographical constraints). If you don’t like this idea, we can make it like the luxury system, which I’ll explain below.

There is no need to stockpile food because in real life, this just doesn’t happen in the long term. Food spoils. Plus, most of the “storage” in the game is handled by the existing mechanic with granaries and tile yields, so any stockpiles for the Food category would be redundant. A true QR system involving food would necessitate an entire overhaul of the food system, which we are not prepared to do here. Maybe in Civ 5. Meantime, this is the best solution.

In the trade screen, Food resources will be traded only per turn, just like it’s done right now.


Luxuries will be halfway between Food and Strategics. They will be quantized, but not stockpiled. What do I mean? Simple: it’s like the slot system described earlier. Each luxury will provide so much output per turn with the proper terrain improvement. A gold mine might yield +5 gold per turn. However, this is not stockpiled, meaning you won’t have ~40 counters total to watch over. Instead, the sole focus is on the per turn production. In XML you could set it so that one gold per turn provides X cities with happiness. If you go over your supply limit, any new cities don’t get the gold bonus. It just doesn’t show up in the city screen--it’s like it’s not even there. (If this doesn’t work for you, we can debate city handling issues later.)

Example: a gold mine produces 8 gold per turn, and it’s set so that 1 gold provides 2 cities with happiness. That means so long as you have less than 16 cities, you’re okay. In the trade screen, this would show up as “+8 gold available for trade” on a per turn basis. So you can sell any excess gold to the AI for profit.

Once again, if you feel this is too complicated then we can simply take the lesser Food approach, which is largely binary.



Finally, there’s strategic resources. They are fully quantified and stockpiled, meaning you can define X stone is needed to build this wonder/unit/building, etc. You can also set up multiple production chains with various facilities and buildings, as Dom said in post 50. Trades with the AI will work just like trading a lump sum of gold does now; it’s added or deducted from your global resource counters. This way, you only have around 9 counters to keep track of, since only Strategic resources are stockpiled. And because they are stockpiled, we avoid the issue in Genetic Era where a loss of a resource will mean you can’t build any more units. You will still have your reserve supply.


A comparison to the current game setup:

We tend to forget that there is already one thing in the game that can be traded as a per turn or lump sum: MONEY. We can use that existing code here. Food and luxury resources will work almost like they do now, and can only be traded per turn. Strategic ones, however, will be traded quantitatively, in lump sums, and if we wished later on we can also enable per turn trades. So if you’re concerned about the coding aspect, my response would be to say that it’s already there; we only have to utilize it for these new resource classes.


Now, the issue Dom has is that this is a pain to code. He doesn’t want a hybrid system because it’s too hard to do. I can hear him objecting right now, and I understand perfectly. That’s where the surprise comes in.

The beauty about this system is that we can define ALL the resources as fully quantified, but it doesn’t show up that way in the game. The player never has 40 counters to check each turn. Hence, we scrap the old binary system like Dom wanted, and apply an entirely new one, but it still gives the illusion of binary resources for the ones defined that way. Here’s how I see it:

Each resource gets its own per turn counter (which measures the total amount produced per turn) as well as its own stockpile counter (which measures the amount already stored, and will only show up in-game for the strategics).

Food is the simplest. 1 corn resource = +1 corn produced per turn. 2 corn tiles = +2 corn per turn, etc. The stockpile is irrelevant here.

Luxuries are a step up. Instead of just one, they produce several, e.g. a plantation makes +5 silk per turn. The per turn counter is elsewhere used as a check against cities. Suppose 1 silk increases happiness in 5 cities as defined in XML. Hence, if you have +5 silk per turn and 13 cities, you’ll have a net flow of +2 per turn which you can sell to your trading partners without affecting your own economy. Again, the stockpile is irrelevant.

Finally, quantized strategic resources will have both. An iron mine makes +5 iron per turn, which gets added to the storage counter at the end of each turn. You can sell specific amounts to your friends, require X amount for a building, and everything else we’ve been talking about.

The best part is that Dom’s bonus modifier (for techs, etc.) can still be implemented. You just base it on the per turn production or stockpile of a specific resource, for the reasons I said before. And it satisfies the “80% of it is going on under the hood” test. The only thing the player will have to watch closely in-game is the new counter system for the 9 select strategic resources. So the moral of the story is everybody’s happy… I hope.

Again, 80% of it is going on under the hood. Each system is fundamentally the same in code, but the way they work in the game gives the illusion of very different properties. There’s just an extra bit of code needed for the happiness/health issue, but that’s all. The rest of the framework (e.g., for AI trading) is already in the game in some form.

So that’s my idea, and it’s open for discussion. We can tweak the fine points however you like, but I think the basics are sound. Please ask any lingering questions and tell me what you think.

EDIT: It seems FanaticDemon has done something similar to this (part of it, anyway) so I direct the reader to his mod for further information.
 
Another idea: for the happiness/health problems, you could define a tag in XML that sets how many cities 1 instance of the resouce applies to. For example, 1 gold might make 5 cities happier. You could also arrange it so that setting this to -1 means all cities are affected. That solves the last binary/quantum problem.
 
That makes a lot of sense, Gaius Octavius. Basically *everything* provides a per-turn value and it is stockpiled. The difference is what the player sees, and that's determined by the code.

  • Strategic resources provide a per turn value and are stockpiled. (These are the true quantifiable resources.)
  • Luxury resources provide a per turn value, and "spoil" instantly. The stockpile is always set to 0 at the end of a turn. This stockpile is hidden, but we do show the number of resources to indicate what you have per turn. (These are "capacity" resources.)
  • Organic resources provide a per turn value, but it's "infinite". The stockpile is always super high, and hidden. The per turn value is also super high, and hidden. If you have multiple corn resources, we don't show "3 corn" or even "10000 corn". We just show "corn". (These are the oldschool binary resources. Either you have it or you don't. And if you have corn, you can trade it to everybody and still have some left over for yourself.)

Of course, reasonable people may disagree about what goes where.

There's a lot of luxuries that are as renewable and growable as food -- like sugar, or wines, or spices. Even Hit Movies, or new potential resources like Coffee or Tobacco. These all provide happiness. It might be better to just make all of these into "capacity" resources.

Also, I think some strategic resources are better off abstracted as capacity. War animals, for example. Maybe even marble or stone or even some of the metals -- since it's not that these resources are the only sources in the world, but that these are the most abundant ones. You always have enough marble to build a marble palace, it's just nicer to have a clear source of it. You always have enough iron to build an army of swordsmen, but tapping into a vein of iron lets you build some of them faster.

That said, we can argue the finer points of what's binary, what's capacity, and what's truly stockpiled later. So long as we make it a priority to keep the number of stockpiles down around 7 or less, to alleviate complications.
 
Top Bottom