The official VisuStella notetag help thread

● ARCHIVED · READ-ONLY
Started by Trihan 1458 posts Page 59 of 73 View original ↗
  1. Kurbbie said:
    You can add elements to any actor/enemy example
    <Element: Fire, Ice>
    <SubElement: Thunder, Fire>
    I don't see where the instructions list that as valid syntax for those notetags.

    The documentation says:
    1721234713632.png

    It doesn't say you can use commas to have multiple in one notetag. As a rule, you can't just add words in a notetag that the plugin doesn't say you can - it takes specific coding to parse a list with commas and split it and accommodate that.

    Let me know if I missed something.
  2. ATT_Turan said:
    I don't see where the instructions list that as valid syntax for those notetags.

    The documentation says:
    View attachment 311726

    It doesn't say you can use commas to have multiple in one notetag. As a rule, you can't just add words in a notetag that the plugin doesn't say you can - it takes specific coding to parse a list with commas and split it and accommodate that.

    Let me know if I missed something.

    Right thats what I was explaining.
    <Multi-Element: x>
    <Multi-Element: x,x,x>

    <Multi-Element: name>
    <Multi-Element: name, name, name>

    But that's for skill/item note tags. But like I said to the other man, if it didn't work then it isn't programmed to work.
  3. Okay. It's just that this:
    Kurbbie said:
    <Multi-Element: x>
    <Multi-Element: x,x,x>
    <Multi-Element: name>
    <Multi-Element: name, name, name>
    is a completely different thing from this:
    Kurbbie said:
    <Element: Fire, Ice>
    <SubElement: Thunder, Fire>

    They're two (three) different notetags that serve completely different purposes. Giving skills multiple elements for the purposes of damage calculation is one of the described purposes of the plugin, and that comma-delimited format is shown in the plugin instructions for that notetag.

    The main and sub-element traits for actors serve a different purpose, are stored in a different format, and use different notetags.

    I'm merely trying to reinforce that because a plugin provides a notetag with one syntax, you can't presume and recommend to others to put that syntax into a completely different notetag.

    Anyway, I think the question has been addressed, I'll bow out. Good luck.
  4. ATT_Turan said:
    However, I don't see why you couldn't create more traits in the plugin parameters that are described as being two different elements.
    Sorry for the delayed response. The reason I needed multiple main/sub element traits to be possible is because there are two types of elements: Base and Advanced. All Advanced elements are a combination of two base elements in regards to unlocking them, but the combination itself typically functions differently than either of the Base elements do. I mentioned that damage calculation isn't the issue because the system is matchup-based to an extreme degree, and damage is only one component of that.

    The structure would essentially be to have any Advanced element (if an actor has one) be the Main Element trait, with the Base elements to unlock it being the Sub Element traits. If an actor doesn't have an Advanced element, then their Base element would be their Main Element trait instead. Since an Advanced element functions differently from either of its Base components, combining all three into a single trait would create multiple problems with the functions of several elements in the system.
  5. Xeri said:
    Sorry for the delayed response. The reason I needed multiple main/sub element traits to be possible is because there are two types of elements: Base and Advanced. All Advanced elements are a combination of two base elements in regards to unlocking them, but the combination itself typically functions differently than either of the Base elements do. I mentioned that damage calculation isn't the issue because the system is matchup-based to an extreme degree, and damage is only one component of that.

    The structure would essentially be to have any Advanced element (if an actor has one) be the Main Element trait, with the Base elements to unlock it being the Sub Element traits. If an actor doesn't have an Advanced element, then their Base element would be their Main Element trait instead. Since an Advanced element functions differently from either of its Base components, combining all three into a single trait would create multiple problems with the functions of several elements in the system.
    yeah my man that sounds like you'd need a whole different system than whats provided with VZ
  6. Unrelated questions about Element Status Core.

    First: If an attack would apply a state, but the attack is absorbed due to the element absorb note tag, would the state still be applied even though the damage itself was absorbed?

    Second: Is it possible to absorb elemental damage as things other than HP? Like, as MP or TP instead?
  7. I am trying to update my Crit Rate with VisuMZ_1_BattleCore and it doesn't seem to be working at all. Full code here for reference. I can go into battle with 500+ luck and my rate only seems to be my class rate of 5%. Using the Note overrides DOES work.


    Code:
    // Declare Constants
    
    const user = this.subject();
    
    const target = arguments[0];
    
    
    
    // Create Base Critical Rate
    
    let rate = this.subject().cri * (1 - target.cev) + (this.subject().luk * 0.001);
    
    
    
    // Apply Notetags
    
    const note = this.item().note;
    
    if (note.match(/<ALWAYS CRITICAL>/i)) {
    
        return 1;
    
    }
    
    if (note.match(/<SET CRITICAL RATE:[ ](\d+)([%%])>/i)) {
    
        return Number(RegExp.$1) / 100;
    
    }
    
    if (note.match(/<MODIFY CRITICAL RATE:[ ](\d+)([%%])>/i)) {
    
        rate *= Number(RegExp.$1) / 100;
    
    }
    
    if (note.match(/<MODIFY CRITICAL RATE:[ ]([\+\-]\d+)([%%])>/i)) {
    
        rate += Number(RegExp.$1) / 100;
    
    }
    
    if (note.match(/<JS CRITICAL RATE>\s*([\s\S]*)\s*<\/JS CRITICAL RATE>/i)) {
    
        const code = String(RegExp.$1);
    
        try {
    
            eval(code);
    
        } catch (e) {
    
            if ($gameTemp.isPlaytest()) console.log(e);
    
        }
    
    }
    
    
    
    // Apply LUK Buffs/Debuffs
    
    const lukStack = this.subject().buff(7);
    
    rate *= 2 ** lukStack;
    
    
    
    // Return Rate
    
    return rate;
  8. @SeomanReborn It's not breaking your code, but why do you use this.subject() every time when the very first line of code gives you a user variable to use?

    Are you sure you want the luck buffs to do double duty? They're already contributing to raising the actual luck stat.

    Aside from that, it sounds like it's probably working correctly. If you give your actor 500 luck, that means the base rate is:
    Code:
    rate = this.subject().cri * (1 - target.cev) + (this.subject().luk * 0.001);
    which is
    Code:
    rate = .05 * .95 + 0.5 = 0.54
    so only just over a 50% chance to critical.

    If you wanted to test having a guaranteed chance, you'd need to use about 1,000 luck. Or, of course, change the multiplier at the end - take out the * 0.001 and see it automatically succeed.
  9. ATT_Turan said:
    @SeomanReborn It's not breaking your code, but why do you use this.subject() every time when the very first line of code gives you a user variable to use?

    Are you sure you want the luck buffs to do double duty? They're already contributing to raising the actual luck stat.

    Aside from that, it sounds like it's probably working correctly. If you give your actor 500 luck, that means the base rate is:
    Code:
    rate = this.subject().cri * (1 - target.cev) + (this.subject().luk * 0.001);
    which is
    Code:
    rate = .05 * .95 + 0.5 = 0.54
    so only just over a 50% chance to critical.

    If you wanted to test having a guaranteed chance, you'd need to use about 1,000 luck. Or, of course, change the multiplier at the end - take out the * 0.001 and see it automatically succeed.
    I did do all that testing and even just setting rate = 1. Doesn't seem to affect any attack they all crit about 5% of the time (I have an attack that hits 10 times to test).

    ATT_Turan said:
    @SeomanReborn It's not breaking your code, but why do you use this.subject() every time when the very first line of code gives you a user variable to use?

    Are you sure you want the luck buffs to do double duty? They're already contributing to raising the actual luck stat.

    Aside from that, it sounds like it's probably working correctly. If you give your actor 500 luck, that means the base rate is:
    Code:
    rate = this.subject().cri * (1 - target.cev) + (this.subject().luk * 0.001);
    which is
    Code:
    rate = .05 * .95 + 0.5 = 0.54
    so only just over a 50% chance to critical.

    If you wanted to test having a guaranteed chance, you'd need to use about 1,000 luck. Or, of course, change the multiplier at the end - take out the * 0.001 and see it automatically succeed.

    looks like the "double duty" line was the culprit. I removed it and now it is working.

    As far as the "user" stuff goes, for the rate equation it came to me like that already in the plugin. I agree it should just be user.
  10. SeomanReborn said:
    I did do all that testing and even just setting rate = 1.
    Then it seems like you must have some other plugin conflicting with it.

    To clarify, when you make any changes to this, you're saving your project then starting a new playtest, right? Not loading a save or just using the battle test?
  11. ATT_Turan said:
    Then it seems like you must have some other plugin conflicting with it.

    To clarify, when you make any changes to this, you're saving your project then starting a new playtest, right? Not loading a save or just using the battle test?
    I was using Battle test. how to you make a new "playtest"?
  12. SeomanReborn said:
    I was using Battle test. how to you make a new "playtest"?
    You click the Playtest button on the editor's menu bar and select New Game.
  13. Thank you so much for your help. 2nd issue I am having is that this sometimes doesn't do damage. usually on the first hit of a multi hit combo. But sometimes it does do all the damage correctly.

    I have a state that all it has is this stuff in the notes. I did some console debugging and it seems after it ticks down 1 turn, that variable is getting set to 0. Not sure how though,


    Code:
    <JS Post-Apply as Target>
      var varId = target.index() + 900;
      $gameVariables.setValue(varId, Math.floor(user.mat/5));
     
    </JS Post-Apply as Target>
    
    
    <JS Post-Damage as Target>
     target.startDamagePopup();
     var varId = target.index() + 900;
     
     let dam = $gameVariables.value(varId) * target.elementRate(2);
     target.gainHp(Math.floor(0-dam));
     target.startDamagePopup();
    
    </JS Post-Damage as Target>
  14. SeomanReborn said:
    I have a state that all it has is this stuff in the notes. I did some console debugging and it seems after it ticks down 1 turn, that variable is getting set to 0. Not sure how though,
    1 - Do you actually have that many variables allocated in the editor? If you try to use script calls to access variables higher than the "max number" in the editor, it will fail.

    2 - Why are you using the target's index as a reference point for a game variable? As members of the unit (the actor party or enemy troop) die, that index will change.

    If you want to track a value on a specific battler, you should store it as a property of that battler.
  15. ATT_Turan said:
    1 - Do you actually have that many variables allocated in the editor? If you try to use script calls to access variables higher than the "max number" in the editor, it will fail.

    2 - Why are you using the target's index as a reference point for a game variable? As members of the unit (the actor party or enemy troop) die, that index will change.

    If you want to track a value on a specific battler, you should store it as a property of that battler.
    1. Yes I have 1000. Like I said I could see the value being stored correctly. Turns out that Post-Apply applies every time someone attacks them so it was using the previous attackers magic value.

    2. That is a good point. I tried looking this up but it is hard, how do you store a custom value attached to a monster?
  16. SeomanReborn said:
    Turns out that Post-Apply applies every time someone attacks them so it was using the previous attackers magic value.
    Well, yes, that's what the description of the notetag says it does. I'm not sure how you want it to work differently.

    SeomanReborn said:
    I tried looking this up but it is hard, how do you store a custom value attached to a monster?
    You might want to read through Yanfly's Tips & Tricks (or Trihan's thread that adapts them to VisuStella notetags) - this is something he does very commonly in there.

    You just...do it :stickytongue: It doesn't need any special syntax.

    Code:
    <JS Post-Apply as Target>
    target.attackerMat = Math.floor(user.mat / 5); 
    </JS Post-Apply as Target>
    
    <JS Post-Damage as Target>
     target.gainHp(0 - Math.floor(target.attackerMat * target.elementRate(2)));
     target.startDamagePopup();
     delete target.attackerMat;
    </JS Post-Damage as Target>
  17. This helps out a TON and solves like all of my issues. <3
    ATT_Turan said:
    Well, yes, that's what the description of the notetag says it does. I'm not sure how you want it to work differently.


    You might want to read through Yanfly's Tips & Tricks (or Trihan's thread that adapts them to VisuStella notetags) - this is something he does very commonly in there.

    You just...do it :stickytongue: It doesn't need any special syntax.

    Code:
    <JS Post-Apply as Target>
    target.attackerMat = Math.floor(user.mat / 5);
    </JS Post-Apply as Target>
    
    <JS Post-Damage as Target>
     target.gainHp(0 - Math.floor(target.attackerMat * target.elementRate(2)));
     target.startDamagePopup();
     delete target.attackerMat;
    </JS Post-Damage as Target>

    I know, tons of questions. I am trying to edit the final damage value after the formula calculation (I chose FF10). Pre-Damage as Target seems to happen AFTER the damage formula is run. So my questions are.

    1) Is there a script I can put on a state that will run before the damage calc after they target is chosen of an attack.

    2) in Pre-Damage as Target or similar can I change the damage value that is chosen somewhere? Like is there a variable I can call and then change it?
  18. Hello everyone! I’m trying to achieve two things within the <JS On Add State> tag:

    1. Display a custom text pop-up when a state is added to a target.
    2. Play a specified animation simultaneously.
    Are there any scripts that can achieve these two functions within this tag? Thank you very much for your help!
  19. SeomanReborn said:
    I know, tons of questions. I am trying to edit the final damage value after the formula calculation (I chose FF10). Pre-Damage as Target seems to happen AFTER the damage formula is run.
    Yes, the documentation says it runs immediately before the damage is executed, so it's necessarily already been calculated.

    SeomanReborn said:
    1) Is there a script I can put on a state that will run before the damage calc after they target is chosen of an attack.
    The earlier notetag; pre-apply as target.

    SeomanReborn said:
    2) in Pre-Damage as Target or similar can I change the damage value that is chosen somewhere? Like is there a variable I can call and then change it?
    Yes. It's not in the documentation for some reason, but there's a value variable that's the damage about to be dealt.

    catxiaolang said:
    Hello everyone! I’m trying to achieve two things within the <JS On Add State> tag:
    Display a custom text pop-up when a state is added to a target.
    You would need some other plugin that allows you to create custom text popups. By default, the only kind of popup in MZ is for attack information.

    catxiaolang said:
    Play a specified animation simultaneously.
    $gameTemp.requestAnimation([target], 49);
    where 49 is the ID of the animation.
  20. Hello,

    I've got an action sequencing question that I can't seem to find a specific solution to.
    I've got a skill, and with this skill I want it to have a different effect depending on what state the user is affected with.

    In the common events for the action sequence, I can't seem to find a good script to call the "IF" statement to check if the user is affected by a state.
    Here's an example of what I'm talking about- I have user attempted a.isStateAffected(29) but I have a feeling I'm missing something small to get it working. Thoughts?
    1724545650816.png
    Sidenote: I do know about Tab 2, being able to select an actor and state there- however this won't exactly work with what I'm attempting to accomplish because just about anybody has the potential to learn this skill.