MZ Visustella Boost Action BP reference in Javascript?

Fairly simple question: for the Visustella Boost Action plugin, is there a way to reference a user's boost points in Javascript?

To go into a bit more detail, I want to see if I can create an 'Upcasting' system, where an actor can use Upcasts (in this case, Boost Points) to access more powerful versions of a spell (ie. using one Upcast would turn Fire I into Fire II, two Upcasts would turn it into Fire III). I figured if I could access the actor's BP using Javascript, I could use the Skills and States javascript notetags for visability to enable or disable the different skills to only show the one that they player could choose. Of course, that would mainly depend on if you could even access the actor's BP in javascript in the first place. Is there a javascript function designed for that?

Also, does what I'm trying to do even sound possible? I'm not very familiar with how RPG Maker populates menus and such, so i could very well be trying to do something that isn't even possible from normal engine limitations.
You can do anything - the problem is that VisuStella's plugins are obfuscated, which means we can't just look it up in the code.

If they don't provide a script call for you in the plugin instructions, you're pretty sunk - you could guess randomly at what it might be named, but that's probably pointless.

You could try following their instructions for customer service, see if they'll tell you.
Moved to: Plugin Support
So, I'm necroing this post after a month because I think I found the solution on the VisuStella discord and tried coding it out, but I got a syntax error.

For the first skill in a set, I've got this:
Code:
<JS Skill Visible>
\\Get the current skill id
var currID = this.id;
console.log(currID);

\\Check if user is boosting
if(user.toUseBoostPoints >= 1) {
    \\Check if user knows the next skill in line
    temp var nextID = currID++;
    if(user.isLearnedSkill(nextID)) {
        \\User knows next skill, hide current.
        visible = false;
    } else {
        \\User doesn't know next skill, continue showing current.
        visible = true;
    }
} else {
    \\If not boosting, skill will be shown.
    visible = true;
}
</JS Skill Visible>

Any in the middle look like this:
Code:
<JS Skill Visible>
\\Get the current skill's id
var currID = this.id;
console.log(currID);

\\Check if user is boosting over amount
if(user.toUseBoostPoints > 1) {
    \\Check if user knows the next skill in line
    temp var nextID = currID++;
    if(user.isLearnedSkill(nextID)) {
        \\User knows next skill, hide current.
        visible = false;
    } else {
        \\User doesn't know next skill, continue showing current.
        visible = true;
    }
} else if(user.toUseBoostPoints = 1) {
    \\If boosting the exact amount, skill will be shown
    visible = true;
} else {
     \\Otherwise, skill will not be shown.
    visible = false;
}
</JS Skill Visible>

And the skill at the end has this:
Code:
<JS Skill Visible>
\\Get the current skill's id
var currID = this.id;
console.log(currID);

\\Check if user is boosting to max
if(user.toUseBoostPoints = 3) {
    visible = true;
} else {
    \\User is not boosting to max
    visible = false;
}
</JS Skill Visible>

I'm almost positive I'm doing the bit for getting the skill ID wrong, but the rest i'm not sure due to lack of Javascript experience.
Are you intentionally putting those console.log() lines in there to try to debug? If you got that copied from someone, that's bad practice - you don't want your console littered with stuff that aren't errors.

In your first two notetags, the temp var is going to crash, that's not valid JavaScript syntax. Make it just var.
Yeah, the console.log() was intended to be temporary while figuring out if the code was working. Hold-over from coding in C# in Unity where being able to get debug logs were critical to me getting anywhere.

I removed console.log() as well as made the var change you mentioned, but I'm still getting a syntax error. The only note from it is 'Invalid or unexpected token'.
Personally, I would go through and get rid of extraneous braces. If you're not using an IDE or specialized text editor, it can make it harder to keep track of. There are also chunks of code you can get rid of entirely because you're dealing with booleans.

I think this makes code much easier to read, and the less you have typed, the less stuff you have to look at for potential errors.

One error is in the middle notetag, you have (user.toUseBoostPoints = 1) setting a value instead of (user.toUseBoostPoints == 1) checking a value.

Same thing in the bottom tag, you have = 3 instead of == 3.

