Dom Pedro II
Modder For Life
ww2commander said:1. Not every resource needs to use this system. Resources that are classed as strategic should use this system, and further to this, those that are in a controlled environment (produced by the civ via building conversion or strategic in quantity).
From a coding standpoint, I'm actually quite leery about having a hybrid system. The fact is it would be easier to replace the existing system than to create a new system that sort of piggybacks on the old one. Saying this resource will be binary and this one quantitative... it just runs into problems... it's better just to wipe the slate clean and build something new.
If you only want a couple of resources to be quantitative, my advice is to simply remove those resources you want and make them yields instead... then create yield requirements for units both in terms of construction and also for continued maintenance in the field (oil for tanks, food for troops, etc.)
RE Point 1:
I'm not sure I'm clear on this. If you're talking about food resources not needing to be quantitative, then I kind of agree, but hesitatingly. I could see other modders out there who might want to implement famines and whatnot, and this would be of interest to them. I know of one WW2 scenario where someone wanted to link food supplies to units, such that if all your food runs out your units start to die of starvation. Let's try to keep this open for all resources now. As you said, strategic is in the eye of the beholder. If we're going to do it for some, we might as well go all the way.
I was going to basically disagree with ww2commander here, but I also have to disagree with your example as well. The best way, IMO, to implement units requiring food is not to have a Bonus supply requirement but rather a Yield supply requirement. I mean, it would be a lot easier to say that a unit needs 1 Food Per Turn than 1 Corn OR 1 Wheat OR 1 Rice OR 1 Pig OR 1 Cow OR, etc. etc.
That said, there's a few other issues to be addressed: How will health and happiness bonuses from resources be handled? It wouldn't make sense to have +1 health or +1 happiness from each unit of a resource unless you dramatically devalued an individual point of happiness or health. You could set it so that you get +1 for every five units or ten units or whatever you want it to be, but does that mean you'd be able to stockpile it and get tons of extra happiness or health? You could set it so that you get the +1 if you have at least one unit of the resource in a city inventory, but that seems rather unrealistic as well...
The other possibility is that you have consumption rates like with food. Resources would be consumed by the citizens of a city, and if you meet the consumption rate, you get the +1 happiness or health, and if you fail to meet it, you don't get it. If you have a stockpile, it will continue to take from the stockpile if the consumption demands exceeds the supply rate.
While we're on the subject, I would also suggest that it would be a good idea to add some storage constraint options. The idea here would be that certain resources could not be stored.. or at least not very well. So instead of 100% of the resource carrying over into the next turn, some other variable percentage would carry over instead. That variable percentage could be influenced by different things... techs, civics, difficulty level and map size for example. For example, Refrigeration could be used to increase the storage capacity for the food resources. And for civics, certain civics reduce the quantity carrying over to represent a society where more stuff falls off the back of the truck.
There should also probably be some kind of decay value for resources so that you don't establish too massive a stockpile... over the years, time will erode your storage supplies... but you could set that decay rate for different resources, so food would keep for a lot less time than Iron or Stone.
These last two things are a bit beyond the scope of some of the basic problems, but I think they'll become important in the long run for economy management.