Quantitative Resources

The short answer on the When of a first release is that I have no clue... I'm just one relatively new programmer with two jobs trying to muddle my way through a very large change in gameplay... I hope that I can have an alpha for you in a few weeks... another factor will be based on the amount of python coding involved since I have virtually no experience with that. If, however, I could get an experienced python interface modder on board, then things would be much easier for me.
 
I love this idea
Could you have storage yards that increase the ammount that can be stockpiled?
Also would it be possible to have resources that give out a finite ammount. eg 1 oilwell supplys 10000 oil and another 8000. This could be random but could be changed in the editor for scenarios etc.
 
I was wondering if it made sense for you to basically shelve your changes until BTS comes out.
It sounds like the corporation concept is going to get you half way there in some of the aspects you want (resource conversion into other resources, al la TheLopez modpack), plus I assume you will want this to work with the most current game engine BTS.
 
I can understand that. It'll have to be updated anyway.

BUT... ;)
If we continue with it now, we can get many of the bugs worked out and then just update the XML once BTS arrives. The increased moddability in XML is one of the selling points of BTS, but that part of mods is always the easiest to update. It's my understanding that they haven't really changed the resource system fundamentally, so that shouldn't be a problem. ;)
 
I've realized that we've got some more problems to deal with... in this case it's the topic of the OR resources required to build something. I mean, if an item requires Oil AND Iron to be built, it's fairly simple... you just remove those two things from the inventory. But what do we do if something requires one resource OR another resource?

The best example of this would be for the Axeman or Spearman... you need either Bronze OR Iron to produce them. Currently you only need to have access to one or the other and the unit can be trained.... but now, something actually has to be taken away to train that unit. But which to take??

Should it automatically take the "best" resource which maybe would be considered the Iron? But why if Bronze will do? Not to mention that it might deprive you of the ability to build Swordsmen... and what about if it defaults to Bronze? If you've got a ton of Iron but not a lot of Bronze, this could hurt your ability to build other things that require Bronze like the Colossus....

The only solution I see, which I'm not especially thrilled with either is to simply take whatever you happen to have the most of from those two options. Still.. if you're stockpiling for a wonder and you suddenly find yourself at war and have to pump out a lot of a unit that requires that resource or another one that you have less of but in sufficient quantities to cover the cost of those units, you're stockpile of the resource you really need is going to be depleted simply because the game made that decision for you... will it be a rare instance where this might happen? Sure... but I'm not terribly happy about it.

Also there are other issues too... I really want to add certain modifiers for having bonuses... in fact, before working on this, I was working on a modcomp that would give additional yields on improvements, additional yields on buildings, bonus prereqs and bonus time modifiers for builds, and extra movement on routes if you had the right bonus... I was also going to add in TheLopez's bonus tech research modifier which modified the time it took to research a technology if you had a particular bonus.

So for example, you'd be able to build certain improvements and routes more quickly with metals or draft animals... farms and mines would produce more food and hammers with metals and draft animals, roads would be faster if you had horses or camels, Iron Working would be easier to discover if you had Gold or Copper to practice on...

The problem is that with quantitative resources, that would be considerably much more difficult to implement... and even if you could, if all these things consumed resources to produce their benefits, you'd probably be bankrupt on the resources you needed almost immediately unless you had Iron Mines producing thousands of units a turn that would get distributed throughout the empire to Farms, Mines, city's buildings, etc. and aside from being a logistical nightmare to keep track of all this, you'd also have a real drain on game speed to have the game managing all of that...

I dunno... I guess long story short is that the more I try to make this a reality, the more reservations I start to have about it.
 
What I'd do for the OR requirement is have the cost split as evenly as possible between the available conflicting resources.

So if an axeman costs 50 either bronze or iron, and you have 100 bronze and 30 iron, then each resource would be deducted 25 to build the unit. In another example, say you have only 15 iron but still 100 bronze. Then the axeman would end up charging all 15 of your iron and 35 copper.
 
I believe I have the solution to this problem. There are 3 possible avenues:

1. You set it up so the game takes whichever resource you happen to have more of at the time, as you said. This is probably the easiest way to do it, and I'm for this if no other way can be found.

2. Get rid of "OR" resources altogether. Not the best solution, admittedly, but it would fix the problem. :D With the mod I was planning to make, it wouldn't matter because I wasn't going to use the OR option, but I could see how others would want it and might have trouble.

