1. 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.
    Dismiss Notice
  2. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  3. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  4. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  5. Dismiss Notice
  6. The Highway to Hell has been laid open. Come along and participate in the 5th Special Effect Contest.
    Dismiss Notice
  7. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

W3MS - MoonScript Development in Warcraft III

Submitted by kovadarra
This bundle is marked as pending. It has not been reviewed by a staff member yet.
[​IMG]
W3MS is a Python script that enables you to do MoonScript development for Warcraft III in Sublime Text.

Requirements

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

Features


[​IMG]
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.

[​IMG]
Accessing MoonScript from Lua.

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

[​IMG]
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...`.
Contents

W3MS - MoonScript Development in Warcraft III (Binary)

  1. kovadarra

    kovadarra

    Joined:
    Oct 22, 2019
    Messages:
    12
    Resources:
    0
    Resources:
    0
    Update:
    • 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:
    upload_2019-11-8_21-51-23.png [​IMG]


    Update 11.11.2019:
    • Every module is now initialized before a call to `InitGlobals`.
     
    Last edited: Nov 11, 2019
  2. yxq1122

    yxq1122

    Joined:
    Jun 5, 2018
    Messages:
    127
    Resources:
    0
    Resources:
    0
    Awesome tool for developing lua maps with python. Good job!

    I’m just wondering why the Sublime text 3 installation is mandatory. Why not notepad++ or vs code?
     
  3. kovadarra

    kovadarra

    Joined:
    Oct 22, 2019
    Messages:
    12
    Resources:
    0
    Resources:
    0
    Thanks!

    At extras & addons on the MoonScript page it's only advertising Vim and ST support. Perhaps there exist third party solutions, but I didn't feel like looking around for working ones.
     
  4. feber13

    feber13

    Joined:
    Nov 23, 2017
    Messages:
    11
    Resources:
    0
    Resources:
    0
    very good tool