Evo gave me a bit of motivation to finally polish the last few things needed to finish up a refactored, stable version of BBScript, drawing from my own experience using the tool to make it significantly better for users and contributors to the config files. Here’s some of the important changes:

New game support: DNF Duel

Adding support for this was trickier than I expected, 8ing didnt seem to want to use BBScript the way ArcSys does, so they moved a lot of info out of the script code and into UE4 data structures, they also changed the binary format of the script a bit, which forced me to rewrite how parsing was handled to let script configs specify different types of instruction formats. In this case, the instructions are now explicitly labeled with their sizes, which has the added benefit of the config not needing to contain every function, allowing for more gradual labeling. I was already rewriting a lot of this code though, so it ultimately only took a few days to put it together, and now the codebase is a bit more flexible. I hope support for this game will result in datamining being much faster, as well as some fun mods.

New Verbosity Options, Better Logging

BBScript now has a -v option that you can raise the verbosity level of through adding more -v flags, for example, -vvvv will give you maximum verbosity, resulting in all being dumped to the screen, while a verbosity level of -v will only show warnings.

New Variable Syntax

Before, BBScript made you use a named value for labeling functions that had a discriminator that gave you info on whether the next argument was a literal number or a variable ID, it resulted in syntax like this:

// Variable ID 3, followed by a static value of 1500
functionExample: (VARIABLE), 3, (STATIC), 1500

This was functional, but the main caveat was that you couldn’t label variable IDs by their function, which is a big problem for quickly reading/writing BBScript code. To fix this, I’ve introduced a new syntax, with a new config file section that lets you add named values for specifically variable IDs. In BBScript code, it looks like this:

// Variable ID 3, followed by a variable labeled ACCUMULATOR, followed by a static value of 1500
functionExample: Mem(3), Mem(ACCUMULATOR), Val(1500)

Much cleaner, and allows for more information in the code, no referring back to notes you’ve written down.

On the config file side, this means you can explicitly label which tags count as variables and which count as static values, these seem to only use 0 for statics and 2 for variables, but its good to be able to change it if there’s ever an edge case. For labeling variable IDs with a more readable name, you add entries to the named_variables section of the config, it looks like this:

literal_tag: 0,
variable_tag: 2,
named_variables: {
  0: "ACCUMULATOR", // Label ID 0 as ACCUMULATOR
}

This will hopefully make the code significantly more readable as new variable IDs get labeled.

New Config Option: Function-Independent Named Values

Named values in BBScript were nice to have, but they had a big flaw: They weren’t shared globally. This new feature fixes that, by adding a new config section called named_value_maps you can create a new map of named values without needing to copy-paste it around to all the other functions that use the same thing. Here is a config example of creating a new named value map:

named_value_maps: {
  "GuardType": {
      0: "ANY",
      1: "HIGH",
      2: "LOW",
      3: "NONE",
  },
}

Here is how you use it in a function entry:

// Function ID 1098, named "guardType" takes an Enum("GuardType")
// Which lets it know to use the corresponding map for that argument
1098: (
    size: 8,
    name: "guardType",
    codeBlock: NoBlock,
    args: [
        Enum("GuardType"),
    ],
),

This should result in the config-writing process being much faster for people working on making the scripts more readable, I’ve already had a good experience with it myself, and I hope others do too.

Config Error Checks

There has been a problem of subtle, silent errors when rebuilding BBScript code, specifically with two functions in a config sharing a name, causing the program to rebuild the wrong instructions. Now BBScript will check for duplicate function names and throw an error upon finding one. No more headaches from lack of information on what’s wrong with the rebuilt scripts!

Release Download

You can get the newest version of BBScript here.

To end this, I would like to express my thanks to everyone who supported this project, it won’t be ending anytime soon, as ArcSys is always putting out new games, and maintaining the configs to label more functionality is an eternal project, but I think this is a good point in time for the software, and I’m incredibly proud to have made something useful for people who want to experience their favorite games in a different way, the saints who maintain wiki frame data and move property entries, and people who were just happy to see Goku in Guilty Gear: Strive or my work on XXrd. I look forward to contributing more in the form of new and better tools for various file formats, and support for more games.