I just started dabbling with battle AIs but I am having a bit of a hard times.
I am trying to get an AI to hunt a target but if there's no target or the target is too far, randomly play an ability to spawn traps.
This is what I had so far:
Unfortunately the AI never seems to clear the target even if its distance is greater than 10 units.
The move AI is set to Hunt with a base detection range of 8.
I also added to the spawn trap ability the
Game State condition In Battle=Inactive hoping it would have used the ability outside battles.
Any help is more than welcome
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
(https://orkframework.com/guide/documentation/features/move-ai/ and https://orkframework.com/guide/documentation/battles/battle-ai/).
This is my understanding of the process, but I have a feeling I am getting something wrong since my AI are not working as expected.
1) the Move AI detects targets set in Combatants>Move AIs>Enemy Detections.
I assumed an enemy is defined as such if the sympathy between the user and target factions is less than zero.
I am also not clear why in the Enemy Detection>Use Detection prompt, enemy detection is needed for Hunting and Fleeing but not Caution. What does Caution uses?
2) if an enemy is in Range and aggressive, a battle starts and the Combatant Battle AI kicks in.
3) The Battle AI can check (Independently from the Move AI ) for its own targets but the AI movement is still handled by the Move AIs.
This is part is where I am confused. What happens if the Battle AI selects a target that's different from the MoveAI or outside the battle range?
I did a test and set my Move AI to Caution Setting with a Caution condition avoiding the Player combatant type and a Battle AI not targeting the player and yet the AI still targets the player when close enough...
1) Enemies are determined by faction sympathy, so yeah - sympathy below 0 is an enemy.
Caution also uses enemy detection, not sure what you mean here? The settings are also only available when using detection is enabled.
Caution tries to keep a defined distance between user and target, so basically hunting when out of range and fleeing when closer than their desired range.
2) Not exactly - battles can start when the player gets close to an enemy, depending on the Battle Settings > Auto Start Battles settings in Combatants > Combatants > General Settings (each combatant can optionally override that for custom ranges, etc.).
This is independent of the move AI or battle AI.
3) See my explanation above :)
Move AI just handles movement and detection, if the battle AI uses a target and the action needs to move closer, the move AI will do that. So, action takes priority.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
1) This is the prompt I was talking about that thew me off regarding the caution detection.
2) in Combatants > Combatants > General Settings battles can start when the player gets close to an enemy. Does that apply to AI vs AI?
I am trying to get a hunter AI chase a target AI independently from the Player and I couldn't find any node in the Battles > Battle AIs to auto start battles.
The text hasn't been updated when the new modes where added to move AI.
2) No, only player to non-player.
There's no battle going on without the player.
Real time area battles can have enemies fight each other without the player being near them, though.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
* My game is using a Real time Battle System
* For my Ranged attacker AI, I have set the MoveAI to cautious with enemy detection and conditions that should limit the enemy type to the Player and Animals
* For my BattleAI, I am first clearing found targets in the settings, the checking if the target is an enemy type == Animal (and use the ability shoot) and if not, if it is a enemy type == Player, still shoot.
Unfortunately the behavior I'm experiencing is the Ranged attacker AI is never shooting the Animals even when in sight (see image below), or sometimes chasing the player when animals are in range/sight and the Player is out of range, despite the Target Position Check>Target Lost Interval = 0.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
All the combatants have set Battle Settings > Auto Start Battles > Own Auto Start Battles = true
and the targets for the Battle AI I'm testing have no distance constraints. Is that enough to for AI to start battles between each other?
There are Auto Join Settings available in Battles > Battle System > General Settings to automatically have combatants around a starting (or running) battle join in.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!