edited November 1 in ORK Support
If I understand correctly (https://orkframework.com/guide/documentation/battles/battle-ai/) – if none of the battle AIs results in an action, the combatant will try performing its base attack (or do nothing if that fails).

Is there a way to prevent the AI performing its base attack if none of the battle AIs results in an action? Or, more simply, a way for combatants to just always ignore a combatant type?

This is what is happening
AI-1 receive a negative status effect (with no damage) from an ability of AI-2 BUT it's not supposed to do anything.
Unfortunately AI-1 keep using one of its abilities on AI-2 even if:
* AI-1 doesn't have a base attack nor auto attack nor counter attack
* AI-1 Battle AI excludes AI-2 (either do nothing or attack a non AI-2 combatant type)
* AI-1 MoveAI Enemy detection conditions excludes AI-2 and it's set to detect on Damage only (not on Aggression).
Post edited by ChimpLogik on
  • Usually you just add a battle AI with the None action as the last battle AI, so if all other battle AIs didn't result in anything, it'll do nothing.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • I tried but unless I add extra target selection conditions on the ability themselves, the AIs keeps attacking.
    I would love to keep the target selection controls outside the abilities so I don't have to duplicate them.

    1. Is there a way to debug the BattleAI to verify if the targets parsing process is going as expected?

    2. Are there other settings that could interfere with unwanted target selection & performing unwanted abilities other than these?
    * Battle AI
    * Move AI (Enemy detection)
    * Combatant Attacks & Abilities Overrides
  • @ChimpLogik Not sure if there's a more "proper" way, but Battle AI has support for the console node, so you could put those after each check success/fail or the start of a given battle AI to see if it's actually being hit / what it's executing
  • @Acissathar that's what I've been doing so far and combining that info with the Combat component Battle Information and Move AI target combatant.
    Unfortunately when it happens that my AIs are attacking targets that they're not supposed to and that don't show up in the Battle Information, would be great to have more info to avoid going in circles.

    I was doing some tests and I'm starting to consider the possibility that some factions that initially were not meant to be enemies (sympathy = 0) might have changed due to default modifiers. This could explain some oddities in behaviors.
    Is there a way to check the factions relative sympathy at runtime and a way to access them/reset them via code?
  • There are schematic nodes for checking and changing faction sympathies. Though, those default sympathy changes would usually only kick in when doing something 'bad', e.g. killing a combatant of a faction - which the battle AI would usually only do to enemies unless set up to attack allies ...

    Debugging battle AI is done using the Unity Console node. You'd basically have to add debug output before and after any action node in a combatant's battle AI. Before to see where you are, after to check if it was used (battle AI will exit at the action node if it was used, otherwise debug output would show).
    That way you can see what is actually used in the battle AI. Maybe also add a battle AI with only debug output as the last battle AI to see if any was used at all.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited November 14
    I've spent this entire week going through the documentation again and trying to get a single AI behavior working accurately ...but never got there :(
    There's always some unexpected behaviors in the Move AI or the Battle AI like the combatant starting to attack or chase targets explicitly not allowed in the conditions.

    Is there a way in Battle AI (and Move AI settings) to force the Move AI and Battle AI have the same target?
    Post edited by ChimpLogik on
  • Your battle AI needs to only use targets from the move AI, e.g. using the Check Move AI Target node. Keep in mind that any other node you use in the move AI can add new targets, unless you set them up to only check the already found targets.

    Though, move AI can only target one combatant - so after the Check Move AI Target node you'd just have that one combatant (if the move AI had a target) as found target anyway.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • I did a quick test using that approach and it's already so much better!
    Thank you Nicholas :)
Sign In or Register to comment.