The official VisuStella notetag help thread

● ARCHIVED · READ-ONLY
Started by Trihan 1458 posts Page 4 of 73 View original ↗
  1. Cyberhawk said:
    probably has been done already but.
    I'm REALLy bad with code being presented like this.
    <JS Passive Condition>
    code
    code
    condition = code;
    </JS Passive Condition>
    If i need this passive to only be active if the user is above 75% HP i need to do mathfloor.target. mmhp * 0.75 ?

    The good news is there's already a built-in function to do this for you: just do

    Code:
    condition = target.hpRate() >= 0.75;
  2. Hi; is there somewhere in the battle core plugin that allows us to alter or remove the TP generation from taking damage? Or is this feature going to be coming in the TP manager plugin? I know this would probably be a simple plugin for someone to write, but I'd rather stick to only visustella plugins if possible, to ensure compatibility. thank you!
  3. Don't quote me on this but I think that'll be coming in a separate plugin.
  4. I want to know is there a way to display the stack of a state?
    Or at least make the state stackable and show how many stacks ?
  5. I believe one of the plugins already shows stacking states.
  6. Hi again. I am trying to recreate a skill in the tips and tricks from yanfly in mv. I did it like this but it doesnt work.
    <JS Post-Apply>
    if (target.hp <= 0) {
    user.gainMp(item.mpCost);
    }
    <JS Post-Apply>

    Its supposed to return the mp cost of the skill when it finishes the enemy, but it doesnt work.
  7. Just curious if there's any info on this?

    oriongates said:
    I'm trying to make some changes to how TP works on a character-by-character basis, using the skills/states core.

    One character doesn't use TP so I put in the notetag <Replace TP Gauge: none> and it gets rid of their TP gauge. Perfect.

    For two other characters, they both use TP but the function is inverted. For one, their TP is more traditional (build it up and spend it) and it's called Fury. For the other, TP is a bad thing, their skills increase TP and they've got to use special venting skills to prevent negative effects upon reaching maximum TP. Their TP is called Heat.

    So, there's the problem...I want both of these characters to use TP but under different names.

    I thought this would be easy, but unfortunately I can't figure out how to do that. I tried to just copy the parameters for TP and just changed the name and the icon, like so.

    View attachment 157818

    The only difference between the Fury line and the TP line is the name and the icon number. I then put the <Replace TP Gauge: Fury> notetag in the class note field. But the result is that the TP field just goes away.

    So I can't figure out what I'm doing wrong.

    EDIT: I did figure out that part of the problem was not saving the changes before doing a test battle. That causes the TP gauge to re-appear, but it's still just called TP. I even tried removing the TP gauge entirely, then replacing the MP gauge (which the character doesn't use) with Fury. Still shows as TP on the battle screen.
  8. Hello, sorry for the noob question. How do I set up the basic attack skill with the battlecore plugin to work with both physical melee and physical ranged attacks? I would like the character to run up to the enemy and attack for melee attacks and obviously stay back for ranged attacks.
  9. @Kupotepo

    Add the following notetag to your passive state:

    Code:
    <JS Pre-Damage as User>
    if (!user.isStateAffected(14)) {
      user._attackStack = user._attackStack || 0;
      user._attackStack++;
      user.setStateDisplay(11, user._attackStack);
      if (user._attackStack == 3) {
        user.addState(14);
      }
    }
    </JS Pre-Damage as User>

    Replace 11 with the ID of your passive state and 14 with the ID of a new state; call it "attack crit up" or whatever name you want to give it. The state should add 50% critical rate, and have the following notetag:

    Code:
    <JS Post-Damage as User>
      delete user._attackStack;
      user.setStateDisplay(11, "");
      user.removeState(14);
    </JS Post-Damage as User>

    Replace 11 with the ID of your passive state and 14 with the ID of the state you just created. This will cause every 3rd hit that actor makes to have 50% increased crit chance which will reset after their next hit (misses shouldn't affect it). The state will show just the icon, then a "1", then a "2", with the next hit after that being the boosted one.

    @oriongates You need to edit the JS: Draw Gauge section: change the "const label" line to say "Fury" rather than the TP name from TextManager (you can also change the colour values here as I imagine you'd probably prefer it to be red rather than green)

    @rollerbelchen

    You can do

    Code:
    <JS Item Enable>
    enabled = BattleManager.actor().actorId() === ID OF ACTOR;
    </JS Item Enable>

    And that item will only appear to the character who can use it. The colouring issue is a bit more complex since it's being caused by the dark item rects and those are built in to some of the functions being called by the shop menu code. You could replace these with your own versions but that'd be quite involved; Yanfly said he'll add a parameter for changing the dark rect colour in a later update, which should resolve this for you.

    @GM-NUN

    You can use setStateDisplay to show a number over the state, which can include how many stacks it has. Passive states are stackable via <Passive Stackable> but it won't natively show you how many stacks there are; that's something you'll have to code in.

    @shaylina

    You forgot the slash on your closing tag. Should be </JS Post-Apply>

    @nitriso That's an action sequence thing; if you look at how the actions are set up in the VisuStella sample project you should get a decent idea of how to make effects like this, but let me know if you're struggling to figure it out even with that as a reference.
  10. @Trihan
    @shaylina

    You forgot the slash on your closing tag. Should be </JS Post-Apply>

    I feel so stupid to have missed something so easy to see...
  11. Hey, better that than your issue being some weird complex thing that takes forever to figure out!
  12. Trihan said:
    @oriongates You need to edit the JS: Draw Gauge section: change the "const label" line to say "Fury" rather than the TP name from TextManager (you can also change the colour values here as I imagine you'd probably prefer it to be red rather than green)

    I gave this a try, but when I saved everything and put in the notetag then go to a test battle, I get the error "Uncaught ReferenceError: Fury is not defined"

    To keep things simple, the only change after copy-pasting the TP information is to change the name to Fury and then went down to change the const label to Fury. I haven't tried changing the color yet.

    1598892266949.png
  13. You need to put Fury in quotes. :)
  14. @Trihan
    Thanks you so much! :3
    I did a bit of research yesterday and came up with something like that wasn't sure. Now I'm happy with the solution and the fact I nearly did it myself! just started to learn JavaScript last week XD

    And thanks for letting me know about the dark item rects. Just need to wait for that issue is fine for me.
  15. rollerbelchen said:
    @Trihan
    Thanks you so much! :3
    I did a bit of research yesterday and came up with something like that wasn't sure. Now I'm happy with the solution and the fact I nearly did it myself! just started to learn JavaScript last week XD

    And thanks for letting me know about the dark item rects. Just need to wait for that issue is fine for me.

    We all had to start somewhere buddy, I'm sure you'll be coding rings around me in no time. :)
  16. Hi, I'm trying to code a Zombie State where the Actor inflicted by the State receives damage, instead of healing, if hit by a healing spell or item.
    I was trying to implement this code:
    Code:
    <JS On Add State>
    if(target.isHpRecover()){
    value = Math.abs(value);
    }
    </JS On Add State>
    But it didn't work.

    I also tried using <JS sparam Flat: REC> but that too didn't work.
  17. Trihan said:
    You need to put Fury in quotes. :)

    That seems to have worked! Thanks a lot.
  18. CrocPirate said:
    Hi, I'm trying to code a Zombie State where the Actor inflicted by the State receives damage, instead of healing, if hit by a healing spell or item.
    I was trying to implement this code:
    Code:
    <JS On Add State>
    if(target.isHpRecover()){
    value = Math.abs(value);
    }
    </JS On Add State>
    But it didn't work.

    I also tried using <JS sparam Flat: REC> but that too didn't work.

    Instead of value = Math.abs(value), try value = -value
  19. @Trihan I followed your example on Quit Game adding it to title screen and it works. But when I add the same command and settings from Scene_Title to Scene_GameEnd, the command is there but when I press it, it just goes back to the menu screen in-game.

    And is an extension possible like customizable Hit Accuracy like YEP_HitAccuracy like editing the Accuracy and Evade formula params, and setting things for User Hit Rate and Target Evade Rate? In that plugin, I've a really long complex conditional code on each User Hit Rate and Target Evade Rate param referencing a series like Fire Emblem's accuracy with its weapon triangle and some extra things in there. And I use 1.00 for Accuracy and 1 - (skillHitRate * (userHitRate - targetEvadeRate)) for Evade.
  20. The same thing won't work if you do it in the menu because Scene_GameEnd is stacked on top of Scene_Menu, so popScene will just return to the previous one. It quits the game in Scene_Title because at that point there is no previous scene to return to. Do

    Code:
    SceneManager.exit();

    instead.

    Yes, you can edit accuracy and evade params from the plugin parameters on CoreEngine.