Plugin Name: Battle A.I. Core
Do you have all the latest updates for the plugins in question? Yes
Plugin Parameter Changes: As in project. (Dynamic actions on, AI to 100% to ease testing)
Bug Explanation: Speed on attacks is incorrect, see below for more details.
Are you a coder who understands the problem in code as to why this bug is caused? ...kind of? I've got a starting point.
Exact Steps on How to Replicate Bug: Talk to ghost.
Did you recreate the bug on the sample project? Yes
Upload the sample project and share the link: As below.
Wow. Weird error here with AI core. I think I know what the issue is, but I'm going to have to make a sample project just to explain it properly.
https://drive.google.com/file/d/0Bz6xnh515Ab-bG52SEUzLXVHNXc/view?usp=sharing
To see the bug, talk to the ghost and start the battle. On the first turn, the bat will use "fast-attack", which has +999 speed, but he will not be faster than you for some reason and so use it after you attack. Next turn, the bat will use "slow-attack", and go first even though his agility is 5 compared to your 30ish.
That's the bug in a nutshell. Here's my digging:
Look at the enemy's AI:
<AI Priority>
Turn % 2 === 0: SKILL 4, highest MAT
Turn % 2 === 1: SKILL 3, highest MAT
Always: SKILL 1
</AI Priority>
Note that on turn 0, he's supposed to use slow attack. The fact that he uses "fast attack" instead implies the first turn is turn 1, right? Not unreasonable; a lot of RPGMaker stuff is one-indexed instead of zero-indexed.
Now go into plugin parameters and set "Dynamic actions" to false. Start the game again. You'll note he uses slow attack the first round instead. And that it indeed is slow. Everything works as intended. Huh?
Try inserting the code "console.log(this.item()); console.log(speed)" between lines 3242 and 3243 in YEP_BattleEngineCore, then turn "Dynamic Actions" back to true. You'll note the console says that the actor is planning to use slow attack. He uses fast attack instead for some reason.
I think that the "Turn number" increments after Battle AI core selections its proposed action and the actor combat order is determined, but before the abilities actually go off. Therefore, the enemy changes its mind the moment the turn starts, and FastAttack is given SlowAttack's speed rating and vice versa.
I have no idea how I would fix this. Are you going to try, or is this outside your scope of support?
It would be sad if this didn't get fixed because "Use skill K on turn A+B*X" is in an option in default RPGMaker MV. It would be sad to lose that functionality when "upgrading" to Battle AI core's dynamic actions system.
Thanks!
Do you have all the latest updates for the plugins in question? Yes
Plugin Parameter Changes: As in project. (Dynamic actions on, AI to 100% to ease testing)
Bug Explanation: Speed on attacks is incorrect, see below for more details.
Are you a coder who understands the problem in code as to why this bug is caused? ...kind of? I've got a starting point.
Exact Steps on How to Replicate Bug: Talk to ghost.
Did you recreate the bug on the sample project? Yes
Upload the sample project and share the link: As below.
Wow. Weird error here with AI core. I think I know what the issue is, but I'm going to have to make a sample project just to explain it properly.
https://drive.google.com/file/d/0Bz6xnh515Ab-bG52SEUzLXVHNXc/view?usp=sharing
To see the bug, talk to the ghost and start the battle. On the first turn, the bat will use "fast-attack", which has +999 speed, but he will not be faster than you for some reason and so use it after you attack. Next turn, the bat will use "slow-attack", and go first even though his agility is 5 compared to your 30ish.
That's the bug in a nutshell. Here's my digging:
Look at the enemy's AI:
<AI Priority>
Turn % 2 === 0: SKILL 4, highest MAT
Turn % 2 === 1: SKILL 3, highest MAT
Always: SKILL 1
</AI Priority>
Note that on turn 0, he's supposed to use slow attack. The fact that he uses "fast attack" instead implies the first turn is turn 1, right? Not unreasonable; a lot of RPGMaker stuff is one-indexed instead of zero-indexed.
Now go into plugin parameters and set "Dynamic actions" to false. Start the game again. You'll note he uses slow attack the first round instead. And that it indeed is slow. Everything works as intended. Huh?
Try inserting the code "console.log(this.item()); console.log(speed)" between lines 3242 and 3243 in YEP_BattleEngineCore, then turn "Dynamic Actions" back to true. You'll note the console says that the actor is planning to use slow attack. He uses fast attack instead for some reason.
I think that the "Turn number" increments after Battle AI core selections its proposed action and the actor combat order is determined, but before the abilities actually go off. Therefore, the enemy changes its mind the moment the turn starts, and FastAttack is given SlowAttack's speed rating and vice versa.
I have no idea how I would fix this. Are you going to try, or is this outside your scope of support?
It would be sad if this didn't get fixed because "Use skill K on turn A+B*X" is in an option in default RPGMaker MV. It would be sad to lose that functionality when "upgrading" to Battle AI core's dynamic actions system.
Thanks!