View Single Post
Old 08-30-2006, 08:24 AM   #1
Av3n
Roar!
 
Av3n's Avatar


Project Leader: TBR
Project Member: PoC
 
Join Date: May 2006
Posts: 1,854

Submissions (7)

Av3n is a jewel in the rough (240)Av3n is a jewel in the rough (240)Av3n is a jewel in the rough (240)Av3n is a jewel in the rough (240)Av3n is a jewel in the rough (240)

Hero #4 extra-official winner2008 Spell olympics - Fire - BronzeHero Contest #3 - 3rd Place

Default Melee AI Importing

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:
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
Trigger:
WyrmMonger Initialization
Collapse Events
Time - Elapsed game time is 0.00 seconds
Collapse Conditions
(Race of Player 2 (Blue)) Equal to Undead
Collapse 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.
Trigger:
Normal Initialization
Collapse Events
Time - Elapsed game time is 0.00 seconds
Collapse Conditions
(Race of Player 1 (Red)) Not equal to Undead
(Race of Player 2 (Blue)) Not equal to Undead
Collapse 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
Attached Files
File Type: w3x (2)BootyBayAI.w3x (140.9 KB, 392 views)
__________________

Thanks to FatherTime for the sig
.:
Current ProjectsSubmissions
Power of CorruptionMy Terrain
The Black RoadMy Resources
Strikeforce
Twitter
Av3n is offline   Reply With Quote
Sponsored Links - Login to hide this ad!