• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Volunteers Needed - Notepad++ vJASS

Status
Not open for further replies.
I have put together a c++ thing that outputs xml required for autocomplete by Notepad++.

I need help plugging all of the natives, BJs, and several relevant ai natives, into the c++ code.

This will be used for general coding for vJASS and I also hope to give the same treatment to Galaxy.

These are the urls with the details

http://wiki.thehelper.net/wc3/jass/common.j
http://wiki.thehelper.net/wc3/jass/Blizzard.j

This is the template list (credits to GhostWolf for making this list. Thank you GhostWolf! : D).

https://github.com/nestharus/Notepad---vJASS/blob/master/ai to do.txt
https://github.com/nestharus/Notepad---vJASS/blob/master/natives to do.txt
https://github.com/nestharus/Notepad---vJASS/blob/master/bjs to do.txt

If nobody is going to help, then this will never be done, and the JASS Class will never be reformed. Furthermore, amazing new features that can be applied to Galaxy and vJASS will never be done : \. I really need help with this stuff.

Keep in mind that the text does not wrap, so don't go past the dashes at the bottom (or end close to them). Use \n to start a new line like this

Code:
	definitions.add(
		new Function(
			"ConvertMapFlag",
			"mapflag",
			{ "integer i" },
			"\n"
			"Returns the mapflag that corresponds to the given integer."
			"\n\n"
			"Map Flag Constants: MAP_FOG_HIDE_TERRAIN, MAP_FOG_MAP_EXPLORED, MAP_FOG_ALWAYS_VISIBLE,\n"
			"                    MAP_USE_HANDICAPS, MAP_OBSERVERS, MAP_OBSERVERS_ON_DEATH,\n"
			"                    MAP_FIXED_COLORS, MAP_LOCK_RESOURCE_TRADING, MAP_RESOURCE_TRADING_ALLIES_ONLY,\n"
			"                    MAP_LOCK_ALLIANCE_CHANGES, MAP_ALLIANCE_CHANGES_HIDDEN, MAP_CHEATS,\n"
			"                    MAP_CHEATS_HIDDEN, MAP_LOCK_SPEED, MAP_LOCK_RANDOM_SEED,\n"
			"                    MAP_SHARED_ADVANCED_CONTROL, MAP_RANDOM_HERO, MAP_RANDOM_RACES,\n"
			"                    MAP_RELOADED"
			"\n\n"
			"Parameters\n---------------------------------------------------------------------\n"
			"    integer i: The integer representation of the map flag (see constants)."
		));

For anyone that wants to play with the work in progress, these are the notepad++ files you'll need

Styler: https://github.com/nestharus/Notepad---vJASS/blob/master/vJASS Style.xml
Autocomplete: https://github.com/nestharus/Notepad---vJASS/blob/master/vJASS.xml

Place Autocomplete in C:\Program Files (x86)\Notepad++\plugins\APIs

Start notepad++, go to Langue->Define your own language

From here, click import and select vJASS Style.xml

Restart notepad++, then open your .j and .ai files like normal.


To compile, go to Plugins->Plugin-Manager

Select NppExec and install it.

Restart Notepad++ and then hit F6

Go to your jassnewgenpack5d or jassnewgenpack20 directory

Go into the jasshelper folder, create a new folder called bin and copy sfmpq.dll into it

Place this into the commands in notepad++
"C:\Program Files (x86)\Warcraft III\jassnewgenpack5d\jasshelper\jasshelper.exe" "C:\Program Files (x86)\Warcraft III\jassnewgenpack5d\jasshelper\common.j" "C:\Program Files (x86)\Warcraft III\jassnewgenpack5d\jasshelper\Blizzard.j" "C:\Program Files (x86)\Warcraft III\Maps\my map"

my map should be the wc3 map that includes your script

be sure to place all of your scripts into jassnewgenpack5d\jass in order to make it easy to do //! import

hit Save As and then save it as your map name

now you can hit F6 whenever to save compile your script

