Quantitative Resources

What defines the X in gaining x per turn?

I'm hoping we could define consumption of a resource by population. A system with this mechanism may be able to help guide unit production fine but what about, say, the consumption of gems (as one of many examples)? Can we use this to show that there is a limited amount to go around among the people to qualify for the happiness and building based commerce benefits among a particular number of cities/population within those cities?
 
The code is very straight forward at the moment. Cities are not considered at all. It is all at the national level. It just uses the capital to store the information.

If it is made city based then there needs to be some way of saying "send all this city produces to my military city" for example. Plus the code for the AI to do this also, although it would probably be something similar to the contract system in that a city requests it and other cities send them the goods.

Currently the definition of what is produced is held in an array in the Python (Source Bonus, Number Produced, Every x turns, Manufactured Bonus).

If we go beyond strategic bonuses used for units to resources used for population you need to make decisions about the order something is used. In your gems case how much is used for population happiness and how much used by the jeweler to make jewellery.

On the other side it could make many of the so called useless manufactured bonuses more important. Eg carcass;). In that case people would first consume the raw and dried meat and then the carcass if there is not enough meat, so the buildings would consume first then the people.

Edit Changing it to cities brings up the problems of the resource being
  • outside any city
  • improved and connected but not worked near a city
  • near multiple cities
  • worked or not-worked
  • effects of buildings in a city eg Stable

I think setting it up for the strategic resources first as a proof of concept is the best idea as I think that would be what we want at that level.

Then if we want some other resources at a city level I can set up a new proof of concept for that later.
 
Good discussion material here.
The code is very straight forward at the moment. Cities are not considered at all. It is all at the national level. It just uses the capital to store the information.
I suspected that was the case at the moment and had intended to highlight the limitations with that simple question. Which apparently has done its job.

If it is made city based then there needs to be some way of saying "send all this city produces to my military city" for example. Plus the code for the AI to do this also, although it would probably be something similar to the contract system in that a city requests it and other cities send them the goods.
The contract system is something I'd find very difficult to duplicate or clone in any manner but I could setup something that would work and should work efficiently. It's noteworthy though that such a project would be pretty intense and would be challenging to make extremely streamlined for both processing time and data. Not to say it can't or shouldn't be done but just to say it's, as you point out, rather complex.

I would like to utilize the basic trade function to help with this. It really could create a major reshaping of how trade works entirely as the profits from such trade would be largely a calculation of supply and demand rather than straightforward yields if done optimally.

I'd LOVE what this could do for making unit based trade extremely fun. If you've ever played some of the trading games like some of Sid Meier's other selections involving pirates and railroads and such, you would have an idea of what I'd love to see. Ideally the player could look into cities and get an idea of the value of a product where the merchant currently is, looking for valuable products being offered to the unit far beneath the average price due to an abundancy of the product there, and find where its value is at a premium for sale. Pick up a shipment and take it to the place where they will profit the most from it. One could use such units to both play a miniature game of profit for that specific unit as well as use them to help distribute bonuses across the nation in the way most beneficial for the empire as a whole. Those players that like the option but don't want to get too micro into it could then just automate such units to generally perform 'best practices' as the AI would be using.

Having such merchant functionality would add another layer of importance to the criminal/ruffian side of things as well.

Currently the definition of what is produced is held in an array in the Python (Source Bonus, Number Produced, Every x turns, Manufactured Bonus).
That array is going to end up being a very problematic data hog I fear. It works... but the data efficiency would be an issue as this grows out further. Nothing against the programmer(s) involved... for a simpler mod this wouldn't be an issue.

And all the moreso when we would want to track by city... On a national level of tracking, this won't be all that helpful for representing the difficulties of getting resources where they are needed in space exploration and other frontiers we're looking to get into more depth with. But it is a good way to start a system at first if we're just looking at a 'proof of concept' so to speak.


If we go beyond strategic bonuses used for units to resources used for population you need to make decisions about the order something is used. In your gems case how much is used for population happiness and how much used by the jeweler to make jewellery.
This is true. And perhaps buildings themselves could then be relegated to the role of providing the happiness that is normally currently just an automatic benefit. Not sure what benefit gems and gold would provide people if there weren't gems and gold crafters and retail outlets for such products. This would then mean that they would use a maximum amount of the bonus material and get a benefit per bonus material that would equate to +x (whatever benefit is being provided) per population. This would probably need to be a severely decimalized system so we can account for cities between 0 and 400 in size and many of them while the number of sources can be quite limited.

On the other side it could make many of the so called useless manufactured bonuses more important. Eg carcass;). In that case people would first consume the raw and dried meat and then the carcass if there is not enough meat, so the buildings would consume first then the people.
Absolutely could make resources and trade agreements FAR more important! For many reasons.

