Yanfly AI Battle Core bug?

Alright so this one's really got me confused... Admittingly I found Yanfly's battle AI core a little difficult to understand but this specific bit I'm trying to use was taken directly out of the examples they provide and I keep getting this same bug. Out of curiousity I disabled the only other plugin even mentioned in the bug popup and still the same thing.
AIDUMB.PNG
AIDUMB2.PNG
the two most common causes of strange errors like that:

1) you loaded a now incompatible old savefile instead of starting a new playtest game after some changes

2) your yanfly plugin order may be wrong.

please give screenshots of your plugin manager so that we can check 2 - all of yanflys plugins have to be in exactly the order on his main list on his website, or they are known to cause strange effects.
the two most common causes of strange errors like that:

1) you loaded a now incompatible old savefile instead of starting a new playtest game after some changes

2) your yanfly plugin order may be wrong.

please give screenshots of your plugin manager so that we can check 2 - all of yanflys plugins have to be in exactly the order on his main list on his website, or they are known to cause strange effects.
yan1.PNG
yan2.PNG
yan3.PNG

I do use a fresh file every time and I think they're all in order, I try to pay attention to that.
My guess is the word param. I think that must not be there. Can you try it again without the word param?
@JohnDoeNews
it seems the notetag is correct, checking the plugin example:

Code:
 * Example:   HP% param <= 50%: Heal, Lowest HP%
 *            MP param > 90: Mana Drain, Highest MP
 *            ATK param > user.atk: Power Break, Highest ATK

so that wont do it though.

@Geeguz
can you download the YEP_PluginOrderChecker from my plugin
and run that to see if it's all correct to be sure?

it checks the yanfly plugins and see if any is out of place, faster if you
do it manually (but manually is always saver) as the update version is 100% correct.
@JohnDoeNews
it seems the notetag is correct, checking the plugin example:

Code:
 * Example:   HP% param <= 50%: Heal, Lowest HP%
 *            MP param > 90: Mana Drain, Highest MP
 *            ATK param > user.atk: Power Break, Highest ATK
There could be a mistake in the example. I've seen that in yanfly plugins before. I don't really know this one, but the word param behind a parameter is not very yanfly-like. Normally param is in the template and needs to be replaced with a parameter.

So even though it is in the example, I'd still try it without the word param. Even if I'm wrong, it's worth the shot.
the word param behind a parameter is not very yanfly-like.
You're not wrong, but in this case it's used to set the bounds of the regexp that parses the parameter.

So it is necessary for the notetag to be read correctly.

@Geeguz the error you're getting is coming from a line that's checking whether you're also using the Selection Control plugin. So I'm onboard with the posts above - double check the order of your plugins against the Yanfly Engine Plugins page.

Remember that any time you change anything, you need to start a new play test game, not load a save. Also, you should be testing this in-game, the battle test in the editor doesn't work correctly when you start adding in plugins.
You're not wrong, but in this case it's used to set the bounds of the regexp that parses the parameter.

So it is necessary for the notetag to be read correctly.

@Geeguz the error you're getting is coming from a line that's checking whether you're also using the Selection Control plugin. So I'm onboard with the posts above - double check the order of your plugins against the Yanfly Engine Plugins page.

Remember that any time you change anything, you need to start a new play test game, not load a save. Also, you should be testing this in-game, the battle test in the editor doesn't work correctly when you start adding in plugins.
I do all my battle testing in game and with brand new files. Im not in a place I can work with it atm but is this yanfly selection control plugin neccesary for the battle ai core to run properly? Because I dont think I have that one on my project atm
is this yanfly selection control plugin neccesary for the battle ai core to run properly? Because I dont think I have that one on my project atm
No, but as I said, that code statement that's throwing the error in your screenshot only gets executed if you have the Selection Control installed.

So if you don't even have that in your project, something very funky is going on. Try replacing the plugin file with a fresh copy.

If that doesn't work...do some logical troubleshooting. Make a new project and put only the Battle AI plugin in it, test this exact notetag. If it works, then disable all other plugins in your existing project and see if that works. Proceed from there.
@ATT_Turan he does have X_SelectionControl ON in his screenshot.
so I'm unsure if the order of the battle plugins are correct.

however, I dont see "TargetCore" though. so he is missing that plugin,
as selection control ONLY works with battleEngineCore and TargetCore
he does have X_SelectionControl ON in his screenshot. however, I dont see "TargetCore" though. so he is missing that plugin, as selection control ONLY works with battleEngineCore and TargetCore
Ah. Well, I don't think I'm the necessary person to tag for that 🤣

I'm certainly not going to sit there and read through someone else's huge plugin list 😉

@Geeguz probably needs to know he might well be causing the problem by including plugins that don't meet their prerequisites. It's a very good practice to not add a plugin to your project until you actually need to use what it does.
It's a very good practice to not add a plugin to your project until you actually need to use what it does.
Yes, absolutely. And don't just import a bulk of plugins like a full yanfly library. Add one, learn what it does, then add the next one.

It is easier to learn how they work one by one then to try to understand them all at once.
Yeah I'm still working on developing an understanding of how they all work together with each other n whatnot, I do try to add one by one and learn as I go, I tried to lay out most of my foundation from the get-go and that did work pretty well but there's still unexpected issues down the line or things you forget or think up on the fly. In either case I'll toy around with the provided suggestions, never know when you're making some dumb mistake someone else can immediately point out and save you hours if not days on
@ATT_Turan he does have X_SelectionControl ON in his screenshot.
so I'm unsure if the order of the battle plugins are correct.

however, I dont see "TargetCore" though. so he is missing that plugin,
as selection control ONLY works with battleEngineCore and TargetCore
So turns out that this was the solution, and it does mention target core being necessary in the notes so that's ignorance on my part. I honestly can't even remember why I have it but I'm sure there was a reason at some point, that's probably the downside to trying to lay everything out right away. @ATT_Turan If you don't mind me asking how were you able to tell by the error what caused it? I always end up taking shots in the dark using keywords
@Geeguz the reason he knows (as he target the selectionControl, which
was the TargetCore more specifically is because of the error you showed.

that indicated the plugin and the line throwin that error, which is than
reconized why it does throw it.

if the plugin target a function that does normally not exist, but in another
plugin, it is noticeable from there.

that is also why we ALWAYS ask for console log that gives a specific error,
to indicate what plugin, and what is missing or compability inssue.

and while ATT_Turan knows yanfly plugin good, he knows it most of the time,
or by checking the plugin what function it was calling that throws the error.
how were you able to tell by the error what caused it?
As ShadowDragon said, I looked at the code. The number at the end of each error in your screenshot is telling you which line from that file was being executed at the time - line 903 of the Battle AI Core says "If you have Selection Core installed, run the targets through the GetActionGroup function."
As ShadowDragon said, I looked at the code. The number at the end of each error in your screenshot is telling you which line from that file was being executed at the time - line 903 of the Battle AI Core says "If you have Selection Core installed, run the targets through the GetActionGroup function."
That information is significantly helpful, I knew those errors had to have some meaning that's why I post them but I never understood fully how to "read" them

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-ai-battle-core-bug.151175/