Drone Work, Recipe Enhancements, and New Item
I continued work on the new drone creature today. I was mainly looking into the wound locations on the drone, since "arm" and "torso" don't make sense for a non-anthropomorphic machine.
At first, I considered moving all the wound slot definitions into the game data, so creatures could specify which wound slots they have in the XML data. This would be good for modders, too, since they could now control wound data.
Unfortunately, this proved to be a lot more complex than I expected. It would've required multiple new data tables, parsing code, and possibly as many as 20 data fields per wound. That, and wounds also have lots of specialized code for bleeding, healing, infection, and pain, which don't apply to machines.
This is totally doable, of course. But I kinda want to get a new patch out sooner than later, to get some important fixes out to players. This is more like a few days of work, and possibly error-prone.
So for now, I've hacked a solution in the code which does the job without much risk. I'll go back and see if this data-driven design can be done later.
Once that was done, I started testing battles with the drone. And in the process, I found and fixed a minor UI issue in the battle screen. Basically, the "previous move" target sprite was changing incorrectly if the current target was changed, so I fixed that. I also found and fixed a bug that caused weapons to discharge incorrectly when their charge profiles called for more than one charge per attack.
During the battle, I started a list of things the drone did that were unrealistic. Things like bleeding, stunned, fleeing, etc. I'll probably make the drone immune to conditions like those, and see how that goes. It did fight pretty effectively, though, and dropped the appropriate corpse when done.
Which segues nicely into the next point: drone salvage. The drone is a pretty rare thing to find, let alone defeat. And I'm certain those who fight one will want some sort of reward for their effort/risk (and lost access to DMC!). As such, I'm thinking I'm going to make the wreckage salvageable for parts to make something cool. It'll probably require many parts, and possibly both mechanic and electrician skills to craft. I think it'll be worth it, though!
Finally, I made an update to the recipe system, as well. Modders were running into issues with recipes that should produce 100% quality items from damaged ingredients (e.g. repairs). Since the existing system made that hard to do, I decided to add a new field to the recipes data type for overriding this output quality. Basically, recipes can now specify "always 100% output." As an example, the campfire and shards from glass/plastic now use this feature.
That's all for today. Have a good night, all!