• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Melee AI Importing

Level 9
Joined
Jul 18, 2005
Messages
319
This is about how to import melee AI's (Artificial Intelligence) to melee maps. Its pretty easy. There is the .wai files and .ai files. Theres a example map that can be downloaded.

The Difference
The difference is that .wai files are edited using the WE AI editor which could be time cosuming clicking all over the place, also if you wanted an custom AI you will have to import your maps object data. After fnishing the AI the editor will generate an .ai file for you, which contains the final AI that will be used by the map.

.ai files can also be manually edited with Notepad/JassCraft. They're written in JASS and allow for much more powerful AI scripts than possible in the GUI editor (see the AMAI project). However it isn't always necessary to write the JASS from scratch. You can also generate an .ai file with the GUI edtior and later add a few teweaks manually.

AI importing

Contents
1. Importing the AI
2. Starting the AI
3. Other things
4. Seeing if it works

1. Importing the AI
How do I import the .wai or .ai file?
1. Open the Import Manager.
2. Click on the import button.
3. Find the AI you want to import.
4. Import it.
In my case the AI's I've imported are the Blizzard ones that came along. (WyrmMonger.)

2. Starting the AI
How do I start the .wai or .ai file?
1. Remove the Action from the default trigger:
  • Actions
    • Melee Game - Run melee AI scripts (for computer players)
2. Now create a new trigger called: WyrmMonger Initialization for example.
3. Add these
  • WyrmMonger Initialization
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
      • (Race of Player 2 (Blue)) Equal to Undead
    • Actions
      • AI - Start melee AI script for Player 2 (Blue): war3mapImported\WyrmMonger.ai
3. Other
The other triggers if you are only using 1 race.
1. These are the other triggers.
  • Normal Initialization
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
      • (Race of Player 1 (Red)) Not equal to Undead
      • (Race of Player 2 (Blue)) Not equal to Undead
    • Actions
      • Melee Game - Run melee AI scripts (for computer players)
4. Seeing if it works
Now to see if the .wai or .ai file it works on the map.
1. Open the Frozen Throne, then the map you imported the AI on.
2. Make the computer to the race on what melee AI you made for it. (WyrmMonger is Undead.)

Also note that the .wai file only contains the GUI definitions of your AI. It isn't required by the game, only by the editor. So after having finished your map, and imported the .ai file, you can remove the .wai file from your map. But you should consider keeping a backup of that .wai somewhere on your harddrive in case you'd like to make edits later.

It should work,but if it doesn't you might of have setted the wrong race or for the condition. The method is very similar. Remember its only works for melee related maps.

-Av3n
 

Attachments

  • BootyBayAI.w3x
    140.9 KB · Views: 1,790
Last edited:
Top