The Rambles Continue

Arthritis is still at a 4/10 today. Maybe even creeping back up to a 6/10 the more I sit with it. I'm hoping it doesn't affect my TMN run too badly. Even though I'm not much better yet, it's really amusing to look back at things I've done while distracted by pain, as I just had to read an error message that I wrote that said: "sprited requeste". I think my arthritis might be visible today, because when I went to a local coffee shop they brought my sandwich to me, which is a first. Either way, it was extremely nice of them and I appreciate it.

UPDATE (from later in the day) :

Got new pain meds from my rheumatologist. They still have increased bleeding risk, but since my hematologist recommended it and my rheumatologist approved it, I figure it should be safe enough. I just need to make sure to listen to the "take with food" and "no alcohol" warnings. Here's hoping it works, because today has been... a day. I'm sure I'll make a long-winded post to provide context some day.

Tech Talk

So I reached an interesting conundrum with my pixel manipulation code.

This entire time I've been operating off the assumption that the .png files were sort of -- how to put this -- main attraction? As in, I make Sprite objects based off the .png files and then augment the Sprite objects with collision metadata after the fact.

But that's not really how it works. Obviously, there isn't really a straight-forward way for them to link .pngs to collision metadata in the image's .png (or if there is, it was lost in decompilation). Rather, the collision metadata is aware of the images, so really the collision metadata should be the main attraction.

From just the collision metadata, I can get all of the information needed for a complete sprite. I can't do that from an image, so theoretically, if I ever plan to read in collision metadata, I should start there.

I think I'll refactor my code logic (again). Instead of allowing someone to create a Sprite object and then augment it with metadata, which requires deconvoluting which metadata associates with which existing created Sprite object, I'll make it so if you ever plan to contain collision metadata, you start there and that gives the script the knowledge of where to get the image.

This helps too with some of the weirder collision metadatas. Like, there's one called something about a knife? That one broke a lot of my sorting code, but I'm certain that if I want to implement move export based on character script logic, I'll have to handle cases like that one sooner than later.

I'm also currently working under the assumption that metadata files only ever have 1 image file associated with them, which I need to check. My guess is I'll find exceptions with characters like Relius or Celica.

UPDATE (from later in the day):

I've refactored everything so that now you can either create Sprite objects from just images and add the metadata later, or you start with the collision metadata and it loads the image too when creating the Sprite object. Overall I'm happy with how the code works now, since I think it's fairly straightforward to run it from the command line, from another python script to simply combine gifs, and from another python script to both recolor and turn into a gif in a single go.

You can see the scripts on my github, here. If you feel like trying it out, be my guest!

I still have 2 major features to add:

  1. Add support for spawned entities. (For example, the sneks in Terumi's j.D). It's going to be a little bit annoying because I have to figure out when to start their animation. This information is stored in the character's script file, but that means I need to work on parsing the script files to figure out when that is. I'll add a post about why that's complicated soon-ish.

  2. Add the capability to generate a gif from a move, and a UI to do so. The UI is kind of necessary because of the complexity of parsing a character's script file, which like I said in part 1, I'll talk about some other time.

I also want to go back and adjust spriterecolor.py to use these Sprite objects. Right now it's kind of janky to do the whole shebang of recolor -> gif, and I don't like it. It'll be a lot neater if I can put the sprite name next to the Image, and putting it into a Sprite will take care of that.

I also still eventually need to support base palettes, so if someone shows up who wants to use one it won't be a huge pain in the ass.

Random Things of Interest

Someone in the US is selling the Hazama figure at JP (minus shipping) prices here, so that's kind of neat. If I had $350-ish to spend, I probably would have reached out to them and seen if I can barter them down a tiny bit, but as it stands now I'm a grad candidate so I need to save that money for possibly having to relocate and buy a car. (Plus also, it's not Terumi /complain complain)

Along that vein, someone's selling a bag back from the bbcf x supergroupies collab here. It's Hazama themed and honestly kind of neat, but again, I can't really excuse buying it right now, especially since shipping will probably be another $40. Maybe if I could bring it down to $110 USD but I don't think it's common to barter in japanese culture, nor do I have any means to since I don't speak japanese and no proxy service offers bartering.

links

social