Quantitative Resources

Joined
Jul 28, 2006
Messages
4,016
Original Idea: May 19, 2007
Quantitative resources -- perhaps the biggest and best feature missing from Civilization, and something I've longed to see implemented. Seeing as how many of us have already thought about this, and as I'm only just beginning to get the hang of python, I'd like to request someone look into the idea of modding it into Civ 4.

Here's the basic idea: right now, if you get a resource, say horses, that one resource can supply all your needs for the entire civilization...unrealistic, to say the least. What I'd like to do is make it so that you can set in XML/Python (preferably XML) how many of each resource is produced/consumed every turn.

Example: let's say an iron deposit that is mined creates +5 iron per turn. Building a swordsman requires 10 iron. That means you have to wait 2 turns before you have enough stockpiled in order to build the unit, or if you have two mines, you can produce one swordsman per turn, etc.

This gives advantages to civs which have large resources in their borders, and makes it all the more critical to one-up your opponents with extra resources. It also means if your enemy pillages your mine, you have several turns before your supply runs out, giving you time to retake the plot and rebuild the mine. Coupled with oil in the modern age... I think you get the idea.

I'd also like to be able to set buildings that can produce/consume resources (already possible to some degree, a la Hollywood, Broadway or Rock 'n Roll), so I can set Factories to take in coal and iron and produce steel, for example.

This idea sounds a bit complex, but it's far from impossible. Does anyone have any ideas to point me in the right direction, or is there anyone out there currently working on this or who would like to take it on?

I should point out that quant. resources are already in the game to some degree, namely food, hammers and culture. Surely we can adapt this code somehow?

__________________________
Latest Update: May 13, 2008
In the time since this project was first discussed, Fanatic Demon has produced a very interesting mod that utilizes a kind of quantified resource system. This allows for production bonuses if you have a specific resource, like iron.

Grey Fox has also produced his Unit Fuel Mod, which implements individual (i.e. unit-specific) and global oil counters. Each oil-based unit requires X oil to be built, and if you don't have that much, you can't build that unit.

I also have created my own SDK mod that has a stockpile system as we discussed it, though I have not released it yet. Each unit and building will require a specific amount of a resource to be built, and when you run out you won't be able to create any more until you replenish your stockpile through trade or conquest. If you lose immediate access to resources, however, you'll still be able to build things so long you have a stockpile left.
 
Another thought on your factory resource conversion. Perhaps less ideal but more doable would be to add additional improvements for certain resources that convert them to others. For instance, building a Refinery on an Oil tile provides Gasoline instead of Oil. Gasoline would then be more more highly valued than straight Oil and worth more to the AI as well as useful for building a different selection of units than the more basic counterpart. A similar thing could be done for Cotton with a Textile Mill improvement to provide Cloth.

The basic idea would be to give the player and AI a way to make their resources more valuable in trade and more useful at home. Granted, it still doesn't help with the quantifying thing, and it also doesn't allow you to trade raw materials and then refine them yourself, but it might be the start of an improved economy mod.
 
I'd also like to be able to set buildings that can produce/consume resources (already possible to some degree, a la Hollywood, Broadway or Rock 'n Roll), so I can set Factories to take in coal and iron and produce steel, for example.

This idea sounds a bit complex, but it's far from impossible. Does anyone have any ideas to point me in the right direction, or is there anyone out there currently working on this or who would like to take it on?

TheLopez made a mod that does exactly what you describe here.

http://forums.civfanatics.com/showthread.php?t=179993

Cheers,
ripple01
 
TheLopez always does nice work. This resource converter seems to be the only rudiementary attempt at quantitative resources and "refining" I've seen so far, though the other ideas are as yet untried.

What exactly is his "Dynamic Resources" mod, which is in progress? Does that attempt to implement QR somehow?
 
Here's the basic idea: right now, if you get a resource, say horses, that one resource can supply all your needs for the entire civilization...unrealistic, to say the least. What I'd like to do is make it so that you can set in XML/Python (preferably XML) how many of each resource is produced/consumed every turn.

I completely agree with this assessment Gaius. This situation is more important when playing at the 'scenario' level where a fixed amount of time may be the situation.

Representing quantity across 4000 years of history is a bit complex but if your dealing with a time frame such as ww1 or ww2 then quantitative resources would be an obvious strategic element. I think that military and infrastructure production should be reflective of resource production.

