The official VisuStella notetag help thread

● ARCHIVED · READ-ONLY
Started by Trihan 1458 posts Page 52 of 73 View original ↗
  1. CrocPirate said:
    For your 1st question, I haven't tested it but...
    Thank you very much, that plus Att_Turan's edits worked perfectly. Thank you again.

    I am still trying to figure out how to do damage without using the damage formula box? Currently trying for simple damage using the below code, just to see if it can work. If i was to get it to work I can make the damage more interactive

    <JS Pre-Damage>
    const damage = 22;
    target.gainHp(-damage);
    </JS Pre-Damage>

    My final goal is to get something like the old Arcane Blast from Word of Warcraft where the move increases in power and resource cost with each consecutive use... i was thinking using a stacking counter like yall suggested in my earlier post

    <JS On Add State>
    target._pain ??= 0;
    target._pain++;
    </JS On Add State>

    <JS On Erase State>
    delete target._pain;
    </JS On Erase State>

    <JS Pre-Regenerate>
    target._pain ??= 0;
    const stacks = Math.min(3, target._pain);
    const damage = stacks * 100;
    $gameTemp.requestAnimation([target], 59);
    target.gainHp(-damage);
    </JS Pre-Regenerate>

    That is not the suggested code for the Arcane Blast, just an example of the stacks I was thinking of trying to use
  2. For - VS Movement Effects plugin
    Considering - Smart Rush
    So for Smart Rush events there has been a lot of issue where it goes through a player touch event and then as it doesn't stop exactly on the player touch, that becomes a issue if I have set movement command in that player touch for cut scenes , etc.
    As those maps also have puzzles such as spikes coming from ground, the spike rush manages to go beyond them but also triggers them.
    Unlike Smart Blink and Smart Jump, the Rush one doesnt has a option to restrict regions.
    Is there a way to stop the Smart Rush exactly where-ever there is a Player Touch/Event Touch Event?
    I have a lot of cutscenes, it will be extremely hard and also I have to include a feature to increase your Smart Jump level,Kindly Help!! Thank you in advance!!
  3. Morning All,

    I am looking to add text to the bottom bar here

    image.png

    But only for specific windows. ANyone know how?
  4. Is it possible to add an item cost to learn a skill using the Skill Shop plugin, or is that plugin limited to gold only?
  5. I have a question for the MZ Crafting plugin.

    Is there a way to make the Crafting Item Icon smaller?
    The Icon for the item you want to craft is always super big compared to the ingriedient items icons.
  6. Good evening,

    I am trying to have a skill deal damage based on the number of stacks on the target(s).

    here is the State's code: state ID 84

    <JS On Add State>
    target._wfire ??= 0;
    target._wfire++;
    </JS On Add State>

    <JS On Erase State>
    delete target._wfire;
    </JS On Erase State>

    <JS Pre-Regenerate>
    target._wfire ??= 0;
    const stacks = Math.min(4, target._wfire);
    const damage = stacks * 22;
    $gameTemp.requestAnimation([target], 59);
    target.gainHp(-damage);
    </JS Pre-Regenerate>

    With repeated casts, this successfully stacks up to 4(for testing purposes) and deals 22 damage per stack.

    I want a skill that will deal a 1 time damage to the target( or targets if AoE) equal to 111 * #stacks then remove the state.

    Any help is much appreciated.

    The following are two skills I have tried already and failed to get to work.:


    <Custom Apply Effect>
    b._wfire = b._wfire || 0;
    value = 111 * b._wfire;
    </Custom Apply Effect>

    and

    <JS Pre-Damage>
    var addDamage = 0;
    let states = target._wfire();
    while (states.length > 0) {
    const state = states.shift();
    value = ((111) * (addDamage + 1));
    </JS Pre-Damage>
  7. AndreaMZ said:
    <JS Pre-Regenerate>
    target._wfire ??= 0;
    This is superfluous. There's no way the state could be on in the Pre-Regenerate phase without having been applied, which means your code from the On Add has made the _wfire property.

    AndreaMZ said:
    I want a skill that will deal a 1 time damage to the target( or targets if AoE) equal to 111 * #stacks then remove the state.
    ...
    The following are two skills I have tried already and failed to get to work.:
    This code is all very strange. You talk about doing damage from a skill, then you're using a notetag that is
    A - for a state
    B - from a completely different plugin than you could be using (an MV plugin)

    Then this:
    AndreaMZ said:
    let states = target._wfire();
    makes no sense as _wfire is neither a function nor anything to do with any states.

    Did you write this code? This looks like the kind of jumble you get out of an AI.
  8. awww Xmas magus cute
  9. ATT_Turan said:
    This is superfluous. There's no way the state could be on in the Pre-Regenerate phase without having been applied, which means your code from the On Add has made the _wfire property.
    Good evening,

    I am quite new to the code and design. I try to do a little here and there for just a couple hours a week if I am lucky. I understand very little of what I am using. A lot of it is trial and error on small things that originated from code on this forum. This trial and error ain't working for me so here I am.

    The code for the state, the first part of my post, is copied from Trihan's "how to implement Yanfly tips":

    How to implement every possible Yanfly Tips & Tricks effect in MZ with VisuStella plugins
    The stacking Damage over Times tip. I changed the _stackingPoison to _wfire (short for wildfire). That formula works as i wanted, even if parts may be redundant or useless. I have used it for two other states. And I am frankly scared to change too much so that it keeps working. I only understand bits and pieces of the code, not every line.

    As for the other two, I had very low expectations going into them. I got them from another forum just to try and couldn't get them to work. I don't use AI, but if the forums I got them from did, idk.

    My state is applied to the target and will stack on subsequent applications, also resetting the turn count on it. Now I am looking for a skill that will deal damage to the target based on the number of stacks of the particular state(number of wildfire stacks). Kinda like the Affliction Warlock from WoW but instead of damage per state, its damage per stack of one state.

    Any help on the skill is appreciated. :)
  10. Trying to set something up and I'm a little unsure of whether or not this is possible through Battle Core (presumably using the <JS Target> notetag) and, if so, how.


    Basically, I want some troops to have something like a 'flying' state, where they cannot be targeted by skills that have been designated as 'short range' skills/items. So, I need the ability to add a notetag to these skills which will prevent the player from choosing flying enemies as a target.


    I don't need to worry about enemy skills, skills targetting players, etc. Only player skills targeting enemy troops. It does need to make them untargetable, merely making these attacks miss is not sufficient.
  11. AndreaMZ said:
    As for the other two, I had very low expectations going into them. I got them from another forum just to try and couldn't get them to work. I don't use AI, but if the forums I got them from did, idk.
    Okay, fair enough :smile:

    For your state:
    Code:
    <JS On Add State>
    target._wfire ??= 0;
    target._wfire++;
    </JS On Add State>
    
    <JS On Erase State>
    delete target._wfire;
    </JS On Erase State>
    
    <JS Pre-Regenerate>
    $gameTemp.requestAnimation([target], 59);
    target.gainHp(Math.min(4, target._wfire) * -22);
    </JS Pre-Regenerate>

    Then I don't see why your skill would need any notetags. Just make it a part of the math in the damage formula. e.g.
    Code:
    111 * b._wfire

    Then you can put the regular Remove State in the skill's Effects and it will.

    oriongates said:
    Basically, I want some troops to have something like a 'flying' state, where they cannot be targeted by skills that have been designated as 'short range' skills/items.
    You give your short range skills the following notetag:
    Code:
    <JS Targets>
    targets = $gameTroop.aliveMembers().filter(enemy => !enemy.enemy().meta.flying);
    </JS Targets>

    That will make it only able to target enemies that do not have the notetag <flying>
  12. ATT_Turan said:
    You give your short range skills the following notetag:
    Code:
    <JS Targets>
    targets = $gameTroop.aliveMembers().filter(enemy => !enemy.enemy().meta.flying);
    </JS Targets>

    That will make it only able to target enemies that do not have the notetag <flying>

    Thanks so much.
    Would it be possible to make the <flying> notetag a part of a state? I was also looking to have the option for circumstances/skills to remove the flying attribute, so I was originally imagining it as a state (adding it to appropriate enemies at the start of combat and removing it when needed).

    Using the state number as a designation would work as well, whichever seems simplest.
  13. oriongates said:
    Would it be possible to make the <flying> notetag a part of a state?
    Just replace it with the script call that checks for a state.

    So enemy.enemy().meta.flying becomes enemy.isStateAffected(x)
  14. Excellent, thank's for the help
  15. Thank you very much. that was much simpler than I expected. The skill works perfectly. Cheers!
    ATT_Turan said:
    Okay, fair enough :smile:

    Then I don't see why your skill would need any notetags. Just make it a part of the math in the damage formula. e.g.
    111 * b._wfire
  16. ATT_Turan said:
    Just replace it with the script call that checks for a state.

    So enemy.enemy().meta.flying becomes enemy.isStateAffected(x)

    Hmm, so I didn't have a chance to test this out before today and I seem to be running into a problem.

    The flying state is currently state #40 and so I have this as the notetag

    <JS Targets>
    targets = $gameTroop.aliveMembers().filter(enemy => !enemy.isStateAffected(40));
    </JS Targets>

    So, I seem to be running into two issues...

    The skill I'm using to test it is single target and when used it does cause me to select one enemy. But the effect is applied to any enemy that doesn't have the specified state, effectively making it a multi-target skill.


    The other problem is that it doesn't actually restrict your ability to select an opponent with the state, it just makes it so that the skill has no effect on them. What I'm hoping to do is to prevent players from selecting "flying" enemies entirely (preventing them from wasting any time or resources trying to attack an opponent they can't hit).
  17. @oriongates I don't believe VisuStella has anything to control selection, only the end targets.

    But I'm trespassing in this thread, @Trihan or someone who actively uses the plugins may know better :stickytongue:
  18. If I remember correctly there was a sponsored update that added selection control to one of the plugins, but I'll have to look into it.
  19. Yeah, it's part of what's kind of confusing me, because there certainly are options that modify selection. Like, you can do things like designate a skill to affect all allies but the user. Or use the aggro control plugin to limit a character's selection options...but only to force targeting, not exclude it.
  20. I have an accessory which adds to the ordinary attack a chance to inflict state 65. It looks like this:
    Code:
    <JS Post-Damage as User>
    if (!target.isDead() && Math.random()<.4)
        target.addState(65);
    </JS Post-Damage as User>
    It works fine and does what I want.

    However, I have discovered that it does more than I want.
    At the moment it is equipped to Actor 4, but it could be anyone. Actor 4 has a self-heal skill. Its setup is bog standard, but I include it here in case it's needed.
    1703317097161.png

    I have just noticed that using this skill she can inflict herself with state 65. I don't understand how something that is designated to add a state via Attack can do it with a heal skill, but if that's the way things work, I need to amend the notetag so as to exclude the user as target.

    Can anyone help me out?
    Thank you.