The reason for this post is to find a flexible structure for a great modding future. To find a standardised way to create any resources, factories, or creatures/units a modder wants. (Creatures obviously have other properties related to combat etc, but it is out of context here.)
Everything is a resource, which is subdivided to Creature Resources (CR), Natural Resources (NR) and Manufactured Resources (MR). In this context they are the same.
All resources have the following properties:
1. (Re)productive period: e.g. from 15 to 35 years of age, once per turn, or whatever season of the year, etc
2. (Re)productive rate/Growth rate: X units per turn per population, X units per turn, X unit per turn during reproductive period
3. Maximum number of offspring: 0 to ∞ per lifetime
Warehouse has one or more of the following properties
1. Every global map tile is considered as a warehouse. Multiple Resources types & Factories types can be stored in a warehouse, depending on what tile it is.
2. Depending on the type of resource concerned, a quantity of 0 to ∞ can be stored
3. When storage capacity is exceeded, excess resources produced are wasted or (re)production is stopped
Factory has one or more of the following properties, depending on the resource type concerned
1. Process one resource stored in its warehouse into another resource type
2. Multiply the (re)productive rate of a resource by a factor of X
3. All recent (re)production is then stored at the warehouse
4. At any turn, only Y units can be “extracted” out of the warehouse by caravans; unless it is CR that can walk out by itself.
5. Factory can increases or decrease or limit the warehouse capacity of the specific resource
6. Factory can be upgraded, for higher capability
7. Factory can be built only on specific map tiles
All Resources, Factories, and Warehouses has all of the following universal properties
1. Material type: Flesh, Plant, Ethereal, Machine, Crystal, Metal, Earth, Water, Fire, Magic, Wood, etc which is affected by magic spells, or other physics
2. Weight: 0 to ∞ pound
3. Hit point. It is a % of its weight. A different % for different material. Therefore everything can be destroyed by a means appropriate to its constituent material
4. Current Age
5. Lifespan: 0 day to ∞ day
In the game, Lifespan, Reproductive rate, # of offspring, Factory extraction Y/multiplication rate X, warehouse capacity can be changed by tech level, spells, gamers’ control, etc.
Take Iron ore (NR) as an example
One the map tile, as a warehouse of iron ore, it stores 5000 unit of iron ore (Resource) now. The ore weighs 50000 pounds, it is Metal, it has ∞ lifespan, and cannot have offspring. (In some cases, certain NR can have offspring). Gamer builds an ore mine (Factory) inside this warehouse/tile. The ore mine do nothing, except it allows an ore extraction rate of 200 ore per turn. When it is caravans to the Blacksmith (Factory), it sees it has 200 ore in the warehouse allowing it to convert them to 100 Swords. If this production is not immediately caravanned away, it is automatically stored at the local warehouse.
Take Farm as an example
On the map tile, as a warehouse of wheat, it stores 10 unit of Wheat naturally. Wheat weights 2 pounds, is plant, it has lifespan of 1 month. If it is not caravan away in a month, its quantity becomes 0. Since its reproductive period is twice per year (& ∞ number of offspring) & reproductive rate of 10 unit every XX turns, you will then expect there is 10 unit of Wheat next autumn. Now, I build a farm on that tile, it is a factory that multiplies the wheat reproduction by a factor of 50. I can expect a harvest of 500 Wheat next autumn instead.
Take a Bear’s Den level 1 as an example
On the map tile, the den is the warehouse of 50 bears naturally. As a warehouse, the den can contain other buildings e.g. Barrack etc. A level 1 Bear’s den has the storage capacity of only 100 bears. Bear’s natural reproductive rate is 1 per 10 bear per turn. Level 1 Den (as a factory) does not multiply this rate.
When there is the bear population reaches 100 after 10 turns, the Den is automatically upgraded to Level 2 without cost. As a better factory, it doubles the bear’s reproductive rate, population increases at a rate of 2 bears per turn.
Melt Metal spell
Assume there is such a spell, I can cast it to my rival's Iron mine reducing the quantity stored.
Do I miss any common properties that are important to resources, factories & warehouses?