Hey everyone, I've been in one of my usual coding binges.
The crafting system is almost complete, which means I'm that much closer to an alpha release. I think all that remains is a creating a good file save format and a Condition system (for temperature, malnourishment, etc.. various penalties, and so that death is actually possible), and then some work on the catalog of game elements. As of now I think there are only 4-5 plants, 8 objects, and 3 constructs that I used for testing. Not a whole lot of stuff to play with, so I need to work with xml files and make some passable pixel art for new objects. In the future I will make a nice Swing-based editor system that will allow people to add content to the game easily without working with the xml directly.
Let me just say a bit about the
crafting system and recipes:
- Each recipe is flagged for a specific skill and skill mode (task category) that governs it.
- Each recipe lists up to 8 different components as inputs (with multiple quantities of any item).
- Each recipe can be flagged for whether a tool is required to create that recipe (using the skill modes)
- Each recipe can be flagged for whether a workshop is required (also via skill modes)
- Each recipe can be flagged for whether a specific heat-level is required for crafting (for campfire vs. smelting heat, vs lava, etc..)
- Also each recipe can be flagged if the creator actually needs to be around to work on the item or if it "constructs itself" in a workshop, such as baking a loaf of bread.
- Recipes are flagged as three types (for now) that effect how item quality is transferred and the nature of the process:
Transformative (=): One or more objects are transformed to one or more other objects (ex: baking bread from dough)
Additive (+): One or more objects are added together to form one or more collective objects (ex: hammer head + shaft = hammer)
Reductive (-): One or more objects are reduced to form one or more separated objects (ex: whittling a log = a shaft + wood kindling)
- Each recipe also lists up to eight products as outputs (with multiple quantities of any item).
- Each recipe lists the average number of steps (1.5 sec) that it takes to create the item, which is heavily influenced by the tool, workshop, and creator's skill.
- Additional flags will allow for ignoring tool, workshop, and skill modifiers for calculating time, (as the creator's skill should not affect time it takes to bake bread, although the quality of the workshop (fireplace vs. oven) should).
So as you can see this is a very flexible system that will allow for almost any creations and complex object hierarchies.
Also a note about
modding:
All game content (besides unalterable core content), is saved in a Ruleset. This is just a folder container more folders for constructs, creatures, image, materials, objects, plants, and recipes. In these folders can be any number of xml files containing custom content. In the future terrains, skills, and cultures will be in the ruleset as well. Eventually when you create a new game you can choose which ruleset to use to generate that games's content (as it currently only uses the 'native' ruleset). I hope to have copies of the ruleset in save games, such that you can add content to it (although this will only really work for new items and recipes as the terrain and such will have already been generated). Each item in the game uses an ID number limited by 32-bit integer limitations. The core game will probably use a lot of the lower numbers, so I would encourage people to use high numbers or negatives (except -1 which is reserved for null) to not interfere.
Please let me know what your think! Also, screenshots of the crafting panel will be posted soon.
Thanks