Now I know that this could get blown out into one of those ideas where the complexity outways the realism, but keeping it simple, it would use the same basis as Duke 176'S beta oil mod, where each oil well produces X amount of oil per turn and a global counter is stored and used. His mod predominantly deals with fuelled unit movement, but changing this code could obviously allow more global counters to be maintained and X amount of each resource to be used to produce something.

The only problem I see at first glance is how does the AI handle production when half way through its turn (or even fanlising your own city queues) it runs out of specific resource. Would it just halt production the same way as when you run out of money or a wonder is built by another civ...or would it bomb out with a CTD at worst :(
 
Basically, the way I was thinking, if the AI runs out of resources, it just can't make any more of those units or buildings. All the resources would be necessary at the outset, so this isn't a problem. From the moment you click 'build' the necessary resources are subtracted (if you decided to halt construction later in the turn, before it actually starts building, your resources can be refunded). So if the mine or whatever is then pillaged it won't affect in-progress construction, but it will affect any future construction.

It works like money: once you pay for a building or unit, you can go bankrupt as far as the game is concerned, but it won't affect your construction. Here, even if you lost a critical resource you could continue to build it normally as your hammers accumulate. But if you're short of oil, you couldn't build any new tanks, for example.

Am I confusing the issue? This is why it will be a bugger to implement in Civ 4, but I am hopeful for BtS.

EDIT: Upon pondering your question some more, I find a good analogy with the missionary units. The game simply won't let you build more than three at a time, as the option is greyed out. It would be exactly the same if you don't have enough resources. The tally runs immediately after you set the build queue. Here's a more concrete example:

Let's say you want to build a Factory, which requires 10 iron and 5 stone. You have 30 iron and 12 stone, and want to build three factories. When you set the build in two of your cities, the game subtracts 20 iron and 10 stone, leaving you with 10 and 2. The option to build in the third city is therefore greyed out. If, however, you cancel one of the factories, you can build it in the third city. It works just like anything already in Civ 4 that requires a certain number of X, e.g. cathedrals.

I know this sounds overly complicated, but for those who are unfamiliar with QR I say give it a chance. I've played many strategy games where QR are implemented and let me tell you, it really adds depth to the gameplay, even if it spans 4,000 years. ;)
 
Actually what you propose would work better. I assume that you would require counters to control accumulation of resources. This is where the nitty gritty work would be involved :sad:

Overall I dont think its overly complicated assuming it is limited to production and not every other aspect of the game.

Obviously if anyone was to tackle such a prospect, it would be best to wait until BTS as their would be new source code available with additional exposed functions that could be useful.
 
yah.. this would be an excellent modcomp, i know colonization mod has been hoping for something like this, and so have i with my mod. thelopez's resource mod is like halfway there, but he stopped working on everything to do the editor..
 
If only Duke176 was around to get involved in this discussion. He was the only one who actually implemented a counter per turn on resource development (that I am aware of).

I wish someone with the expertise and knowledge would give something like this, or simpler a go as it would be a mod that most people would use in a heart beat ;)
 
Adding quantative resources is quite doable, but it's also filled with problems. The main issue that I see is when you need a certain quantity of a resource to produce something like a building or a unit.

Because if you're building a wonder, and it costs 500 stone for example, should 500 units of stone be taken right at the beginning? What if you can't finish it? Should it come all at the end? So you built the entire pyramids without a single block of stone until the very end? Or should it be a "per turn" requirement? And is that really fair that a city where it takes twice as long to produce the pyramids should require twice as much stone to build it?

However, I think Gaius Octavius may have hit upon the solution to the problem... The total sum of a resource could be earmarked for the construction of a building or the training of a unit up front, but if for some reason, the item is cleared from your queue, the resources would be put back into your resource stockpile.
 
I think a few of those problems can be address easly and effeciently using built in Civ4 mechanisms.

Using the example of the Pyramids and requireing Stone.

The total Stone cost would be equal to its cost in Hammers and each turn a number of stone equal to the number of hammers put towards it would be removed from the cities stored supply of Stone. I think this is the best solution as it removes the need to come up with new stats like iStonePerTurn, iMinStonePerTurn, iMinStone, iMaxStone, iTotalStone, ect. or any complex algorithms for the amount of resourse per hammer per turn, blah, blah.. In the end that will be very easy to do in python.

