The official VisuStella notetag help thread

● ARCHIVED · READ-ONLY
Started by Trihan 1458 posts Page 16 of 73 View original ↗
  1. Ys42 said:
    On a skill, you can make said skill add a state to the affected unit via notetag, so, is there a way for said state to be affected by enemy state resist.
    It should. Changed my Archer char to have added effects for when she uses a bow skill w/ the Hidden state.
    So if an enemy resists Slow or Stun, It will respect those state resists.
  2. Oh, yeah. If you're doing it via a post-damage notetag or whatever, you can add in an if statement which checks the enemy's state resist before calling addState.
  3. Actually what would be the conversion for Thornmail from MV tips and tricks?
    I'm having trouble trying to learn this one. Along with a Heighten Magic.
    Though Highten Magic might be easier.

    Thornmail
    <Custom React Effect>
    // Check to see if any physical damage is dealt.
    if (value > 0 && this.isPhysical()) {
    // Sets the Recoil Rate to 15%.
    var rate = 0.15;
    // Determines the amount of recoil damage dealt.
    var recoil = value * rate;
    // Sets the DEF bonus rate to 25%.
    var rate = 0.25;
    // Determines the amount of bonus damage dealt.
    var bonus = target.def * rate;
    // Rounds up the bonus damage and recoil damage.
    var dmg = Math.ceil(bonus + recoil);
    // Makes the attacker lose damage equal to the dmg variable.
    user.gainHp(-1 * dmg);
    // Check to see if the attacker is dead.
    if (user.isDead()) {
    // If the attacker is dead, make it collapse.
    user.performCollapse();
    }
    }
    </Custom React Effect>


    Heighten Magic
    <Custom Confirm Effect>
    if (this.isMagical() && value !== 0) {
    value = Math.ceil(value * 1.50);
    }
    </Custom Confirm Effect>
  4. Visustella, thank you so much for allowing breathing animations for the heroes as well. Super cool and a most welcome feature.
  5. Cyberhawk said:
    Actually what would be the conversion for Thornmail from MV tips and tricks?
    I'm having trouble trying to learn this one. Along with a Heighten Magic.
    Though Highten Magic might be easier.

    Thornmail
    <Custom React Effect>
    // Check to see if any physical damage is dealt.
    if (value > 0 && this.isPhysical()) {
    // Sets the Recoil Rate to 15%.
    var rate = 0.15;
    // Determines the amount of recoil damage dealt.
    var recoil = value * rate;
    // Sets the DEF bonus rate to 25%.
    var rate = 0.25;
    // Determines the amount of bonus damage dealt.
    var bonus = target.def * rate;
    // Rounds up the bonus damage and recoil damage.
    var dmg = Math.ceil(bonus + recoil);
    // Makes the attacker lose damage equal to the dmg variable.
    user.gainHp(-1 * dmg);
    // Check to see if the attacker is dead.
    if (user.isDead()) {
    // If the attacker is dead, make it collapse.
    user.performCollapse();
    }
    }
    </Custom React Effect>


    Heighten Magic
    <Custom Confirm Effect>
    if (this.isMagical() && value !== 0) {
    value = Math.ceil(value * 1.50);
    }
    </Custom Confirm Effect>
    Thornmail (note that you can put this notetag directly on the armour, you don't need a passive state any more):

    JavaScript:
    <JS Post-Damage As Target>
      if (value > 0 && this.isPhysical()) {
        const rate = 0.1;
        const recoil = value * rate;
        const defRate = 0.25;
        const bonus = target.def * defRate;
        const damage = Math.ceil(bonus + recoil);
        user.gainHp(-damage);
        if (user.isDead()) {
          user.performCollapse();
        }
      }
    </JS Post-Damage As Target>

    Heighten Magic:

    JavaScript:
    <JS Pre-Damage As User>
      if (this.isMagical() && value !== 0) {
        value = Math.ceil(value * 1.5);
      }
    </JS Pre-Damage As User>
  6. Good afternoon. Back in MV's Tips and Tricks, there was a video on how to let enemies steal items from the party. Can that be done with VisuStella MZ?
  7. Question, for Battle Core Plugin:
    Action Sequence plugin command VisuMZ_1_BattleCore, MECH: Multipliers
    My understanding of Rate vs. Flat seem to not work out and I've been trying to find a search on the topic.
    Example for damage:

    (Rate, default at 1.00, if I set it to 1.50 before the action effect, the hit will deal 1.5 times the damage)
    (Flat, default at +0.00, if I set it to +0.50 before the action effect, I expect the hit to do 1.5 damage as well but it doesn't)

    I guess I'm just confused on the difference of Rate vs. Flat for the multipliers. I prefer using Flat because it works additively and can stack with other multipliers that I have planned where as rate just gets set to a set value.

    I've verified in game with no variance applied that Flat does not work like I thought it did and was wondering if anyone knew how it worked?
    Thanks!

    EDIT: Ok so I tested the Rate vs Flat for Crit %, Crit damage, Damage, and Hit % in battle. The Crit % and hit % rate apply a multiplier to your current crit % and hit % where as Flat adds % to your current crit % and hit %. So Flat +0.05 for crit/hit % adds 5% crit/hit chance which is great!
    The same does not apply to crit damage and damage though. Rate works as expected but Flat is literally just like it sounds. +0.50 adds 0.5 damage to the end of the calculation. It does say in the plugin command notes that you can use JS code for any of the multipliers and now I'm trying to find a way to make:
    Damage/Crit Damage Flat add a percentage of the overall damage at the end of the damage calculation instead of just a Flat number.
  8. WilsonE7 said:
    Good afternoon. Back in MV's Tips and Tricks, there was a video on how to let enemies steal items from the party. Can that be done with VisuStella MZ?
    It sure can!

    JavaScript:
    <JS Post-Apply>
      if (user.isEnemy()) {
        const successRate = 0.5;
        if (Math.random() < successRate) {
          let items = [];
          const total = $gameParty.items().length;
          for (let i = 0; i < total; ++i) {
            const item = $gameParty.items()[i];
            if (item.itypeId !== 2) {
              items.push(item);
            }
          }
          if (items.length > 0) {
            const random = Math.randomInt(items.length);
            const item = items[random];
            $gameParty.loseItem(item, 1);
            var text = user.name() + ' stole ' + item.name + ' from the party!';
            SoundManager.playEquip();
          }
        } else {
          var text = user.name() + ' failed to steal an item!';
          SoundManager.playBuzzer();
        }
        const window = SceneManager._scene._logWindow;
        if (text) {
          window.addStealText(text + '<CENTER>');
        }
      }
    </JS Post-Apply>

    @Novam4a1 I think the documentation might have been a mispaste; rate is percentage, flat is just a flat value. I *think* for things like crit chance, rate adds a percentage of the current while flat adds an actual percentage.
  9. I was wondering if you can replicate toxic effect from MV tips and tricks if you know the poison status worsen every turn unless cured. I don't know if that code would work in MZ because there is JS slip damage but i'm no javascript genius
  10. Jrrkein said:
    I was wondering if you can replicate toxic effect from MV tips and tricks if you know the poison status worsen every turn unless cured. I don't know if that code would work in MZ because there is JS slip damage but i'm no javascript genius
    JavaScript:
    <JS On Add State>
      this._toxicCounter = 1;
    </JS On Add State>
    <JS Pre-Regenerate>
      const n = this._toxicCounter / 16;
      const value = Math.floor(n * target.mhp);
      this._toxicCounter++;
      target.gainHp(-value);
    </JS Pre-Regenerate>
  11. Thanks man that worked :hswt:
  12. Trihan said:
    @Novam4a1 I think the documentation might have been a mispaste; rate is percentage, flat is just a flat value. I *think* for things like crit chance, rate adds a percentage of the current while flat adds an actual percentage.
    Thanks Trihan. That’s what I’ve found too. I think probably the easiest way for me to get what I need is to do states and plug them in action sequences. Thanks for the help!
  13. Hello, is there a way to use allow a skill to only target an enemy with a certain state?
  14. Austrian said:
    Alright thanks, I'll give it a shot!
    With that plugin, try this notetag in the skill and see if it works for you:

    <target filter: return target.isStateAffected(putyour state id here);>

    then see if your skill will not only let you target an enemy with that state ID
  15. Novam4a1 said:
    With that plugin, try this notetag in the skill and see if it works for you:

    <target filter: return target.isStateAffected(putyour state id here);>

    then see if your skill will not only let you target an enemy with that state ID
    Trying it out, but the skill is un-selectable even if there's an enemy with the state ID in the field.

    Edit: I forgot, .isStateAffected(x) doesn't work for passive states. Forgot I had to use target.states().includes($dataStates[x]) instead. So the skill now works as intended :). Thanks for the tip!
  16. Austrian said:
    Trying it out, but the skill is un-selectable even if there's an enemy with the state ID in the field.

    Edit: I forgot, .isStateAffected(x) doesn't work for passive states. Forgot I had to use target.states().includes($dataStates[x]) instead. So the skill now works as intended :). Thanks for the tip!
    Awesome! Glad it worked out!
  17. Hello, I want to create a state that adds Actor01's ATK number to his MAT number in RMMZ.
    This is the VisuStella CoreEngine notetag I'm using but when the state is applied, it displays "NaN" for the MAT stat.

    <JS MAT Flat: +$gameActors.actor(01).param[2]>

    EDIT: solved using

    <JS MAT Flat: +($gameActors.actor(01).atk)>
  18. Hi, i see you can level cap from notetags using <Max Level: x>
    But there any form, that you can levelcap from an event or scriptcall?

    My character max level is 10, but i want add you can levelcap from 10 to 15 after an event.