Hi there !
Been working smoothly on my project, and my thread is for a feature I'm willing to add to my battle mechanics.
Right now I made a "prepare" mechanic on enemies, using YEP_SelectionControl, BuffsStatesCore and BattleAICore. Some enemies have skills that need a turn to prepare, and the party can interrupt them by inflicting a stun on them.
This works correctly and I wanted to expend on it by making some enemies target a specific party member, then using the skill on the targeted member.
So as of now, I did this setup :
A "Prepare" skill, giving "Preparing" state on the user;
The enemy having a "Charged attack" skill in its actions in the database, with the condition "State 'Preparing'" and on max priority;
The following notetags to make sure the enemy use the correct skill :
Then I tried to replicate it while adding a "Lock On" state to a party member :
A "Lock On" skill that inflicts "Locked On" to the target, and apply "Prepare lock on" to the user;
The "Charged attack" skill with this condition :
The "Focused attack" skill in the enemy's actions, with the condition "State 'Prepare lock on'" and on max priority;
The following notetags to make sure the enemy use the correct skill :
I even set the "Locked On" state with a counter in case there is multiple enemies that can do the "Lock On" skill.
The issue now is when an actor stuns an enemy with "Prepare lock on", the "Locked On" state doesn't go away, nor does its counter decrease.
So I'm a bit stuck on that part, searching if a similar case happened before but couldn't find any thread about it.
One idea I had was to make a Custom Respond Effect into the "Prepare lock on" state, to store the index of the party member which got their "Locked On" state counter increase into an array, then searching the array once the stun is inflicted to decrease the counter (and removing the state at 0 on the counter). I'm not sure if it would work this way, or if a <Before Eval> on the "Lock On" skill would be better. Since I'm quite a noobie at Javascript I decided to ask if my way of thinking is correct or if I'm going in the wrong direction to achieve this, or even if it's not possible to make this at all 😅
Been working smoothly on my project, and my thread is for a feature I'm willing to add to my battle mechanics.
Right now I made a "prepare" mechanic on enemies, using YEP_SelectionControl, BuffsStatesCore and BattleAICore. Some enemies have skills that need a turn to prepare, and the party can interrupt them by inflicting a stun on them.
This works correctly and I wanted to expend on it by making some enemies target a specific party member, then using the skill on the targeted member.
So as of now, I did this setup :
A "Prepare" skill, giving "Preparing" state on the user;
The enemy having a "Charged attack" skill in its actions in the database, with the condition "State 'Preparing'" and on max priority;
The following notetags to make sure the enemy use the correct skill :
Code:
<AI Priority>
State === State Preparing: Skill Charged Attack
</AI Priority>
Then I tried to replicate it while adding a "Lock On" state to a party member :
A "Lock On" skill that inflicts "Locked On" to the target, and apply "Prepare lock on" to the user;
The "Charged attack" skill with this condition :
Code:
<Select Conditions>
State: Locked On
</Select Conditions>
The following notetags to make sure the enemy use the correct skill :
Code:
<AI Priority>
State === State Prepare lock on: Skill Focused Attack
</AI Priority>
I even set the "Locked On" state with a counter in case there is multiple enemies that can do the "Lock On" skill.
The issue now is when an actor stuns an enemy with "Prepare lock on", the "Locked On" state doesn't go away, nor does its counter decrease.
So I'm a bit stuck on that part, searching if a similar case happened before but couldn't find any thread about it.
One idea I had was to make a Custom Respond Effect into the "Prepare lock on" state, to store the index of the party member which got their "Locked On" state counter increase into an array, then searching the array once the stun is inflicted to decrease the counter (and removing the state at 0 on the counter). I'm not sure if it would work this way, or if a <Before Eval> on the "Lock On" skill would be better. Since I'm quite a noobie at Javascript I decided to ask if my way of thinking is correct or if I'm going in the wrong direction to achieve this, or even if it's not possible to make this at all 😅