"Mixing" systems. in Design Philosophy
|
|
Has anyone here ever come up with an elegant solution to handling mixing systems? That is, things like what ingredients form a certain type of food, what metals and items are needed to make a weapon, what items are needed to cast a spell, etc. I haven't ever been able to come up with anything except the obvious choices of a list containing possible combinations, variables indicating a general feature of the ingredients and then requiring some sort-of bruteforce lookup of the final result, or breaking down items into component items which then determine the final result. All of these are, in my opinion, pretty bad, and I'm sure there has to be a better method.
|
Unless the system is similar to that used in The Elder Scroll games, where you throw a bunch of items into a pot, and the resulting potions effects are based on those ingredients and their properties.
Other than that, you'll probably have to keep a list of ingredients needed to make an item, or what items an ingredient can be made into.
One system I made basically had ingredients as types. And each item you could make was made of various item types.
All ingredients had properties, and like in The Elder Scroll games, if you mixed these properties together, the final item was altered.
An example was a healing potion, it needed 1 container, 1 herb, and 1 water like item.
By mixing and matching items the final potion could inherit properties, such as being more powerful, or healing a group of people, maybe even healing status effects and so on.
But yeah, even that system was still basically keeping a list of ingredients and then looping through the items being used to make the final product to see if they were the right type of ingredient.