Recent Posts

1
Warcraft III Models / Re: Shoto Todoroki
« Last post by Pashafenko036 on November 23, 2022, 10:35:47 PM »
Good Model Pro! :) :) :)
2
Site Discussion / Re: Minor bug in forum search (HTML Tag in output)
« Last post by City17 on November 11, 2022, 09:38:47 AM »
Ok sounds good  :)
3
Site Discussion / Re: Minor bug in forum search (HTML Tag in output)
« Last post by moyack on November 11, 2022, 08:57:50 AM »
Hi @City17 .

Well, this is a kind of "normal" bug in this system. It seems that it was fixed in the latest version fo this forum software, which I plan to upgrade. I just need to make some preparations for that.
4
Site Discussion / Minor bug in forum search (HTML Tag in output)
« Last post by City17 on November 07, 2022, 08:27:52 AM »
1. Go to https://wc3modding.info/search/
2. Search for "Zandalari High Priest"
3. The search result returns this: "Warcraft III Skins / highlight">Zandalari High Priest" -- the highlight"> thing definitely does not belong there, must be a bug. Because if you search for "Zandalari Priest" it shows correctly.

 
5
Concept Art / Re: Moyack's casual drawings and other stuff
« Last post by City17 on November 07, 2022, 08:02:42 AM »
Cool sketches, I like them  ;D
6
Jassdoc / [functions] GetUnitRallyPoint
« Last post by Bribe on September 24, 2022, 12:54:22 PM »
GetUnitRallyPoint is the only location native which actually needs to be called in order to retrieve those coordinates' values, since there is no GetUnitRallyX/Y.
7
WC3 Editing Tools / Re: Notepad++ Jass/vJass syntax highlighter
« Last post by moyack on August 12, 2022, 08:33:40 PM »
Thanks for making a new version of this highlighter. When I return to Windows, I'll give a try. Keep the good work.
8
WC3 Editing Tools / Re: vJASS Syntax Highlighter for notepad++
« Last post by City17 on August 12, 2022, 06:07:23 PM »
New version posted here: https://wc3modding.info/172/vjass-syntax-highlighter-for-notepad/

Moyack thanks for your highlighter, without you I'd have never attempted the new version! I started it from scratch, but I really needed a brief look at what you've done to get interested... OK ok it also needed fixes to be useful  ;D
9
WC3 Editing Tools / Notepad++ Jass/vJass syntax highlighter
« Last post by City17 on August 12, 2022, 06:04:34 PM »

Related Topics or Resources


Features:
  • 100% Jass2 syntax support
  • 95% for vJass (see below)
  • Partial support for JassHelper directives: //!
  • All current natives added for highlighting (v1.33)
  • All functions from common.j, blizzard.j, variables and constants
  • Different colors for blizzard.j, common.j's natives and variables
  • Colors made specifically for Notepad++ Obsidian theme (dark)
  • Default extensions: .j and .ai for Jass, .vjass for vJass

Jass syntax: only vanilla Jass2 keywords are highlighted. Good for learning basic Jass.
vJass syntax: extended syntax with vJass keywords and JassHelper. Good if you want to write/view vJass code.

There's no auto-completion support. (a) you can add it yourself (b) you should contribute to jassdoc to make it a reality: help describe the natives!

 


---

Installation

  • (Recommended): Set Notepad++ theme to Obsidian: Notepad++ toolbar (top) > Settings > Style configurator > Make sure "Global Styles" is selected on the left > Choose "Select theme: Obsidian" above
  • Notepad++ toolbar (top) > Language > (at the bottom) User Defined Language > Open User Defined Language Folder... > extract the .xml file to this folder (XML file has both Jass and vJass).
  • Restart Notepad++
  • Now you can select Jass/vJass syntax highlighting under Language

---

Introduction:

There were a few Notepad++ syntax highlighters made over the years to support Jass. The last one I used was by Moyack, it was alright but broke in various places like natives (very important to me). Also it's not made with a dark theme in mind. However it was last updated in 2020.