outside any city
Probably would need to find the city working the plot first, but if outside any working city plot, find the nearest city to be delivered to first and then if there is a tie to the nearest, go with the city with the larger population and if there is a tie, there, the city that has seniority in when it was founded. There will never be a tie there, even if it was the same round - it's the 'city cycle' order you'd be accessing for that.

This would need to be severely cached and checked as infrequently as possible.

improved and connected but not worked near a city
Not worked should give some minimal benefit perhaps but minimal indeed. This is where such a basic system as getting one per source per round is not really going to be nearly granular enough to represent things very well.

]near multiple cities
worked or not-worked
I think I touched on this above.

effects of buildings in a city eg Stable
Similar thinking to the ideas project will need to be implemented. Buildings should go inactive if they don't have ENOUGH access to the resources they need. In some cases the most minimal access is enough and then buildings from there, as suggested above, could start having improved effects with more access (but limit this so that a building cannot itself soak up all the available materials.)


I think setting it up for the strategic resources first as a proof of concept is the best idea as I think that would be what we want at that level.

Then if we want some other resources at a city level I can set up a new proof of concept for that later.
Yeah, I cannot see how the ultimate vision for this project could possibly be fit into a reasonable enough project time to include it for this version or even the next or possibly even the next.

But its not a bad thing to be plotting out concepts for its implementation now. The more we think about it and test things and so on the more it becomes a likely reality. I really think it would be a super cool evolution for our mod that could make for a lot of neat strategic implications and not so much an overwhelming degree of required micromanagement. It would certainly give the player ways to get clever but if the system primarily runs itself nearly as well as it can for optimization for any given player, it shouldn't be too bad to implement.

I just worry about the massive amount of potential data and time consumption but thanks to having AIAndy and Koshling and Alberts2 here, they've shown me a lot of great ways to keep things streamlined. Hopefully I would be able to design something that doesn't cost us too much to make it worthwhile.
 
When I said Stable above I was suggesting that buildings could have a multiplier effect as well as consumption effect. For example the stable may double the number of resources produced neither using nor consuming resources in the process.

Other buildings such as the butcher would convert the carcass produced in the into raw meat. The question there is should it just convert all or only some.

Gems, as I pointed out elsewhere are not just about wealth, a sculptor can't fashion stone without them. Flint is almost as good but wont work the hardest stone, steel and iron are worse and copper worse still. Some sands will work but that is because of the gem dust in the sands.

For resources outside all city work areas there are a number of options
  • forts could act like a city in all respects except population; requiring workers, imprisoned criminals, or foreign captives to work one of the plots
  • an improvement could be built that requires the worker settle on the plot

By "a resource near multiple cities" I meant that the resource is inside the work area of many cities. It can only be worked by one but, currently, all the cities get the benefit of the resource and may build buildings that require the resource in the vicinity. This is because the concept of vicinity does not take into consideration the plot being worked, just improved and connected.
 
When I said Stable above I was suggesting that buildings could have a multiplier effect as well as consumption effect. For example the stable may double the number of resources produced neither using nor consuming resources in the process.
Very good point. Magnification of the volume being provided the city. Consumes but then spits back out more than is consumed (or something different now that it is processed.)

Other buildings such as the butcher would convert the carcass produced in the into raw meat. The question there is should it just convert all or only some.
Probably shouldn't convert all of it, no. Could also provide bone in the process.

Gems, as I pointed out elsewhere are not just about wealth, a sculptor can't fashion stone without them. Flint is almost as good but wont work the hardest stone, steel and iron are worse and copper worse still. Some sands will work but that is because of the gem dust in the sands.
Such a system as a whole could easily account for that by providing 'Stoneworking Tools' which would be a prereq for other buildings.

For resources outside all city work areas there are a number of options
  • forts could act like a city in all respects except population; requiring workers, imprisoned criminals, or foreign captives to work one of the plots
  • an improvement could be built that requires the worker settle on the plot
I like it! Both ideas are pretty cool. It's still then a matter of guiding the initial 'shipment' to the city according to the selection mechanisms noted.

By "a resource near multiple cities" I meant that the resource is inside the work area of many cities. It can only be worked by one but, currently, all the cities get the benefit of the resource and may build buildings that require the resource in the vicinity. This is because the concept of vicinity does not take into consideration the plot being worked, just improved and connected.
Only one city, the one working the tile or even just 'claiming' the tile would be 'the one' to receive the shipment initially I think. Obviously there should be a diminished amount delivered to the city if the tile isn't worked.

This also brings up another point... shouldn't all farms need to define what kind of food they are providing? Perhaps we should incorporate into the design plan a concept of enforcing that when a farm is planted, it must gain one of the farmable resources the player has come to possess. Furthermore, with such a system, we'd need to pull far back on the base plot bonus provided by such resources... not completely so that they can still have variances to different crops but significantly less than it is currently.

Similarly, perhaps mines 'must' find a material resource to mine (or its pointless to be mining.)

