This has been suggested and planned on before, but I finally decided to try and implement it. What follows is the system as I’ve worked it out so far; feel free to point out any problems or make suggestions.
I’ve added a new .json file called tool_groups.json, which has entries that look something like this:
[ "rock", -1 ],
[ "primitive_hammer", -1 ],
[ "hammer", -1 ],
[ "hatchet", -1 ],
[ "toolset", -1 ]
The basic idea is that instead of including all of those tools in a recipe entry, you can just include “tools_pounding”. Not only does this save space and time, but it standardizes the modding files: if you add in a new type of hammer, you just add it to the tool_group entry instead of adding it to every single recipe that uses it. This part of the system I think everyone can agree is more efficient, but there is one thing it doesn’t take into account.
Some recipes use a certain number of charges from their tools, and don’t use the same number of charges for each one. For instance, in recipes.json we have these tools that are used to make quikclot:
[ "hotplate", 18 ],
[ "toolset", 1 ],
[ "fire", -1 ]
If you use a hotplate it’s 18 charges, but the integrated toolset only uses one (since it uses your internal power storage). The solution I suggest would replace it with something like this:
[ "tool_heat_source", 1 ]
[code]MEANWHILE in tool_groups.json
[ “hotplate”, 18 ],
[ “toolset”, 1 ],
[ “fire”, -1 ],
So, there are two values for charges: one in the recipe definition, and one for each tool in the tool_group. When a tool is chosen from the list, the given values are multiplied together. So here the hotplate uses 18 charges, but if the value was set to 2 in the recipe entry it would be 36.
This way we could standardize the effectiveness of tools that use charges, because they scale using the values in tool_groups.json instead of being defined for each recipe that uses them. Maybe forging a knife scales the number of charges by 1, but a sword would scale it by 3. This would also change nothing about the existing system, because you could still manually include tools in recipes rather than using tool groups.
Thoughts? Suggestions? Insults? (wow this turned out pretty long)