HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Use normal AI in custom map

01-25-2009, 04:51 PM#1
Flame_Phoenix
Hi guys my map is a castle vs castle map and is custom. CvC maps are modifications of a ladder game, they share all things a regular ladder game would have (4 races, items, armies ...) and they can have something more. My map is a custom map, however, I feel the computer AI would adjust to it very easily with only 1 minor change (just has to evolve the spawn building into a base, but I can also do that).
Many people are asking for my map to have AI and I know this would be an interesting addition. How do I enable Human (per example) insane AI in my custom map using triggers?

Btw, I will give +rep to people who help me (again)

Thx in advance.
01-25-2009, 07:32 PM#2
Av3n
I got an old tutorial about how to use custom AI's: http://wc3campaigns.net/showthread.php?t=86893.

But however if you got something that requires to be done by triggers, do so. Unless you really want to edit the .ai file. + Computer (Insane) etc. just determine how many resources the AI gets and such.

-Av3n
01-25-2009, 08:04 PM#3
Flame_Phoenix
Mmm, in this AI thing, will the computer purchase items from my shops ? xD
Is there a website where I can download intelegent AI's?
01-25-2009, 09:16 PM#4
moyack
AIs are not generic resources, they must be coded so they can fit with your map.

You can do AI code with triggers perfectly, in theory you are able to do it now you consider good at jass. I think an example of this can be helful for you.... ok, I found it one here.
01-25-2009, 09:39 PM#5
Flame_Phoenix
Quote:
AIs are not generic resources, they must be coded so they can fit with your map.
My map is much like a ladder map, it is not a her vs hero map =S
The idea would be to use a normal AI for a normal ladder, but with minor twists so it could buy from a shop, per example. Still Thx for help!
01-25-2009, 09:44 PM#6
moyack
eassy, then use a melee AI and with triggers put a timer that check if a hero pass near to a shop, if so, order him to buy an item.
01-25-2009, 09:59 PM#7
akolyt0r
But if your map has any custom abilities ...dont expect the AI to use them in a correct way ...
01-25-2009, 10:29 PM#8
moyack
If you base it on the right ones, the AI will use it correctly. that's the reason why I never use channel, AI can't manage it.

For example, if you want a spell that the AI cast it when they find a cluster of enemies, use thunderclap (melee), or blizzard (ranged). Cast over units with mana in an AOE: silence, and so on...
01-26-2009, 06:41 AM#9
Archmage Owenalacaster
I work with AIs. AI files are small and importing modified versions of melee AIs is hardly an issue. I could do the modifications for you or, better yet, guide you through it. Getting the AI heroes to learn your abilities is a simple matter, but regarding custom items I know of no means to modify preference for item purchasing; moyack's suggestion seems best.
01-26-2009, 07:04 AM#10
Flame_Phoenix
Quote:
eassy, then use a melee AI and with triggers put a timer that check if a hero pass near to a shop, if so, order him to buy an item.
This will work great for Permanent items like a sword, or a shield, but not for items that need to be cast, like a custom AOE item =S
Quote:
If you base it on the right ones, the AI will use it correctly. that's the reason why I never use channel, AI can't manage it.

For example, if you want a spell that the AI cast it when they find a cluster of enemies, use thunderclap (melee), or blizzard (ranged). Cast over units with mana in an AOE: silence, and so on...
In a first version I intend only to give AI to Blizzard normal races, Human, Elf, Orc and Ud, so heroes would not be a problem. In further versions however, I would have to teach computer how to play the new races I created.

Quote:
I work with AIs. AI files are small and importing modified versions of melee AIs is hardly an issue. I could do the modifications for you or, better yet, guide you through it. Getting the AI heroes to learn your abilities is a simple matter, but regarding custom items I know of no means to modify preference for item purchasing; moyack's suggestion seems best.
Seems good. You are invited to my team as AI manager if you want xD
I don't need many modifications in the heroes, just to teach them how to use my items, if you could help I would appreciate.

Btw, does any one knows a good place to download melee brutal AI's ?
01-26-2009, 11:26 AM#11
Archmage Owenalacaster
I wouldn't mind being the AI manager.

Units will use items as well as they would any ability they have, which as moyack explained requires the items must have abilities the AIs will use.

By brutal AIs, do you mean the standard AIs on Insane difficulty or custom AIs more difficult than Insane? If you mean the former, they are located in the game's MPQs.
01-26-2009, 12:06 PM#12
Flame_Phoenix
I mean AI's more intelligent then the insane AI the game has =D
01-26-2009, 03:49 PM#13
Archmage Owenalacaster
AIs don't get any more intelligent, only more efficient in how they handle build orders, resource management, and target priorities. In a sense, AI intelligence is hardcoded and inaccessible to us mere mortals.

With regards to difficulty, it is quite a challenge to make a Blizzard AI more efficient than Insane difficulty since it already explores (almost) the entire tech tree, has targeting priorities to account for most practical purposes, and manages its resources, hm well, rather arbitrarily with the use of buffers (in the case of gold and lumber) and static build queues with conditions. One way to make an AI more efficient is to design it to be responsive to the game environment; this is the great challenge and passion of AI design.
01-26-2009, 08:28 PM#14
Flame_Phoenix
Ok guys, thx all for help. +re to all !
01-28-2009, 05:13 AM#15
ericwu101
Hey, that CvC looks cool to me!

Maybe you can beat DotA!