Suggestion: Allow custom game owners to access Statescript debugging/editing

https://www.gdcvault.com/play/1024653/Networking-Scripted-Weapons-and-Abilities

That presentation gave us a sneak peek at some of the tools the developers use for debugging in-game scripts, created using the internal “Statescript” system. Given the similarities in what can be accomplished (I even see “Chase Var” as an option in one of the slides) I think it’s likely that Workshop code is compiled to Statescript. Clearly the developers find those features useful for debugging the official game scripts, and now that players have a way of creating their own scripts (even if not in the exact form those screens show) perhaps it could be a valuable tool for us as well.

A natural place to add this option would be as a toggle in the Workshop Inspector (“Expert Debug Overlay” perhaps) which could also optionally be bound to a key in the options menu.

To take this idea even further, how about porting the Statescript editor to run inside the retail game as part of the Workshop editor? The existing editor would still exist, but you’d also have the option of turning on “Expert Mode” (in the settings menu, perhaps) which would enable some additional, more advanced features.

First, the “Expert Debug Overlay” feature I mentioned before would become visible.

Second, when creating a new rule, you’d be able to select either “Basic Rule” or “Advanced Rule”. As you may have guessed, Basic rules exactly the same as what we already have now. Advanced rules, on the other hand, are just plain Statescript graphs. If you know what you’re doing, creating an Advanced rule would make it (I’m assuming) much easier to script more complex behavior, and likely have more flexibility as well. Not to mention the opportunity for more fine-tuned server load optimization.

Third, Basic rules could have an option to convert them to Advanced rules. This would likely be a one-way conversion, which would compile the rule to a Statescript graph just like what happens internally, and then replace the rule with an Advanced rule containing that graph.

Fourth, instead of just the usual rule list, you’d have two sections: “Custom Rules” and “Built-In Rules”. The former section would just be the rule list you’re used to having, but “Built-In Rules” would show you all the default Statescript graphs used by the game. The options here would appear to be more limited: you can’t create, delete, or rename built-in rules, and editing, if allowed at all, would be limited to trivial things like node properties. (Otherwise things would get messy when updates change those graphs.) But there’s at least two things you would still be able to do: toggle their enabled/disabled status, and copy them to the clipboard. So if you want to delete a rule, just disable it, and if you want to make more detailed modifications to one, you can copy it to Custom Rules and disable the original one. There could also be an “Override” button that does those two steps automatically.

I hope Blizzard seriously considers doing this—it could make Workshop even better than it is now, plus I’d personally love to experiment with this stuff myself. If they aren’t ready to give us full Statescript editing (due to security concerns or whatever) then hopefully we can at least get access to the debugging screens.

What are all your thoughts?

Not related to your suggestion, but I found slides 71-72 kind of interesting, it had a lot of actions and conditions (I think) that we don’t have.