Before I talk too much about the changes we made, I would also like to mention that we created a NoxTools organization on GitHub. The goal is to have a central repository for the many scripts and tools for Nox. If you want to become a member the organization or add a project, let me know.

What is Nox Script 3.0? It is a C-like scripting language that is compiled into a script object file that can be loaded into a map. The included Map Editor has two new options under the File menu: "Import Script" and "Export Script". These are used to load and save the script that is embedded in a map, and are only compatible with Nox Script 3.0.

The complete language details are in the documentation. Two features that were missing from previous Nox scripting was function arguments and function return values. Arrays and variables now work reliably. Also, the built-ins have been reviewed and all of the Unknown functions have been discovered, except for one.

Visual Studio Code. We implemented language support in Visual Studio Code, so you now have a mostly functioning IDE for writing scripts. It also integrates the compiler for a seamless experience. Installation instructions are available on GitHub.

Example. A simple translation of the script from Kingdoms.map is available here. There are also example snippets in the Nox Script documentation.

Map Editor. The included Map Editor is based on the last public release. The principal changes are fixing the ScriptObject parser to handle functions with arguments and return values, and adding support to load in an external script object. The source code and binaries are on the NoxTools GitHub.

Compiler. The Nox Script 3.0 Compiler is written in Python using pyparsing. It uses the included builtins.h header file to get type information for the built-ins. Future work on the compiler: adding optimization passes, and the ability to decompile scripts from official maps.

tldr; Download and install Visual Studio Code. Go to GitHub and download the Map Editor and the VS Code extension. Open the vsix file in VS Code to install it. Now write a script file (.ns extension), compile by pressing F5, and then import the script into a map using the Map Editor.

This was one of the tensions when figuring out the language details. We opted to prevent you from using an integer to reference a waypoint in order to improve the error detection. If this is a major inconvenience, I can be persuaded otherwise.

If your goal is just to reduce the amount of typing to reference a waypoint, maybe try using a helper function and naming your waypoints as WP1, WP2, ...: