So I figured this topic hasn't touched on as much as the others, due to its complexity and/or difficulty of implementation. For the sake of this thread, let's just throw the "how-to" and other technical aspects of implementation aside. I'd like to discuss possible enemy AI patterns and behaviors. I was looking at the LeTBSconfig.js file and found several already made examples, which I will be listing to get us started. Hopefully, we can think of some cool ideas! (Which I can then use hehe.)
Note: Some of this will only apply to grid-based combat, while other parts can apply to all combat systems. However, I'm not trying to limit discussion to specifically 1 type or the other. Feel free to ignore any parts that don't benefit your project.
So without further adieu, here are some of the basics...
For positioning, we have 2 possibilities (that I'm aware of, would love to know if there's more)...
Example Enemies:
Vampire Lord
AI pattern: melee
AI pattern: ranged
Note: Some of this will only apply to grid-based combat, while other parts can apply to all combat systems. However, I'm not trying to limit discussion to specifically 1 type or the other. Feel free to ignore any parts that don't benefit your project.
So without further adieu, here are some of the basics...
For positioning, we have 2 possibilities (that I'm aware of, would love to know if there's more)...
- melee: prioritizes closing the distance to the target
- ranged: prioritizes keeping a distance from the target
- healing: skills that heal damage
- usually, the AI will check for certain conditions such as...
- is itself below a certain HP threshold? else...
- who is the lowest HP ally and is it in range? else...
- is the closest ally in range below a certain HP threshold?
- support: skills that apply states
- basically follows the same logic as healing, except it's a boolean logic (I think)
- here I think the AI can be improved upon by dividing this category into offensive & defensive
- otherwise, simply categorize skills that apply negative states as "offense" instead
- offense: skills that deal damage
- mostly straight forward, hurt the target
- typically searches for closest target
- the default AI seems to execute skills in the order listed above unless told otherwise
- maximize the number of targets
- avoid friendly fire (or unfriendly for healing)
- Turn
- HP
- MP
- State
- Party Level
- Switch
Example Enemies:
Vampire Lord
AI pattern: melee
- Attack (melee) - Always, offense
- Suck Blood (melee) - HP 0%~70%, offense, CD: 3
- Lifesteal Aura (aura: 5, costs MP to maintain) - MP 50%~100%, support
AI pattern: ranged
- Attack (ranged: 3) - Always, offense
- Seduce (ranged: 3) - Always, offense, CD: 7
- Blood Rain (ranged: 5, aoe: 3) - HP 0%~50% (checks allies), healing, maximize targets, avoid (un)friendly fire, CD: 5