A good point was brought up about the per turn idea and what happens if a city doesn't have enough of the required resourse on a given turn. In theory this could be handled by the same mechanism that stalls production when a city is in revolt, which along with an alert popup telling you it can't build this turn would handle the situation from a human player perspective, allowing you to just wait till the next turn or que the stalled build and work on another build. And from the AI perspective, I think a simple switch of if (currentBuildResourse < iReqResourceNum) could be used to tell the AI to que its current build and work on somthing else.

This modcomp is going to be an intrigal part of the scenario I am making and is third in line on my todo list. I should have a beta out in a month or two, but it will be out, so keep up the debates as I get alot of good ideas from reading these forums. :)
 
Using the example of the Pyramids and requireing Stone.

The total Stone cost would be equal to its cost in Hammers and each turn a number of stone equal to the number of hammers put towards it would be removed from the cities stored supply of Stone. I think this is the best solution as it removes the need to come up with new stats like iStonePerTurn, iMinStonePerTurn, iMinStone, iMaxStone, iTotalStone, ect. or any complex algorithms for the amount of resourse per hammer per turn, blah, blah.. In the end that will be very easy to do in python.

I don't know; this makes it sound kind of simplisitic, or worse yet, redundant, though you do make several good points. Just exchanging resources with hammers, broadly speaking, is an interesting idea but it might create more problems than it solves. I always thought of hammers as a measure of production power, not necessarily related to resources. An elaboration:

If someone gave me all that was necessary to build a skyscraper (tools, steel, glass, etc.), I could do it... in about 300 years or so. However, a group of people with the proper facilities ( = more hammers) could do it much faster as we all know from experience. So it's not just a question of having enough iron or steel to make, say, your broadcast tower, it's also all the miscellaneous stuff represented by :hammers: that deals with how fast you can build it. So I'd rather see entirely separate resource counters.

However, as you point out it does become a pain in the programming. :D But in the end I think it's worth it. And again, you just have the resources deducted as soon as you set the build, and the mid-stream problem is gone.
 
Okay, this may be a bit redundant, but here's a specific example taken from another game:

Factory
Costs 5 iron, 5 lumber, 5 stone to build. (Lumber's kind of superfluous for Civilization so we can leave that out.)

A stone Quarry can produce 8 stone per turn. An iron or coal Mine similarly produces 8 per turn.

Here's how I see it: at the end of each turn, the new resources produced by the mines are added to a counter. (I'm guessing this should be at the end of the turn, not the beginning, so pillaging has a realistic effect.)

So now it's turn 2, and you have 8 iron, 8 coal and 8 stone. You want to build a factory in York. Okay, the game earmarks 5 iron and stone from the counters for the factory, leaving you with three each. So now if you wish to build another factory in London, you can't, because it's greyed out. The AI control can work just like you said. If you change your mind mid-turn, the game "refunds" your resources and you can then build in London. Hammers, however, are totally irrelevant here; they will only control how fast the city completes the production, not whether it can at all.

Changing resources:
Additionally, let's say a factory has the ability to make 1 steel out of 2 coal and 1 iron, like with TheLopez's mod. That would mean that your iron mine is now effectively only producing a net +7 per turn, because one automatically gets used by the factory in the process of steel making. (This won't really affect construction yet because that's based on a flat number, not per turn amounts.) Here's where it gets to be important: what happens if you set more factories to build steel than you have iron to use? You'll get a negative resource flow, and the supply will slowly dwindle. So my guess is you'd need some way to set "no production" or else turn the resource manufacturing off, since you can't sell buildings in Civ 4.

Diplomacy trades are also affected, because now you will be able to buy resources in quantity from other players. This could end up giving us a realistic import/export model.

This can have major applications in one rather obvious way: the coal plant. If you power your cities with coal, well that just means less of it to use for other more productive applications, like in real life. I could also see an option for limited resources, e.g. where each tile only supplies a certain number before it's exhausted, just like in real life. (Although I'm content to have an infinte number for now. ;))

This resource managemnt is kind of like in Colonization, which I see you're also working on :goodjob:, and it was always one of my favorite parts of the game. I like to get everything running smoothly and efficiently with factory machine-like production, with the resources being converted into useful forms, etc. I am excited to see that people are really interested in this and I hope I can continue to contribute meaningfully.


EDIT: Just had another interesting thought. Building railroads requires iron, yes? Well, if we change it to a QR system, that would sort of make it wasteful (and harder) to have railroads on every tile, which is unrealistic. This could lead to a lot of good things...
 
