• Are you planning to upload your awesome tool to Hive? Please review the rules here.
    July 9, 2018: The rules for the Tool Section have been revised. Please be sure to read the revisions.

W3MS - MoonScript Development in Warcraft III

This bundle is marked as pending. It has not been reviewed by a staff member yet.
  • Like
Reactions: deepstrasz and Vinz
W3MS is a Python script that enables you to do MoonScript development for Warcraft III in Sublime Text.


  • Windows 10 64-bit
  • Python 3
  • Sublime Text 3
  • Warcraft III



Showcasing completions.

Completions are invoked by pressing Tab while having selected the desired completion from the completion list. You can jump between function parameters with Tab and Shift+Tab.


Accessing MoonScript from Lua.

You can access MoonScript modules from within your Lua code. This is enabled by `require` function, as demonstrated above.


Upon error, the client is closed and relevant code line is highlighted.

W3MS will watch `Documents\Warcraft III\CustomMapData` for an error file that's dumped by the code in case of a failed `pcall`. In such event, Warcraft III is closed and Sublime Text will open war3map.lua at the failed line.

Installation & usage
  1. Make sure you have up-to-date Warcraft III, Python 3 and Sublime Text 3 installations.
  2. Run the .py file; post any errors you get here.
  3. Have a project folder inside which resides exactly one .w3x scenario folder open in Sublime Text.
    • Building: Select W3MS from `Tools/Build System`. Press Ctrl+B. Post any errors you get here.
    • Syntax recognition: Save your files with .moon extension. Click the syntax label at bottom-right corner. Select MoonScript from `Open all with current extension as...`.

W3MS - MoonScript Development in Warcraft III (Binary)

Level 4
Oct 22, 2019
  • More code parameter wrappers for catching Lua errors.
  • Lua files from the project directory are also imported.
  • Module initializer is now invoked on `__call`s as well.
Here's a knockback function I did:

Update 11.11.2019:
  • Every module is now initialized before a call to `InitGlobals`.
Last edited:
Level 4
Oct 22, 2019
In case someone wants to work with Reforged, an additional -launch flag is required, otherwise it brings you to the Battle.net app.
Press Win+R, type: notepad "%APPDATA%\Sublime Text 3\Packages\User\W3MSBuild.py"
Change line 60 to: U=E.Popen([C.w3app,'-launch','-loadfile',N])
Level 4
Oct 22, 2019
I've been working on an update for this for roughly a month now. One can (hopefully, and at their own discretion) install it already from the repo by cd'ing to the project root and running `python setup.py install`. You need Visual C++ build tools and 64-bit Win10.
The version here doesn't mandate using `require` for importing modules, and also initializes every module by default. This is no longer the case with the new version.
It still integrates to Sublime Text which is admittedly suboptimal, so I'll look into migrating over to VS Code.
upload_2020-9-14_1-10-6.png Object editing: `python -m w3ms build -x ...`
Note that it'll overwrite/remove any existing W3U, W3T, W3B, W3D, W3A, W3H, W3Q files in the map dir. I'll look into changing this behavior.

Unit tests: python -m w3ms test <files...>