The official VisuStella notetag help thread

● ARCHIVED · READ-ONLY
Started by Trihan 1458 posts Page 72 of 73 View original ↗
  1. DBrys23 said:
    Hello, is it possible to use the notetags to have a skill disappear and/or prevent it from being used again once its used
    Yes
  2. There's multiple ways to do it (I suppose you meant once per battle). You can use their 'Limited Skill Uses' plugin or you can attach a custom property / state to the actor when the skill is used and check for that with <JS Skill Visible> / <JS Skill Enable>

    For example you can make an empty state with no icon that gets removed at battle end and which has notetags <No Death Clear> <No Recover All Clear>

    You can add the state on the user at the start of the skill damage formula or with like <JS Post-End Action> and then put on your skill notetag:
    <JS Skill Visible>
    visible = !user.isStateAffected(id);
    </JS Skill Visible>
  3. Back once more.
    So I wish to implement an idea where either an actor or enemy would have a passive state that can be toggled on and off.
    Seems simple enough, using the VisuStella Skills and States Core. However, there are some caveats that I am running into

    For actors:
    You cannot make a toggle skill work unless it is LEARNED by the actor and not given.
    For example: I wish to make a toggle skill that gives the "Ranged Weapon" state called "Swap Ranged."
    I only want this skill to be used when someone has a ranged weapon equipped. So, I make all ranged weapons grant this skill through the traits.
    Except, as it turns out, you can't do this (it is even explained in the description of the plugin you can't do this). Which is very frustrating.

    For enemies:
    You cannot even use toggle skills on enemies. They can only ever have passive states that are on permanently.
    For example: The player has a skill called "Reel" that removes states like "Ranged Weapon" and applies the state "Pulled Forward."
    However, there is no way to individually toggle an enemy passive state off. I can make it so a passive state is turned off with a switch, however this shuts off that passive state for ALL USERS, ENEMY OR ACTOR.

    For both of these, I could just make a skill act as a toggle by giving the state a duration of 999 turns, however out of combat for actors the turn timer still ticks down every 20 steps, which means it'll eventually run out and the player will have to, annoyingly, re apply it.
    For enemies, this is less of an issue. Combat would never reach the 999 turn count, so you can easily make it through switches in combat events to have that state turned off and on if needed, like with the aforementioned example using the "Pulled Forward" state.

    Is there any way to simplify this using another plugin, VisuStella or otherwise?
  4. Tinteebo said:
    You cannot make a toggle skill work unless it is LEARNED by the actor and not given.
    For example: I wish to make a toggle skill that gives the "Ranged Weapon" state called "Swap Ranged."
    I only want this skill to be used when someone has a ranged weapon equipped. So, I make all ranged weapons grant this skill through the traits.
    the website does say that the passive state tag applies to weapons, so you could give the weapons the passive state via the notetag directly - not through an added skill. you can still give the weapons a skill describing the passive effect so that theres a visible description somewhere, but the skill will not be doing anything other than indicating what it is.
    1766612599920.png

    Tinteebo said:
    For enemies:
    You cannot even use toggle skills on enemies. They can only ever have passive states that are on permanently.
    For example: The player has a skill called "Reel" that removes states like "Ranged Weapon" and applies the state "Pulled Forward."
    However, there is no way to individually toggle an enemy passive state off. I can make it so a passive state is turned off with a switch, however this shuts off that passive state for ALL USERS, ENEMY OR ACTOR.
    you can make the passive's condition be for the user to not have the reeled in state. or write a property into the enemy battler and check for it in the state condition
    1766612776298.png


    edit: realized toggles are a different kind of mechanic than I had in mind. not entirely sure how to get around it just by reading the description and the issue you brought up, but i think visustella has an implementation for instant actions that you could use to do the same idea of the enemy bit. manipulating some property on the battler to determine the state condition
  5. Robro33 said:
    you can make the passive's condition be for the user to not have the reeled in state. or write a property into the enemy battler and check for it in the state condition
    View attachment 355937
    Could you provide an example on how to do this? I have a room temperature IQ.

    EDIT: Nevermind, I got something that works.

    Code:
    <JS Passive Condition>
    var var1 = true;
    if (user.states().includes($dataStates[104]) == true) {
        var1 = false
    };
    condition = var1
    </JS Passive Condition>
  6. If you want to use the skill toggle functionality for actors and the skill needs to be learned, can't you make it so that they all know the skill, but you use the <JS Skill Visible> notetag to only show it if the actor has a ranged weapon equipped (and is in battle if you want), or whatever the requirement is.

    If you just want to control the passive state for enemies or actors, I think put it in the condition notetag, like (use whatever number id):

    <JS Passive Condition>
    condition = user._skill12Toggle;
    </JS Passive Condition>

    Then you can put into notetags or wherever that:
    target._skill12Toggle = true;
    target._skill12Toggle = false;
    (or target enemy 1 for example $gameTroop.members()[0]._skill12Toggle = true)

    EDIT: that _skill12Toggle property doesn't have to do with the VS skill toggle functionality
  7. rpgLord69 said:
    If you want to use the skill toggle functionality for actors and the skill needs to be learned, can't you make it so that they all know the skill, but you use the <JS Skill Visible> notetag to only show it if the actor has a ranged weapon equipped (and is in battle if you want), or whatever the requirement is.

    If you just want to control the passive state for enemies or actors, I think put it in the condition notetag, like (use whatever number id):

    <JS Passive Condition>
    condition = user._skill12Toggle;
    </JS Passive Condition>

    Then you can put into notetags or wherever that:
    target._skill12Toggle = true;
    target._skill12Toggle = false;
    (or target enemy 1 for example $gameTroop.members()[0]._skill12Toggle = true)

    EDIT: that _skill12Toggle property doesn't have to do with the VS skill toggle functionality
    I'm not really sure what to do with this.
    I tried the skill toggle for the passive condition and then tried to use Force Action in a battle event to toggle the skill but it doesn't work.
    I've tried a few other things, like making the toggle skill forced on the player side, but nada.
    I'm not sure there's a good way to make an enemy have a passive state that can be disabled mid combat unless it's through another state disabling it with the JS Passive Condition notetag, but that still has the issue where the state disabling it would still be a temporary one even if I max the duration to 999 turns. Though I think I'll just have to use that method since nothing else seems to work.
  8. What do you mean "what to do with this"? I suggested that you can try and control the visibility of known skills with notetags.

    If you want to use the skill toggle functionality and use scripts to set the skill toggles, I think it was (change actor id and skill id and choose either true or false):
    $gameActors.actor(1).setSkillToggle($dataSkills[id], true);
    $gameActors.actor(1).setSkillToggle($dataSkills[id], false);

    If it's just about passive state conditions, I already showed above how to do it (though I confusingly named the property skillToggle, even though a better name would be just passiveXOn or whatever).
  9. rpgLord69 said:
    What do you mean "what to do with this"? I suggested that you can try and control the visibility of known skills with notetags.
    Apologies, I think I'm misunderstanding something with your previous post and this one as well.
    The visibility wasn't where I was getting hung up on the notetags, rather it was specifically being able to make a workaround for the skill toggle (since the VisuStella wiki specifically states that enemies cannot use skill toggles to turn a passive state on and off).

    If you just want to control the passive state for enemies or actors, I think put it in the condition notetag, like (use whatever number id):

    <JS Passive Condition>
    condition = user._skill12Toggle;
    </JS Passive Condition>

    Then you can put into notetags or wherever that:
    target._skill12Toggle = true;
    target._skill12Toggle = false;
    (or target enemy 1 for example $gameTroop.members()[0]._skill12Toggle = true)

    EDIT: that _skill12Toggle property doesn't have to do with the VS skill toggle functionality

    This was the part I didn't know what to do with it. I think I understand what the concept here is, but I didn't know how to apply it. I tried just directly copying it and editing to fit my game but couldn't get it to work.
    Again, my issue was making this work for enemy battlers, which by default isn't technically supported by the VisuStella Skills and States plugin for enemy based toggled passive states. I'm trying to figure out a workaround or possibly even find another plugin that will work.
  10. In your first post you talked about multiple things. That visibility part was a suggestion how to get around the actors having to have learned the skill to toggle.

    Where and how exactly do you want to control the enemy passive states?
  11. rpgLord69 said:
    In your first post you talked about multiple things. That visibility part was a suggestion how to get around the actors having to have learned the skill to toggle.

    Where and how exactly do you want to control the enemy passive states?
    Yeah, that's my bad. Robro's suggestion worked for the visibility part so I no longer needed help on that. And the idea I had in mind for using toggled enemy passive states was changed but I forgot to explain that further. That's on me, sorry.

    To clarify further:
    What I'd like to do is have the enemy have some kind of state that persists all combat (like a passive state). However, once certain conditions are met that passive state is removed.

    The example I used in my first post was as followed:
    For example: The player has a skill called "Reel" that removes states like "Ranged Weapon" and applies the state "Pulled Forward."
    However, I'd like to take it a step further now, since I figured out how to accomplish the above example with the JS Passive Condition notetag.

    I'd like to shut off that passive state for the rest of combat for the specific enemy once a certain condition is met. For example:
    The enemy has the "Ranged" passive state. They're hiding behind a melee based enemy. If the player kills the melee enemy first, the "Ranged" state on the other enemy is removed for the rest of combat.

    The simple way to accomplish this is to just make a different state that has a duration of 999 turns and apply it when the other enemy dies. Then use the JS Passive Condition notetag to shut off the passive state. It's a cheap, dirty fix but it would work and realistically no one will be in a single combat encounter for 999 turns anyways.
    I was just wondering if there's a better way to accomplish this or a workaround for skill toggles not working on enemies.
  12. Tinteebo said:
    The simple way to accomplish this is to just make a different state that has a duration of 999 turns and apply it when the other enemy dies. Then use the JS Passive Condition notetag to shut off the passive state. It's a cheap, dirty fix but it would work and realistically no one will be in a single combat encounter for 999 turns anyways.
    I was just wondering if there's a better way to accomplish this or a workaround for skill toggles not working on enemies.
    depending on what exactly constitutes "an enemy hiding behind a melee enemy", it should be possible to put that inside the passive condition. but its also possible to instead of giving the enemy that state with the troop event, use a script call to write a property directly onto the enemy that the passive checks for.

    Code:
    <JS Passive Condition>
    condition = !user._isRangedBlocked;
    </JS Passive Condition>
    
    ---troop event script---
    $gameTroop.members()[x]._isRangedBlocked = true;
    replace the x for the index of that enemy, but keep in mind that in script the list starts at 0, not 1. if the editor says its enemy 3, it'd be 2 in the script.
  13. Robro33 said:
    depending on what exactly constitutes "an enemy hiding behind a melee enemy", it should be possible to put that inside the passive condition. but its also possible to instead of giving the enemy that state with the troop event, use a script call to write a property directly onto the enemy that the passive checks for.

    Code:
    <JS Passive Condition>
    condition = !user._isRangedBlocked;
    </JS Passive Condition>
    
    ---troop event script---
    $gameTroop.members()[x]._isRangedBlocked = true;
    replace the x for the index of that enemy, but keep in mind that in script the list starts at 0, not 1. if the editor says its enemy 3, it'd be 2 in the script.
    I see. Testing it seems to work as intended. Thanks for the help.
    Also sorry again to RPGLord for me being obtuse, my brain's been a bit foggy due to winter sickness.
  14. I'm back once more. This time a more simple question.

    The VisuStella plugin 'Main Menu Core' (I think it's this plugin adding this feature) expands on the "Options" menu, adding several QoL things including a keybind reassignment menu.

    I'd like to know if there's a javascript command to directly access that menu. I know you can open the "Options" menu using:
    Code:
    SceneManager.push(Scene_Options);
    but I figured I'd check if anyone here knows how to jump straight to the keybind menu, just to make it less confusing on the player when first starting the game. They'll be given a prompt to change keybinds if they want, but they might not find it if they just go straight to the "Options" menu alone.

    EDIT: I was wrong, it's the "Options Core" plugin that adds this, whoops.
    EDIT2: Of course I found it after posting about it despite looking all day...
    For those curious, you can access the keybind menu for either controller or mouse+keyboard with:
    Code:
    SceneManager.push(Scene_RebindGamepad);
    SceneManager.push(Scene_RebindKeyboard);
  15. Hey there! I have a question! I was looking through the Yanfly's Tips and Tricks for MZ post and I was wondering... Given that there's a Greed state that redirects item use and forces it on characters other than the user, is there a script to make a state where trying to use buffing/healing skills are forced into an enemy? It would be hella cool if it could also make it so you also attack your allies!
  16. I don't think you can copy greed as is, because you want to switch the unit the targetIndex is used on. So you'd have to mod a method or at least temporarily change a property, but unless you have a hundred skills, you could also just use the JS targets notetag for the skills.

    <JS Targets>
    if (user.isStateAffected(X)) {
    const side = user.opponentsUnit().aliveMembers();
    targets = [side[Math.randomInt(side.length)]];
    }
    </JS Targets>
  17. Ooh, that's one way to go about it! Thanks!

    EDIT: I suppose that for like Charm states, you'll need a proper plug-in for it right? It'd be outside the scope of VS?
  18. Hey guys, another quick one hopefully. I am using the Skill Shop plugin and I want to affect an Actors parameters on "Skill Learn". Trying with this:
    Code:
    <Learn Cost Eval>
      user.addParam(0, 10); // Increases Max HP (0) by 10 permanently
      user.addParam(2, 5);  // Increases ATK (2) by 5 permanently
    </Learn Cost Eval>

    but it doesn't seem to be working, my guess is because of the skill shop. Also tried this version:

    Code:
    <JS Skill Learn>
      // Increase attack by 5 when this skill is learned
      user.addParam(2, 5);
    </JS Skill Learn>

    But again doesnt seem to affect my characters Parameters. Any ideas?

    I could apply passive states but I want my players to be able to upgrade their characters how they want and I dont want to stack that many passives, it feels.... like it'll just cause me trouble later having a character with 25 passives in affect.
  19. @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>