I am at work right now but this idea is growing hugely on me. I will try and map out several ideas to capture various ways of doing this and this way we can also identify pitful along the way. I will assume that TheLopez's building resource convertor will be included in the scheme.
 
So now it's turn 2, and you have 8 iron, 8 coal and 8 stone. You want to build a factory in York. Okay, the game earmarks 5 iron and stone from the counters for the factory, leaving you with three each. So now if you wish to build another factory in London, you can't, because it's greyed out. The AI control can work just like you said. If you change your mind mid-turn, the game "refunds" your resources and you can then build in London. Hammers, however, are totally irrelevant here; they will only control how fast the city completes the production, not whether it can at all.

Ok, I'm with you on that, but here's the problem... Using the numbers you've provided, this sounds like a good plan. But to have buildings like a Factory costing less than even a single Quarry could put out in one turn seems to make having that resource almost pointless. When we get to bigger things, like Wonders, we would expect that vast sums of any given resource would be required for its completion. That in and of itself is part of what makes it a Wonder...

So let's say that we make it so that the Pyramids require 250 units of Stone... which to me, if one Quarry produces 8 units of Stone per turn is a pretty good number... if you have to have all of the resource right up front, and you just hook up that Quarry with a road and start receiving the Stone... you're going to be waiting 32 turns just to start construction... but if you simply had to provide the Stone as construction went along and it would take 36 turns to complete, you could start immediately and have Stone to spare... or if it were a little less, you wouldn't have to wait as long.

But again, if you reduce the cost of the Wonder to make it so that you can start sooner, you run the risk of devaluing the resource to the point where it doesn't really serve a purpose.

Requiring "resource per turn" for construction of a building is a non-starter for reasons I mentioned already, so that's not a viable alternative.

And setting a specific number of 250 Stone that could be paid over a period of time doesn't really work either... Should the game take all the stone you have in your inventory and then deduct what it needs from your per turn production rate? Well, what if you want to use Stone for something else? You'd have to wait until the Wonder is built to start doing anything else anywhere else in your empire... allow the player to modify this number? Now this is really starting to get complicated and you still run into a major hurdle: what happens if the production completes before you have paid the resource in full? Would it make sense that the workers have completed the Pyramid without the Stone it's made of? Of course not... even if you withheld completion until after the Stone has been paid in full, it's going to be ridiculous if the "production" has long since finished.

So this takes us back to Jeckel's concept... now, this I think has some merit but with a little working. Instead of saying that the amount of resource required is equal to the amount of hammers required, establish a resource to hammer ratio...

See, I agree with Gaius Octavius's interpretation of hammers.. to me, hammers represent man-hours of labor. And those man-hours are influenced not only by shear manpower but also by technology, machinery and other tools that improve the work that can be done in a given amount of time.

So if you say that, for example, the Pyramids cost 450 hammers (and they do), you then require basically 0.5 Stone per Hammer. (it would be 225 Stone rather than 250... oh well). So if a city produces 10 hammers per turn, it will need to consume 5 Stone per turn... still leaving you 3 Stone per turn going into your inventory. On the other hand, if your city produces 16 hammers per turn, you've now devoted all of your Stone supply... with 20 hammers per turn, you'd actually have an insufficient supply of Stone if you had zero in your inventory to begin with and in that instance, your production would simply become waste and only 16 hammers worth of work would be done per turn. But as unpleasant as that sounds, you'd basically be wasting production sitting around waiting to have enough of a resource to start construction anyway.

Anyway, this system would allow us to have multiple resource requirements at different rates so we can say maybe we want some Marble thrown in there for a nice facade, but nothing compared to the volume of stone that would make up the majority of the structure... If you have a very limited Marble supply, the Marble then becomes the limiting reagent in this formula (sorry I'm starting to talk chemistry but it's applicable). And if you ran out of either, the production would stop completely since you have the manpower but you lack the materials for them to craft. Thus the man-hours go completely to waste.

However, in the meantime, you could switch production and keep the building in the queue and pick it up when you've got the resources again. So, yes, you might find yourself facing a loss of productivity because you're relying on a supply per turn of a resource, HOWEVER you have the freedom under this system also to stockpile ahead of time and have most or all of the resource you need before you even break ground.

