Scripting for dummies:
1st and most important, scripts are sequential. every few fractions of a second the AI reads the script from top to bottom
2nd, a player inputted command disables AI until that command is finished - If you tell Xoti to walk 1/2 way across the battlefield, she will do nothing else until that walk is finished or prevented by enemy action
1: is this box on cooldown - this refers to the customizable cooldown in the behavior settings, if yes: skip to next box if no: proceed
2: if necessary, define "target" - the word "target" in conditionals depends on the target set for the ability, this is especially important when referencing allies or enemies of the "target." the condition "Target: allies in melee range > 0" on an enemy only ability (a nuke) means: are there 2 enemies of the caster within melee range of each other(are there 2 enemies standing together)
The actual target will be chosen based on the target preference chosen(highest Will, lowest deflection, marked, etc), then nearest to farthest away(unless the preference chosen was "farthest")
3: conditional - target(self or ally): health below 50%, are there any allies or myself who are below half health? if yes: continue, if no: skip to next box
4: additional conditionals - ALL conditionals must be true for an ability to fire(useful for keeping a caster from using a huge nuke on just one peon enemy)
5: availability*- can the ability be cast/used(are you out of zeal/guile/focus/phrases/etc)? if yes: continue, if no: skip to next Ability, if no more abilities listed, skip to next box
6: range - is the target in range(non-factor for self target). if yes: cast ability, if no: check engagement status.
If not engaged: walk towards target(shortest path possible) until target is in range, cast ability.
If engaged: check engagement flag
if "allow disengage" checked: walk towards target(shortest path possible, taking the disengagement hit) until target is in range, cast ability.
if not: Skip to next Ability, if no more abilities listed, skip to next box***
The sequential nature is what screws up a lot of people, if you have a buff or attack listed above your heals, she'll never get around to casting a heal until she has no viable targets for her attacks(this is bad). Second wind should be the first conditional for every AI behavior for any character that can use it (self: health below 50% - second wind on self, no target preference)
USE YOUR COOLDOWNS - they default to 0 and should almost never be left that way unless you're building very specific conditionals or you'll just burn through your resources in seconds on useless actions(casting mirror image 4 times in 10 seconds)
be careful with conals - its probably a bug, but a conal ability(originates from caster acts in a triangle) doesn't check distance, if the target is 20m away, but your cone only reaches 5m in front of you, the AI will still fire the ability hitting nothing and wasting resources.
Generally speaking, and assuming not playing a beguiler-cipher or a rogue, most attacks shouldn't be set to AI until you reach a point where you have more resources than you really know what to do with. AI attacks increase DPS(the computer is faster than you) but greatly hurt flexibility - The "Self: has at least # resource" conditional can help here. Rogues and beguilers should keep some on AI to ensure sneak attacks stay active, but be very careful with rogues, guile doesn't regenerate.
All told the behavior editor is by far the most fleshed out one of those I've seen in quite some time, I'm actually very impressed. but, you gotta be careful with it, using it poorly can easily lead to a party wipe as characters stop filling their role because you "told" them to do other things