If this still produces an invalid token, the only thing I can think of is that maybe toUseBoostPoints is supposed to be a function, so it should have parentheses after it...but I would expect that to report as a reference to an undeclared variable rather than an invalid token.

Code:
<JS Skill Visible>
visible = user.toUseBoostPoints>=1 ? user.isLearnedSkill(this.id+1) : true;
</JS Skill Visible>

The next one is almost the same:
Code:
<JS Skill Visible>

\\Check if user is boosting over amount
if (user.toUseBoostPoints > 1)  
    \\ Show if the user doesn't know the next skill in line
    visible = !user.isLearnedSkill(this.id+1);

else
    \\ If boosting the exact amount, skill will be shown, here's where an error was
    visible = user.toUseBoostPoints==1;

</JS Skill Visible>

Code:
<JS Skill Visible>
// There was also an error here
visible = user.toUseBoostPoints==3;
</JS Skill Visible>
I've been looking on how to reference boost points as well.
Been trying to make it so if a user lands a crit, they gain a boost point.
But have been unsuccessful in my attempts so far.
If this still produces an invalid token, the only thing I can think of is that maybe toUseBoostPoints is supposed to be a function, so it should have parentheses after it...but I would expect that to report as a reference to an undeclared variable rather than an invalid token.
Tried the changes you made both with and without the added parentheses. Still getting same syntax error of Invalid token.
Please post the actual screenshot of the error (press F12, go to the Console tab).

It should give an indication of what the incorrect character actually is, as well as where.
SyntaxError.png

this is what the console generates when I try to run a battle test from the database with the notetags in skills actors have access to.
I think it's your use of this.id

I can't say for sure because VisuStella obfuscated their code, but in the Yanfly skill plugin the notetags for visibility are attached to the Game_BattlerBase, so "this" actually refers to the actor.

I see the documentation for the Skills and States says to use "skill" to refer to the current skill.

So replace the instances of this.id with skill.id
I tried replacing the instances and it's giving me the exact same error.
Then I think you should take it back to VisuStella support...with the code simplified down like I showed you, it's pretty easy to double check and I don't see anything wrong syntactically.

It seems like the only room for error is that toUseBoostPoints reference.
Slight necro - I was doing the same thing, and found it. toUseBoostPoints is a function, so needs to be referenced as user.toUseBoostPoints().
Were you able to get it working? If so, would you mind sharing your code? I keep getting the mentioned syntax errors from above when I was working with Turan before even when the function parenthesis are added, and while I tried contacting VisuStella support, they never got back to me.
I didn't try to implement your code exactly, but I did implement this:
<Boost Damage> <Target: Ally or Enemy> <JS Pre-Damage> if (user.toUseBoostPoints() >= 1) { target.addState(4); } </JS Pre-Damage>

And it works as intended, adding state 4 if I boost. (The skill heals, if you boost, it heals more and applies Regeneration).
Though it occurs to me that there might be an easier way to do this: just have the damage value directly manipulated by the expenditure of boost points, instead of having them unlock skill visibility. Or possibly set the skills to require BP.

But that might be a paradigm-breaker for your concept, I'm not sure. (I chose not to have different tiers of the same spell, instead making them all smoothly scale up with the user's ATK/MAT, but there's a case to be made for doing it the other way too.)
What you're saying makes sense for things like healing and damging spells in what I'm trying to acomplish, but for some others it doesn't quite work.

One example is buff/debuff skills. Common in most RPGs is having these skills start as single target, but then getting a multi-target version later on. Boost Action lets you increase the duration of of a buff, but not the targeting scope. And while I do know that Battle Core now has the multi-target toggle that you can add to skills, it doesn't adjust the skill's cost (at least not that I could find). For the balancing I'm trying to go for, that doesn't work.
Ah, but you're going for the ability to boost and then have the skill become multi-target, with a commensurate increase in cost?

I actually want to do that myself, so I may take a stab at it. Offhand, Skills and States Core has a <JS type Cost> notetag - that, combined with the user.toUseBoostPoints() function, looks like it might be just the thing. Lemme test it some and get back to you.

Original thread: https://forums.rpgmakerweb.com/threads/visustella-boost-action-bp-reference-in-javascript.156340/