Changing resources:
Additionally, let's say a factory has the ability to make 1 steel out of 2 coal and 1 iron, like with TheLopez's mod. That would mean that your iron mine is now effectively only producing a net +7 per turn, because one automatically gets used by the factory in the process of steel making. (This won't really affect construction yet because that's based on a flat number, not per turn amounts.) Here's where it gets to be important: what happens if you set more factories to build steel than you have iron to use? You'll get a negative resource flow, and the supply will slowly dwindle. So my guess is you'd need some way to set "no production" or else turn the resource manufacturing off, since you can't sell buildings in Civ 4.

Sure... basically, you'd make it so that the building becomes dormant. I would assume this would also apply for buildings that don't manufacture a new resource but rather just give other bonuses like extra culture, happiness, etc. Then if you get enough to continue, the building would begin to function again.

It would also be possible to add the ability to sell buildings... I mean, compared to the work required to add quantified resources, that'd be fairly simple.

Diplomacy trades are also affected, because now you will be able to buy resources in quantity from other players. This could end up giving us a realistic import/export model.

This could also allow for resources to be traded via trade routes to other civilizations under certain civics giving them more depth and difference from one another. And it would provide a real incentive to possibly not allow the Free Market since then your enemies (or at least potential enemies) might be getting important resources trickling in from your cities.

EDIT: Just had another interesting thought. Building railroads requires iron, yes? Well, if we change it to a QR system, that would sort of make it wasteful (and harder) to have railroads on every tile, which is unrealistic. This could lead to a lot of good things...

A good point... here come Highways!
 
Many good suggestions and points to respond to but heres a couple of quick things to think about.

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).

2. Strategic resource should be used to limit access to key buildings and unit production....and not all buildings. If we start to concern ourselves with bricks and mortar (sic?) then the concept gets to complicated.

3. Trading of resource (at the code level) should be identical as if you had physical access to that resource. Thus if France decides to give you one iron for 20 turns, then it is the same as having 20 turns of output for one iron mine in your territory. This way you take the quantity factor away from the AI which does not have a clue and just treat it theoretically as another plot in your territory.

4. Remember, the primary objective should be to represent the importance of strategic resources and the fact that losing them or the buildings that make them can impact your military and production capacity. I dont care if my jungle produces 100 gems per turn as it is not strategic, but on the other hand, if I plan to build a huge navy, I should have the necessary steel on hand.

EDIT: Of course 'strategic' resource would depend on the period of a game. Timber was important during the 18th century and steel important during the 19th/20th century...etc etc
 
Dom, you&#8217;ve raised a lot of good points, and the problems you mentioned out are all very real. However, I do think I can address them adequately. Indulge me for a moment in this rather long post:

But to have buildings like a Factory costing less than even a single Quarry could put out in one turn seems to make having that resource almost pointless. When we get to bigger things, like Wonders, we would expect that vast sums of any given resource would be required for its completion. That in and of itself is part of what makes it a Wonder&#8230;

Sorry about that. The example I am using is from an older game (which incidentally, was made by a longtime coworker of Sid Meier) where you had an entire system of building upgrades. The Quarry was a rather late one, not available until after gunpowder. The earliest &#8220;mines,&#8221; like the Diggings, as it was called, would put out less than half that amount because it was meant to represent Stone- and Bronze-Age technology. But I&#8217;m not worried about the particular costs of each building right now--people would mod them individually for their particular uses, anyway. That&#8217;s a later issue of balancing, not coding. (Actually, I disagree, because this late in the game you would have resources being refined, lowering your net surplus, but again that&#8217;s an issue for a much later date.)

I like what you said, so let&#8217;s continue with the Pyramids example.

So let's say that we make it so that the Pyramids require 250 units of Stone... which to me, if one Quarry produces 8 units of Stone per turn is a pretty good number... if you have to have all of the resource right up front, and you just hook up that Quarry with a road and start receiving the Stone... you're going to be waiting 32 turns just to start construction... but if you simply had to provide the Stone as construction went along and it would take 36 turns to complete, you could start immediately and have Stone to spare... or if it were a little less, you wouldn't have to wait as long.

This is a good assessment, though in the words of Doc Brown, &#8220;You&#8217;re not thinking fourth-dimensionally.&#8221; We&#8217;re all thinking in a very Civvish style, but let&#8217;s face it -- what we&#8217;re trying to do is very un-Civvish, even uber-Civvish. (Civ didn&#8217;t even have a system of true strategic resources until Civ 3.) You&#8217;re assuming one quarry and one stone deposit, but having quantitative resources necessitates a complete overhaul of the current way they are distributed. Right now, if I decide to play as my favorite civ, Rome, I might get unlucky and not have an iron deposit on my continent (or within my borders). But with QR, no more.

