• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

AI Editor Help/Guidance - Custom(ish) Heroes + Pre-Placed Buildings

Level 7
Joined
Oct 7, 2024
Messages
25
Hiya,
I'm currently working on an AI for my custom campaign and wanted some guidance on what y'all more experienced folk recommend in my circumstances as a new player. I've been looking at how other creators like Tomoraider made their AIs, and I saw that he used the built-in editor (or at least I believe). I am building an Orc enemy faction and am almost entirely using vanilla for simplicity, the exception being two custom versions of Blademaster and Farseer which I have saved in the mission. I saved the Object data from the map and uploaded it as seen in the 1st screenshot below, I just wanted to verify I took the right step since I couldn't find any clear resource on this. My 2nd screenshot is the hero tab. For the building tab, I have a bunch of stuff selected, but I also have pre-placed buildings on the map too, and when I import my AI in I don't think the computer recognizes it has those buildings. The wave system makes sense, but I wanted to reconcile these issues two issues since they are the biggest bottleneck. For reference I am testing using the World Editor test feature (Ctrl + F9). I was having weird things happen since my AI I've been testing is in player slot 5, but I've heard that in-editor testing is weird.

Sorry for the long post, but I wanted to describe my issues as clearly as possible if anyone can help. I would greatly appreciate it (My map inside the campaign editor appears blue too, but I intend on figuring that out when I have multiple maps built. If you can help with that too it would be appreciated, but for me baby steps is enough)


1774235409145.png
1774235462540.png
 
I'm pretty sure the problem is tied to the WE Test, if you're working on a campaign sadly you can't use it because the test map doesn't contain any custom asset you've created in the campaign manager, so you need to boot the game, open your custom campaign and play your map as you normally would

The blue map must mean that it's part of the campaign alright but has no loading screen button associated, i.e. on the mission selection screen it won't be there, so ideally you'd add one, especially if you're going to test it, but if it's a map that's only accessed from other maps then you can ignore the blue
 
I just realized that I may be entirely blind. I was struggling to find how to add a loading screen, but then I right clicked and suddenly it appeared. Thanks for that. Another follow-up, if you don't mind.

Since my heroes are technically custom, would the AI recognize them and automatically train them and such? From what I gathered the AI wouldn't know it's own heroes, so I need to write scripts to train them. But that conflicts with the idea of the AI knowing the heroes for the wave system. Could you clarify this? thanks for the help though!

Edit: while testing (a few things happened, notably my AI didn't work but will check imports and whatnot), I saw that the load-in map wasn't what I wanted it to be, as it was showing the map layout rather than some agnostic screen. Where can I go to see how to do that?
 
Last edited:
For the loading screen you need to set one up in Scenario > Map Loading screen otherwise it uses the default pvp screen

1774312165488.png


If your heroes are custom data then yes you need to add them to the wave system otherwise they won't know how to train or send them in attack waves. You should be able to add them in the Building and Attacking tabs like this

1774312319592.png


(This example is silly because they need the altar before training the hero so in this case they'd do nothing probably)

It's been a while since I've used the editor's AI tool because it's less flexible than writing a script for scratch but that should work
 
Most campaigns use JASS to create their AIs not the AI editor which isn't ideal for making campaign AIs. All you do is write a text file in JASS set it's extension to .ai and import it and it should work. There's plenty of examples inside the MPQ/CASC from the vanilla campaigns as it's how blizzard did it too. Or you can extract it from any of my campaigns to see. The .ai file is what the AI editor generates under the hood so to speak.
 
Most campaigns use JASS to create their AIs not the AI editor which isn't ideal for making campaign AIs. All you do is write a text file in JASS set it's extension to .ai and import it and it should work. There's plenty of examples inside the MPQ/CASC from the vanilla campaigns as it's how blizzard did it too. Or you can extract it from any of my campaigns to see. The .ai file is what the AI editor generates under the hood so to speak.
Would you still recommend it for someone doing their first campaign like me? I definitely can, but if you could speak more about what it's better at specifically it would help me in learning a lot. When I initially was using Jasscraft, I was running into issues with my version being in 1.2.2 or something and thus not accepting certain lines/phrases (like slow harvesting/chopping), so I went to Notepad ++. Is this the standard or did I miss something with Jasscraft? Thanks again.
 
That should be the right version, perhaps you were not using the right syntax? Scripts are very very stubborn so even a slight change can cause a script to fail to run

The main reason I stopped using the F8 editor is because you need to export/reimport your object data every time to add/remove something, it's such a chore... It's less tedious when you're writing the script on your own. Of course the interface is less friendly than the editor's but it's worth it

You have more control over your waves (even a simple thing as the WaitForSignal that Blizzard uses in campaign, you can't do that in the editor I think), and you can do some advanced stuff with signals in general, but even for starters you can just have a look at the campaign scripts to get an idea of how things are structured
 
Back
Top