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

Getting Melee AI to work in a campaign map

Level 2
Joined
Jan 22, 2022
Messages
6
Basically I extracted default Undead and Night elf AI I want to work on the last map of the Scourge campaign, but when starting the AI with the trigger editor the AI seems to not act accordingly. The undead will harvest gold and lumber but not train or build any units. The Night Elf will send all there workers to lumber and create units until it runs out of gold. I'm also trying to avoid having the game run Melee AI for all computers because the other AI on the map won't function properly such as Illidan taking the pillars. I've tried looking through everything but can't seem to find a working solution.
 
Level 2
Joined
Jan 22, 2022
Messages
6
1736123827556.png
 

Attachments

  • elf.ai
    60.5 KB · Views: 7
  • undead.ai
    60.6 KB · Views: 4
Level 2
Joined
Jan 22, 2022
Messages
6
I imported your AI but the issue still persists, the undead don't make any units and the night elf refuses to put any wisps on the gold mine. Is there a way to start the game with the wisps already in the gold mine?
 
Level 30
Joined
Aug 29, 2012
Messages
1,382
I suppose you can order them manually in your init trigger to enter the gold mine, as for the rest, it's probably more adequate to write your own script (or use the AI editor if that's not your thing), there are probably reasons why they didn't use melee AI for the campaigns
 
Level 21
Joined
Mar 16, 2008
Messages
955
Your .ai script is really long and hard to read. I'm sure a problem could be lurking in there but idk 100%. I normally format my .ai scripts to be more like the default/gui generated ones. I'm trying to use a syntax checker on yours to make sure there are no syntax errors but I can't find my syntax checker.

Another possible problem, put the trigger that starts the scripts as its own trigger. I think it might be a problem if there are other triggers actions in the trigger. But not 100% sure.
 
Level 20
Joined
Jan 3, 2022
Messages
364
You can find version-correct default AI scripts here: jass-history/war3extract/Reforged-v1.36.1.20719-w3-51d40ee/scripts/elf.ai at master · Luashine/jass-history

I have two guesses about your triggers:
1) why is it at "Game elapsed" rather than Map Init? Is this supposed to work flawlessly at any game elapsed time? Hiw and when is the special campaign AI started? Doesn't the AI started by default interfere somehow?
2) war3mapImported, using default file name. Can you add like "-map.ai" as the name to rule out the possibility of files being overriden due to equal paths?
 
Level 2
Joined
Jan 22, 2022
Messages
6
I attempted to use "Game elapsed" Since Map initiation wasn't working either and was changing things around seeing if I could get them to work. The other AI in the map is started when I choose a difficulty at the beginning of the game. I attempted to put them there as well but also had no luck.
Thank you for the link to the default AI I'm going to attempt to redownload them and update it using those.
 
Level 2
Joined
Jan 22, 2022
Messages
6
I successfully have the elf AI working! Apparently it's tree of life was to close to the gold mine or something. Now i have to figure out why the undead AI only makes his Altar crypt 3 ghouls and stops building.
 
Top