With QR, since it&#8217;s all based on quantity, there&#8217;s no reason for the rarity of resources, except maybe one or two. So I plan to redo the entire distribution system (easy in XML) so that each civ is not only likely to have multiple, but many (i.e. 3 or more) deposits of a given resource. So you wouldn&#8217;t just have one stone quarry -- you&#8217;d have at least two (assuming 3-4 cities) by the time you want to think about building the Pyramids. So you don&#8217;t have to wait nearly as long as you might think. Plus, even if you did have to wait, the same thing would be applicable to all civs, and it would simply delay the construction for everybody by X turns--meaning it would all come back to hammers in the end.

And setting a specific number of 250 Stone that could be paid over a period of time doesn't really work either... Should the game take all the stone you have in your inventory and then deduct what it needs from your per turn production rate? Well, what if you want to use Stone for something else? You'd have to wait until the Wonder is built to start doing anything else anywhere else in your empire... allow the player to modify this number? Now this is really starting to get complicated and you still run into a major hurdle: what happens if the production completes before you have paid the resource in full? Would it make sense that the workers have completed the Pyramid without the Stone it's made of? Of course not... even if you withheld completion until after the Stone has been paid in full, it's going to be ridiculous if the "production" has long since finished.

You hit the nail right on the head. It&#8217;s virtually impossible to implement any kind of &#8220;per turn&#8221; method when you&#8217;re talking about construction. The only reasonable way to do it as far as I can see is the way I&#8217;ve always seen it done in other TBS games: you pay up front. Either you have it, or you don&#8217;t, and you can&#8217;t start construction till you have everything necessary. Now, I realize this may not always seem the most fair way, but overall I think it is the best given the way it gets complicated (and fast) otherwise.

So if you say that, for example, the Pyramids cost 450 hammers (and they do), you then require basically 0.5 Stone per Hammer. (it would be 225 Stone rather than 250... oh well). So if a city produces 10 hammers per turn, it will need to consume 5 Stone per turn... still leaving you 3 Stone per turn going into your inventory. On the other hand, if your city produces 16 hammers per turn, you've now devoted all of your Stone supply... with 20 hammers per turn, you'd actually have an insufficient supply of Stone if you had zero in your inventory to begin with and in that instance, your production would simply become waste and only 16 hammers worth of work would be done per turn. But as unpleasant as that sounds, you'd basically be wasting production sitting around waiting to have enough of a resource to start construction anyway.

Anyway, this system would allow us to have multiple resource requirements at different rates so we can say maybe we want some Marble thrown in there for a nice facade, but nothing compared to the volume of stone that would make up the majority of the structure... If you have a very limited Marble supply, the Marble then becomes the limiting reagent in this formula (sorry I'm starting to talk chemistry but it's applicable). And if you ran out of either, the production would stop completely since you have the manpower but you lack the materials for them to craft. Thus the man-hours go completely to waste.

This is where I have to disagree. Again, your argument is based upon waiting around for resources to accumulate (which would equal wasted production in some senses) but as I said I plan to set up the distribution so this doesn&#8217;t happen for the most part -- unless you happen to be in a war situation and the enemy cuts off your oil, for instance. But then, that&#8217;s the whole point of it. ;)

I think the chemistry scenario is another great argument for the up-front approach, because if you have a limiting reagent then you&#8217;d have to switch the queue back and forth as you said whenever your supply was interrupted (very annoying), and knowing me I&#8217;d forget to set it back for a while, and then Mansa Musa would beat me to it by one turn. The up-front way, you can stockpile (or even buy the resources you don&#8217;t have from neighbors if necessary) and then begin construction. Then it becomes a traditional Civ matter of hammers and production power.

I realize I&#8217;m very much for the up-front method, but it&#8217;s because I have never seen QR implemented in a satisfactory manner any other way. It&#8217;s just too cumbersome. It&#8217;s the same with relating hammers and resource requirements. Now, it&#8217;s possible we can take into account the :hammers: cost of a building when setting the resource prereqs, as that&#8217;s just logical, but to go so far as setting ratios like 0.5 :hammers: = 1 stone I think would lead to other problems and ultimately might reduce the customizability for modders. Setting a flat rate cost in XML would be much easier.

So in summary, I think the &#8220;up-front&#8221; way, a flat amount required at the outset, is the best path.

