Bugs, Balancing, and Builds
I managed to fix another handful of bugs today, including (I think) the quick recipe bug!
I decided to try out a longer playtest this afternoon, to see if I could spot any of the harder to track bugs, and to test general balance. And wouldn't you know it, at the last possible minute, I triggered the quick recipe bug! It looks like it was caused by stacked items inside a container.
The crafting screen tries to get a list of all known items on the player, and flattens that list for sorting (e.g. no stacks nor nested items in containers). However, that process causes a few of the stacked items in the list to be missing slot info. And when the sorting algorithm kicked in, it tried to access slot info, throwing an error. This null pointer issue should be fixed now.
Quick recipes were also getting randomized due to a load/save ID mismatch, so that should be fixed, too. I fixed a bug involving camp stats looking wrong whenever a new camp was awarded and/or items added to a new camp. And a random encounter's treasure should no longer appear illogically outside its container.
I also think I figured out what was causing the fullscreen mode to exit when starting or loading a game. So far, testing seems to be pretty smooth, so hopefully the next build is more graceful in honoring resolution preferences.
I made a few recipe changes, particularly to arrows so that they couldn't be made using wrenches nor crowbars. In the process, I also noticed a way to make recipes prefer cheaper ingredients first from ingredients selected by the player, not just those selected by quick recipes. And I've added the ability to rip newspapers into paper scraps, for easier sourcing of arrow fins. This involved adding a new junk item to the game, much like recipe scraps, except with no useful info on them.
Finally, I made some balance tweaks of the course of the day. Both lure and create obstacle are now more effective and reliable. In practice, they were neat ideas before, but usually not worth the risk. They often missed or had little effect Now, lure automatically moves the player one space away, and has better chances for knockdown, recovery, and wounds on the target. Similarly, create obstacle has higher chances for damaging or incapacitating the target. Since they're not available all the time, these improved outcomes seem fair.
I also slightly increased the crowbar's wounding potential. Previously, it was more of a mid-range lethality, while the wrench was higher, and stick lower. Now, crowbar is more in the higher range (which seems more logical).
So things are looking up for the new build. I was close to creating it today, but felt there were some outstanding issues worth waiting for. However, with that late quick recipe fix, maybe it's worth doing a new build as early as tomorrow. We'll see how things look then. Have a good night!