wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Tutorials > Tutorials for beginners
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 08-30-2006, 09: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, 370 views)
__________________

Thanks to FatherTime for the sig
.:
Current ProjectsSubmissions
Power of CorruptionMy Terrain
The Black RoadMy Resources
Strikeforce
Twitter

Last edited by Av3n : 12-05-2006 at 06:32 AM.
Av3n is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 09-10-2006, 07:44 PM   #2
PitzerMike
Alcopops
 
PitzerMike's Avatar


Tools & Tutorials Moderator
 
Join Date: Jan 2003
Posts: 2,794

Submissions (12)

PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)

Approved Map: Pitzer's Minesweeper

Default

This is well written and the triggers + demo map are good.
However, i feel this is a bit small for a tutorial.

Have you ever imported jass ai files (that is files with the .ai extension, not .wai)?
If that's the case you could expand the tutorial on those. For example show how to import an AMAI script.

If not, this can probably be approved for the beginners section.
__________________
Zoom (requires log in)
PitzerMike is offline   Reply With Quote
Old 09-11-2006, 07:27 AM   #3
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

I'll see pitzermike, to that about the amai scprits to import them. (P.S don't approve yet wait for me to finish how to improt amai scprits first please.)
__________________

Thanks to FatherTime for the sig
.:
Current ProjectsSubmissions
Power of CorruptionMy Terrain
The Black RoadMy Resources
Strikeforce
Twitter

Last edited by Av3n : 09-11-2006 at 07:44 AM.
Av3n is offline   Reply With Quote
Old 09-11-2006, 07:49 PM   #4
PitzerMike
Alcopops
 
PitzerMike's Avatar


Tools & Tutorials Moderator
 
Join Date: Jan 2003
Posts: 2,794

Submissions (12)

PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)

Approved Map: Pitzer's Minesweeper

Default

Cool :)
__________________
Zoom (requires log in)
PitzerMike is offline   Reply With Quote
Old 09-12-2006, 09:38 AM   #5
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

Please point out anything you find wrong PitzerMike. (I found out the method is very similar.)
__________________

Thanks to FatherTime for the sig
.:
Current ProjectsSubmissions
Power of CorruptionMy Terrain
The Black RoadMy Resources
Strikeforce
Twitter
Av3n is offline   Reply With Quote
Old 09-13-2006, 04:07 AM   #6
PitzerMike
Alcopops
 
PitzerMike's Avatar


Tools & Tutorials Moderator
 
Join Date: Jan 2003
Posts: 2,794

Submissions (12)

PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)

Approved Map: Pitzer's Minesweeper

Default

Yeah, looks good. Now at the beginning of the tutorial you should explain what the difference between wai/ai files is. Namely that the first one are made in GUI AI editor, whereas the .ai files are JASS-coded with a text editor.

Oh, and we have a rule about color tags. They shouldn't be used because they can hardly be seen on certain forum themes. If you could use italic or bold instead of colors that would be nice.

Other then that i think we can soon approve this. Good work!
__________________
Zoom (requires log in)
PitzerMike is offline   Reply With Quote
Old 09-13-2006, 06:09 AM   #7
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

So should I explain triggers in Jass as well huh?. The .ai section is basically a mimic for the first one so I've removed it. I will do the explaination as well
__________________

Thanks to FatherTime for the sig
.:
Current ProjectsSubmissions
Power of CorruptionMy Terrain
The Black RoadMy Resources
Strikeforce
Twitter

Last edited by Av3n : 09-13-2006 at 06:21 AM.
Av3n is offline   Reply With Quote
Old 09-16-2006, 09:36 AM   #8
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

Any replies? It is all finished now. Please point outr if anything is wrong.
__________________

Thanks to FatherTime for the sig
.:
Current ProjectsSubmissions
Power of CorruptionMy Terrain
The Black RoadMy Resources
Strikeforce
Twitter
Av3n is offline   Reply With Quote
Old 09-18-2006, 09:30 PM   #9
PitzerMike
Alcopops
 
PitzerMike's Avatar


Tools & Tutorials Moderator
 
Join Date: Jan 2003
Posts: 2,794

Submissions (12)

PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)

Approved Map: Pitzer's Minesweeper

Default

Ok, I've added a few bits here and there (for example the.wai file isn't required by the game, so it can be removed from the map when it's finished).

Approved! :)
__________________
Zoom (requires log in)
PitzerMike is offline   Reply With Quote
Old 09-19-2006, 12:31 AM   #10
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

Yay it is approved!
__________________

Thanks to FatherTime for the sig
.:
Current ProjectsSubmissions
Power of CorruptionMy Terrain
The Black RoadMy Resources
Strikeforce
Twitter
Av3n is offline   Reply With Quote
Old 04-22-2007, 02:05 PM   #11
keniff_ca
User
 
Join Date: Apr 2007
Posts: 1

keniff_ca has little to show at this moment (0)

Default THANKS

i wanted to take the time to thank Av3n for this tutorial its helped me alot im just learning how to use the ai and dont know much.
beginners should start here and take there time rushing makes it not work.
THANKS
keniff_ca is offline   Reply With Quote
Old 12-10-2007, 09:24 AM   #12
guillesime
User
 
Join Date: Dec 2007
Posts: 2

guillesime has little to show at this moment (0)

Default

can you help me?

I was create a mele AI for personalized race, and the structures donīt train units and heroes
guillesime is offline   Reply With Quote
Old 02-01-2015, 09:43 PM   #13
moraru.cosmin1981
User
 
Join Date: Jan 2015
Posts: 6

moraru.cosmin1981 has little to show at this moment (0)

Default

hi !

i have a custom race - the naga, as a selectable race

to select it, one must choose Night Elf --> set handicap at 90%

how do i make the computer player (which i have set up via night elf-> 90% handicap) which is now a Naga race, play the custom ai script ?

Last edited by moraru.cosmin1981 : 02-01-2015 at 09:44 PM.
moraru.cosmin1981 is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 11:23 PM.


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2018, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services