A Line of Code is Worth a Thousand Pictures

March 20th, 2019

Just looking at Seinarukana's old project files gives me an ulcer.

Last time on this misadventure:

Battle Moon Wars SDK
Galaxy Angel/Moonlit Lovers SDK
Daibanchou – Big Bang Age SDK
Eternal Lovers SDK
Kamidori SDK
Duel Savior/Xross Scramble SDK
Bumper Baby Banchou SDK

Seinarukana and Littlewitch Romanesque Image Generation Scripting

I'm not comfortable sharing the tooling I was given for Seinarukana (not that it'd be useful since it was literally just some dude's workspace packaged up) and am contractually obligated not to share the proprietary tools given for Littlewitch Romanesque (which were not used for 99% of the work I did anyway, nor supplied until long after translation was complete), but the two did share something godawful in common. They both utterly adored using images instead of text boxes. For Seinarukana, it was mostly in the skill and character descriptions. Seems like there wouldn't be too many of those, but you'd be grossly mistaken. Every single skill was unique. If two characters appeared to have the same skill, you're wrong. They just happened to have skills with the same name, same description, and probably the same effects. An uncomfortable amount of the time, however, the actual effects differed, and some of them were just straight up bugged, like missing a minus sign on a stat adjustment so they buffed something they should be debuffing. Fixing that was… an undertaking. One that I would later learn was wiped out after the fact without telling me.

But anyway, every description was an entire paragraph, some spread across multiple pages. One of the first things done was to force a template where one didn't exist in the Japanese. The first page was a translation of the original description, and the second page was a list of the skill's actual effects, which didn't exist at all originally. Yeah, that's right. You just had to read the description, hope that it was accurate, and then remember whatever it did by what you saw in battle. Again, many were not accurate. To create the images, I made a ginormous spreadsheet of every single skill, a Photoshop template, and a script that would combine the two into a series of layers that could then just be dumped out to separate files. Technically, there was also a script for converting the spreadsheet into a more sleek csv because Photoshop's script processing is… inefficient.

skprof005-025-001.png;By cleansing the body and mind, this skill lets the user quickly absorb outside power and add it to their own, as well as sharing it with those around them.
skprof005-025-002.png;Trigger: Ally Attack Skill@rAll Allies Combat Mana Up@rAll Allies All Attributes Up@rAnti-Banish

The three files in the rar above were used to create literally tens of thousands of images and save me all manner of hassle. And if you're wondering why there's a green and red area in the PSD template, it's because every skill description image actually bleeds over into other parts of the interface. Those parts are just intentionally left blank on everything. Seinarukana's internals are a goddamned mess.

Romanesque was more complicated and also more hacked together. A lot of its text was text, thank the gods. A lot of things weren't though. For example, the spell names below. There were about 8 versions of each individual spell name for use in different places and contexts. A different approach was used here (not created by me). Since the game's files are virtually all xmls, one of the ones with the spell names was grabbed and a php script put together that would pull the spell names and then feed them to Imagemagick to create an image. Unlike Seinarukana, LWR handles changes in image size smoothly.


But wait, there's more and worse. Another place where the image-as-text problem comes up is in the backlog. All character names are text, and worse, they all have an icon associated with them. And there's close to a hundred of those since each random one-off NPC has its own name and icon. A similar approach was used there. A random xml with all the names was available, and php script modified to pull them out and Imagemagick used to create the text. It also then required an extra step to crop out the original text, leaving the icon, and then another one to append the new text to the existing icon.

And that's the story of how, if ever asked to do any image work or scripting in any official project ever again, the answer will be "Not my problem."

Next time, as we fast approach the finish line, Bunny Black.

Posted in Unimportant Crap | Comments Off on A Line of Code is Worth a Thousand Pictures

Comments are closed.