• 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.

[General] How can I make a advanced AI?

Status
Not open for further replies.
Ah, Warcraft_Tester; You have returned.

No one uses the AI Editor anymore ;/ (Unless you're talking about AI for melee maps and possibly Melee-like Campaign maps.)

You can create AI scripts with the Trigger Editor.
If you only know GUI, it's going to be hard (Designing a smart AI in GUI is pretty difficult and ugly)
Designing it in Jass/vJass is easier and way cleaner ^-^

Basically, the algorithm is this:
Every second, check the AI unit's current state (His hp, his mana, the units around him, etc...)
And using that information, you would decide what to order that unit to do!
Pretty simple right? :D

For example, if the unit's HP is low, you'd pick every unit on the map to find the closest fountain.
If the base is closer than the fountain, order him to go to the base, else, order him to go to the fountain.
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
Ah, Warcraft_Tester; You have returned.

No one uses the AI Editor anymore ;/ (Unless you're talking about AI for melee maps and possibly Melee-like Campaign maps.)

You can create AI scripts with the Trigger Editor.
If you only know GUI, it's going to be hard (Designing a smart AI in GUI is pretty difficult and ugly)
Designing it in Jass/vJass is easier and way cleaner ^-^

Basically, the algorithm is this:
Every second, check the AI unit's current state (His hp, his mana, the units around him, etc...)
And using that information, you would decide what to order that unit to do!
Pretty simple right? :D

For example, if the unit's HP is low, you'd pick every unit on the map to find the closest fountain.
If the base is closer than the fountain, order him to go to the base, else, order him to go to the fountain.

but what about unit use his abilities? since a map have alot ability and u must check every ability for oder it no? or trigger for every kind of mob/hero on map?
 
but what about unit use his abilities? since a map have alot ability and u must check every ability for oder it no? or trigger for every kind of mob/hero on map?

Forgot about those.
You can use checks to see if an ability could be used or not;
For example, let's say we have a Balanar from DotA.
While checking every second, if you find that there's a hero in range and he's
vulnerable, you'd order the Balanar to use Void on him and if there's only one
hero in range, you'd go and attack him after that. If there's more than one
hero, you'd check how strong both of them are and decide whether you should
engage or go back.
 
Also you can base abilities on standard wc3 abilities thus they will be used in the same scenarios as in melee games. There's a tutorial in the tutorial section about it.

Genius method!! I've never thought of it like that before :D
I can even force my spells to be almost exactly like the in-game ones ^-^
 
Level 5
Joined
Sep 21, 2010
Messages
142
Ah, Warcraft_Tester; You have returned.

No one uses the AI Editor anymore ;/ (Unless you're talking about AI for melee maps and possibly Melee-like Campaign maps.)

You can create AI scripts with the Trigger Editor.
If you only know GUI, it's going to be hard (Designing a smart AI in GUI is pretty difficult and ugly)
Designing it in Jass/vJass is easier and way cleaner ^-^

Basically, the algorithm is this:
Every second, check the AI unit's current state (His hp, his mana, the units around him, etc...)
And using that information, you would decide what to order that unit to do!
Pretty simple right? :D

For example, if the unit's HP is low, you'd pick every unit on the map to find the closest fountain.
If the base is closer than the fountain, order him to go to the base, else, order him to go to the fountain.
Yes I have returned from the land of Java. Anyways sorry for the long wait of a reply but can someone make a basic trigger for me then that does that please? It was gonna be a melee map that only had crowns but now it's transformed into a melee map/tag map. Weird huh?
 
Smarter how? Depends how much is altered compared to default wc3 races. You can do quite decent melee AI with editor quite easily.

That's why I never base my spells on Channel :) the main reason why Channel suuuuck

Depends, if they are very specialized abilities, which can be used only in specific moments, if it's based on channel or no, doesn't matter.
 
Status
Not open for further replies.
Top