Hello everyone!
For those that do not understand the substantial impact that this latest update has on the development process, I would like to explain what is now possible. Since we have raw text which functions as a direct input into the Workshop, it is now possible to write scripts which “transpile” (work as a translator) into a source language, which is the code for rules in the Workshop. I am starting to tackle the project of writing a Python-like programming language which will transpile into the raw code that can be imported into the Workshop.
Some features I am looking into making are variable substitution (write boss_hp instead of a single letter, procedure declaration (reuse code snippets from elsewhere without having to copy-paste), and custom operators (array indexing using my_arr[1] turns into exactly what you would expect).
The project can be found on my Github page (adapap/owscript) for the the technically savvy or the curious mind. By keeping this open source I might inspire Blizzard devs to add some of the features that this programming language will provide in the meantime.
3 Likes
Great idea! Implementing higher-level python language features (like slicing / indexing) would go a long way towards enabling some more complex workshops with less user-written code. It’s a fun thought experiment to just go down the list of dunder methods (https://docs.python.org/3/reference/datamodel.html
) and consider how each could apply to the workshop…
I really wanted to give this post a bump to tell people how amazing it actually is. I use it in my own gamemode and I’ve actually been helping with it myself.
It’s awesome and it makes making complex workshop code SO much easier. Legendary is no idiot and has made it super smooth and as issues arise, he quickly fixes them.
On top of that, if you’re used to workshop code…it’s better than some of the alternatives that essentially require you to learn another language. It also makes debugging raw workshop code easier because they’re so similar in many ways.
I’ve never used Python or anything really Python like before. I come from a PHP/NodeJS background with some work in C# and Java, but because it’s built so easy to understand and get started with, I got a first prototype build of my gamemode up within a few hours, including working with Legendary on various issues that arose during the development process.
Not only that, but Legendary is quick to add features. I remember specifically wondering if he could add a map detection feature, he added it within a couple days if I can recall and now I actively use it to allow multiple map support with one code inside my gamemode.
Now the biggest thing is, there’s no standard intellisense because it’s essentially a custom language. So if you’re willing to bear with that fact and don’t mind a little extra work, I 100% suggest it.
It also adds some pretty nifty stuff like functions and, assuming my PR passes, importing of other modules. So re-using code/core functionality across your script is extremely easy. Honestly, if you’re looking for an easy way to get started with workshop and don’t wanna deal with all the crap that is the workshop editor, this [OWScript] is the way to go.
Here’s my game I use it in:
It’s open source here too: https://github.com/overwatchworkshop/upgrade-shop
I’m sorry I’m beginner but what exactly did the last update cause?