MZ Visustella Boost Action BP reference in Javascript?

OK, I got it. First, the visibility: It only worked for me when I used all three of these notetags, but here it is: <Boost Duration> <JS Skill Visible> visible = user.toUseBoostPoints() >= 1; </JS Skill Visible> <JS Command Visible> visible = user.toUseBoostPoints() >= 1; </JS Command Visible> <JS Skill Enable>

And the varying cost and target scope also worked, albeit with something of a wart:
<Boost Duration> <JS MP Cost> if (user.toUseBoostPoints() >= 1) { cost = 20; } else { cost = 7; } </JS MP Cost> <JS Targets> if (user.toUseBoostPoints() >= 1) { targets = $gameParty.battleMembers(); } </JS Targets>

The wart is this: when you boost, the skill will still have you select a single ally, but then it will affect all of them anyway. That works, mechanically, but it's a little clumsy. Now if the initial skill was user-only, or random ally, and then boosted into all allies, there'd be no wart.

And yes, the displayed cost also changes when you boost the skill.
Looking over your code, I got an idea as to what I might have been doing wrong with my original idea. I tried this idea out and I got it to work! Here's the changed code:

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

//Middle Skill(s) (adjust Boost Point numbers as needed)
<JS Skill Visible>
visible = user.hasSkill(skill.id + 1) ? user.toUseBoostPoints() == 1 : user.toUseBoostPoints() >= 1;
</JS Skill Visible>

//Final Skill
<JS Skill Visible>
visible = user.toUseBoostPoints() == 3;
</JS Skill Visible>

Something I forgot to mention was that along with the scope adjustments for support skills, I wanted skills that use this mechanic to have varying cast times (my game is using AT😎 based on the skill's power, akin to having to channel a skill longer to get more powerful versions in an action combat system.

The intention is to create scenarios for the player where they have to think if waiting for the longer cast times would prove beneficial to them, or if the shorter cast time would be enough. For example: party is at low health and the boss is preparing a damaging skill. Does the player think that their party will survive waiting for the healer to cast a powerful healing spell with a long cast time that won't go off until the boss finishes their attack, or should they go for a less powerful healing spell with a shorter cast time that will go off before the boss's attack, but maybe only just barely leave them alive after?

Either way, I got the code working the way I wanted it to! I honestly would have likely given up on this mechanic if you didn't revive this thread and help me bounce ideas around, so thank you!
Looking over your code, I got an idea as to what I might have been doing wrong with my original idea. I tried this idea out and I got it to work! Here's the changed code:

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

//Middle Skill(s) (adjust Boost Point numbers as needed)
<JS Skill Visible>
visible = user.hasSkill(skill.id + 1) ? user.toUseBoostPoints() == 1 : user.toUseBoostPoints() >= 1;
</JS Skill Visible>

//Final Skill
<JS Skill Visible>
visible = user.toUseBoostPoints() == 3;
</JS Skill Visible>

Something I forgot to mention was that along with the scope adjustments for support skills, I wanted skills that use this mechanic to have varying cast times (my game is using AT😎 based on the skill's power, akin to having to channel a skill longer to get more powerful versions in an action combat system.

The intention is to create scenarios for the player where they have to think if waiting for the longer cast times would prove beneficial to them, or if the shorter cast time would be enough. For example: party is at low health and the boss is preparing a damaging skill. Does the player think that their party will survive waiting for the healer to cast a powerful healing spell with a long cast time that won't go off until the boss finishes their attack, or should they go for a less powerful healing spell with a shorter cast time that will go off before the boss's attack, but maybe only just barely leave them alive after?

Either way, I got the code working the way I wanted it to! I honestly would have likely given up on this mechanic if you didn't revive this thread and help me bounce ideas around, so thank you!
Oh, I really like the idea of increasing cast times! I'll keep that in mind for a future project, actually 🙂 (This one is using STB, because I like the Exploit system, and because I think it's somewhat easier to balance than a tick-based system, but I liked ATB-type systems in FF4/5/6/7, CT, etc, so I was very tempted.)

But congrats on getting it working! Your efforts here also gave me lots of ideas about having boost change the scope of certain skills, which actually helps with some of the design points I was getting stuck on! You get a credits mention for that alone!

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