Open I-am-Erk opened 2 years ago
What are your thoughts on a system like this?
That looks like exactly what I want. As a debug option I don't think there's any need to compare to current crafting inventory, it's ok if it generates something you already had.
If you want to actually test a few recipes, you have to debug in components to all those recipes, plus the tools to use them, plus the charges for the tools.
The problem with just spawning 1000 of every item is then that you cannot check whether the charges / items were used up, right? That is the only reason why you want to spawn exactly what you need.
Is your feature request related to a problem? Please describe.
Attempting to debug and playtest crafting is, to put it mildly, a pain in the ass. Debug Hammerspace grants you all components and tools, but prevents crafting failures, cannot test component inheritance (eg calorie and vitamins), disassembly, proper use of charge, destruction of components... ie. almost anything you might want to playtest with crafting. If you want to actually test a few recipes, you have to debug in components to all those recipes, plus the tools to use them, plus the charges for the tools. It is a huge amount of work and leads to insufficient playtesting of crafting PRs because we are not made of infinite time here!!
Solution you would like.
We need a debug tool, or tools, that allow us to spawn the requirements to a recipe in order to craft it. There are several ways this could be done, here are two I like:
I don't care which we pick as long as we pick one. What should happen when you attempt to craft something under this framework is:
If there is a tool requirement for the recipe that could not be spawned as an item, we get a debugmsg like:
crafting aborts and you have to make a lift furniture before going onward.
Describe alternatives you have considered.
Another option would be a debug command to select a recipe by ID and spawn one of every ingredient that you could use in that recipe. However I prefer the random version because random component selection is a very good way to playtest.
We could keep the hammerspace tool as is and make this a new one. However I believe the current hammerspace mutation is actually just a trap, it is marketed as a debug tool but makes a lot of relevant debugging impossible. I think this is in every way a superior option.
Additional context
As far as tools go, once implemented this may also be very handy for testing and CI.
I am marking this as P2 because there are some major crafting changes ready to implement, and they are almost impossible to adequately test without either this or a horde of volunteers