The official VisuStella notetag help thread

● ARCHIVED · READ-ONLY
Started by Trihan 1458 posts Page 67 of 73 View original ↗
  1. Trying to get a skill to add turns to a state based on category, I found this:
    Code:
     <After Eval>
    
    if (target.isStateAffected(state) && target._stateTurns[state] > 0) {
    
    target._stateTurns[state] += duration_increase;
    
    }
    
    </After Eval>

    I know to change the yanfly notetags to Visu ones but in those "[]" thats an index right? So i could technically just add as many states in there as i wanted? Ideally I would prefer if is was
    if target.isStateAffected('CATEGORYNAME') then add x amount of turns.
  2. Looking at Yanfly's example, I think for MZ it's like:

    <JS Post-Damage>
    const states = target.states();
    let category = 'test';
    category = category.toUpperCase();
    for (let i = 0; i < states.length; ++i) {
    const state = states[i];
    if (state && state.categories.contains(category)) {
    target.addStateTurns(state.id, 5);
    }
    }
    </JS Post-Damage>

    EDIT: Edited the i in there, cropped it out earlier.
  3. Hi, I would like to create a skill that deals more damage when an enemy is afflicted by State "x"

    for example :
    Poison Blade = Increase physical damage by 100% if the enemy is affected with the "Poison" state.
  4. I think you can just use b.isStateAffected(stateID) as a condition in the damage formula.

    e.g. if you poison state has ID of 99:

    b.isStateAffected(99) ? a.atk * 8 - b.def * 2 : a.atk * 4 - b.def * 2
  5. Canned_Dinosaur said:
    I think you can just use b.isStateAffected(stateID) as a condition in the damage formula.

    e.g. if you poison state has ID of 99:

    b.isStateAffected(99) ? a.atk * 8 - b.def * 2 : a.atk * 4 - b.def * 2
    Thank you, it works
  6. Hey guys, using Visustella Extra Enemy Drops and wondering if there is a way to make it so atleast 1 item drops everytime you fight the boss. Or do I have just have to keep messing around with percentages? For Example: 1749392398742.png

    Sometimes this boss will drop 3 items sometimes 0. I read through the yanfly webpage but didn't see anything.
  7. Use the JS notetag, something like:
    <JS Drops>
    if (Math.random() < 0.05) {drops.push($dataWeapons[1]);}
    if (Math.random() < 0.10) {drops.push($dataWeapons[2]);}
    if (Math.random() < 0.25) {drops.push($dataWeapons[3]);}
    if (drops.length === 0) {drops.push($dataWeapons[4]);}
    </JS Drops>
  8. rpgLord69 said:
    Use the JS notetag, something like:
    <JS Drops>
    if (Math.random() < 0.05) {drops.push($dataWeapons[1]);}
    if (Math.random() < 0.10) {drops.push($dataWeapons[2]);}
    if (Math.random() < 0.25) {drops.push($dataWeapons[3]);}
    if (drops.length === 0) {drops.push($dataWeapons[4]);}
    </JS Drops>
    that means if nothing drops it will 100% drop data weapon 4?

    If so I can make that work. Thanks again.
  9. Hi guys, I'm using VS Battle Core, I'd like to make a conditional skill based on the target's remaining HP
    This is the detailed background :

    deals damage to 1 enemy, the effect is varied based on the remaining HP.
    - if the target's HP is at 50%- 100% , inflicts "Poison"
    - if the target's HP is below 50%, deals additional 100%ATK
  10. Eden019 said:
    Hi guys, I'm using VS Battle Core, I'd like to make a conditional skill based on the target's remaining HP
    This is the detailed background :

    deals damage to 1 enemy, the effect is varied based on the remaining HP.
    - if the target's HP is at 50%- 100% , inflicts "Poison"
    - if the target's HP is below 50%, deals additional 100%ATK
    Can you do this inside an action sequence with an if statement?

    Make 2 skills that 1 that poisons and one that poisons but does double damage.
    Run an action sequence that has
    If Target health is equal to or greater that 50% use skill 1.
    Else:
    Use skill 2.

    This is how I would do it with no scripting knowledge I’m sure rpglord or someone else here can write a neater solution.
  11. try this. i cant remember if the pre damage notetag in VS has a value variable for the damage being dealt and its not listed on the website, but i believe its there.
    Code:
    <JS Pre-Damage>
    if (target.hpRate() > .5)
      target.addState(x)
    else
      value += user.atk
    </JS Pre-Damage>
    replace the x with the id for the poison state
  12. Robro33 said:
    try this. i cant remember if pre damage notetag in VS has a value variable for the damage being dealt and its not listed on the website, but i believe its there.
    Code:
    <JS Pre-Damage>
    if (target.hpRate() > .5)
      target.addState(x)
    else
      value += user.atk
    </JS Pre-Damage>
    replace the x with the id for the poison state
    It works, with this logic, I can make more interesting skills
    for example : When the target is below 50%, inflicts Silence, meanwhile when the target is above 50% , inflicts blind..


    Code:
    <JS Pre-Damage>
      if (target.hpRate() > .50)
      target.addState(x)
    else
      if (target.hpRate() < .50)
      target.addState(x)
    </JS Pre-Damage>



    jimmyshmo said:
    Can you do this inside an action sequence with an if statement?

    Make 2 skills that 1 that poisons and one that poisons but does double damage.
    Run an action sequence that has
    If Target health is equal to or greater that 50% use skill 1.
    Else:
    Use skill 2.

    This is how I would do it with no scripting knowledge I’m sure rpglord or someone else here can write a neater solution.
    I never used the action sequence for now, but the visustella notetags worked fine for now.
  13. Eden019 said:
    <JS Pre-Damage> if (target.hpRate() > .50) target.addState(x) else if (target.hpRate() < .50) target.addState(x) </JS Pre-Damage>
    Because you added the second if condition.... what if HP=50%? gotta be careful when being all inclusive with a list of if statements.
  14. ZimXero said:
    Because you added the second if condition.... what if HP=50%? gotta be careful when being all inclusive with a list of if statements.

    Thanks for advice.
    No error so far. IF the target's HP is exactly at 50%, then no states inflicted to the target.
    here's the revised notetag :

    <JS Pre-Damage>

    if (target.hpRate() > .50)

    target.addState(x)

    else

    target.addState(x)

    </JS Pre-Damage>
  15. Hey guys! Looking to have a Armor piece give bonus Crit damage, the two note tags ive found:

    <Modify Critical Bonus Damage: x%>

    and

    <Modify Critical Multiplier: x%>

    But both only work on Items and Skills.

    Anyone know how to apply this on an Armor piece?

    I'd prefer not to do it with a passive state.
  16. The mechanics notetags work on armors (instead of + you can use *):

    <JS Pre-Damage as User>
    if (target.result().critical){
    value += X;
    }
    </JS Pre-Damage as User>
  17. rpgLord69 said:
    The mechanics notetags work on armors (instead of + you can use *):

    <JS Pre-Damage as User>
    if (target.result().critical){
    value += X;
    }
    </JS Pre-Damage as User>
    So for let's say 15% bonus it would be:

    <JS Pre-Damage as User>
    if (target.result().critical){
    value *= 1.15;
    }
    </JS Pre-Damage as User>

    Will that stack? Say you had 2 armor pieces on with that.
  18. theyd stack multiplicatively. the tag would be ran for each piece of equipment that has them
  19. Hi, I'm looking for a new skill notetag that deals damage based on the total sum of all party member's ATK or any stats.

    For example :
    Union Strike -> A slow attack that deals damage : 25% of the total ATK of all party members.

    a few notes :
    1. only counts the alive party members (including the attacker)
    2. Doesn't count the sub / inactive party members.
  20. The formula you get that with is like:

    $gameParty.aliveMembers().reduce((sum, actor) => sum + actor.atk, 0)

    EDIT: This gives you the total sum of attack. Then you can multiply it with what you want.