The official VisuStella notetag help thread

● ARCHIVED · READ-ONLY
Started by Trihan 1458 posts Page 73 of 73 View original ↗
  1. CrocPirate said:
    @jimmyshmo
    Do you have the Skill Learn System plugin?
    Because if you do, then try this code:
    Code:
    <JS On Learn Skill>
      user.addParam(0, 10); // Increases Max HP (0) by 10 permanently
      user.addParam(2, 5);  // Increases ATK (2) by 5 permanently
    </JS On Learn Skill>
    That worked! Thank you, too many Notetags lol
  2. Anyone know if its possible to get the Animated Visu Text Codes inside the battle Skill selection window. I want a Skill to glow when the conditions for use are met but nothing I do works.

    I can get the Skill to change to blue using \c[1]Skill but if I try \Effect<SoftBlue>Skill it'll just stay white.
    Which makes sense cause Visu will just clean the garbage text off if it doesnt recognize it.
  3. The plugins are executed in order from top to bottom. This means you can put a plugin under a visustella plugin to over-ride something it is doing. For something visual, it should work great, but altering a dependency or moving a value outside of the parameters that VS works with could cause bugs or a crash.
  4. jimmyshmo said:
    Anyone know if its possible to get the Animated Visu Text Codes inside the battle Skill selection window. I want a Skill to glow when the conditions for use are met but nothing I do works.

    I can get the Skill to change to blue using \c[1]Skill but if I try \Effect<SoftBlue>Skill it'll just stay white.
    Which makes sense cause Visu will just clean the garbage text off if it doesnt recognize it.

    VS animated message text effects plugin says that it's only for message box.

    You can try to change the Window_SkillList.prototype.drawItemName method so that if the skill id is that special one it uses color to draw it. But you also have to change some update method so that it refreshes that window every frame to change the color gradually.
  5. Hey guys I'm back again with another question, I'm having trouble with the Visustella QTE Timing Bar.
    I'm using it for a battle mechanic but instead of popping up in the middle of the screen, I want it to pop up above the person using the skills head. With Timed hit there is an option to specify X and Y coordinates and ive been using the code and it works perfect.
    Code:
    $subject.battler().x + 5;
    $subject.battler().y - 125;
    Anyway you guys know how to do this with the Timing Bar?
  6. I think it works if you just throw them with a script (give whatever values you want):

    SceneManager._scene._qteWindow.x = 400;
    SceneManager._scene._qteWindow.y = 100;
    SceneManager._scene._qteTimerWindow.x = 400;
    SceneManager._scene._qteTimerWindow.y = 200;

    But if you want the move to happen immediately instead of next frame, you might need to launch the QTE form the same script box.

    Also in the plugin settings you can set where the QTE is stuff is positioned. I think it's created again every time you do the QTE, so you can try to put a conditional there that if you're in battle, make at those locations.
  7. Sorry if it sounds dumb but by throw them with a script do you mean inside the common event like
    this? Or do you mean somewhere in the plug in Parameters?
    (Also I know thats not gonna work perfectly for X and Y I'm just testing I can tweak that later )
    1776633167695.png

    Unless its in this message box spot.
    1776633402177.png
  8. Yeah in the common event, but put it after the plugin command. Not sure which elements those 2 different windows held, so you might not have to change the x of the other one (if it's the long dark rectangle or whatever). But like I said, if you do it like that there might be a one frame delay, unless you launch the QTE plugin command in script form from the same script box.

    And yeah, with plugin settings I meant that stuff. I think there was 2 different spots for the different stuff.
  9. rpgLord69 said:
    Yeah in the common event, but put it after the plugin command. Not sure which elements those 2 different windows held, so you might not have to change the x of the other one (if it's the long dark rectangle or whatever). But like I said, if you do it like that there might be a one frame delay, unless you launch the QTE plugin command in script form from the same script box.

    And yeah, with plugin settings I meant that stuff. I think there was 2 different spots for the different stuff.
    I'll give it a go in a couple mins, thank you for the help as always.

    Edir: That was it! I can tinker with that and get the results I'm looking for, just had to make that script run after and make sure wait for QTE was off and manually add a wait timer after it equal to the QTE.
  10. jimmyshmo said:
    I'll give it a go in a couple mins, thank you for the help as always.

    Edir: That was it! I can tinker with that and get the results I'm looking for, just had to make that script run after and make sure wait for QTE was off and manually add a wait timer after it equal to the QTE
    rpgLord69 said:
    I think it works if you just throw them with a script (give whatever values you want):

    SceneManager._scene._qteWindow.x = 400;
    SceneManager._scene._qteWindow.y = 100;
    SceneManager._scene._qteTimerWindow.x = 400;
    SceneManager._scene._qteTimerWindow.y = 200;

    But if you want the move to happen immediately instead of next frame, you might need to launch the QTE form the same script box.

    Also in the plugin settings you can set where the QTE is stuff is positioned. I think it's created again every time you do the QTE, so you can try to put a conditional there that if you're in battle, make at those locations.
    Everything is working decent just wondering if you know another script call to try to change the size of the black tint box that's behind the buttons. Line 3 and 4 of that script call don't seem to do anything. Again which is fine but if I could change that box size it would look a little cleaner. If not no worries!
  11. @jimmyshmo Lines 3 and 4 are moving the qteTimer window, which you seem to have disabled in the plugin settings.

    You can manipulate the black box with (give them values):
    SceneManager._scene._qteWindow._dimmerSprite.x
    SceneManager._scene._qteWindow._dimmerSprite.y
    SceneManager._scene._qteWindow._dimmerSprite.width
    SceneManager._scene._qteWindow._dimmerSprite.height

    If it's always the same for everything, could be better to put it in some method, but you'd have to search what method to add it it. Didn't seem to be createDimmerSprite at least.
  12. Hello, I need some help regarding how skill costs are altered using some of the notetags for the Skills and States plugin from VisuStella (for RPGMaker MZ).

    You can give a skill a custom cost by applying a notetag (for example, a skill will cost 50% HP if you give it the notetag <HP Cost: 50%>).
    You can also make a state reduce these kinds of costs by giving it the same notetag (for example a state will reduce all HP costs for skills by 100 if you give it the notetag <HP Cost: -100>).

    This all works fine. However what I'd like to do is make a state reduce all HP costs to 0. I used the notetag <HP Cost: 0%>, which does work but it seems that regardless of the reduction a skill with an HP cost will always cost a minimum of 1. I tried the other one, <HP Cost: -9999> and also a combination of both, but the skill cost still remains at a minimum of 1. I know there's a notetag that can force a skill to have a minimum/maximum cost, but I don't have those notetags used in the skill (or anywhere for that matter).

    In the plugin settings I saw that you can edit the HP cost calculation, but I'm not familiar enough with JS to figure out where it's forcing the min cost as 1. Here is what that code looks like:
    Code:
    // Declare Variables
    const user = this;
    const skill = arguments[0];
    let cost = 0;
    
    // Calculations
    const note = skill.note;
    if (note.match(/<HP COST:[ ](\d+)>/i)) {
        cost += Number(RegExp.$1);
    }
    if (note.match(/<HP COST:[ ](\d+)([%%])>/i)) {
        cost += Math.ceil(Number(RegExp.$1) * user.mhp / 100);
    }
    if (note.match(/<JS HP COST>\s*([\s\S]*)\s*<\/JS HP COST>/i)) {
        const code = String(RegExp.$1);
        eval(code);
    }
    
    // Apply Trait Cost Alterations
    if (cost > 0) {
        const rateNote = /<HP COST:[ ](\d+\.?\d*)([%%])>/i;
        const rates = user.traitObjects().map((obj) => (obj && obj.note.match(rateNote) ? Number(RegExp.$1) / 100 : 1));
        const flatNote = /<HP COST:[ ]([\+\-]\d+)>/i;
        const flats = user.traitObjects().map((obj) => (obj && obj.note.match(flatNote) ? Number(RegExp.$1) : 0));
        cost = rates.reduce((r, rate) => r * rate, cost);
        cost = flats.reduce((r, flat) => r + flat, cost);
        cost = Math.max(1, cost);
    }
    
    // Set Cost Limits
    if (note.match(/<HP COST MAX:[ ](\d+)>/i)) {
        cost = Math.min(cost, Number(RegExp.$1));
    }
    if (note.match(/<HP COST MIN:[ ](\d+)>/i)) {
        cost = Math.max(cost, Number(RegExp.$1));
    }
    
    // Return cost value
    return Math.round(Math.max(0, cost));
  13. try changing
    Code:
    cost = Math.max(1, cost);
    to
    Code:
    cost = Math.max(0, cost);
  14. Robro33 said:
    try changing
    Code:
    cost = Math.max(1, cost);
    to
    Code:
    cost = Math.max(0, cost);
    That worked, thank you very much.
  15. rpgLord69 said:
    Ah ok. I only skimmed the plugin page, but it seems to give the option in the settings to not include the boost/unboost in the actor commands. Also, in the plugin settings you can set the mechanics to have no boost effects, right? There also seems to be a BattleCore MECH plugin command to change boost points in action sequences.

    Didn't notice a way to get the boost point value, but you can try to guess it. Like maybe:
    $gameActors.actor(1).bp
    $gameActors.actor(1).BP
    $gameActors.actor(1)._bp
    $gameActors.actor(1).boostPoints

    If you figure it out, you can also use VS Skills & States to set <JS Skill Enable> to enable the skill only when the users boost points are above certain value.

    But yeah, like I said, I just quickly looked at the plugin page LOL
    For anyone interested... getting boost points to work automatically, similar to MP, was solved by AI (see below)

    While the VisuStella MZ Boost Action plugin is designed for manual player input, you can achieve an "automatic cost" behavior using JavaScript notetags from the VisuStella Skills and States Core.

    ## Required Scripting
    To make a skill automatically check for and consume Boost Points (BP), you must manually reference the battler's BP in the skill's notebox.

    ## 1. Skill Enable Requirement
    Ensure the skill is only selectable if the user has enough BP.

    <JS Skill Enable>
    // Replace 'X' with the required Boost Points
    enabled = user.boostPoints() >= X;</JS Skill Enable>

    ## 2. Automatic BP Deduction
    Since the plugin normally waits for a manual "Boost" command, you can use a custom execution notetag to deduct the points when the skill is used.

    <JS Post-Apply as User>
    // Replace 'X' with the amount to deduct
    user._boostPoints -= X;
    // Ensure BP doesn't drop below zero
    user._boostPoints = Math.max(0, user._boostPoints);</JS Post-Apply as User>

    ------------------------------
    ## Important Considerations

    * Visual Cost Display: Use <Custom Cost Text: X BP> to show the cost in the skill menu, as BP is not a default resource like MP or TP.

    * Conflict with Manual Boosting: If you use this "automatic" method, consider disabling the manual Boost command in the Plugin Parameters under Battle Control > Show Command? to avoid player confusion.

    * Obfuscation: VisuStella plugins are obfuscated, meaning you cannot directly rewrite the plugin's internal code; you must use these "hooks" (notetags) provided by their core system to create custom logic.

    Pro Tip: To make skills "stronger" based on these auto-spent points, you can use user.boostPoints() directly in your Damage Formula. For example: (a.atk * 4 - b.def * 2) * (1 + (X * 0.5)) where X is the points spent.
  16. ZimXero said:
    For anyone interested... getting boost points to work automatically, similar to MP, was solved by AI (see below)

    While the VisuStella MZ Boost Action plugin is designed for manual player input, you can achieve an "automatic cost" behavior using JavaScript notetags from the VisuStella Skills and States Core.

    ## Required Scripting
    To make a skill automatically check for and consume Boost Points (BP), you must manually reference the battler's BP in the skill's notebox.

    ## 1. Skill Enable Requirement
    Ensure the skill is only selectable if the user has enough BP.

    <JS Skill Enable>
    // Replace 'X' with the required Boost Points
    enabled = user.boostPoints() >= X;</JS Skill Enable>

    ## 2. Automatic BP Deduction
    Since the plugin normally waits for a manual "Boost" command, you can use a custom execution notetag to deduct the points when the skill is used.

    <JS Post-Apply as User>
    // Replace 'X' with the amount to deduct
    user._boostPoints -= X;
    // Ensure BP doesn't drop below zero
    user._boostPoints = Math.max(0, user._boostPoints);</JS Post-Apply as User>

    ------------------------------
    ## Important Considerations

    * Visual Cost Display: Use <Custom Cost Text: X BP> to show the cost in the skill menu, as BP is not a default resource like MP or TP.

    * Conflict with Manual Boosting: If you use this "automatic" method, consider disabling the manual Boost command in the Plugin Parameters under Battle Control > Show Command? to avoid player confusion.

    * Obfuscation: VisuStella plugins are obfuscated, meaning you cannot directly rewrite the plugin's internal code; you must use these "hooks" (notetags) provided by their core system to create custom logic.

    Pro Tip: To make skills "stronger" based on these auto-spent points, you can use user.boostPoints() directly in your Damage Formula. For example: (a.atk * 4 - b.def * 2) * (1 + (X * 0.5)) where X is the points spent.
    Just wanna pick your guys' brains here. I wanna have a boss in my game apply a bleed to an actor every time he hits them with a physical attack. I want this bleed to be able to be stacked 5 times and when at 5 stacks the boss will hit them with a much harder hit. I might be over thinking this but I've been trying to reverse engineer the Tips and Tricks Combo Attack to add a stacking bleed on an enemy but I can't quite get it right. I think once it gets to 5 stacks I could then just use a:
    Code:
    <JS Skill Enable>
    if (user.isStateAffected(X)) {
        enabled = true;
    } else {
        enabled = false;
    }
    </JS Skill Enable>

    To enable the skill at 5 stacks. Any ideas on this or am I over thinking it?
  17. @ZimXero That one would have been trivial to solve even without AI. That post you quoted is just from a time before I started using the console (where you could have seen the property/method name in 5 seconds). And not using the console is kind of an absurdly hard way of doing things.

    @jimmyshmo You're checking if the user (the enemy?) has a state. And I'm not sure if that skill enable works for enemies. And even if it does, you need to give/change the target with JS Targets so the enemy doesn't attack just anyone. So it'd be easier to use VS Battle AI.
    But if that JS enable works and if you've made the stacking state according to instructions that you should find in many threads here, you'd have a property on the actors like ._bleedStack
    Then you'd check something like:
    enabled = $gameParty.battleMembers().some(member => member._bleedStack >= 5);
    And you'd need to have that skill on with highest priority and then use the JS targets notetag to set the target with find the member with that stack value.

    Since it's also just for this boss, you can also put conditionals in skill action sequences that alter what the boss does.
  18. Hi :)
    Can someone help me up a little, and maybe pinpoint me to where the interference with skills' HP cost color may occur?

    1780837093619.png

    HP parameter from the Skills&StatesCore
    1780837128173.png


    EDIT:
    I found the culprit. Under the Skill Cost Types → HP → JS: Cost Text
    JavaScript:
    // Text: Add Color
    if (color.match(/#(.*)/i) && Imported.VisuMZ_1_MessageCore) {
        text += '\\HexColor<#%1>'.format(String(RegExp.$1));
    } else {
        text += '\\C[%1]'.format(color);
    }

    the line '\\HexColor<#%1>' was missing the #.