Interaction Data Refactor

Hey Folks! I had a whole day of dev today! It's been a while since I could say that, and it was a nice change. And probably a good thing, too, as the day involved a pretty major data refactor.

I decided to move forward with the interaction refactoring. This meant changing the way interactions list:

  • Conditions to apply to Us
  • Conditions to apply to Them
  • Conditions We must have/not-have to make interaction available.
  • Conditions They must have/not-have to make interaction available.
  • List of items to add to Us
  • List of items to add to Them
  • List of items to remove from Us
  • List of items to remove from Them
  • List of items to transfer from Us to Them
  • List of items to transfer from Them to Us

As you can see, quite a lot of data per interaction. And the way it was written, there was a lot of redundancy. (Like listing the same thing multiple times in a row to stack its effects.)

The new data format makes better use of things like Condition Triggers and Loot specifications, which each can list multiple things. I can just say "5x this plus 3x that" instead of listing the same thing 5 times in a row. It also lets me to some randomization, though I'm unsure if I'll use it since that may complicate things too much.

Changing the code wasn't too hard. A few hours of tracking down all the references and it was done. Even the GUI data editor wasn't too hard to update.

However, the data is taking a while. I have something like 60 interactions in the game right now, and each requires some manual data-entry to convert. I briefly considered trying to write code to automate it, but I think it'd be a wash in terms of effort. Plus, doing it by hand means I get to review all the data I haven't seen in a while, to refamiliarize myself with it. (E.g. I can see that most social interactions get 1-5 stat points and a few major ones get 10, so this helps me continue adding more with consistent values)

I'd say I'm 80% done with the conversion now, which is further than I expected to be by the end of the day. Hopefully, I'll be able to test this out tomorrow. The results should let me create new ship items more quickly, and with more options!