MZ VisuStella Battle Grid System + Battle AI

Hi there,

I would like to use VisuStella's Battle AI plugin alongside the Battle Grid System. In the update notes of Battle AI, it says that changes have been made to make the plugin compatible with the Battle Grid System, specifically regarding scopes. However, there is no more information shown on either plugin's page relating to how they work together.

My question is: How can I reference variables/aspects of the Battle Grid System in the Battle AI conditions? For example, instead of calling for AI to target the enemy with the higher HP, I would like them to target an enemy in the Front-most Rank (two variables central to the Battle Grid System). How might I go about doing this?

If this isn't possible, it's important to note that these two plugins are not fully compatible, since access to the variables built into Battle Grid System are necessary to having an AI that works with that system. Thank you for any help!
Did you check if their settings JS stuff contains info on how to reference which node a battler is on? Like the JS tactics, or stuff from the grid actions sequence commands?

A workaround would also probably be to make them use skills that you've limited the targets to front rank. // Or just ask VS team.
Did you check if their settings JS stuff contains info on how to reference which node a battler is on? Like the JS tactics, or stuff from the grid actions sequence commands?

A workaround would also probably be to make them use skills that you've limited the targets to front rank. // Or just ask VS team.
Thanks for the reply. Unfortunately, I don't see any way to reference which node a battler is on. There doesn't seem to be a database of JS things to use as references for this plugin, as there are for many others in the VisuStella family, which is surprising/confusing to me, since it fundamentally changes important aspects of the battle system and therefore most projects would need such references for them to work properly.

I've thought about workarounds like that, but they become way too limited and do not fit the needs of my project. Thanks for your continued help!
Oh yeah, I had forgotten one thing I had previously suggested to someone else. Like maybe you can check what node they're on, by getting the coordinate of the battler/sprite. Just move them around and check what coordinates are what node. Like I think:

battler.battler()._homeX
battler.battler()._homeY
battler.battler().x
battler.battler().y

Or just Ctrl-F the obfuscated plugin file and check if there's something you notice. Might be as simple as battler.row() (that was from Yanfly row formation) or something similar like 'node'. Anyway, I though VS had a discord, but I don't use that. But there's some discord link on their page.

battler.gridRank(): This method will return the current Rank (column) the battler is on.
battler.gridFlank(): This method will return the current Flank (row) the battler is on.

var actor = $gameActors.actor(1); // Or any other way to get an actor object
var currentRank = actor.gridRank();
var currentFlank = actor.gridFlank();

console.log("Actor's current Node: Rank " + currentRank + ", Flank " + currentFlank);
battler.gridRank(): This method will return the current Rank (column) the battler is on.
battler.gridFlank(): This method will return the current Flank (row) the battler is on.

var actor = $gameActors.actor(1); // Or any other way to get an actor object
var currentRank = actor.gridRank();
var currentFlank = actor.gridFlank();

console.log("Actor's current Node: Rank " + currentRank + ", Flank " + currentFlank);
Thank you so much! I will try this out.
battler.gridRank(): This method will return the current Rank (column) the battler is on.
battler.gridFlank(): This method will return the current Flank (row) the battler is on.

var actor = $gameActors.actor(1); // Or any other way to get an actor object
var currentRank = actor.gridRank();
var currentFlank = actor.gridFlank();

console.log("Actor's current Node: Rank " + currentRank + ", Flank " + currentFlank);
May I ask where you found this information? For example, I cannot find any mention of battler.gridRank in any of my plugins, or anywhere on the internet. This post is the only place there's any mention of it that I can find. If you would be able to point me towards where you got these references from, that would be super helpful so that I (and any others) could find them and troubleshoot myself. Thanks so much!
Those ones you could probably find pretty easily by just Ctrl-F:ing the obfuscated plugin. Generally you can find all the info if you just deobfuscate the plugins, but people here don't like to do that and share the stuff, since it's not in the spirit of the plugin creator's wishes, I guess.
you can also get some direction from your console. if you type in something that results in a battler being returned, you could then see battler functions in the auto fill list and look for relevant function names.
you can also get some direction from your console. if you type in something that results in a battler being returned, you could then see battler functions in the auto fill list and look for relevant function names.
Thanks, I will try that too. Any other help on this is helpful and appreciated!

Those ones you could probably find pretty easily by just Ctrl-F:ing the obfuscated plugin. Generally you can find all the info if you just deobfuscate the plugins, but people here don't like to do that and share the stuff, since it's not in the spirit of the plugin creator's wishes, I guess.
Thanks. That's how I searched for it, but it's not in the plugin. Also, this was a plugin that I paid for, so I feel that I should have access to the variables that I can reference. So I am wondering where those are located so that I can properly use the features in the plugin that I bought.
this was a plugin that I paid for, so I feel that I should have access to the variables that I can reference.
unfortunately, its one of the known downsides of VS plugins. if its not something they disclose, its not going to be easily found. Yanfly's plugins (or most authors' really) dont mention all the functions they add, but theyre not obfuscated and anyone who knows JS can peek inside and find what they need. VS plugins on the other hand are made to make that difficult
Thanks. That's how I searched for it, but it's not in the plugin. Also, this was a plugin that I paid for, so I feel that I should have access to the variables that I can reference. So I am wondering where those are located so that I can properly use the features in the plugin that I bought.

Do you mean that if you open the obfuscated file and search for: gridRank or gridFlank , it returns no match?

EDIT: I mean like don't search it like gridRank()
EDIT 2: And don't put the battler part or whatever there

EDIT 3: And just to be clear, what I mean is that, since they're called 'rank' and 'flank' in the plugin, searching with just those would get you to the 'gridRank' and 'gridFlank', and then you realize that "oh those are the functions that get you some of the battler properties".

EDIT 4: Final edit LOL, but someone told me that it's possible to obfuscate the name in the file or whatever, so maybe I'm wrong. But what I'm sure about is that you can't search for it like "battler.stuff".
Do you mean that if you open the obfuscated file and search for: gridRank or gridFlank , it returns no match?

EDIT: I mean like don't search it like gridRank()
EDIT 2: And don't put the battler part or whatever there

EDIT 3: And just to be clear, what I mean is that, since they're called 'rank' and 'flank' in the plugin, searching with just those would get you to the 'gridRank' and 'gridFlank', and then you realize that "oh those are the functions that get you some of the battler properties".

EDIT 4: Final edit LOL, but someone told me that it's possible to obfuscate the name in the file or whatever, so maybe I'm wrong. But what I'm sure about is that you can't search for it like "battler.stuff".
Thanks for this! I seem to have found it following your advice. Hopefully it ends up working. Appreciate it

Original thread: https://forums.rpgmakerweb.com/threads/visustella-battle-grid-system-battle-ai.178347/