Then again, old concepts of the prospector and farmer units could possibly answer those, making it impossible to farm or mine where one has not yet determined the viability of a particular crop or access to a worthy mineral.
 
Probably shouldn't convert all of it, no. Could also provide bone in the process.

If it is the only building using the resource I think it should no matter how much of it there is.

Currently farms(building), herd(building) and improved resource in the vicinity provide carcass but only Slaughter House uses it turning it into higher quality unimplemented bonus (and hide?). This unimplemented bonus is then used by the Butcher to provide Raw Meat (and Bone?). Raw Meat is part of a healthy diet and can be used by the Dryer to make Dried Meat which is also part of a healthy diet.

In the future those buildings and improvements would still provide Carcass a consumable bonus that disappears at the end of the turn it is created if not used and before refrigeration. The Slaughter House then converts all the available Carcass into Cleaned Carcass and Hide both consumable bonuses. The Butcher then converts each Carcass into x Meat and y Bones.

The population then eats the Meat if available else the Clean Carcass else the Carcass along with any other food including Dried Meat.

Any left over Meat can be used by the Dryer to produce Dried Meat.

Only excess dried food, grains, some vegetables and breads go into the food bar towards extra population before Refrigeration. The rest is lost due to wastage.

This can get very complex and elite housing will require foreign luxuries such as wine or dried fish.

Which brings me back to the need to identify the source of goods by
  • local
  • in the nation but on same continent
  • in the nation but on same planet/space region
  • outside the nation

I like it! Both ideas are pretty cool. It's still then a matter of guiding the initial 'shipment' to the city according to the selection mechanisms noted.

Shipment reminds me of a micromanagement system in one of the Civ III mods I liked. Instead of just adding to the city it produced merchant units that would be moved to their destination.

This also brings up another point... shouldn't all farms need to define what kind of food they are providing? Perhaps we should incorporate into the design plan a concept of enforcing that when a farm is planted, it must gain one of the farmable resources the player has come to possess. Furthermore, with such a system, we'd need to pull far back on the base plot bonus provided by such resources... not completely so that they can still have variances to different crops but significantly less than it is currently.

All farms not on specific resources are assumed to be mixed farms producing small amounts of everything available inside the nation.

There are many mods that let you plant a resource you have on the plot. We do exactly that using the Great Farmer and now the Herds mod I have introduced and want to replace the Great Farmer with, for resources you have in your nation. Currently we don't have units for plant species.

Similarly, perhaps mines 'must' find a material resource to mine (or its pointless to be mining.)

Most real in the real world produce more than one resource. Silver, Lead and Zinc from the one mine for example. That is what the buildings represent.
 
If it is the only building using the resource I think it should no matter how much of it there is.
Some amounts should be able to build up and then be provided to trade usage. There really should be a limit to how much a given building can process the bonuses on hand.

Note: Wouldn't carcasses also contribute to tanning procedures to produce leather?

In the future those buildings and improvements would still provide Carcass a consumable bonus that disappears at the end of the turn it is created if not used and before refrigeration. The Slaughter House then converts all the available Carcass into Cleaned Carcass and Hide both consumable bonuses. The Butcher then converts each Carcass into x Meat and y Bones.
Decay of resources. Certainly something to be watching for. Some resources wouldn't be tradeable at all for a long time simply because they wouldn't be able to be kept good throughout the transportation process. Good point!

Instead of just adding to the city it produced merchant units that would be moved to their destination.
Hey... I'm all about having merchants out there moving stuff about but shouldn't this be an 'in the blink of the round' procedure? I suppose not if the resource is being obtained from FAR away, like a distant fort or something. But just outside a city limit doesn't seem to warrant this imo.

The population then eats the Meat if available else the Clean Carcass else the Carcass along with any other food including Dried Meat.

Any left over Meat can be used by the Dryer to produce Dried Meat.

Only excess dried food, grains, some vegetables and breads go into the food bar towards extra population before Refrigeration. The rest is lost due to wastage.

This can get very complex and elite housing will require foreign luxuries such as wine or dried fish.

Which brings me back to the need to identify the source of goods by

local
in the nation but on same continent
in the nation but on same planet/space region
outside the nation
I suppose it depends on the resource itself as to if it could be tracked on a level more than by city but why would it absolutely need to be? If natural background process trading took place to transport goods on a fairly 'radiant' from the source basis throughout other cities in the nation (and perhaps even to a degree internationally if open trade is enabled) would we need to identify any resource tracking on a layer above that of the city itself?


We may be able to model an improved economic strata system for society through this as well... somehow.


About your last few points: The reason I suggest that farms cannot be without a resource defined and a mine cannot be without a mineral defined is due to the fact that if we are tracking the volume of the specific materials being obtained, we would be shortchanging civilizations significantly by not giving any specific foodstuffs or minerals from a farm or mine. Saying it's a little of a lot of stuff means it rounds out to a sum of nothing of anything.
 
Back
Top Bottom