3. This is the best idea, but harder to do. Introduce a new option called "Stockpile." I assume you're going to have to modify the interface to allow the user to see how much of each resource he has. What I propose is that you make a little button that can be toggled on or off, which corresponds to "stockpile." Basically, it means that this resource is unavailable for use when the button is toggled on, meaning that you're stockpiling it (for a wonder, units, buildings, etc.) That would solve the iron/copper problem.

Let's say you wanted to build the Colossus, which requires 500 bronze. You have 250 bronze and 300 iron, and you also want to build axemen. Well, you just toggle the bronze resource button to "stockpile," and then the game will automatically take the iron because it can't use the bronze. This gives you much greater leverage and better resource control because you can direct what goes where with ease.
 
The best example of this would be for the Axeman or Spearman... you need either Bronze OR Iron to produce them. Currently you only need to have access to one or the other and the unit can be trained.... but now, something actually has to be taken away to train that unit. But which to take??

In Genetic Era, we use depletive resources, and for the case where you need one OR another resource, that depend of the order of the resources in xml...
For your exemple, the axeman use Bronze, and, if there is not bronze aivalable, it use iron.
 
Dom Pedro II, the safest way to fix the problem with the least micromanagement is to take OR resources proportionally. Let's say you have 400 Iron and 200 copper stockpiled. If something required iron or copper, you'd take 400/(400+200) Iron and 200/(400+200) copper. That is, 2/3 iron and 1/3 copper.

This is ideal, because you would maintain the current proportions of resources. Consuming 300 copper or iron, you'd drain yourself down to 200 iron and 100 copper.

On the other hand, if you just take the largest number... you'd eventually drain yourself down to 150 iron and 150 copper. That, to me, interferes more with what the player originally had.

It would also guarantee that if you were rolling in mountains of iron, but had only a few shillings of copper (or vice versa), you'd use more of what you have more of, and save what is becoming more scarce.

Don't get too glum about this mod. Try not to get distracted with other frills that are more icing on the cake. Let's quantify all 35 to 40 resources, and take it from there. Trying to do it all with your first shot will only overwhelm you.
 
dh_epic, this sounds like a good idea... that way it also resolves the issue of when you have an equal amount of both resources... you'd just take an equal amount from each.

Ideally, the best solution would be if the player can actually pick what quantities of each to allocate toward this production... however, this is a little above my paygrade. Perhaps eventually it can be something that I can work out (maybe with some assistance from someone else), but your suggestion is definitely the best for now.

Also, thank you for your encouraging words. I have been feeling a little glum for the prospects of this... if you have any ideas of how I might implement the other things I mentioned above with a quantitative rather than binary resource system, please let me know because those are things I really want to see in the game.
 
I'm not sure if the ideal solution is that ideal unless you can find a clean interface for it. Right now, you click on something, and it gets built. Having to decide how to build every single unit can get damn tedious, in my opinion. Still, I'm glad we agree on automatically draining the resource pools in proportion.

The best way to deal with road speed is to do it at the unit level, rather than the city or tile level. Have a "mounted transport" combat promotion. Assuming you have X horses, you can promote your combat unit and allow them to use regular roads a bit faster. This is somewhat realistic, since learning to ride a horse effectively takes some experience.

