• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

vrJASS

This bundle is marked as awaiting update. A staff member has requested changes to it before it can be approved.
This tool originates from here

UyuRc3b.jpg

What is vrJASS?
A just-for-fun programming language which compiles down to JASS (Warcraft 3). It aims to improve and replace the beloved vJASS.

What? x2
An update to vJASS which tries to solve its flaws.

I want to try it! - I need a manual
https://github.com/Ruk33/vrJASS/wiki

Last version
https://github.com/Ruk33/vrJASS/releases

TODOs
  1. 80%-100% (I'm planning not to implement a few features, like function interfaces, but if anyone can/want-to code it, will be welcome) compatibility with vJASS
  2. Improve debug messages
  3. Fix (module) initializations (implemented as abstract classes)
  4. Improve OOP (type-safety, attributes initialization, etc.)
  5. Anonymous functions
  6. Free variable definition
  7. Add operators +=, -=, *=, /=
  8. Improve/add loops
  9. Null/Empty string/0 Conditional (null->false, "" -> false, 0 -> false)
  10. Auto-null local handle variables Optimizers do this already
  11. Return array Simply use structs
  12. Allow end as alternative to endfunction, endmethod, endloop, etc.
  13. Hooks (before/after)? Delegated to cJASS
  14. Alternative C-like syntax Delegated to cJASS

Green -> Done

When is it gonna be ready?
It already is on an stable version!

Where can I see the progress/code?
https://github.com/Ruk33/vrJASS

How can I help you?
If you know Java or Antlr4 you can check the repository and send me pull requests (don't worry if you don't know too much about them, I'm new too!). If you don't know these languages, let me know your suggestions, I'm open to them :)

So there will be no changes for the final-user (you), it will be like coding with the actual vJASS in my current setup in Newgen without any weird stuff, right?
Kinda. Yes, it is gonna be the same syntax, same features (excepting just a few that no one uses) but with a few and hopefully useful new features like better error messages, free variable definition (not only at the beginning), new loops, etc..

Few examples

Anonymous functions
JASS:
call TimerStart(..., function takes nothing returns nothing
    local timer expiredTimer = GetExpiredTimer()
    // ...
endfunction)
Free variable definition
JASS:
function foo takes nothing returns nothing
    call TimerStart(...)

    if (...) then
       // ...
    endif

    local unit bar = CreateUnit(...)
endfunction

Operators +=, -=, *=, /=
JASS:
local integer i = 5

set i += 5 // same as set i = i + 5
set i -= 5 // same as set i = i - 5
set i *= 5 // same as set i = i * 5
set i /= 5 // same as set i = i / 5

Improved loops
JASS:
while (true)    
    if (shouldSkipThisIteration) then
        continue // not implemented... yet
    endif

    // ...

    if (isOver) then
        break // same as exitwhen true
    endif
endwhile

Null/0 conditional
JASS:
local unit u = null

if (u) then
    // unit isn't null
else
    // unit is null
endif

local MyCustomStruct instance = ...

if (instance) then
    // instance exists (allocated)
else
    // instance does not exists (not-allocated) 
endif


What does vr mean?
Pick the one you like the most:
  • Beer (default), because everyone loves beer
  • Vexorian r$~%d-newbetterversionftw
  • Vexorian Ruke

Keywords:
vrjass, jass
Contents

vrJASS (Binary)

Reviews
eejin
Do you have any intention of updating it to function with the newest Warcraft 3 version? Once you do it can be reviewed for approval. Refer to the tool submission rules or contact me if you need any clarification.
Level 9
Joined
Aug 26, 2010
Messages
573
Well it's weird. I don't use any of them. But I can't reproduce it somewhy now. T_T Anyway it was failing on private static constant field I think.
Have you implemented import preprocessor? Cuz I moved all the vJASS code outside of map after trying your tool and it is being imported on compilation atm.

Edit: tried to use your import (like "//! import Core\Bonus.j") but it still doesn't work.
 
Last edited:
Level 10
Joined
Sep 19, 2011
Messages
527
Well it's weird. I don't use any of them. But I can't reproduce it somewhy now. T_T Anyway it was failing on private static constant field I think.
Have you implemented import preprocessor? Cuz I moved all the vJASS code outside of map after trying your tool and it is being imported on compilation atm.

Edit: tried to use your import (like "//! import Core\Bonus.j") but it still doesn't work.

Yes, but the imports now must be like import "path/to/file.j" ^^.
 
Level 10
Joined
Sep 19, 2011
Messages
527
vrJass doesn't work for me... Should I do something with the lua file after I downloaded it?

Hi Night, make sure you have Java installed. Then, just follow this instructions: https://github.com/Ruk33/vrJASS/wiki

Tried again but now it gives error that it can't find file

Hi Drizz, from what path are you using the import statement?.

For example, try the following (it should work):

folder/file_2.j
file_1.j

In file_1.j, put import "folder/file_2.j"


Never mind, seems like a bug when using w3x, I'm going to check.

Edit: if you need a quick fix, please use absolute path.
 
Last edited:
Top