• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Using Meele AI in a campaign level?

Status
Not open for further replies.
Level 9
Joined
Apr 15, 2022
Messages
61
I've had this idea for a level in my campaign in which you would start off with a complete base and a nice set of units and would have to survive for a set amount of time, facing a few meele enemy players (thus you would have to use skirmish hit and run tactics, hero spells created with skirmishes in mind, expand, hold and take back goldmines as one initial base would be enough and all of this inside a fresh campaign level)

As for the question I was wondering if
a) there is a way to use the skirmish AIs in a custom map
b) there is some guide for creating a meele AI complete with everything such AI would do in the skirmishes
c) there is a way to edit the AI from the mpq files within the AI editor
d) someone was willing to or already made such AI
 
Level 21
Joined
Mar 29, 2020
Messages
1,237
a. yes. The standard melee AI is the default behavior of computer players unless you disable that trigger.
b. yes, check out the tutorials I linked here to find out about using the AI editor. this will let you customize the standard melee AI to fit your needs.
c. if you want to dig deeper than using the AI editor, there is a way to download the jass ai files and edit them. there are old tutorials on the hive on that too.
d. blizzard?
 
Level 9
Joined
Apr 15, 2022
Messages
61
a. yes. The standard melee AI is the default behavior of computer players unless you disable that trigger.
b. yes, check out the tutorials I linked here to find out about using the AI editor. this will let you customize the standard melee AI to fit your needs.
c. if you want to dig deeper than using the AI editor, there is a way to download the jass ai files and edit them. there are old tutorials on the hive on that too.
d. blizzard?
Thanks, I didn't know there's a trigger dedicated to the meele AI, as I usually delete the default ones straight away. I will definitely check out your tutorials though, as I'm not sure the regular meele AI will work the way I intend to within the level
 
Level 9
Joined
Apr 15, 2022
Messages
61
a. yes. The standard melee AI is the default behavior of computer players unless you disable that trigger.
b. yes, check out the tutorials I linked here to find out about using the AI editor. this will let you customize the standard melee AI to fit your needs.
c. if you want to dig deeper than using the AI editor, there is a way to download the jass ai files and edit them. there are old tutorials on the hive on that too.
d. blizzard?
Any idea why the default AI orders nearly all of it's workers to mine gold? My best guess is it has something to do with expanding, but I still have no idea how to fix it
 
Level 21
Joined
Mar 29, 2020
Messages
1,237
it has fixed build orders for each race (for example - first 5 workers to gold, then send one to lumber etc). if you want to create something for a custom race, or just a custom AI build order you should really look into using the AI editor.

there you specify how many to build, and where to send them. you can even add conditions for if you have an expansion. really think you should look at the stuff I linked in my previous post.
 
Level 9
Joined
Apr 15, 2022
Messages
61
it has fixed build orders for each race (for example - first 5 workers to gold, then send one to lumber etc). if you want to create something for a custom race, or just a custom AI build order you should really look into using the AI editor.

there you specify how many to build, and where to send them. you can even add conditions for if you have an expansion. really think you should look at the stuff I linked in my previous post.
I'm more or less aware of the basics of the AI Editor as I have used it for my campaign levels before. The issue I have as of now, is that the AI sends nearly all of it's pre expansion workers into the goldmine. Doesn't seem to want to expand either, so I suppose the issue here is that the expansions don't meet the conditions required for the AI to detect it and instead it sends the workers that would eventually work there into the original goldmine (instead of ordering them to harvest the lumber)
 
Level 21
Joined
Mar 29, 2020
Messages
1,237
In the AI editor go to the "Building" tab. the right side column there is "Harvest priorities". this is where you set exactly what you are talking about.

for example, if you enter:

Gold 3 main
lumber 2 main
gold 2 main



then first it will send 3 to the goldmine, then 2 to lumber, than another 2 to the goldmine. you can also specify here if you want them to mine in the main base or expansion, and if there are any conditions to doing this.

just note, that it will only reach the total amount of builders you have gotten to in the left column "build priorities". so if you only start with 5 workers there, and then a blacksmith and a barracks - and then 2 more builders - it will only create builders 6 and 7 after it has built the blacksmith and barracks.

hope this helped.
 
Level 9
Joined
Apr 15, 2022
Messages
61
In the AI editor go to the "Building" tab. the right side column there is "Harvest priorities". this is where you set exactly what you are talking about.

for example, if you enter:

Gold 3 main
lumber 2 main
gold 2 main



then first it will send 3 to the goldmine, then 2 to lumber, than another 2 to the goldmine. you can also specify here if you want them to mine in the main base or expansion, and if there are any conditions to doing this.

just note, that it will only reach the total amount of builders you have gotten to in the left column "build priorities". so if you only start with 5 workers there, and then a blacksmith and a barracks - and then 2 more builders - it will only create builders 6 and 7 after it has built the blacksmith and barracks.

hope this helped.
I'm talking about the default melee AI. It doesn't expand and it sends all of the workers that would work at the expansions to the original goldmine. Pretty sure it also trains excess workers too
 
Level 21
Joined
Mar 29, 2020
Messages
1,237
the default melee AI does expand at some point in the game. it also has build priorities, and attack priorities, and will only get to them once it does the things that are earlier up on its list. you can see this clearly by trying to play any of the melee blizzard maps against bots. they will always expand. If this isn't working when you enable the default AI in your map, you must have done something that messed it up, or is colliding with it in some way (triggers, blocked resources etc).

in order to get around this problem, you can either try to figure out what about your map is stopping the AI from expanding or build your own custom AI with the AI editor.
 
Last edited:
Status
Not open for further replies.
Top