As for improving the effectiveness of tiles with horses... again, the tile-level strikes me as asking for too much trouble. Instead, have the "Stables" building give a small bonus to farms, mines, or even roads (if you didn't like the prior suggestion). Improving the effectiveness with metals would ideally be done with forges, or some other such building.

The question you then ask yourself is if how -- if at all -- those buildings (and the combat promotion) consume those resources. To me, it makes some sense that you need "one horse" for every "one population" (abstractly speaking). That way, each tile you work is accounted for horse wise. But this could get annoying and consume the bulk of resources for some people. This depends on where you want this mod to go.



There's going to be a lot of people who want more, more, more. As you confront problems, people are going to want to create a whole new feature just for the one problem you're trying to solve. It creates a domino effect. If you don't pin down the scope of the mod, it will get away from you. That's just a reality of game design. Too many ideas become vaporware because they make no plans, or their plan expands at a whim.
 
I'm not sure if the ideal solution is that ideal unless you can find a clean interface for it. Right now, you click on something, and it gets built. Having to decide how to build every single unit can get damn tedious, in my opinion.

Well, it wouldn't be for everything... only in instances where a building/unit/wonder would require one of two available resources. That probably wouldn't happen all that often... unless one adds a lot of units and buildings that can be built with different kinds of resources.

The best way to deal with road speed is to do it at the unit level, rather than the city or tile level. Have a "mounted transport" combat promotion. Assuming you have X horses, you can promote your combat unit and allow them to use regular roads a bit faster. This is somewhat realistic, since learning to ride a horse effectively takes some experience.

Well, I'm making a number of changes to the promotions system already... promotions will be more than just newly acquired skills available after reaching XP thresholds, they will also represent components of units that will be available to mix and match without an XP requirement... so this would work too. I'd also have to add a promotion that only increases route speed and not speed in general... hmm...

As for improving the effectiveness of tiles with horses... again, the tile-level strikes me as asking for too much trouble. Instead, have the "Stables" building give a small bonus to farms, mines, or even roads (if you didn't like the prior suggestion). Improving the effectiveness with metals would ideally be done with forges, or some other such building.

Yeah... I mean, with the binary system, this was remarkably simple. It worked exactly in the same way as the technology, civic, and route yield modifiers for improvements. If you had the resource, you got the yield bonus. It was nice and simple :(

The question you then ask yourself is if how -- if at all -- those buildings (and the combat promotion) consume those resources. To me, it makes some sense that you need "one horse" for every "one population" (abstractly speaking). That way, each tile you work is accounted for horse wise.

But this could get annoying and consume the bulk of resources for some people. This depends on where you want this mod to go.

Well, presumably, you'd balance it so that the consumption rate would not take up all of your potentially available horses... but yes, it certainly could get frustrating even if 90% of this would be going on under the hood without the player having to directly manage it.

I'm considering some other options where maybe you can have sliders to invest resources into infrastructure and research.... I'll look more into that possibility once the basic system is set up... I wish I could have the simplicity of the system I created with the quantitative resources, but it just doesn't seem possible. It just seems to me that if we create a more realistic economic system with quantities of resources and potential production chains but we don't actually give those resources real benefits on the economy like I think having improvement yield modifiers, build time modifiers and route modifiers does, then it seems at best incomplete to me... but that's just me.

I guess I should still go ahead and release the bonus modifiers I've already created for those who prefer the binary system... after all I did put a bit of work into designing it. ;)
 
I agree with dh epic. This is a complex, but not impossible, task to implement, and while it's nice to go forward and do everything we've ever dreamed of (believe me, that's a hard urge to resist) it will ultimately serve us better if we hold off on the more advanced features for now and get the basics fleshed out.

It sounds like the proportional system might be the easiest solution and the best for the player, since it preserves the existing proportions of resources and upsets gameplay the least. Just be careful to avoid the divide by zero problem. ;) When you think about it, how many units are there that use the OR option anyway?

Answer: 12. Most of these are modern naval units, which can use either oil or uranium. Many of them are a little questionable now that I look at it. For example, the Maceman can use either copper or iron, but the Samurai (which replaces the maceman) requires only iron. :hmm:

My point is that you shouldn't let this one feature get you too discouraged. It reflects such a small proportion of all the units that if you can't get it to work, it would still be better to say "to heck with it" and just get rid of the OR option altogether.

EDIT: I guess you were writing as I was. It occurs to me that perhaps the best option for now is to separate the two mods you were planning, since it seems rather complicated to combine them. Then, after BtS is released, we can combine the QR system with the improvement/bonus mod you were talking about. You may not want to, though, and I can understand that perfectly. :)
 
I agree with dh epic. This is a complex, but not impossible, task to implement, and while it's nice to go forward and do everything we've ever dreamed of (believe me, that's a hard urge to resist) it will ultimately serve us better if we hold off on the more advanced features for now and get the basics fleshed out.

Well, I wasn't looking to incorporate this now, but I was feeling pretty bummed that I might never be able to...

It sounds like the proportional system might be the easiest solution and the best for the player, since it preserves the existing proportions of resources and upsets gameplay the least. Just be careful to avoid the divide by zero problem. ;) When you think about it, how many units are there that use the OR option anyway?

Answer: 12. Most of these are modern naval units, which can use either oil or uranium. Many of them are a little questionable now that I look at it. For example, the Maceman can use either copper or iron, but the Samurai (which replaces the maceman) requires only iron. :hmm:

Well, I'm not too concerned about the modern units... I'm planning, down the road, to make units consume yields and resources to function, and the later era ships along with tanks and planes will not have Oil as a resource prereq to be built... but you'll still need it to operate these units.

My point is that you shouldn't let this one feature get you too discouraged. It reflects such a small proportion of all the units that if you can't get it to work, it would still be better to say "to heck with it" and just get rid of the OR option altogether.

Yeah, but it was not that which was really discouraging me... it was much more the prospect of losing the features I had planned with the modifications I described.

EDIT: I guess you were writing as I was. It occurs to me that perhaps the best option for now is to separate the two mods you were planning, since it seems rather complicated to combine them. Then, after BtS is released, we can combine the QR system with the improvement/bonus mod you were talking about. You may not want to, though, and I can understand that perfectly. :)

Yes, again, I wasn't planning on incorporating this into the quantitative resources mod (not yet at least) especially since I don't have a firm idea on how this would all work.
 
I'm also going to add, for the hell of it, a place in the XML file to specify the resource's unit name... i.e. for Iron it could be "1 ton of Iron" for Oil it could be "1 barrel of Oil"... I realize that most production deals in thousands or millions of each unit, but I thought it would be fun to have some diversity there... not a big priority, but not tough to add either.
 
How exactly does your depletive resource system work in Genetic Era?

I am not coder, so i can't explane how work the engine, but, for each resource we defined a number of "part", and each time an unit or improvement or building need a resource, that use one "part".
we don't use it for "living resource" (bananas, rice ...), only for "non renewable resource" (iron, gold, oil...), and to equilibrate, we added a new capacity (for geologist) that allow the player (and AI) to find new resource...

The challenge is to have an equilibrium in the choice of number of part by resources, because in the game, the resources are not required the same times, for exemple, coal is needed to build railroad, so we made 150 part, and for bronze, we have 35 parts, gold 15/20... that depend of the game speed, because on quick speed, you don't build the same number of units than on marathon speed...
(sorry for my poor english :sad: )

EDIT : if someone want our code source, that is be possible, but, there is a lot of other things in the code source, so you will must search in...
 
we don't use it for "living resource" (bananas, rice ...), only for "non renewable resource" (iron, gold, oil...), and to equilibrate, we added a new capacity (for geologist) that allow the player (and AI) to find new resource...

:wow:

It makes so much sense I can't believe it didn't hit me sooner. Only have quantities for non renewable resources!

This would cover 8 strategic resources (all of them, minus horses), plus gems, gold, and silver. That's 11 values to keep track of. It's not the magic number (which, I claim, is 7). But it's small enough to offer proof of concept: that it might be possible to implement this with elegance rather than complications and tedium.

Arguably, you could "obsolete" Marble and Stone with Steel or Physics, to stay closer to the "magic number". And maybe keep quantified Horses around, for strategic intrigue, until a mid game or late game tech (depending on how you want to balance realism and strategy).
 
Here's what I'd like to see, to combine the strategic value of quantifiable resources with the efficiency of the current system:

HOW TO QUANTIFY RESOURCES, BUT KEEP IT EFFICIENT

Only non-renewable resources will be quantified.

Main Six: Aluminum, Copper, Iron, Gold, Silver, and Gems are all quantified as they are discovered. No tricks here.

Early Three: Horses will also be quantified until the advent of Guilds. Marble and Stone will be quantified until the advent of Industrialism. This is due to them becoming trivial.

Power is One: Coal, Uranium, and Oil will be abstracted as all providing Power resources. This efficiency will be improved with Power Plants.

THE MAGIC NUMBER

The magic number for human memory is 7 +/- 2. That's probably why Civilization only has 7 religions, 7 types of terrain, 5 specialist types, 9 strategic resources. And, at any given moment in the game, you'll likely only have the choice of around the same number of technologies, and around the same number of land unit types.

This game would quickly ramp up the number of resources you keep track of. By the classical era, you'd be tracking Copper, Iron, Stone, Marble, Horses, Gold, Silver, and Gems. That's eight.

That number would fall to seven by Guilds. It would rise up to eight again in the early industrial era, with Oil/Coal/Uranium bringing Power into play.

Industrialism would bring Aluminum into play, but also push Marble and Stone out. You add one, but drop two, and that's seven until the end of the game.

All in all, you'd spend most of the game at 7 or 8 quantities, in addition to tracking your nation's research and gold.

LEEWAY

It seems kind of wasteful to quantify Gold, Silver, and Gems. They have no strategic value. The few people who can afford them get happy. Only forges seem to do anything with them. Otherwise, it's just more Gold (the other kind) in your treasury. If we abstract these or leave them as binary like other resources, we cut the number down by two or three. If we're currently hovering around 8, this change would put us on the low side of the magic number.

Besides thrift and simplicity... why would we keep the number lower than what it needs to be? Because we could add other relevant quantities.

Arguably, Production and Food should be quantified. Nationally. No longer would growth and production come directly from working the tiles. The tiles, instead, would generate Food and Hammers for your national pool. Each city would take food from the national pool per turn, and turn food into people in the "people meter" (replacing the food meter). The building queue would subtract hammers from the national pool per turn, and turn it into hammers in the build queue. The next question is how much food/hammers a city takes from the national pool per turn? Larger cities should take more hammers, and thus produce things faster. Larger cities should also take more food, but growth should remain steady, maybe even slow down in larger cities. In other words, pure population determines how your national production/food is allocated.

Of course, that last suggestion is the most ambitious part of this proposal.
 
dh_epic said:
Arguably, Production and Food should be quantified. Nationally. No longer would growth and production come directly from working the tiles. The tiles, instead, would generate Food and Hammers for your national pool. Each city would take food from the national pool per turn, and turn food into people in the "people meter" (replacing the food meter). The building queue would subtract hammers from the national pool per turn, and turn it into hammers in the build queue. The next question is how much food/hammers a city takes from the national pool per turn? Larger cities should take more hammers, and thus produce things faster. Larger cities should also take more food, but growth should remain steady, maybe even slow down in larger cities. In other words, pure population determines how your national production/food is allocated.

Of course, that last suggestion is the most ambitious part of this proposal.

If I could find even a moderately skilled python modder, I could have this for you in short order... I've implemented something that works on this principle although somewhat differently...

Instead of every yield going directly into a national pool, a levy is imposed on cities whereby food and production are collected from the cities. Set the levy to 0% and you collect nothing... set it to 100% and you get the city's total food and production, everybody starves to death and you lose. Food is stored.. i.e. if your cities collectively give 6 Food per turn and you have 4 Food in stock, you'd have 10 Food the next turn. Production, however, is not stored... thus if you have 6 Production this turn, you'll have 6 Production next turn. Why? This stems from my interpretation of Production as basically "man-hours" of work which, of course, cannot be stored for later use.

What's taken can then be rationed back out to specific cities... so you can direct the national Production pool towards the construction of a Wonder in one city or boost a crucial desert city with foodstuffs. Civics, technologies and buildings modify not only how much you can take out from the cities by raising or lowering the levy cap for different resources, but also how much you can put back in with rations so that one doesn't simply push the full force of one's production economy into a city building a wonder and finish it in a turn or two.

Another feature would be the ability to trade yields with other civs... this adds a new element for the Master-Vassal relationship since you'd be able to turn vassals into the breadbaskets of your empire.

As already stated, I want units to require supplies to continue functioning properly... I don't want something tremendously complicated with ammunition or lots of resources, so I'm simply limiting it to food for most units... so you'd need your national pools of Food to keep your armies going in addition to whatever redistribution you'd want to do for the cities. For other units like Tanks, Planes, etc. I was going to require a new yield called Fuel.

Currently there's three yields: Food, Production, and Commerce. Commerce would not be storable OR able to be pooled. Production can be pooled but not stored, and Food would be both. But also I wanted to add two new yields: Fuel and Power. Fuel would also be storable and able to be pooled, Power would be able to be pooled but not stored until later era techs would permit Power to be stored... Hydrogen Cells or some such technology would unlock that. Fuel and Power (with Hydrogen Cells) would also be tradeable with other civs too...

Power would be provided by the power plant buildings with Nuclear Plants offering by far the most Power and thus making it the best with the obvious disadvantage of the occasional nuclear meltdown. I'd add a new improvement called Solar Plant or Solar Panels that would provide more Power and would be buildable on Deserts so we could actually get SOME use out of those tiles in the late game! But also Windmills and Watermills would begin functioning like wind farms and hydroelectric dams to provide power too... I think I'll just get rid of the Hydroelectric Plant building and go with these instead. With tile improvements producing Power, it also gives a lot more incentive to Spies to sabotage these structures and Bombers to level them since this will have a very negative effect on the enemy's war effort in a time when Food and Production is so abundant that destroying a couple of tiles isn't really a big difference...

However, with the introduction of a quantitative resource system, the role of the yield Fuel seems to be largely replaced by specific resources like Coal, Uranium and Oil... Thus when and if I can get this going, Fuel will get the axe...
 
Top Bottom