Sometimes I Hate Programming

Greetings, Tusslers! Another productive week! I think I’m starting to get back into the swing of things! That being said, sometimes being a programmer can be frustrating. Remember all that cool ScriptableObjects I went on about a few weeks ago? Yeah, those don’t work. Turns out that while you cans serialize Scriptable Objects to Unity assets, you can’t serialize them to JSON, and that’s kind of important for the fighter action file. I knew the action file needed a different kind of file, but they were just so dang convenient that I didn’t want to abandon them entirely.

So then my thought was, how can I keep the ease of creation and auto-generating documentation while still going back to a Serializeable class. The answer was pretty simple: I simply use the ScriptableObjects I created as a database of default values for SubactionData! So, once you click on a CreateSubaction button, it doesn’t use the data asset, it just creates a new object with those values! Bonus points: I didn’t even need to refactor any existing code if I just made a new object with the same field names as the scriptable object!

This means that the Character Builder is now fully functional! You can create a fighter in it and it’ll work in-game! However, it is at this point hardly any better than coding it by hand, since there’s no visual component to it yet! Next up, we need to start displaying a fighter and hitbox information so you can actually edit things and see how it would turn out without needing to load up a match! I already have some plans in place from the pyTUSSLE builder, and if that works this time around, I should be able to have it ready for next week’s blog post! Until next time, Tusslers!