Thursday 26 February 2015

RPGMaker Trans v3.07 Released

So... the number and severity of bugs appears to be going down. Here's a quick release, which contains the following fixes:
  1. Correct a bug where multiline inline scripts would not parse
  2. Include the README and LICENSE files in the distributed binaries
Assuming that's the last of the bugs in the v3.0 series, the next release will probably be a major version bump due to adding in support for VX Ace (and hopefully XP), as well as the new script loader and minor patch version.

Monday 23 February 2015

Revisiting Contexts

So... the v3.1 Patch Format has only been in public for, well, a few weeks, and I'm already thinking of upgrading it. The reason? Again, it boils down to trying to get support for VX Ace and custom scripts shoehorned in.

Now, it's important to preface this with the following: v3.1 patches will have a transparent upgrade to v3.2. Unlike the transition from v2.x to v3.x, which involved the creation of entirely new classes of context (as well as syntax, persistence etc), the v3.1 to v3.2 transition is much milder, and only involves rewriting contexts. The absolute worst case is that some of the older style contexts will remain, but that's it.

The reason for this is that there's a tiny corner case in how Ruby files were processed. The corner case meant that it was impossible for certain classes to be seen by the patcher as an entity in and of themselves (although the patcher did see their constituent parts). This meant that the newer, adaptable detectors never saw what they needed to detect, and... well, it didn't go well.

What's the benefit for this? Well, ignoring the addition of VX Ace support, my test VX Ace game includes some custom scripts for what I'd call 'inter-party recap of goal events'. These are simply common events, but they're in a non-standard file. The older, fixed structure detectors missed them completely, and would require some custom code adding to the patch to make it work. The newer adaptable detector finds it without issue.

Downsides? Well, it's a little slower, and I'm still trying to weed out some of the things that don't need translation. For example, I thought it'd be reasonable to translate any name attribute as a string, but it turns out there's a lot of names in a game which are only for the developer to see. That's slightly annoying.

Anyhow, I'm hoping for VX Ace + custom data support early next month, once the v3.2 patch format is ironed out. Hopefully that will go well.

Wednesday 18 February 2015

Revisiting Script Loading

Well, I do know that RPGMaker Trans's VX use hasn't been widespread, at present - far too many critical bugs which weren't found. But oh well. In any case, much more interesting is adding VX Ace support, given that's where all the new games are at.


In any case, I've picked a test game, and then found that my current method, a generic version control script for RPGMaker, doens't work. Custom data types, which Ruby doesn't like unmarshalling without a definition. Of course, a sane person would have picked a new test game, but it's far more fun to get custom data types working. Also more useful in the long run.

Therefore I'm migrating away from the older approach of assuming the structure and onto an approach where the structure is loaded from the Scripts file, as happens in the RPGMaker runtime. There's a couple of downsides to this, unfortunately. The first is negligble - the scripts get a chance to run, which leaves you open to malicous scripts. While this sounds bad, it leaves you no less vulnerable than if you just ran the RPGMaker game, so I'm not concerned here.

The second is somewhat more annoying: XP/VX use Ruby 1.8, XV Ace uses 1.9, and these have different syntax's. This probably means that on Windows I'll end up shipping multiple Ruby binaries in the pruby folder. On other platforms... it's less clear what I'll do, but probably the onus will be on the user to provide an appropriate Ruby interpreter (perhaps using RVM). That said, most of the time it should be perfectly fine to use a different Ruby interpreter, it's just the little corner cases.

There's also going to be an overhaul of how things are checked for if they're translateable - probably along the lines of Ruby files which inform the patcher - but before I can comment on how that's going to work I need to get a better hang of Ruby metaprogramming so I can provide a nice, clean, interface.

On a side note, does anyone know how to programmatically call all the methods on a Ruby Module? I know how to do it with a Class, but finding out how to do it for a Module is driving me nuts... EDIT: Think I've got this now...

RPGMaker Trans v3.05 Release

As the v3.04 release, but fix a bug where finding the Ruby binary wasn't working. Website will be updated soonish.

Monday 16 February 2015

Prerelease RPGMaker Trans v3.04

So there's still bugs in v3.03. v3.04 is available on the download page, but isn't officially being released - it still counts as beta software.

Here are the bug fixes:
  • Fix for potential (although obscure) confusion with Patch/Asset files/folders in v3 patches
  • Fix for patched inline comments crashing the game
  • Fix for crash on exit (temporary)

Friday 13 February 2015

RPGMaker Trans v3.03 Released

Probably should do a release announcement for this. New version fixes 2 bugs:
  • Comments in v3 patches could modify the string inserted
  • Crashes with version controlled games/patches
Huzzah!

Also doing VX Ace support is much harder than I at first anticipated.