In order to test the map, from http://www.wc3c.net/showpost.php?p=391508&postcount=1

Here is a list of parameters, that are accepted by Warcraft III (war3.exe):
Syntax: -[command]
Example: -window
window = Window Mode (starts WC3 windowed)
fullscreen = Full Screen Mode (not needed, this is default)
gametype
loadfile <Path> = Load a file (makes only sense, when loading a map or a replay)
datadir
classic = Runs RoC
swtnl = Software TnL (just a guess)
opengl = OpenGL Mode
d3d = Direct3D Mode (not needed, this is default)

You would add a second line to the commands in notepad++ to start warcraft 3 with your map.

"C:\Program Files (x86)\Warcraft III\war3.exe" -window -loadfile "C:\Program Files (x86)\Warcraft III\Maps\my map"

The -window option doesn't appear to work

Anyways, this is what my command looks like for vJASS Run
Code:
"E:\Program Files (x86)\Warcraft III\jassnewgenpack5d\jasshelper\jasshelper.exe" "E:\Program Files (x86)\Warcraft III\jassnewgenpack5d\jasshelper\common.j" "E:\Program Files (x86)\Warcraft III\jassnewgenpack5d\jasshelper\Blizzard.j" "E:\Program Files (x86)\Warcraft III\Maps\vJASS.w3m"
"E:\Program Files (x86)\Warcraft III\war3.exe" -loadfile "E:\Program Files (x86)\Warcraft III\Maps\vJASS.w3m"

I recommend that you only include 1 file into your map and include the rest of the files through that 1 file.


The final result
attachment.php


And script compilation with F6
 

Attachments

  • final result.jpg
    final result.jpg
    59 KB · Views: 918
Last edited:
no, what u'd be doing is filling in descriptions

just give me a # of functions you want to fill in and I'll give you a list to fill in

this is not for testers, this is for workers ; P

I can't fill in the details for ~2000 functions ;(, so I need a lot of people to help fill in those details. I'll prob be able to do 100 myself, that leaves 1900.

If nobody helps, then this project will never be finished :\
 
Ok everyone, this is an update

First, Map Cleaner, compiled for 64 bit windows
https://github.com/nestharus/Map-Cleaner--vJASS-/tree/master/bin/x64
You'll need to put those in
Essentially, your wc3 directory, whatever it is, it'll find it
C:\Program Files (x86)\Warcraft III\jassnewgenpack5d\mapcleaner

Next, go here
C:\Program Files (x86)\Warcraft III\jassnewgenpack5d\jasshelper
Create a new folder called bin
Copy sfmpq.dll into it

Now get this nifty file compile_war3.rar
Put it in C:\Program Files (x86)\Notepad++
Essentially, your notepad++ directory
Don't have notepad++? http://notepad-plus-plus.org/download/v6.4.2.html

From here, start notepad++, go to Plugins->Plugin Manager and get NppExec

Hit F6 after you get it and put this in
Code:
//set this to the name of your project if you don't want to have to flip
//to the main file
SET NAME=$(NAME_PART)
//SET NAME=

SET map_path=Maps\Projects\$(NAME)
SET jasshelper_path=jassnewgenpack5d\jasshelper
SET cleaner_path=jassnewgenpack5d\mapcleaner\Map Cleaner (vJASS).exe
SET project_path=jassnewgenpack5d\jass\libs\$(NAME).j
SET compile=1
SET debug=0
SET run=0
cd "$(NPP_DIRECTORY)"
cmd /c compile_war3.bat "$(project_path)" "$(map_path)" "$(jasshelper_path)" "$(cleaner_path)" $(compile) $(debug) $(run)
SET map_path=
SET jasshelper_path=
SET cleaner_path=
SET project_path=
SET compile=
SET debug=
SET run=
SET NAME=

Save it as vJASS

These are important
Code:
SET compile=1
SET debug=0
SET run=0

It should be clear what those do

It determines the map name to compile based on the open file unless you change this