Before that, there was Nestharus' Notepad++ plugin to support Jass (2014). I don't remember if I got it working at all or didn't like something about it, but I didn't use it.

The reason Moyack updated his syntax highlighter was new "User Defined Language" features in Notepad++ and I can attest, that's very powerful (and frustrating to setup). But I did it! 12 hours spent or wasted ;)

---

vJass: What does not work?

I've gone through the entire vJass manual and copied examples from there. There's so much stuff, I doubt anyone actually knows all of it. However this piece will totally break the syntax highlighting:
Code: jass
  1. function interface Arealfunction takes real x returns real
This is a function interface prototype, after this line Notepad++'s code block detection will break. The colors will still work though (see big screenshot at the very bottom). I couldn't apply the same hack that I did for the regular Blizzard natives... that was pain too!

method/endmethod is a little broken. The colors are broken for "endmethod" and method's name. Further, methods cannot be folded as blocks (not recognized by Notepad++)

Finally I didn't know what to do with vJass'es special keywords: onInit, onDestroy, destroy, allocate, getType, typeid, create, evaluate, execute, .size, .width, .height. I left them without colored highlighting.

---

JassHelper directives

What you can see in the big screenshot is the best I could get. The syntax definitions of User Defined Languages weren't supposed to work with three different languages at once (Jass, vJass, JassHelper's macros). I had to sacrifice comment folding to highlight JassHelper's directives.

For example, "//! inject main" is the only valid directive, "//!inject main" is not. But Notepad++ will not let me do anything with spaces or multiple words. If you wanted to really improve upon that result, update the syntax plugin by Nestharus or write a new one.

---

Source included! I have left my work notes and scripts inside. If this ever becomes out-of-date, it'll be easy to update. Especially the native and functions lists.

I consider the Jass syntax file to be primary, but I had to change a lot of stuff to make vJass work. Although I left notes what keywords to add for vJass, please compare the two configurations yourself to see what had to be changed between the two.

---

How I made the "native" keyword work

It'll be only of interest, if you want to update this syntax highlighter or create your own for Notepad++.

Code: jass
  1. native ForForce takes force whichForce, code callback returns nothing
  2. // versus
  3. function receivesCallback takes code someFunc returns nothing
  4.         call someFunc()
  5. endfunction
  6.  
  7. function passAFunction takes nothing returns nothing
  8.         call receivesCallback(function someGlobalFunction)
  9. endfunction
  10.  

This was one of the reasons I started creating this highlighter and turned out to be the hardest. The issue here, you want Notepad++ to recognize function ... endfunction as a code block. You will encounter two conflicts:
  • "function" can be used as a standalone keyword, when passing a function as an argument
  • native does not start a block, it ends on the same line
So then you only have the two keywords at your disposal "takes" and "returns". Both are present in function... and native function... So if you start a new function block with either "takes" or "returns" then any native definition will break code blocks in the entire file, because they'd start a new block but never end it (with endfunction).
The workaround was to abuse delimiters. "Takes" is registered to start a new code block. However if "takes" is captured as part of a delimiter, it will NOT start a new code block. With this trick, natives are actually just highlighted "delimiter 7" keywords that grab the next "takes" word and thus suppress the creation of a code-block for native definitions.
10
Warcraft III Models / BTN Mephiles The Dark 2006
« Last post by XdzumanX on August 08, 2022, 05:50:57 AM »
Keywords: WC3 model
Model Type: Unit, Hero
Model Category: Rocks, Miscellaneous / Other
Rating: 5
Warcraft III Model resource
« Created: August 08, 2022, 05:50:59 AM by XdzumanX »
.
Vivir aprendiendo.co - A place for learning stuff, in Spanish   Chaos Realm - The world of Game modders and wc3 addicts   Diplo, a gaming community   Power of Corruption, an altered melee featuring Naga and Demon. Play it now!!!   WC3JASS.com - The JASS Vault + vJASS and Zinc   Jetcraft - A Starcraft II mod   WormTastic Clan (wTc)   Warcraft RESOURCES Reforged: Modelos, mapas, proyectos y mas...