Data Format Rumination, Items

Hey folks! Hope everyone had a good weekend. It was more or less a baby weekend, here, as we struggled to take care of normal life stuff while not making the baby cry. Saturday night was particularly rough. I managed to sneak in an hour of playing Brigador, though, which was a nice break. Still in early access, but already a fun romp reminiscent of Desert Strike, Mechwarrior, and Syndicate on the Sega Genesis.

I actually authored data today in the editor! This time, for real! I basically just did the same thing I was trying to do Friday, but this time, all the bugs seem to be fixed, and I could successfully save modified data out to JSON and read it back in again. Cool!

As you may recall, the data I was modifying was to make way for a new type of interaction: giving food stat directly vs. giving a food item that can later give food stat. Basically, a prototype of how containers and consumables might work.

Almost before I finished modifying the relevant interactions and conditions, however, I started wondering: is the condition and trigger system strong enough to build upon? As I started to imagine situations where an AI should only do something if it had 1x an item, 3x an item, or other arbitrary numbers, I wondered if using conditions as they are now would make data maintenance a nightmare.

Would I need a special condition for Has3xItem, Has5xItem, etc? Should I be testing things differently? Also, should I be listing added/removed/transferred items in an interaction individually, or similar to how NEO Scavenger does it (with a treasure group)?

I spent hours on this. I even started typing my thoughts out in a text file, where I often find answers just by asking questions and thinking "out loud." I started to imagine what it would entail to make these changes, and I came to the realization that maybe now's not the right time to be mucking with data formats again. I just got them working in the editor, after all. And this might be a situation common to programmers where they over-engineer a solution before they've proven they need it.

So I deleted the text file, and resumed work on a dumb/brute-force solution for now. Interactions list items individually. No fancy modifiers or probabilities. Let's just get the damned thing working, and only add bells and whistles when absolutely necessary. Been digging down this rabbit hole too long now, and need to get back to gameplay!

As of now, I have most of the item stuff added to the game. Previously, Items were a hard-coded placeholder, so I had to start making items something that other game objects could refer to by name in the data. I have the interaction UI hooked up to accept items already, and a chunk of the data format in the code. I just need to finish the bit that reads and writes the JSON fields into the right places, and I should be able to resume prototyping food.

Stay on target!