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

● ARCHIVED · READ-ONLY
Started by Trihan 251 posts Page 13 of 13 View original ↗
  1. i talks in general (but in specific kinda i wanted implementing skill cost meastry, for weapons skills ), sorry for confusion in general
  2. Trihan said:
    Jump (skill/state)
    This one is a bit of a hack. Technically it has an unwanted animation happening but because the user is off-screen you don't see it. I had to cobble together the targeting part because of not having Selection Control.

    Skill notebox:
    JavaScript:
    <Custom Action Sequence>
    <JS Post-Apply>
      $gameTroop.aliveMembers().forEach(member => member.addState(65));
    </JS Post-Apply>

    Replace 65 with the ID of your Jump Target Redirect state.

    Action sequence:
    ◆Plugin Command:VisuMZ_1_BattleCore, BTLOG: Display Action
    ◆Plugin Command:VisuMZ_1_BattleCore, CAMERA: Focus Target(s)
    : :Targets = ["user"]
    : :Duration = 60
    : :Camera Easing = InOutSine
    : :Wait For Camera? = false
    ◆Plugin Command:VisuMZ_1_BattleCore, ZOOM: Change Scale
    : :Scale = 1.5
    : :Duration = 60
    : :Zoom Easing = InOutSine
    : :Wait For Zoom? = false
    ◆Plugin Command:VisuMZ_1_BattleCore, MOVE: Battle Step
    : :Targets = ["user"]
    : :Wait For Movement? = false
    ◆Wait:60 frames
    ◆Play SE:Wind1 (80, 150, 0)
    ◆Plugin Command:VisuMZ_1_BattleCore, MOVE: Float
    : :Targets = ["user"]
    : :Desired Height = 495
    : :Duration = 20
    : :Float Easing = Linear
    : :Wait For Float? = false
    ◆Plugin Command:VisuMZ_1_BattleCore, MOVE: Opacity
    : :Targets = ["user"]
    : :Desired Opacity = 0
    : :Duration = 20
    : :Opacity Easing = Linear
    : :Wait For Opacity? = false
    ◆Plugin Command:VisuMZ_1_BattleCore, MOVE: Wait For Float
    ◆Plugin Command:VisuMZ_1_BattleCore, MECH: Action Effect
    : :Targets = ["current target"]
    ◆Plugin Command:VisuMZ_1_BattleCore, MECH: Add State
    : :Targets = ["user"]
    : :States = ["64"]
    ◆Plugin Command:VisuMZ_1_BattleCore, BTLOG: Clear Battle Log
    ◆Plugin Command:VisuMZ_1_BattleCore, CAMERA: Reset
    : :Reset Focus? = true
    : :Reset Offset? = true
    : :Duration = 60
    : :Camera Easing = InOutSine
    : :Wait For Camera? = false
    ◆Plugin Command:VisuMZ_1_BattleCore, ZOOM: Reset Zoom
    : :Duration = 60
    : :Zoom Easing = InOutSine
    : :Wait For Zoom? = true

    Replace 64 with the ID of your Jump state.

    Jump state:
    JavaScript:
    <JS On Add State>
      target._jumpTurns = 2;
    </JS On Add State>
    
    <JS Pre-Damage As Target>
      target.clearResult();
    </JS Pre-Damage As Target>
    
    <JS Pre-Regenerate>
      target._jumpTurns--;
      if (target._jumpTurns <= 0) {
        const skill = 277;
        const target = -2;
        user.forceAction(skill, target);
        BattleManager.forceAction(user);
      }
    </JS Pre-Regenerate>

    Replace 277 with the ID of your Land skill.

    Jump Target Redirect state:
    JavaScript:
    <JS Pre-Start Action>
      if (this.isForOpponent() && this.isForOne()) {
        const possibleTargets = user.opponentsUnit().members().filter(member => !member.isStateAffected(64));
        const target = possibleTargets[Math.randomInt(possibleTargets.length)];
        if (target) {
          this._targetIndex = target.index();
        } else {
          this.setSkill(16);
        }
      }
    </JS Pre-Start Action>

    This requires that 16 is still the default "Wait and See" skill. If not, set up a skill that does nothing and change 16 to that skill's ID.

    Land skill action sequence:
    ◆Plugin Command:VisuMZ_1_BattleCore, BTLOG: Clear Battle Log
    ◆Plugin Command:VisuMZ_1_BattleCore, BTLOG: Display Action
    ◆Plugin Command:VisuMZ_1_BattleCore, MECH: Immortal
    : :Targets = ["user","all targets"]
    : :Immortal = true
    ◆Plugin Command:VisuMZ_1_BattleCore, MOVE: Move To Target(s)
    : :Targets (Moving) = ["user"]
    : :Targets (Destination) = ["all targets"]
    : :Target Location = middle base
    : :Melee Distance = 24
    : :Offset Adjustment = horz
    : :Offset: X = 0
    : :Offset: Y = 0
    : :Duration = 1
    : :Face Destination? = true
    : :Movement Easing = Linear
    : :Movement Motion = walk
    : :Wait For Movement? = false
    ◆Plugin Command:VisuMZ_1_BattleCore, CAMERA: Focus Target(s)
    : :Targets = ["current target"]
    : :Duration = 60
    : :Camera Easing = InOutSine
    : :Wait For Camera? = false
    ◆Plugin Command:VisuMZ_1_BattleCore, ZOOM: Change Scale
    : :Scale = 1.5
    : :Duration = 60
    : :Zoom Easing = InOutSine
    : :Wait For Zoom? = false
    ◆Wait:60 frames
    ◆Plugin Command:VisuMZ_1_BattleCore, MOTION: Motion Type
    : :Targets = ["user"]
    : :Motion Type = attack
    : :Show Weapon? = true
    ◆Plugin Command:VisuMZ_1_BattleCore, MOVE: Opacity
    : :Targets = ["user"]
    : :Desired Opacity = 255
    : :Duration = 1
    : :Opacity Easing = Linear
    : :Wait For Opacity? = false
    ◆Plugin Command:VisuMZ_1_BattleCore, MOVE: Float
    : :Targets = ["user"]
    : :Desired Height = 0
    : :Duration = 20
    : :Float Easing = Linear
    : :Wait For Float? = false
    ◆Wait:10 frames
    ◆Plugin Command:VisuMZ_1_BattleCore, ANIM: Show Animation
    : :Targets = ["current target"]
    : :Animation ID = 2
    : :Mirror Animation = false
    : :Wait For Animation? = false
    ◆Plugin Command:VisuMZ_1_BattleCore, MECH: Action Effect
    : :Targets = ["all targets"]
    ◆Shake Screen:5, 5, 5 frames
    ◆Plugin Command:VisuMZ_1_BattleCore, ANIM: Wait For Animation
    ◆Plugin Command:VisuMZ_1_BattleCore, CAMERA: Reset
    : :Reset Focus? = true
    : :Reset Offset? = true
    : :Duration = 60
    : :Camera Easing = InOutSine
    : :Wait For Camera? = false
    ◆Plugin Command:VisuMZ_1_BattleCore, ZOOM: Reset Zoom
    : :Duration = 60
    : :Zoom Easing = InOutSine
    : :Wait For Zoom? = false
    ◆Plugin Command:VisuMZ_1_BattleCore, MOVE: Jump
    : :Targets = ["user"]
    : :Desired Height = 100
    : :Duration = 30
    : :Wait For Jump? = false
    ◆Plugin Command:VisuMZ_1_BattleCore, MOVE: Move To Point
    : :Targets = ["user"]
    : :Destination Point = home
    : :Offset Adjustment = horz
    : :Offset: X = 0
    : :Offset: Y = 0
    : :Duration = 30
    : :Face Destination? = false
    : :Movement Easing = Linear
    : :Movement Motion = walk
    : :Wait For Movement? = true
    ◆Plugin Command:VisuMZ_1_BattleCore, ACSET: Finish Action
    : :Immortal: Off = true
    : :Wait For New Line = true
    : :Wait For Effects = true
    : :Clear Battle Log = true
    : :Home Reset = true
    : :Wait For Movement = true
    ◆Plugin Command:VisuMZ_1_BattleCore, MECH: Remove State
    : :Targets = ["user"]
    : :States = ["64"]
    I've tried to implement this, and the landing part doesn't seem to be happening. the state just ends without doing anything. I removed the camera movements because I didn't think it was necessary.
  3. A good RPG feature I'd like to see a the spell Chaos Bolt from D&D 5th edition. It's a spell that deals 2d8 + 1d6 damage. The d8s determine which type of damage the spell deals, if they match, then the spell goes to a new enemy target and deals the same 2d8 + 1d6 damage with a new elemental type.
  4. @ELandP

    Try something like this (you'll have to add the animations etc):

    ◆Plugin Command:VisuMZ_1_BattleCore, ACSET: Setup Action Set
    : :Display Action = true
    : :Immortal: On = false
    : :Battle Step = false
    : :Wait For Movement = true
    : :Cast Animation = true
    : :Wait For Animation = true
    ◆Script:const otherTargets = $gameTroop.aliveMembers().filter(member => member !== BattleManager._targets[0]);
    : :otherTargets.forEach(member => BattleManager._allTargets.push(member));
    ◆Label:Attack
    ◆Control Variables:#0011 = Random 1..8
    ◆Control Variables:#0012 = Random 1..8
    ◆Control Variables:#0013 = Random 1..6
    ◆Plugin Command:VisuMZ_1_BattleCore, MECH: Custom Damage Formula
    : :Formula = v[11]+v[12]+v[13]
    ◆If:Script:$gameVariables.value(11)+$gameVariables.value(12)===2
    ◆Plugin Command:VisuMZ_1_BattleCore, ELE: Force Elements
    : :Elements = ["1"]

    :End
    ◆Comment:Add above conditionals for other sum values
    : :to change elements
    ◆Plugin Command:VisuMZ_1_BattleCore, MECH: Action Effect
    : :Targets = ["current target"]
    ◆If:Script:$gameVariables.value(11) === $gameVariables.value(12)
    ◆Wait:30 frames
    ◆Plugin Command:VisuMZ_1_BattleCore, TARGET: Next Target
    : :Jump To Label = Attack

    :End
    ◆Plugin Command:VisuMZ_1_BattleCore, ACSET: Finish Action
    : :Immortal: Off = true
    : :Wait For New Line = true
    : :Wait For Effects = true
    : :Clear Battle Log = true
    : :Home Reset = true
    : :Wait For Movement = true
  5. necroposting in the final days... thank you trihan <3
  6. Crazetex said:
    necroposting in the final days... thank you trihan <3
    Honestly yea, RpG Lord, Robro and Trihan have taught me and helped me so much in the last little bit. Thanks guys.
  7. Hi, I'm pretty new to RPG Maker, but I was attempting to do the thief's revenge skill in my game. This section is causing me issues, as I'm unsure whether I'm supposed to separate them into different scripts and whether the End function is a script itself or something I am missing to add to the script.
    Trihan said:
    ◆Script:BattleManager._action._currentThiefHit = BattleManager._action._currentThiefHit || 0;
    : :BattleManager._action._currentThiefHit++;
    ◆If:Script:BattleManager._action._currentThiefHit === BattleManager._action._totalThiefHits
    ◆Break Loop

    :End

    :Repeat Above
  8. @Soul796
    That first one is a script event command (the first two BattleManager lines are there, when you copypaste them ignore the : : at the start of second line).

    Then you have conditional branch (the 'If' stuff) event command where they selected the script option to use as a conditional.

    The maker adds the 'End' automatically when you use the conditional branch event command.
  9. Thanks, I got it to work, though I am now unsure whether I was supposed to put the JavaScript code in the skill notetag or in the common event, as when I tested the skill to ensure it worked properly, it did an infinite loop.
  10. Never mind, I figured out the issue. I messed up the script command.
  11. Just a heads-up everyone that since this place is closing down, I'll be posting the revised and updated version on rpgmaker.net sometime in the next week or so.