You Were Chosen Fatally to Avater… Whatever The Hell That Means

March 5th, 2019

Giga needs to just not pretend to know English.

Battle Moon Wars SDK
Galaxy Angel/Moonlit Lovers SDK
Daibanchou – Big Bang Age SDK
Eternal Lovers SDK
Kamidori SDK
AQLoop SDK

Duel Savior/Xross Scramble Scripts and Tools

This package was cut down more than the others because it included uncompressed sfx, graphics, voices, etc for both versions, which pushed the workspace size in my archive to about 25 gb.

Duel Savior is a project that if I had to do it again, I'd probably do things a bit differently. First and foremost, the uber-version unifying both Destiny (PS2) and Justice (PC) into a single package? That was a mistake. It really should've just been two separate patches. I don't remember why I wanted to unify it like that, but I think the main reasons were "because I could" and "because it'd be awesome," but it did cause a fair number of extra headaches that I have only vague memories of now and really don't want to go back through my voluminous IRC logs to refamiliarize myself with everything. A few of the highlights were that things like CGs and scripts had hardcoded memory space, so there were lots of really awkward workarounds that resulted in things like character route scripts never being recorded as 'read' because that space got allocated for all the 'common' route files for Destiny/Justice instead.

Giga handles graphics really dumbly too, with a bmp, fil, and ani file for each, and it pieces together little bits of faces, eyes, mouths all individually over a base sprite. We were only able to get the scripts and sound files out of Destiny. All the Destiny-unique graphics in my patch were either taken from Xross Scramble or were actually screenshots I took of Destiny's CG gallery after a quick 100% speedrun through it. Stuff like Dahlia or Papillon's more modestly dressed stand sprites couldn't be pulled out and stayed their more risque versions from Justice. In the scripts/files though, the names and addressing keys for them were changed, so I ended up writing a few quick python scripts that created key-pairs matching those between the Destiny and Justice scripts so I could import them over, with a pretty similar thing for adding Taiga's lines. I would later reuse most of this code for Baldr Sky's zillions of editing issues as well, but we'll get to that in a few weeks. There were still tons of transitional issues (screenshots below) as things were worked out with wrong graphics or sprites being called, corruption of files, or some just straight up crashes. The Destiny scripts also needed to be pruned of some minor PS2 only commands and stuff that the PC engine didn't know how to handle.

As for working on the game itself, that's its own lengthy tale. Zbspac is a Giga tool that has been around forever for unpacking their main archives BUT there exist multiple iterations of it. My understanding is that one of them repackages without recompressing the files, and the other one does. The problem is that one of them doesn't repackage script files correctly but repackages media files correctly, and vice-versa for the other. So there's two versions of zbspac, and both are needed. On top of that, there's a tool specifically for the scripts, descended from a non-functional Baldr Force tool. The Force tool never handled pointers correctly, so while it appears to package scripts, as soon as it hits any kind of movement within a script (eg a choice being made, or a flag hit and being sent to a different part of a script), everything explodes. Baldr Force doesn't have a ton of that, so I imagine it was missed. Duel Savior is FULL of that stuff due to its map movement mechanic, so it melted down catastrophically until that was fixed. Its pointer fix doesn't work for Force though. Believe me, I tried.

Anyway, the scripts themselves look like this.

PushC    0
PushC    FFFFFFFF
PushB    <Taiga>
PushB    <@vtaig003114"No kidding, it's Lily!@w0030 Evil witch Lily!@w0030 She bakes little children into cakes and eats them!">
Call    446(4)
Call    8(FFFFFFFF)
PushC    2
PushC    7D
PushB    <Lily>
PushB    <@v0050020019"…At some point, Taiga Touma, you might find@n it better to shut the hell up.@g怒">
Call    446(4)
Call    8(FFFFFFFF)

It queues up variables or strings in the PushC and PushB fields and then calls a command using them as input. I believe the Call 8(FFFFFFFF) stuff is to clear the variable space. In this case, 446 is the generic text window display using the previous 4 lines as input data. In the above, the first set has Taiga's character ID (PushC 0), Taiga's character window (PushC FFFFFFFF, which is blank), then the nameplate, and finally the text that's in the window itself. Notice that the text contains inline commands. @v means to play the voice file with that name. @w is text wait/pause, @n is a linebreak, and @g is for special emojis. There's a buttload more, from font size changes to automatic advancing to changing the faceplate mid-line. The craziest one, and one that was used extensively excessively in Baldr Sky, is a progressive text size change function that it uses when lines are just slightly too long. Instead of just editing down a word or two, they coded something that gradually shrunk the text by a pixel or two across 10-20 characters so it was hard to notice, but bought them a little more space. It's… an astoundingly idiotic solution to what should have just been slapping the writer and telling them to be more concise.

If you had a lot of time, you could probably figure out what all the commands are and map them appropriately to readable human text. I did a little bit of that so I could emulate the between chapter interstitials that Destiny had but Justice didn't, but as far as translation was concerned only the strings in the PushB calls were of any import. The variables and voice tags did need to be updated for the Destiny stuff as mentioned above, but the Destiny and Justice scripts were largely identical, so that helped immensely. This was the first game where I created my own quick and dirty automatic linebreaker (included), which I would build upon as we get into my final translation era, where I refused to work on anything that wasn't in a human readable format I liked and created lots of helper scripts to ensure that.

Next up, Bumper Baby Banchou, another historical curiosity that is more a mess than anything else. Might even do it on Friday since that should be a pretty short post.

Posted in Duel Savior | Comments Off on You Were Chosen Fatally to Avater… Whatever The Hell That Means

Comments are closed.