• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[General] Basic IA

Level 3
Joined
Aug 19, 2025
Messages
18
Hello, I am a beginner in writing code in JASS. Could someone send me a Basic script to make the computer train units, create structures, and gather resources?
 
Blizzard made the AI Editor public for this purpose (available in WE). The editor AI files are called ".wai" and compiled into Jass they become ".ai". I think some of the "custom blizzard maps" have .wai, if you are looking for examples. Otherwise there are many .ai scripts from campaign including melee races, but those are quite complex.
 
As Luashine explained, you can use built-in AI Editor inside WE. When you made your own AI, it will also create a script written in the ".ai" extension (JASS format), which can be editable with Notepad or JassCraft.

The melee and campaign AI scripts are inside the "Scripts" folder under the "war3.w3mod" folder. In older patches, they are inside "War3x.mpq" (this is for TFT). You need either Ladik's MPQ Editor or Ladik's CascView in order to extract those files.

A detailed info about using your own AI (imported ones) an be found here: Melee AI Importing
 
I would avoid the AI editor at all costs imho.

Instead as others have stated if you have an MPQ or CASC viewer (depending on game version) you can go into the game files and extract the Ai scripts blizzard made for their campaign missions. They're pretty simple enough and easy to adapt.
 
Back
Top