The official VisuStella notetag help thread

● ARCHIVED · READ-ONLY
Started by Trihan 1458 posts Page 18 of 73 View original ↗
  1. This is specific for the OTB Battle System

    Does anyone know the script call for giving a battler an extra action for that turn? I know that it was .addActionTimes() for the MV version, but that one doesn't work and I can't seem to find anything about it.
  2. Hello, I wonder if anyone can help me.

    I'm using all of Visustellas Plug-ins.
    I currently have a state that does damage over time but at the moment the damage doesn't have any fire element attached to it. Even though it's supposed to burn the enemy...

    Is there a way to apply fire element towards the damage value?

    I've set up an elemental Rate of 150% for a monster, attacking it with fire does the 'Weakness Display' popup and deals more damage. I'm hoping this will apply for the DOT when an element of fire is applied towards the damage.

    This is the State I have set up.
    State 36 is the burn effect, when the stack reaches 0 it'll remove itself.

    <JS On Add State>

    this._burnStacks = this._burnStacks || 0;

    if(this._burnStacks <= 2){

    this._burnStacks++;

    this.setStateDisplay(36, this._burnStacks);

    }

    </JS On Add State>


    <JS Pre-Regenerate>

    const n = this._burnStacks / 20;
    const value = Math.floor(n * target._burnStacks);

    if(this._burnStacks == 0)

    {

    a.removeState(36);

    }

    target.gainHp(-value);

    if(user.isDead()){
    user.performCollapse();

    }

    </JS Pre-Regenerate>


    <JS On Erase State>

    delete target._burnStacks;

    </JS On Erase State>

    EDITED ------

    Okay, so I've taken a look at the previous posts and added an 'If statement' to determine if the enemy is weak to fire (enemy set Element Rate Fire = 120%), if so then more damage is dealt from the burn state.

    if(target.elementRate(2) >= 1.2)

    {

    target.gainHp((-value)*target.elementRate(2));

    }

    else{

    target.gainHp(-value);

    }

    But now I'm stuck with something completely different, I was hoping to create, bleed or poison states, much like the burn state where damage is taken over time but when i applied both Burn and Poison to an enemy only one of states will take effect and damage the enemy.

    Is there a way to display the burn and poison dot separately?
    Or maybe add the damages together?

    EDITED -----

    Never mind I figured out a way to add all stack damages together.
  3. Trihan said:
    I have a working version of Chain Lightning in MZ, I'll help you with this shortly.
    Sorry to bother you, but would you be able to post the working version publicly? I'm having issues getting a version that behaves correctly as well.
  4. boikish said:
    Thanks for the thread and all of the help, Trihan. :)

    Is there an equivalent to .startAnimation(x) that can be used with states in VS?

    Thanks again!
    $gameTemp.requestAnimation([targets], animation ID)

    slipstream7 said:
    Hey again all, I'm having a little trouble figuring out how to create the targeting scope that I need. I have a character selects either 1 ally, or 1 enemy, then checks if they have a certain state. If yes, they remove it, if not, they apply it. I have the state part working great, I just need the targeting part. I've dug around all morning and couldn't find an answer or an option to do so so far.

    The battle core lays it out like such:
    Code:
    <JS Targets>
     code
     code
     targets = [code];
    </JS Targets>
    I've fiddled a little bit with $gameParty.aliveMembers() and $gameTroop.aliveMembers(), but I can't figure out anything that works, either it targets everyone, or it doesn't work at all. Any help would be greatly appreciated!
    JS Targets allows you to change who or what gets targeted on execution regardless of the database settings. It doesn't allow you to switch between actively targeting actors or enemies, nor does it allow you to restrict who can be manually targeted. In order to achieve this effect, I suggest combining it with caethyril's battle effects plugin, which does have those features. VisuStella has no intention to my current knowledge of creating a port of Target Core/Selection Control.

    raeson said:
    This is specific for the OTB Battle System

    Does anyone know the script call for giving a battler an extra action for that turn? I know that it was .addActionTimes() for the MV version, but that one doesn't work and I can't seem to find anything about it.
    I'm not sure about this one, I'm afraid.

    NegativeInspiration said:
    Sorry to bother you, but would you be able to post the working version publicly? I'm having issues getting a version that behaves correctly as well.
    The damage formula:

    JavaScript:
    this._chainMultiplier = this._chainMultiplier || 1.0; let value = user.mat + 1000; value *= this._chainMultiplier; this._chainMultiplier -= 0.2; value

    Notebox:

    JavaScript:
    <Custom Action Sequence>
    <JS Targets>
      const foes = this.subject().opponentsUnit();
      const target = foes.members()[this._targetIndex];
      targets.push(target);
      let members = foes.aliveMembers();
      members.splice(members.indexOf(target), 1);
      let extraTargets = 3;
      while (extraTargets--) {
        const member = members[Math.randomInt(members.length)];
        if (member) {
          targets.push(member);
          members.splice(members.indexOf(member), 1);
        }
      }
    </JS Targets>
  5. Hi @Trihan, I wonder if you could help me with this problem I'm facing.

    I'm currently using the toxic effect listed in one of your previous posts.
    But there's a problem with the Anti-Damage Barrier. - I'm using the absorption barrier state.

    When the Toxic dot is in effect, the damage doesn't get taken from the Absorption Barrier.

    Is there a way to do this?

    I forgot to mention I've tried setting JS pre-Regenerate / JS HP Slip Damage but none of those affected the barrier points.
  6. Galkamik said:
    Hi @Trihan, I wonder if you could help me with this problem I'm facing.

    I'm currently using the toxic effect listed in one of your previous posts.
    But there's a problem with the Anti-Damage Barrier. - I'm using the absorption barrier state.

    When the Toxic dot is in effect, the damage doesn't get taken from the Absorption Barrier.

    Is there a way to do this?

    I forgot to mention I've tried setting JS pre-Regenerate / JS HP Slip Damage but none of those affected the barrier points.
    Ah, yeah, that's because the damage being dealt by the state is effectively bypassing the normal method of dealing damage, so the barrier doesn't know there's anything to absorb. I'll take you through how to sort this when I get home later, I'm not at my computer just now.
  7. Thanks for the help, Trihan!

    Another question that I haven't been able to locate yet. Is there a notetag for instant actions for VS plugins just yet?

    Edit: To clarify, specifically for Default Turn Battle. I know it exists for STB.
  8. @Trihan I've managed to get the barrier to take the toxic dot.
    The problem now that I'm facing is I'm unable to get the damage to display when the dot is dealt to the barrier.

    Here's my code -

    State 61 = Toxic = each stacks deals more damage.
    State 62 = Barrier - regenerate barrier of 100 everytime is used. max barrier = the targets.mhp

    Toxic State


    <JS On Add State>

    this._toxicStacks = this._toxicStacks || 0;

    if(this._toxicStacks <= 3){

    this._toxicStacks++;

    this.setStateDisplay(61, this._toxicStacks);

    }

    </JS On Add State>



    <JS Pre-Regenerate>

    const tTotal = this._toxicStacks / 20;

    target._toxicValue = Math.floor(tTotal * target.mhp);



    if(a.states().includes($dataStates[62])){

    $gameTemp.requestAnimation([target], 4);

    target._barrierPoints = target._stateDisplay[62] - target._toxicValue;

    this.setStateDisplay(62, target._barrierPoints);

    }

    else{

    if (target.elementRate(6) >= 1.2){
    target.gainHP((-target._toxicValue)*target.elementRate(6));
    }

    else{
    target.gainHp(-target._toxicValue);
    }
    }



    if(user.isDead()){
    user.performCollapse();
    }

    </JS Pre-Regenerate>



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

    Barrier State

    <All Absorb Barrier: target._barrierPoints>


    <JS On Add State>

    if(target._barrierPoints >= 1){

    target._existingBarrier = target._stateDisplay[62];

    target._barrierPoints = 100 + target._existingBarrier;

    if(target._barrierPoints >= target.mhp){

    target._barrierPoints = target.mhp;

    }

    }

    else

    {

    target._barrierPoints = 100;

    }

    </JS On Add State>
  9. Hello! I have some questions

    1- I'm tryng to make an skill that deals more damage if the target have absorbtion barrier.
    It is *possible* if you use the state barrier in the code, but ill be adding more barrier states than just one.
    SO i thougth: it is possible to make something like this?

    Code:
    if (target.CATEGORYstate){
    code
    }

    based on the categories from the skill and states plugin.


    2- how do force action works in MZ?
    im tryng to make something similar to JUMP in RPG Maker MV.
    this is the code for the state that triggers in the start of the turn
    Code:
    <Custom Turn Start Effect>
      var skill = 68;
      var target = -2;
      BattleManager.queueForceAction(user, skill, target);
    </Custom Turn Start Effect>

    3- i have a passive state that works only when one of the party members is present and alive.
    i was able to make the alive part, but this is the part that works in MV and in MZ just break the actor.
    Code:
    <Custom Passive Condition>
      if ($gameParty.battleMembers().contains($gameActors.actor(1))) {
              condition = true;
      } else {
        condition = false;
      }
    </Custom Passive Condition>

    4- In the action sequence, the "MECH: Multipliers", for the damage/healing rate, it can make decimals appears. in an state or skill notetag, i know i can parse it to int, but i really dont know how to do that in here?


    Really, thanks a lot for your time and work.
  10. ChaosEmperor said:
    What is the code to apply the solution that ATT_Turan mentioned in my thread here:
    Why didn't you just ask inside of that thread that you'd already started?

    In your Dragon state:
    Code:
    <JS Pre-Damage as Target>
    if (user.states().includes($dataStates[X]))
        value*=1.2;
    </JS Pre-Damage as Target>

    where X is the ID of your Dragon Killer state, and the following line is whatever you want to do.

    The trick is that in your original post, you're pretty vague - you mention possibly applying effects, possibly extra damage, so I don't know what specifically you want to happen. In this case, it does 20% additional damage.

    Also, as Tiamat mentioned, this will by default apply to all sources of damage. So if you have any questions about how to do some other effect you wanted, or you prefer to limit what damage sources will do this, you should ask in your original thread so the entire conversation is in one place.
  11. ATT_Turan said:
    Why didn't you just ask inside of that thread that you'd already started?

    In your Dragon state:
    Code:
    <JS Pre-Damage as Target>
    if (user.states().includes($dataStates[X]))
        value*=1.2;
    </JS Pre-Damage as Target>

    where X is the ID of your Dragon Killer state, and the following line is whatever you want to do.

    The trick is that in your original post, you're pretty vague - you mention possibly applying effects, possibly extra damage, so I don't know what specifically you want to happen. In this case, it does 20% additional damage.

    Also, as Tiamat mentioned, this will by default apply to all sources of damage. So if you have any questions about how to do some other effect you wanted, or you prefer to limit what damage sources will do this, you should ask in your original thread so the entire conversation is in one place.
    Sorry, i did something similar in some other post ant a mod told me to ask for plugin codes and etc directly in the plugin help threads. With effects i meant aplying extra damage, maybe it was a little confusing. Also, can this be done the other way around? Like, put a state "dragon-type" in the target and making the user do the extra damage in any targets with this state? Tanks for the help.
  12. Hi, how do i make an stackable "poison" like damage over time on slip damage?
  13. ChaosEmperor said:
    Also, can this be done the other way around? Like, put a state "dragon-type" in the target and making the user do the extra damage in any targets with this state?
    I don't understand the question - that's what you're doing here.
  14. Hey all,

    Running into a weird issue. I'm trying to make it so that when a character is attacked with the Fire Element (ID = 2), there is a 25% chance that they negate damage. This is the notetag that I have:

    Code:
    <JS Pre-Damage As Target>
    var randomNum = Math.random();
    if (!target.states().includes($dataStates[72])) {
      if (this.item().damage.elementId = 2 && randomNum <= 0.25) {
        value *= 0;
      }
    }
    console.log(randomNum);
    </JS Pre-Damage As Target>

    As you can see, this first checks to make sure that the target is not affected with state 72, and then checks the damage element Id and the randomNum variable

    The issue is that after the first attack, every damage value will change to 0. This is true even if the state is removed. Everything will return as 0 always.

    Totally unsure as to why. Using the VisuStella library. Any insight would be appreciated.

    Edit: Fixed it, lmao. Missed an =.
  15. Can anyone tell me what would be the code for a state which prevents receiving buffs? I want to create a state similar to the one seen in Tales of Crestoria called "Buffs Disabled" that prevents applying buffs on the affected unit? All I am pretty sure of is that it would need to be put inside:
    Code:
    <JS On Add State>
     code
     code
    </JS On Add State>

    Also, is it possible to make a state that treats all received damage as critical damage?
  16. Sorry everyone, for some reason this seems to be the one forum thread that I never get notifications for, so I missed a bunch of posts. I'll answer everyone's questions as soon as I can.
  17. Hello everyone

    I have a strange bug (or maybe I am just stupid) with the Enhanced TP system

    As you can see on my screenshots I haven't done anything unusual within the settings of the "TP Mode Command"

    But whatever I do, it always writes this \I[0] in front of the Text (Where the 0 is of course the number of the Icon).

    Anyone knows what causes this?
  18. @Trihan can you help me make my battlers Tp turn to 0 when they die?

    <JS On Add State>
    target.clearTp();
    </JS On Add State>

    adding this on death state didnt work, "target.gainTp(-x)" and "target.setTp(0)" also did not work.

    edit: found the problem. It's my plugin
  19. shukrin said:
    @Trihan can you help me make my battlers Tp turn to 0 when they die?

    <JS On Add State>
    target.clearTp();
    </JS On Add State>

    adding this on death state didnt work, "target.gainTp(-x)" and "target.setTp(0)" also did not work.
    you may have just missed the semi-colon.
    Copy and paste this:

    <JS On Add State> target.setTp(0); </JS On Add State>

    Hope this helps!