The official VisuStella notetag help thread

● ARCHIVED · READ-ONLY
Started by Trihan 1458 posts Page 29 of 73 View original ↗
  1. Austrian said:
    I am trying to let a random variable determine if the hit is successful or not.
    So as far as I can tell from the documentation, that's the wrong tag. The VisuStella documentation is a bit less clear than the original Yanfly Skill Core, but presuming they're equivalent, Pre-Damage happens before damage is dealt (so you can modify it), but after hitting is determined.

    The earliest notetag that includes a "target" option is Pre-Apply, so try moving your code into that.
    YoItsChris said:
    Hello, I have been trying to implement the giant slayer from the yep tips and tricks, but to no avail. Does anyone know how to?
    I think you're in the wrong thread - this is for the VisuStella plugins for MZ.

    If you're using Yanfly's plugins in MV, the tips and tricks should work via copy-and-paste if all of your plugins are set up correctly. If this is what you're doing and it doesn't work, you should start a new thread in Plugin Support and give screenshots of your skill and plugin manager.

    If you're using VisuStella and MZ and trying to convert the Giant Slayer, please show the work that you have done to convert it, and give any details about what doesn't work.
  2. Didn't think to try pre-apply but unfortunately, that didn't work either. It doesn't seem to check the last IF statement on whether the attack hit was a miss or not.
  3. I think he mentioned pre-damage, not pre-apply.. as they are two different things. Not to mention pre-damage, pre-damageas user, pre-damage as target.
  4. Austrian said:
    Didn't think to try pre-apply but unfortunately, that didn't work either. It doesn't seem to check the last IF statement on whether the attack hit was a miss or not.
    Not sure...you might just want to start doing a console.log() of the various numbers in play, in the different sections, see what everything is and what's getting looked at by the code.

    I am curious about the whole chunk of your code leading up to the if conditional:
    Code:
    //Roll the dices & add strMod
    let die = Math.floor((Math.random() * 20) + 1);
    die += str;
    
    //Set the hitDie
    $gameVariables.setValue(122, die);
    
    //if attack miss
    if(target.mp > $gameVariables.value(122))

    you declare a local variable, then you stick it into one of the game's globals, why? Do you actually use that "die roll" value outside of this skill with the game variable?

    Couldn't all that just be
    Code:
    if(target.mp > Math.floor((Math.random()*20)+1)+str)
        target.result().missed = true;
    ?
  5. I do use die roll outside of skill.

    Originally, I was using the common events action sequences and use the variables in there to determine the hit and damage. But thought about converting it all into the skill notes tab. I was trying to figure out how to get rid of the miss + damage occurring. Seems to occur in both methods. Everything works fine, the dmg is calculated correctly, even if the target has resistance.

    I've even did target.result().critical = true, that works perfectly as well. But when I do target.result().missed = true; the miss function works but the target is still getting hit. I am not sure why. When I try something similar without battle core and adjust some of the implementations, the target.result().missed = true, causes the user to miss their attack even if the skill is set to certain hit.

    I could use that method in your last line of code but I like to use the debugger to check the numbers. To make sure things are working, though I should probably take a look at the console more.
  6. OK, now this is in a state where it makes sense to ask for help.

    I have this state that gets removed if the recipient is either the target or the user of a skill with a certain element. However, this does not take into account elements inherited from traits nor (with Visustella Elements) multi-element skills. How should I change this if condition to see if a skill contains a given element?

    <JS Post-Damage as Target>
    if (this.item().damage.elementId == 2)
    {b.removeState(34);}
    </JS Post-Damage as Target>

    <JS Post-Apply as User>
    if (this.item().damage.elementId == 2)
    {a.removeState(34);}
    </JS Post-Apply as User>

    Back on MV it seems like it was getItemElements().contains(x) (in place of this.item().damage.elementID == x) but I don't know how it's like on Visustella MZ. Is there any documentation / resource where we can read up on this? I don't like asking for help, but I also can't find really find reference =(
  7. So, I'm wondering, for notetags that point towards a specific resource, have they been updated to support the new subfolder functionality of RPG maker mz? (Like the "animated item drop")
  8. Perhaps You are asking what supports sub folders?
    Some plugins will point to img folder for example, to use notetags for sub folders, just include them.
    If you had a sub folder called trees inside img folder... and the file pine.png
    trees/pine.png

    think this is what you're asking?
  9. It
    NaosoX said:
    Perhaps You are asking what supports sub folders?
    Some plugins will point to img folder for example, to use notetags for sub folders, just include them.
    If you had a sub folder called trees inside img folder... and the file pine.png
    trees/pine.png

    think this is what you're asking?
    Is, thank you. I was just wondering if Visustella Notetags and plugins allowed for subfolders when pointing to resources
  10. I'd like to recreate the flat damage barrier effect in MZ but this is not working


    <JS Pre-Damage>

    target.loseBarrier(300)

    </JS Pre-Damage>

    Does anyone knows how to do it? Thanks
  11. Krawzer_KOF said:
    I'd like to recreate the flat damage barrier effect in MZ but this is not working


    <JS Pre-Damage>

    target.loseBarrier(300)

    </JS Pre-Damage>

    Does anyone knows how to do it? Thanks
    Barriers in the VisuStella suite use the Anti Damage Barriers plugin (so make sure you have that) and barriers are added via states. Check the plugin documentation for an explanation on setup.
  12. I have the plugin but nowhere in the documentation do they include a way to reduce the target barrier points. I want a skill to only do damage to barrier, not to HP
  13. Krawzer_KOF said:
    I have the plugin but nowhere in the documentation do they include a way to reduce the target barrier points. I want a skill to only do damage to barrier, not to HP
    That's handled automatically. Damage will always apply to a barrier first until it's depleted and only then will it damage HP.
  14. Trihan said:
    That's handled automatically. Damage will always apply to a barrier first until it's depleted and only then will it damage HP.
    I know. What I want is another sort of damage like Shield damage that is not affected by the skill formula. For example, flat 300 damage to barrier and normal damage of 100
  15. Krawzer_KOF said:
    I know. What I want is another sort of damage like Shield damage that is not affected by the skill formula. For example, flat 300 damage to barrier and normal damage of 100
    Ah, okay. Then you want to use

    JavaScript:
    const barrier = target.getStateDisplay(stateid);
    target.setStateDisplay(stateid, barrier - 300);
  16. I used in my skills
    <JS Pre-Damage>

    const barrier = target.getStateDisplay(195);

    target.setStateDisplay(195, barrier - 300);

    </JS Pre-Damage>

    (195 is the barrier state of the enemy)
    and then


    <JS Pre-Damage>

    const barrier = target.getStateDisplay(stateid);
    target.setStateDisplay(stateid, barrier - 300);

    </JS Pre-Damage>

    But none of them work
  17. Krawzer_KOF said:
    I used in my skills
    <JS Pre-Damage>

    const barrier = target.getStateDisplay(195);

    target.setStateDisplay(195, barrier - 300);

    </JS Pre-Damage>

    (195 is the barrier state of the enemy)
    and then


    <JS Pre-Damage>

    const barrier = target.getStateDisplay(stateid);
    target.setStateDisplay(stateid, barrier - 300);

    </JS Pre-Damage>

    But none of them work
    Try this.

    JavaScript:
    <JS Pre-Damage>
      const barrier = target.getStateDisplay(195) - 300;
      if (barrier > 0) target.setStateDisplay(195, barrier); else target.removeState(195);
    </JS Pre-Damage>
  18. It works! Thank you! Btw is there a way to add a pop up to show the damage to the barrier?