• 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.

[JASS] What is JASS?

Status
Not open for further replies.

Archian

Site Director
Level 64
Joined
Jan 1, 2006
Messages
3,106
What is JASS?
By Archian

BTNJass.jpg

Introduction
Due to the new programming section, I decided to create this.
This thread contains information regarding JASS (Blizzard's scripting language used for Warcraft 3), it is meant to be a short source of information that may encourage people to start JASS scripting.
It will also include links to tools, tutorials and other sites, such as; Wc3campaigns and The Jass Vault.

What is JASS?
JASS, is an event driven scripting language used in Warcraft 3.
Custom map creators can use it in the World Editor to create triggers and AI scripts for their Wc3 Maps.

When you place units, items, destructibles, regions etc. in the World Editor the editor converts the information into JASS scripts.
In the Trigger Editor you can use the edit function "Convert to Custom Text" on a trigger to convert it into JASS.

Convert_to_custom_text.jpg

  • Melee Initialization
    • Events
      • Map initialization
      • Conditions
      • Actions
        • Melee Game - Use melee time of day (for all players)
        • Melee Game - Limit Heroes to 1 per Hero-type (for all players)
        • Melee Game - Give trained Heroes a Scroll of Town Portal (for all players)
        • Melee Game - Set starting resources (for all players)
        • Melee Game - Remove creeps and critters from used start locations (for all players)
        • Melee Game - Create starting units (for all players)
        • Melee Game - Run melee AI scripts (for computer players)
        • Melee Game - Enforce victory/defeat conditions (for all players)
I converted the default melee game initialization for all players into JASS, and this is how it will look like now.

JASS:
function Trig_Melee_Initialization_Actions takes nothing returns nothing
    call MeleeStartingVisibility(  )
    call MeleeStartingHeroLimit(  )
    call MeleeGrantHeroItems(  )
    call MeleeStartingResources(  )
    call MeleeClearExcessUnits(  )
    call MeleeStartingUnits(  )
    call MeleeStartingAI(  )
    call MeleeInitVictoryDefeat(  )
endfunction

//===========================================================================
function InitTrig_Melee_Initialization takes nothing returns nothing
    set gg_trg_Melee_Initialization = CreateTrigger(  )
    call TriggerAddAction( gg_trg_Melee_Initialization, function Trig_Melee_Initialization_Actions )
endfunction

The JASS scripting language provides an extensive API that gives programmers control over nearly every aspect of the game.
It can, for example, manipulate the terrain. It has a syntax similar to Turing and Delphi, although, unlike those languages, it is case sensitive, the JASS syntax checker tends to crash and is somewhat slow (this is where tool extensions comes in).

External linksTool Extensions
 
Last edited by a moderator:
Status
Not open for further replies.
Top