Page 1 of 1

Jass

Posted: Sun Jan 22, 2012 4:41 pm
by DarkJustice12
so 3ice if you see this i want you to know i honor your map skills..and someone said you write in jass...i would like to know where to find turtorials on how to work with jass or vjass cuz i wanna start making my maps in jass/vjass instead of GUI with 10k+ leaks..so if you know any place where i can learn how to write in the jass language let me know

Re: Jass

Posted: Mon Jan 23, 2012 3:39 am
by 3ICE
I see everything :) Or at least the posts on my own forum.

How about googling "jass tutorial"?

I learned from the JASS Docs, but I had some prior knowledge: For months, I would just convert triggers from GUI to JASS and figure out ways to improve them. Especially the conditions, those were done in a horribly inefficient and ugly way:
The JASS behind a simple GUI trigger The JASS behind a simple GUI trigger
function Trig_h_Conditions takes nothing returns boolean if ( not ( GetSpellAbilityId() == 'A001' ) ) then return false endif return true endfunction function Trig_h_Actions takes nothing returns nothing //do stuff endfunction //=========================================================================== function InitTrig_h takes nothing returns nothing set gg_trg_h = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_h, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_h, Condition( function Trig_h_Conditions ) ) call TriggerAddAction( gg_trg_h, function Trig_h_Actions ) endfunction
vs
The same trigger in pure JASS that I would write myself The same trigger in pure JASS that I would write myself
function h takes nothing returns nothing if(GetSpellAbilityId()=='A001')then //do stuff endif endfunction function InitTrig_h takes nothing returns nothing set gg_trg_h=CreateTrigger() call TriggerRegisterAnyUnitEventBJ(gg_trg_h,EVENT_PLAYER_UNIT_SPELL_EFFECT) call TriggerAddAction(gg_trg_h,function h) endfunction
I did all this before learning JASS. I designed my triggers in GUI, then improved them in JASS.

Today, I can write JASS without planning my trigger out in GUI. In fact, today I write JASS without even opening the world editor. I extract the war3map.j file from my map and work on it in a text editor: Notepad++.

Before I learned about the syntax checker PJASS, I would copy everything over to JassCraft when I was done and correct the syntax there (F9 to syntax check). But today I have PJASS.exe (somewhat) "integrated" into notepad. I press F6 and it syntax checks my code. The errors (if any) are listed in Notepad++'s built in console window (via a plugin).

PJASS was originally written by PipeDream, and is now maintained by PitzerMike. You can find it on WC3C or Google.

I also read Daelin's GUI to JASS, and basically every tutorial on the first twenty pages of Google, for various search terms: JASS tutorial, world editor JASS tutorial, Warcraft 3 JASS tutorial, etc...

For vJASS, I just read Vexorian's very well detailed documentation that comes with Jasshelper. Which is built into the #1 tool you most likely already have, JASS NewGen Pack: "Path-to-JNGP"\jasshelper\jasshelpermanual.html
It is an 88 pages long, half megabyte HTML document with over 20k words, so set aside an afternoon for it. I spent almost 2 hours learning vJASS.

Re: Jass

Posted: Mon Jan 23, 2012 1:49 pm
by DarkJustice12
Thank you very much :D

Re: Jass

Posted: Mon Jan 23, 2012 1:51 pm
by 3ICE
You are welcome. I enjoy ranting about how bad GUI is, so thank you as well :)

And I got to revisit good memories too. (Oh my, learning used to be fun!)