• 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] AI editor ignoring (some) conditions!

Status
Not open for further replies.
Level 7
Joined
Apr 5, 2013
Messages
243
I'm bugged with issues in the AI editor. I'm trying to make an all in one AI for my map, to save space and have better editing flexibility. I had 5 different ones that worked, and I'm fairy familiar with the AI editor.

To train different units for different factions, I'm using conditions based on upgrades. For example, Macedonians use archers as their starting unit, while other factions use spearmen. So archers queued get a condition ("Civ - Macedonians" upgrade level equal to 1), while other factions' spearmen get ("Civ - not Macedonians/Romans") and Romans get ("Civ - Romans" + "food lower than 120" + "Marian reforms" upgrade not researched), so that they won't bug trying to train spearmen after they are replaced by legionaries in their tech tree.

The problem is, while archer conditions work, and Macedonians get the desired number of archers, the other factions conditions somehow get messed up, resulting in all of them (besides spartans who have a limit of 10 spearmen) training the entire number of spearmen in the queue even those they were conditioned to not to train.

I can't seem to find a logical solution, tried many things and I'd like to keep all factions under one AI file. Does anyone have a good clue on how the AI editor works in the aspect?
 
Level 23
Joined
Jan 1, 2009
Messages
1,615
I doubt you will be able to fix it, the AI-Editor is just really bad.
You're lucky enough to have 5 "working" ones.
In general the ai scripts from the ai-editor only set loose conditions and won't work strictly as specified.
There are two behaviours that could explain this:
-the AI cannot satisfy the condition or execute the action of the next item in the queue and falls back onto the original queue-item, which is producing spearmen on and on.
-the AI cannot satisfy the condition or execute the action of the next item in the queue and skips ahead.

Both of them happened when I was messing with the AI-editor for a very old map.
There are any things you can't control with the AI-Editor and funky things happen often.

You could try adjusting the conditions/queue-positions and look for better outcomes.
Other than that, if you want full control, you have to trigger the AI yourself.
 
Level 7
Joined
Apr 5, 2013
Messages
243
I thought it was supposed to just skip when it can't fulfill a set condition and only loop the last order on and on if you have placed a wrong order in the queue and ask it to make something it can't.

But I guess you should be right, I've read several times on how buggy the AI editor is.

I've sacrificed a bit of the variety in trained units for different civs, and this issue got solved, but I'm already experiencing a similar one further down the queue:( I guess I'll cut out a bit more.
 
Status
Not open for further replies.
Top