During battles, some enemies do not take any action. Please advise on how to resolve this issue.

The battle system is turn-based (multi-turn). After a few turns have passed since the start of the battle, some enemies occasionally end their turn without taking any action.
In the first turn, all enemies take action, but after a few turns, some enemies tend to stop taking action especially those who are far away from the player, although it is unclear what triggers this.

For example, even though there are six enemy turns in the Turn Order, only one or two enemies around the player actually take action, while the turns of other enemies seem to be skipped in an instant regardless of the AI Decision Time setting.

The Battle System settings are as shown in the following image.
https://imgur.com/a/eCtvADs

The AI settings are as follows, MoveAI is not being used.
https://imgur.com/a/Qs7BT33
  • Check the Range Settings in Battles > Battle Systems > General Settings. There are optional range limits to which combatants take part in battle, call use battle AI or move AI, etc.

    Also, since your Actions Per Turn use a formula, make sure the formula has a result above 0 for all participating combatants. If they don't have any APT, they can't use actions.

    And, since they require grid movement to get near a target, make sure they have a move range available to them (based on the Move Command settings in Battles > Battle Grid Settings).
    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 reviewed the settings based on the advice I received, but there didn't seem to be any incorrect settings, and it didn't lead to a resolution.
    However, when I changed the enemy's BattleAI to use items on the spot instead of Grid movement, all enemies started behaving correctly, so I think the issue is with GridMovement.

    The Move Command settings are as follows:
    https://imgur.com/a/kp5vaxJ

    Do you think there is anything else I should review regarding GridMovement?
  • Hm, looks generally correct - though if the move costs of the cells are e.g. higher than 3, the combatant can't move to a cell if it only has a move range of 3.

    I'll do some tests, can you maybe show me the settings of your battle AI's Grid Move node?
    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 April 2023
    Here are the settings for the GridMove node in BattleAI. I tried changing the settings of this node several times but the result did not change, so the cause may be elsewhere.
    https://imgur.com/a/8ju8An2

    As additional information, the phenomenon where the enemy stops moving often occurs after the enemy has acted for the first few turns. Sometimes they stop acting in the next turn, and sometimes they resume GridMovement at the beginning of their turn.


    Additional note:
    When Target is set to Self in the GetNearest node before performing GridMove, all enemies do not stop moving.
    Therefore, I think the reason why enemy AI stops moving may be that for some reason, the GetNearest node cannot obtain the Target (= player).
    Post edited by modot on
  • Tested the same setup and works fine for me ... I think I'll need a Unity test project with your setup to test this.

    If you can provide one, you can reduce the size by deleting the Library folder from the Unity project.
    Zip it up, upload it somewhere (e.g. dropbox) and send me the link to contact@orkframework.com (or via PM).
    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!
  • It may have been a very simple reason for this...
    When all the grids around the player are occupied, the enemy seems to not move as close as possible, but rather takes no movement action.

    I thought that this behavior was set by the On/OFF check of the NoMoveOver in the GridMove node of BattleAI setting, but even if I turned the NoMoveOver check on or off, the enemy stopped trying to move when the grid around the player was occupied.
    Could you tell me which setting I need to change?
  • edited April 2023
    Well, yeah - the target isn't reachable in that case because there's no path to it or the cells around it (since they are occupied).
    In that case you can try to use a 2nd Grid Move node (connected to the first node's Next slot) with a larger Maximum Distance.
    Post edited by gamingislove on
    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!
Sign In or Register to comment.