How to implement every possible Yanfly Tips & Tricks effect in MZ with VisuStella plugins

● ARCHIVED · READ-ONLY
Started by Trihan 251 posts Page 9 of 13 View original ↗
  1. Siul said:
    Sorry to bother you again but I have to ask: is it possible to implement the buff breaker using the visustella state categories so it deals more damage the more count of a certain category the foe has?

    Thanks for your time.
    So you want the number of states with that category to act as a multiplier on the buff breaker damage?
  2. Trihan said:
    So you want the number of states with that category to act as a multiplier on the buff breaker damage?
    Yeah, something like that. Literally, I was trying to make a debuff-abuser class but I'd like to customize what states are considered debuffs via visustella category states.
  3. Siul said:
    Yeah, something like that. Literally, I was trying to make a debuff-abuser class but I'd like to customize what states are considered debuffs via visustella category states.
    Can you tell me specifically how you want the implementation to work so I can be sure I'm giving you accurate code? Like take me through a worked example of the class using Debuff Breaker on a target.
  4. Trihan said:
    Can you tell me specifically how you want the implementation to work so I can be sure I'm giving you accurate code? Like take me through a worked example of the class using Debuff Breaker on a target.
    Sure.
    This class has low base dmg skills but they get stronger based on the target's debuffs. It's easy to make the basic skills using conditions in the dmg formula (in example, a skill that improves effects if the target is poisoned or whatever), but I'd like to give some skills that take advantage based on the number of states of a certain category. In this case, I could see a skill having a bonus dmg having that dmg multiplier that you were talking about, so if the target has 3 buffs (or debuffs for another skill), it does triple dmg. The main point is being able to introduce de visu's state categories so i can decide what states are considered buffs or debuffs (using <positive state> or <negative state> notetags, for example).
    I'd like to be able to transfer those states among the party in other skills (or stealing them from the foes), but I guess that's a post for another thread.

    I hope I've explained myself properly.
    Thanks again for your time.
  5. Siul said:
    Sure.
    This class has low base dmg skills but they get stronger based on the target's debuffs. It's easy to make the basic skills using conditions in the dmg formula (in example, a skill that improves effects if the target is poisoned or whatever), but I'd like to give some skills that take advantage based on the number of states of a certain category. In this case, I could see a skill having a bonus dmg having that dmg multiplier that you were talking about, so if the target has 3 buffs (or debuffs for another skill), it does triple dmg. The main point is being able to introduce de visu's state categories so i can decide what states are considered buffs or debuffs (using <positive state> or <negative state> notetags, for example).
    I'd like to be able to transfer those states among the party in other skills (or stealing them from the foes), but I guess that's a post for another thread.

    I hope I've explained myself properly.
    Thanks again for your time.
    Okay, so you'd be looking at something along the lines of

    JavaScript:
    <JS Post-Apply>
      let hp = 0;
      for (let i = 0; i < 8; ++i) {
        if (target._buffs[i] > 0) {
          hp -= user.mat * 2;
        }
        if (target._buffs[i] < 0) {
          hp += user.mdf * 2;
        }
        target._buffs[i] = 0;
      }
      const multiplier = target.totalStateCategory("name of category here");
      hp *= multiplier;
      if (hp > 0) {
        $gameTemp.requestAnimation([target], 41);
      } else if (hp < 0) {
        $gameTemp.requestAnimation([target], 56);
      }
      if (hp !== 0) {
        target.gainHp(hp);
        target.startDamagePopup();
      }
    </JS Post-Apply>
  6. For some reason I can't get the Tonberry Shop to work. Well, it works, but I can't get it to appear in the menu by setting $gameSwitches.value(4) (the switch I'm using) in JS Show. If I set JS Show to "return true;" it appears in the menu and the shop can be accessed perfectly. For some reason though activating the switch does nothing, though. Also I checked like 3 times to make sure I had the right switch number and that everything is activating correctly. Any thoughts?
  7. @BR5555 Please always show your actual code/settings/event/whatever you're asking about.

    For example, if you literally just typed $gameSwitches.value(4) that's a completely different syntax than return true. One would type return $gameSwitches.value(4) if that's the syntax the plugin parameter is expecting.

    Try that, and if you can't get it working, show your work.
  8. ATT_Turan said:
    @BR5555 Please always show your actual code/settings/event/whatever you're asking about.

    For example, if you literally just typed $gameSwitches.value(4) that's a completely different syntax than return true. One would type return $gameSwitches.value(4) if that's the syntax the plugin parameter is expecting.

    Try that, and if you can't get it working, show your work.

    Sorry I forgot the screenshot. I'll be more mindful of that in the future. And oops, of course that worked! I guess this is why we shouldn't stay up 3 hours late and then posting for help on forums because we're too tired to think clearly. Thanks!
  9. I can't seem to get Poach to work.

    Spoiler
    1709070131397.png

    The note box isn't big enough to display everything there, but all I've done is copy and paste it. I didn't edit it at all. There are items corresponding to the numbers in the JS tags, so it's not like it has nothing to add to the pool. When I use Poach to defeat an enemy, nothing pops up, nothing gets added to the inventory even after battle. This happens in a new & clean project without any plugins or modifications as well. I'm surely missing something obvious here...
  10. BR5555 said:
    I can't seem to get Poach to work.

    Spoiler
    View attachment 296697

    The note box isn't big enough to display everything there, but all I've done is copy and paste it. I didn't edit it at all. There are items corresponding to the numbers in the JS tags, so it's not like it has nothing to add to the pool. When I use Poach to defeat an enemy, nothing pops up, nothing gets added to the inventory even after battle. This happens in a new & clean project without any plugins or modifications as well. I'm surely missing something obvious here...
    I mean in a new project without any plugins, you'd be missing VisuStella's Battle Core, which is required for the JS Post-Apply tag. :p You do have that enabled, right?
  11. Trihan said:
    I mean in a new project without any plugins, you'd be missing VisuStella's Battle Core, which is required for the JS Post-Apply tag. :p You do have that enabled, right?

    lol well that explains the reason it doesn't work in a new project. Little oversight there. BUT it still doesn't work in my main project which does have VS Battle Core enabled. Let me test in a new project with Battle Core and see if that works for me... maybe there's a plugin conflict somehow.

    EDIT: Okay, it does seem to work mostly in a new project. It doesn't display anything in the battle log when an item is acquired, but it does appear in the inventory. Here's the console when this happens:

    Spoiler
    1709073129080.png

    In my main project, I can't get it to work at all. It never adds any items and nothing shows up in the console.
  12. I'll test it on my end as well to make sure it still works; after 2 years maybe an update has shaken something loose. ;)
  13. Well now it's working somehow in my main project. I was disabling plugins one by one to try and get it to work. After getting down to just VS Battle Core and the other BS basics, I decided to just turn the plugins back on. I tried Poach again to see if anything showed up in the console and for some reason it works. The same plugins, nothing changed in the skill notes. So... false alarm? lol

    I'll report back if something breaks it again. Thanks for trying to help, and thanks for getting all the T&T to work in MZ in the first place!
  14. Hi there.

    I'm trying to implement sacrificial bolt into my project but it always gives me 0 damage as output. I've just copy-pasted your lines without changing anything.

    Also, is there any way to choose wich character can you sacrifice instead of a random one?

    Thanks for your time
  15. Siul said:
    Hi there.

    I'm trying to implement sacrificial bolt into my project but it always gives me 0 damage as output. I've just copy-pasted your lines without changing anything.

    Also, is there any way to choose wich character can you sacrifice instead of a random one?

    Thanks for your time
    I haven't gotten to that point in my thread review yet but I'll let you know when I get there.
  16. Siul said:
    I'm trying to implement sacrificial bolt into my project but it always gives me 0 damage as output. I've just copy-pasted your lines without changing anything.
    The damage formula @Trihan provided for that T&T should use a not user

    So a._allyHp + a._allyMat * 14

    Siul said:
    Also, is there any way to choose wich character can you sacrifice instead of a random one?
    Sure, change the skill's scope to be 1 Ally and then reference target in the notetags instead of getting the random ally.
  17. ATT_Turan said:
    The damage formula @Trihan provided for that T&T should use a not user

    So a._allyHp + a._allyMat * 14


    Sure, change the skill's scope to be 1 Ally and then reference target in the notetags instead of getting the random ally.
    Sorry to bother, but I know no coding. What should the reference of the target be?
    Didn't have time to try myself today but i will asap so I can let u know the results.
    Thanks again, as always.
  18. The change of damage formula works fine.

    Now I'm struggling trying to figure out how to code so I deal AoE choosing the sacrificed ally. I've been trying things with the action sequences but it's not working yet. So, as always, if anyone can let me know the code to be used, it wil be much appreciated.
    ATT_Turan said:
    The damage formula @Trihan provided for that T&T should use a not user

    So a._allyHp + a._allyMat * 14


    Sure, change the skill's scope to be 1 Ally and then reference target in the notetags instead of getting the random ally.
  19. Siul said:
    Now I'm struggling trying to figure out how to code so I deal AoE choosing the sacrificed ally.
    ATT_Turan said:
    Sure, change the skill's scope to be 1 Ally
    1710345443149.png

    ATT_Turan said:
    and then reference target in the notetags instead of getting the random ally.
    Code:
    <JS Pre-Start Action>
      user._allyHp = target.hp;
      user._allyMat = target.mat;
    </JS Pre-Start Action>

    You'll then have to make the damage formula deal the target's full health and put the healing into a post-damage notetag that has user.gainHp(user._allyHp + user.allyMat * 14).