One last question: you&#8217;re probably wondering in the case of wonders (sorry for the pun) what happens if it gets built elsewhere while you&#8217;re constructing it. Well, if we take the up-front path we have three options: you either get none, some, or all of the resources back. I&#8217;d vote for an option to allow the modder to set this value in XML -- say, 50 for half of the originals returned, or 100 to get everything back. Just like the hammers-to-gold ratios. That way we can all choose individually.
 
As I was writing my last post, I didn't get a chance to see what ww2commander had to say. Let me throw in my two cents.

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. ;)

Point 2:
I'm not sure I agree here. I am working on a major mod that will encompass 8,000+ years of history, and I'll want to have resource requirements for just about every building. But I promise you, the way I would set it up it would not be a hindrance (except for a few very important strategic resources like oil) unless you had a tiny, tiny civ.

Point 3:
This is a very good way to do it for per turn trade deals, and I agree 100&#37;. However, I'd like to look into the possibility of also opening up purely quantitative trades, e.g. France will give you 10 iron for 30 stone. This way it would be much more realistic and strategic.

Point 4:
Here I vehemenly disagree. I realize you might not care if your "jungle produces 100 gems per turn" because for you it's not strategic, but for me it might very well be. ;) It depends on your implementation. I was going to create a kind of retailing system which would inevitably involve the quantitative use of things like gems, furs, etc. In a Colonization mod, it's an absolute necessity.


You raise a lot of good points and I am glad to see we are having a serious discussion about this. I was originally afraid no one would be interested (some people are immediately against it because it smacks of RTS) so I'm glad everybody's giving their take on the subject.
 
I just wanted to throw my support behind this thing. Economy is one of the two weakest points in CivIV; relgion is the other. There have been many mods and components to fix the religions, but not much of anything to help the economy.

The ability to trade strategically (in a larger fashion than simply fish for cows or steel for oil) would greatly enhance the game, particularly if you could code in levels of value to different resources (i.e. the AI values gold more than food but less than iron).

I would caution a bit about going overboard with resource distribution, however. Don't make it so that in order to work, nearly every tile needs to have a special resource. There should still be some normal plains, hills, etc in there. Resources should be the exception not the rule. Otherwise, you could build a city just about anywhere.

Basically, what it seems to me you need is a system where resources produce X amount per-turn (as you've already said), but it needs to be a fairly high number so that a fewer number of resources can provide an ample supply. Remember that in Civ each tile is not really very local; a city is almost more of a province than a municipality. Similarly, a mine represents an entire area filled with mines. Western Pennsylvania can be one or two tiles with one mine each instead of five or six.

As another caution, I would advise against making too many requirements for buildings and units. They need some, especially wonders, but they still need to be buildable by most, if not all, players. I and every AI shouldn't need to go find four new marble sites in order to build the Statue of Zeus. One or two is perfectly reasonable, and waiting for those to accumulate marble for up to about five turns is also completely reasonable. But spending huge amounts of units seeking out resources and connecting them to my trade network, then waiting the equivalent of the production time for them to accumulate enough would not make for a good game, especially with the AI doing the same thing.

Bottom line: great idea and desperately needed, but keep it simple and don't be afraid to use broad brush strokes; the rest of the game does and it works beautifully as a result.
 
Vrenir, I agree with your view.

I think in our excitement we need to step back and maybe take baby steps as the whole process can become overly complicated if we need to calculate hammer to stone ratios or have to somehow track 20 resources that have dynamic quantity counters.....the idea is starting to get mind boggling just thinking about the things we may be breaking along the way with a mod like this.

We need to ask the primary question and holy rule: Will the AI know how to use it?

I.e can the shifty human player take advantage (horde rushing, trade rorting etc. etc.)

I think the opposite approach should be taken to begin with by restricting the proposed mod's abilities. Something like:

(All the below include take into consideration the quantity)
- Allow max 5 resources to be tagged as quantative along with quantity per turn
- Allow max 2 resources to construct specific buildings (but not all buildings)
- Allow ,ax 2 resources that are required for a unit to attack and/or move (but not all units)
- Allow ,ax 1 resource that is required per turn for a building to work/function

I know this suggestion might be dumbed down, but think of it as forumlating the building blocks that then can be expanded upon play testing.

Eitherway, lets keep this idea alive until someone can give it a go with the programming knowledge. :)
 
Back
Top Bottom