Code:
//set this to the name of your project if you don't want to have to flip
//to the main file
SET NAME=$(NAME_PART)
//SET NAME=

A bit annoying, but oh well, not much that can be done.

If you want to change any paths to where you want to store maps and stuff
Code:
SET map_path=Maps\Projects\$(NAME)
SET jasshelper_path=jassnewgenpack5d\jasshelper
SET cleaner_path=jassnewgenpack5d\mapcleaner\Map Cleaner (vJASS).exe
SET project_path=jassnewgenpack5d\jass\libs\$(NAME).j

cleaner_path is set to where this post tells you to put it
jasshelper_path is set to standard path (unless you have jassnewgenpack20)

Those paths are all within the warcraft 3 directory, so you can't put in something arbitrary.

project_path must contain a JASS file with the same name as your map file. This file is automatically imported, it is your main script. From here, you can import other files and code vJASS. GUI can be coded within the map, but the map (WE) can not have any vJASS in it, it'll all get removed.

If you want to store your vJASS main project files somewhere else, feel free to change the path. Same goes for the map path.

Have fun everyone!

And don't forget to get the autocomplete for notepad++ and the styler (see post #1)
 

Attachments

  • compile_war3.rar
    671 bytes · Views: 160
Last edited:
Ahem, if you are coding, it's much more efficient to code in notepad++ as saving just saves the file you are currently working on rather than compiling a map. Furthermore, if ur comp freezes in the middle of a compile or something, u've lost all of ur work (something that has happened to me frequently). Also, notepad++ allows people to make use of github and promotes teamwork ;).

The real question is, why would you ever want to code in WE unless it's GUI?
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
I think having a standalone way of coding is mainly good for the people with slower or less stabile computers. Such as me.
Because, my biggest maps can take up to like 20 seconds to save, which is absolute bullshit if I just want to fix a typo in code.
 
edo494, you can test the map from notepad++ like in WE. The only difference is that in notepad++, ONLY THE SCRIPT IS SAVED, not the entire map, meaning that if you have a huge map and are only working on the script, the save is going to be fast + you can test it, unlike in WE.

It doesn't make sense to save the entire map (objects, terrain, everything) when you are only working on the script.
 
Some updates


I hooked notepad++ up to war3 and jasshelper through Lua now
I made dll plugins that only require this line to load

require "plugin name (name of the dll)"

war3.dll has these features (added to Lua)
mpq manipulation (read/edit the mpq with an easy API, like Unit['hfoo'].name = "Footman"

access to war3 installation path
access to see if TFT is installed


and I'm also making it so that you can embed Lua into vJASS :eek:

#i = 5
local integer i = #i --5
local integer y = #{i} + 5 //10


the challenge at the moment is that Lua is in C, so everything is in c++, but the parser I want to use is in Java D:. Yea, I'm going to hopefully remake jasshelper using this awesome parser so that it's much faster + bugless + has correct behavior + supports the Lua stuff at the parser level so that we no longer need static ifs. I want to be able to check for function, method, global, etc existence, line by line =).

#if global.name.exists
#if function.name.exists
#if method.name.exists
#if struct.name.exists
#if module.name.exists

etc =)

Lotsa stuff :eek:

edit
Ok, decided to move from Lua to Scala so that the Parser can be worked with directly =).

StormLib is in C, so I'll have to do this in order to load it -> http://blog.mwrobel.eu/how-to-call-dll-methods-from-java/

It'll be pretty light on loading as I load a file into RAM when I do loading

From here, Scala can run alongside the parser, meaning that you'll be able to check for existence of stuff, yum.

Now, while I'm working on this, do people still want the vJASS syntax? Or do people want awesome language tags with cool language plugins?

#{ } //scala
#vJASS { }
#cJASS { }

etc =), no language after the # means preprocessor, the rest would be static and would go through various portions of a parser (the parser can have rule subsets).

edit
vJASS won't need to be in { } as it's an expansion of JASS
 
Last edited:
Status
Not open for further replies.
Top