Thinking through substrate
After checking in the basic substrate item implementation yesterday I got to thinking - never a good sign.
The original idea was to have some pre-set types of substrate - garden dirt, rock, potting soil, pellets, whatever. But how would these items affect the snails and the jar? Would I need to invent some sort of set of attribute templates? Like “Oh well this garden dirt item is going to decrease jar temperature by 1C.” and “Oh well some snails somehow don’t like gardend dirt and prefer other substrates”. But why? Why would a snail prefer one template to another and how would this be decided?
Considering I’m already going for a lot of detail with consumables (making sure consumable items have macro and vitamin attributes based on their real life counterparts), I should maybe do the same thing for substrate. For example, garden dirt isn’t just garden dirt…it can contain varying amounts of clay, humus, sand, rock, etc. An item called “Garden Dirt” would really be made up of multiple base elements in varying proportions. And that led me to thinking - while a template called “Garden Dirt” should exist and be available for pre-mixed purchase from the Habitat store, users should also be able to mix these elements themselves. As a user I want to buy my own sand, clay, rocks, whatever, and experiment with proportions of each to create substrates of different moisture, porosity, pH level, etc.
I don’t know exactly how this is going to work yet - in fact from this point on I’m kind of making this up as I type. But here’s a quick overview of how consumable items already work.
The database has the following item-related tables (with the specified columns):
I suspect that I will need another table on the same “level” as
item_nutrition. Something like
item_terrain_elements…or something. It would contain the following columns (or something like this):
- carbon (primary nutrient)
- hydrogen (primary nutrient)
- oxygen (primary nutrient)
- nitrogen (primary macronutrient)
- phosphorus (primary macronutrient)
- potassium (primary macronutrient)
- calcium (primary macronutrient)
- magnesium (primary macronutrient)
- sulfur (primary macronutrient)
- iron (primary micronutrient)
- manganese (primary micronutrient)
- boron (primary micronutrient)
- copper (primary micronutrient)
- zinc (primary micronutrient)
- molybdenum (primary micronutrient)
- chloride (primary micronutrient)
- nickel (primary micronutrient)
- iodine (other)
- fluorine (other)
- selenium (other)
- cobalt (other)
- arsenic (other)
- lithium (other)
- chromium (other)
- silicon (other)
- tin (other)
- vanadium (other)
The primary nutrients would affect plant growth and the “other” nutrients could affect the animals (ie snails) within the jar.
And looking at the above just now, I don’t see a reason not to just add the above nutrients to the
item_nutrition table. Some of the columns (eg magnesium) would already be duplicates anyway…I could maybe just add the above columns to the nutrition table and set anything irrelevant to ‘0’…would there be something wrong with this? I don’t know, I have to think.