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

[AI] help with singleplayer Ai plz

Status
Not open for further replies.
Level 2
Joined
Jul 19, 2004
Messages
13
sorry if this is a dumb question but I have looked really hard on several sites and I'm unsure as to the exact answer to a few related questions
1. Can you use the AI editor with a custom race
2. Can you use AI in a single player custom type map (with or without a custom race)

Apologies if these are dumb questions - I mean, I tried to get a computer player working in a non-melee map and it didn't seem to like producing custom units, though peasants would gather. (it did produce an 'altered' hero). I did import the customobject data into the AI ed , btw.
Without the custom units it would work in single player, but the attack force explored a portion of the map and just stopped dead after a while (my user units had no buildings so maybe this was confusing them )
I get the impression from reading through other threads that AI won't work in a non-melee map but then most of the blizzard campaign maps would be non-melee wouldn't they? Should I be prepared to bite the bullet and learn some custom AI scripting (if all else fails its back to triggers I suppose
 
Level 6
Joined
Jun 16, 2004
Messages
237
As for the AI editor:

1. You can use custom units and heroes, although there may be some limitations. I haven't personally used the AI editor with custom races, before I moved to custom scripting.

2. Yes, you can use AI editor made AIs in non-melee maps, but they don't work very well, since there are quite many limitations. Most importantly, you can't control where the AI attacks. If there are no buildings, they may not attack at all (because the objective in melee games is to destroy all buildings).

You can accomplish what you want by using custom scripting. It is pretty easy once you learn the basics, i.e. what you can do and what doesn't work.
 
Level 2
Joined
Jul 19, 2004
Messages
13
Many thanks, people, for your replies. Oz02, when you say "just attach the AI to your map and you can use custom units", Which AI do you mean? Would it have to be a custom AI written specifically for those custom units, or any AI ?
....sounds from what people are saying here a bit of custom AI mixed with some triggered behaviour is the way to go...hmmn. Just have to put the release date of my map a bit further into the future while I learn to write AI! The AI is one of the things really worth customising, though, make playing the computer exciting again
 
Level 2
Joined
Jul 19, 2004
Messages
13
Custom Units with computer AI

I leant something about AI scripts since my last post and had a look at one i exported from WE, made with the Blizzard AI editor - all the raw data fields appear to be correct for choosing a custom hero and their skills, but despite this it still doesn't work in game. Can't understand what's going wrong here. Has anyone used the Blizzard AI editor at all?
I could try editing the AI script myself but looking at those scripts, it looks frustrating - one mistake and it doesn't work at all.
What's the point of Blizzard AI Editor if it doesn't work? Perhaps it does if you know how, but no-one seems to use it.

Since my first post I did get the AI working in a non melee single player - just got the computer to build standard races. Question though - what's the difference between 'Run melee AI for all players' (which works) and 'Player-start AI script' (which doesn't)
 
Level 6
Joined
Jun 16, 2004
Messages
237
"Melee - Run AI scripts for all computer players" starts one of the following AIs, depending on the race:

Scripts/human.ai (Human)
Scripts/elf.ai (Night Elf)
Scripts/undead.ai (Undead)
Scripts/orc.ai (Orc)

These are found in the MPQ files. This action starts appropriate AIs for all computer players, and therefore, you cannot start custom AI scripts for computer players after this trigger action.

"AI - Start AI Script for Player" allows you to start a custom AI script, such as one made in the AI editor. There are two actions: one to start a Melee AI and one to start a Campaign AI. Their difference is minor. Melee AIs have a special coding to defend allied players while Campaign AIs do not have this behavior.

Cheers!
 
Level 2
Joined
Jul 19, 2004
Messages
13
Tommi said:

"AI - Start AI Script for Player" allows you to start a custom AI script, such as one made in the AI editor.
Cheers!


didn't see this reply before....
thank you. But... my problem is that the script i made in AI editor don't work...

Also, if you can't use the 'melee ai for all players' trigger and the 'start ai script for player..' triggers together then....do you have ta import an ai script for every player if you want to use a custom ai?
hope that amkes sense
 
Level 6
Joined
Jun 16, 2004
Messages
237
If you want to start both custom and standard melee AI scripts, you could try to place Start Custom AI commands before Melee Game - Start AIs action. I haven't tested if it works, but I think the first started AI will take precedence.

Cheers,

Tommi
 
Level 2
Joined
Sep 4, 2004
Messages
30
I never use the build-in editor cause you cant create your own functions and vars, and the build-in funcs in common.ai have a lot of bugs that you can only override by editing it or writing new funcs.
And (thats not very important for you) it creates a generated script from .wai which is not very effective (like trigger editor vs. jass).
 
Level 2
Joined
Sep 4, 2004
Messages
30
Interesting!
I didnt use jass at all (i didnt even know there is one(i've no net at home(summer))) but im interested in ais for some time, and so i exracted one, and learned how it worked (undead.ai RoC:). And jass is easy if you know the trigger editor well.
 
Status
Not open for further replies.
Top