The official VisuStella notetag help thread

● ARCHIVED · READ-ONLY
Started by Trihan 1458 posts Page 30 of 73 View original ↗
  1. target.displayAbsorptionBarrierPopup(300) should do it.
  2. It works too! If my enemies have different barrier states (because they have different barrier points) will I have to use a conditional branch for every single barrier state or is there a less tedious way? For example


    <JS Pre-Damage>

    if (target.isStateAffected(195)){

    const barrier = target.getStateDisplay(195) - 300;

    if (barrier > 0) target.setStateDisplay(195, barrier); else target.removeState(195);

    target.displayAbsorptionBarrierPopup(300)}

    else

    if (target.isStateAffected(196)){

    const barrier = target.getStateDisplay(196) - 300;

    if (barrier > 0) target.setStateDisplay(195, barrier); else target.removeState(195);

    target.displayAbsorptionBarrierPopup(300)}

    </JS Pre-Damage>
  3. You could give barrier states a category and loop through the category states.
  4. They all belong to the absorption barrier category but I don't know how to do the loop in a script. Is it something like those "push scripts''?



    <JS Pre-Damage>


    if (statecategory() === 'absorption barrier') {

    state.push(195, 196, 52);

    }

    </JS Pre-Damage>
  5. That isn't even remotely how to do it, but good try! XD I'll give you the code for it in a bit.
  6. :guffaw: ThankS!
  7. Gonna take a wild stab here...I'm trying to use VisuStella Skill Learn System and get it to where I need it to look at a custom stat before the skill shows up in the learn skill menu...so I use...

    <JS Learn Show>
    if (this.NParamId(1) > 1);
    visible = true
    </JS Learn Show>

    and I've also tried several other things...

    <JS Learn Show>
    if (user.NParamId(1) > 1);
    visible = true
    </JS Learn Show>

    and this...

    <JS Learn Show>
    if (user._NParamId(1) > 1);
    visible = true
    </JS Learn Show>

    and this...

    <JS Learn Show>
    var NParamId = 1;
    var amount = 1;
    var skillId = 26;

    if (user.NParamId(1) > 1);
    visible = true
    </JS Learn Show>

    ...and a few other similar things changing little things here and there but I just can't get it to work right.

    I am using ICF-Soft Custom Parameters and I got it to work with VisuStella using the Core Engine Plugin and tying them together so that part is done, I just need it to recognize that custom stat in the Lunatic Mode of Skill Learn System so it doesn't show up unless that Custom Parameter is greater than 1.

    I don't typically get errors with this one but it's basically like the notetag doesn't exist at all and the skill will be in the list to learn but it shouldn't be unless the Custom Stat is greater than 1 and it's not.

    I've gotten several things to work with Lunatic Mode by a lot of trial and error but I'm not a Coder so I'm having a hard time figuring this one out to get this to work.

    Any help would be appreciated.
  8. Knightmare said:
    <JS Learn Show>
    if (this.NParamId(1) > 1);
    visible = true
    </JS Learn Show>
    Your syntax is wrong. You put semicolons after code statements (optionally, but recommended). You cannot put them after a conditional. So the correct syntax is:
    Code:
    if (condition)
        statement;

    Also, as a tip for efficiency, any time you find yourself writing an if statement and the only thing it does is set a boolean, you can always get rid of that as the result of the condition itself is a boolean. So your entire tag can be:
    Code:
    <JS Learn Show>
    visible=this.NParamId(1)>1;
    </JS Learn Show>

    However, that will still fail, as when the code executes, this is not referring to the actor. According to the Skill Learn System documentation, you should use user to refer to the actor. Therefore:
    Code:
    <JS Learn Show>
    visible=user.NParamId(1)>1;
    </JS Learn Show>
  9. @ATT_Turan - Thank you very much for the lesson. You broke it down to where even I could understand it and it got it to work. Consider this solved. Thanks again and have a good day!
  10. Hello there. For the Visustella Menu Core, I'm trying to implement a menu item that has a show condition based on a switch being ON. In the JS: Show text box I have:


    if ($gameSwitches.value[817] == true){

    return true;

    } else {

    return false;

    }

    It's always returning false, even with the switch on. This would work in basic JS, but why it's not working is beyond my skill level at the moment.



    Edit: $gamesSwitches.value(817) not [817]. Nothing to see here, please move along -_-'
  11. Reinarc said:
    Hello there. For the Visustella Menu Core, I'm trying to implement a menu item that has a show condition based on a switch being ON. In the JS: Show text box I have:


    if ($gameSwitches.value[817] == true){

    return true;

    } else {

    return false;

    }

    It's always returning false, even with the switch on. This would work in basic JS, but why it's not working is beyond my skill level at the moment.



    Edit: $gamesSwitches.value(817) not [817]. Nothing to see here, please move along -_-'
    I see you figured out your error. Brackets are the bane of the best of us. :)
  12. It's me again. I'm trying to calculate the evasion rate based on Agility and I figure the most painless way to do it is with an XPARAM Plus notetag in Classes. I tried but user.agi doesn't seem to work so I can't even do any calculation.
  13. Weremole said:
    It's me again. I'm trying to calculate the evasion rate based on Agility and I figure the most painless way to do it is with an XPARAM Plus notetag in Classes. I tried but user.agi doesn't seem to work so I can't even do any calculation.
    What have you tried so far?
  14. Trihan said:
    What have you tried so far?

    <JS EVA Plus: (user.agi+1) / 8 * 0.01>

    I've tried with a simple number just to check if it was a bug somewhere, but it works. So it has to be that it's not finding the agility param.
  15. Weremole said:
    <JS EVA Plus: (user.agi+1) / 8 * 0.01>

    I've tried with a simple number just to check if it was a bug somewhere, but it works. So it has to be that it's not finding the agility param.
    try using this.agi instead of user.agi
  16. shukrin said:
    try using this.agi instead of user.agi
    It works! Thanks a ton.
  17. 1) Can i call the battle log message for damages that are done through the notetag? For example, the custom slip damages, and for the On Add/Remove/Expire State notetag. As somebody who heavily use the default battle log, i would prefer some consistency rather than having some damages not mentioned by the battlelog.

    2) Can I force a skill activation upon adding a state, through the "on add state" notetag. If i can what's the code? I know i can do the same thing with common event but i can't really specify the skill user with that.
  18. Probably the most useful thing of MV's Yanfly Engine was his 'Tips and Tricks' where it was shown how to actually execute iconic RPG spells/actions. It gave a reference on how to use most of the notetags. This is sorely missing from Visustella.

    Can someone show how to implement the simple Freeze? It's so common in RPGs that VS used it as an example in their State Effects. Yet, there's no example of how to actually implement it. Is <Custom Respond Effect> replaced with <JS Pre-Damage>?
  19. Gallas said:
    Probably the most useful thing of MV's Yanfly Engine was his 'Tips and Tricks' where it was shown how to actually execute iconic RPG spells/actions. It gave a reference on how to use most of the notetags. This is sorely missing from Visustella.

    Can someone show how to implement the simple Freeze? It's so common in RPGs that VS used it as an example in their State Effects. Yet, there's no example of how to actually implement it. Is <Custom Respond Effect> replaced with <JS Pre-Damage>?
    JavaScript:
    <JS Post-Damage As Target>
      const fire = 2;
      if (this.isPhysical() && value > 0) {
        target.setHp(0);
      } else if (this.item().damage.elementId === fire) {
        target.removeState(state.id);
      }
    </JS Post-Damage As Target>
  20. Trihan said:
    JavaScript:
    <JS Post-Damage As Target>
      const fire = 2;
      if (this.isPhysical() && value > 0) {
        target.setHp(0);
      } else if (this.item().damage.elementId === fire) {
        target.removeState(state.id);
      }
    </JS Post-Damage As Target>

    Thank you.

    While I know this 'simple', I know others are looking for it too. *waves at lurkers*