Pre-made (Yanfly's) Action Sequence Sharing and Discussions

● ARCHIVED · READ-ONLY
Started by Blue001 2126 posts Page 105 of 107 View original ↗
  1. Nice to see the thread still going strong
  2. (SOLVED... Seemed to be a conflict within Yanfly's Weapon Animations plugin which overrides the action sequences and has to be directed with note calls from that plugin)

    Does anyone happen to have a clue as to why "MOTION ATTACK/THRUST/MISSILE/SWING" all just refer to the same 3 frames in the sprite sheet? This is starting to become incredibly frustrating as one of the characters in my game is planned to use whips and bows and thus i want to refer to another available motion animation i have to use for the bow, but at this point it feels like i'll have to figure out how to swap between battler sheets when equipping different weapons whereas this plugin pretends to simply refer to another portion of the sheet but it does not.

    I have been trying for an hour now and all 4 "different" attacking motions all lead to the 2nd of the 4 different slots for attacking motions.......

    the sequence
    <setup action>
    display action
    immortal: targets, true
    </setup action>
    <target action>
    animation 150: user
    move user: targets, front, 17, offset x +180
    wait: 25
    wait for movement
    MOTION MISSILE: user
    attack animation: target
    ani wait: 3
    action effect
    wait: 15
    </target action>

    At this point i have gone as far as to edit the sheet to put the "Missile" motion on top of 3 of the 4 slots in the battle sheet to see if that could help me make sense of anything or possibly solve it, but even still it is only ever the second of 4 total 3-frame battler motions that get referenced by the plugin whether i call for "Motion" Attack, Thrust, Missile or Swing it's always the same one.

    Also have the weapon motion in the database set to Missile as well, though I'd like to assume that that wouldn't even matter with this plugin...
  3. Is there a way of using the Action Sequence and the Eva: Code function to increase the Hit Rate?

    This is what I have right now, so I'm using the Yanfly Row Formation to as the name says have Row, which has the passive State to increase the Evasion, so I want to have a skill that, so far is only for this Actor raises Hit Rate enough to bypass that Evasion boost.

    This is the sequence I have so far...
    JavaScript:
    <target action>
    camera focus: user, center, 30
    zoom: 125%, 30
    wait: 30
    motion spell: user
    action animation: user, mirror
    wait for animation
    camera focus: target, center, 30
    animation 174: target
    wait: 30
    if target.row() >= 3
    damage rate: 200%
    else
    end
    action effect
    </target action>

    Now according to Yanfly Extra Param Formula, I maybe can use the Eval: Code function to artificially increase the hit rate... maybe, would something like this work?

    JavaScript:
    <target action>
    camera focus: user, center, 30
    zoom: 125%, 30
    wait: 30
    motion spell: user
    action animation: user, mirror
    wait for animation
    camera focus: target, center, 30
    animation 174: target
    wait: 30
    if target.row() >= 3
    ///because the one using this skill is Actor 2 on the list
    ///so this would be like increasing Hit by 200% according to Extra Param right?
    eval: $gameActors.actor(1).addHit(2)
    damage rate: 200%
    else
    end
    action effect
    ///then I'll need to remove the extra Hit, and the function in extra param says to use this
    eval: $gameActors.actor(1).clearXParamPlus()
    </target action>
  4. emelian65 said:
    Is there a way of using the Action Sequence and the Eva: Code function to increase the Hit Rate?
    Not easily, but you seem to have some misconceptions about how hitting works.

    The hit rate is the hit rate. There's no such thing as hit rate bypassing evasion.

    If you have a 95% hit rate, then you have a 95% chance to hit your target. Once you've hit, there's a separate check against the target's evasion - so if they have a 50% evasion, they'll have a 50% chance to evade all successful hits. It makes no difference what the attacker's hit rate was.

    You can make the skill's hit type be Certain Hit, which will cause it to ignore evasion.

    Otherwise, you could use Yanfly's Hit Accuracy which has a plugin parameter to change the formula for evasion - you could make it check whether this specific skill is the one being used and have it apply a penalty in the formula, if you want to get that complex.
  5. emelian65 said:
    Is there a way of using the Action Sequence and the Eva: Code function to increase the Hit Rate?
    Don't even need eval.

    To make an attack hit, couldn't you just use states? My yanflyese is rusty, haven't used those plugins in a long time, but this gives a general idea:

    1. Create 2 states: one that boosts accuracy by however much you want, the other that debuffs evasion by however much you want. Let's call the buff state 10 and the debuff state 11.

    2.

    Code:
      add state: 10, user
      add state: 11, target
      action effect: target
      remove state: 10, user
      remove state: 11, target
  6. I am in need of help to fix an Action Sequence (of a regular attack in this case) in such a way that the user (party member) will move to a different X/Y offset when the skill targets another party member rather than an enemy due to a Confusion/Charmed state.

    In the past someone helped me with a similar issue by providing the command line "if target==user" so i tried things like "if target==actor" or "if target==enemy" but so far haven't managed to solve the issue...

    (The issue being that my Enemy Sprite Y Anchors are massively offset and thus so are the party members abilities by default... and so when they use their auto attack on another party member they will hop off the screen or at least stand fiercely far diagonally away from them swinging the air)
  7. Anatis said:
    In the past someone helped me with a similar issue by providing the command line "if target==user" so i tried things like "if target==actor" or "if target==enemy" but so far haven't managed to solve the issue...
    user and target are predefined objects as far as you interfacing with action sequence. actor and enemy are not. if youre trying to see if the target is an enemy or actor, they own functions that can be used to determine it
    Code:
    if target.isActor()
    if target.isEnemy()

    so after that, youd move the actor to cordinates based on the target's position and then offset it a little and face them the correct way based on the actor/enemy check
  8. Robro33 said:
    user and target are predefined objects as far as you interfacing with action sequence. actor and enemy are not. if youre trying to see if the target is an enemy or actor, they own functions that can be used to determine it
    Code:
    if target.isActor()
    if target.isEnemy()

    so after that, youd move the actor to cordinates based on the target's position and then offset it a little and face them the correct way based on the actor/enemy check
    Ah yes, thank you again!

    I̶t̶ ̶n̶o̶w̶ ̶w̶o̶r̶k̶s̶ ̶b̶e̶a̶u̶t̶i̶f̶u̶l̶l̶y̶!̶
    my new sequence
    <setup action>
    display action
    immortal: targets, true
    </setup action>
    <target action>
    if target==user
    jump user: 45, 15
    motion attack: user
    attack animation: user
    ani wait: 4
    action effect
    else
    if target.isActor()
    animation 150: user
    MOTION ESCAPE: user
    move user: targets, front, 30, offset x +20
    face user: backward
    wait for movement
    move user: backward, 20, 12
    jump user: 45, 15
    motion attack: user
    attack animation: user, mirror
    face user: backward
    ani wait: 4
    action effect
    wait: 15
    if target.isEnemy()
    animation 150: user
    MOTION ESCAPE: user
    move user: targets, front, 60, offset x +20, offset y +120
    wait for movement
    move user: forward, 20, 12
    jump user: 45, 15
    motion attack: user
    attack animation: user
    ani wait: 4
    action effect
    wait: 15
    </target action>
    :kaocry:

    Ah... Small edit:
    For whatever reason... This attack command will now only be used when performed automatically through a state such as Charm/Confuse... And when I manually select the "Attack" option the actor just kind of stands there and skips the turn... ;D

    Edit edit: SOLVED, simply had to put the if target.isEnemy() section at the top of the list which seems logical even to me...
    NOW it works beautifully ;D
    <setup action>

    display action

    immortal: targets, true

    </setup action>

    <target action>

    if target.isEnemy()

    animation 150: user

    MOTION ESCAPE: user

    move user: targets, front, 60, offset x +20, offset y +120

    wait for movement

    move user: forward, 20, 12

    jump user: 45, 15

    motion attack: user

    attack animation: user

    ani wait: 4

    action effect

    wait: 15

    else

    if target==user

    jump user: 45, 15

    motion attack: user

    attack animation: user

    ani wait: 4

    action effect

    wait: 15

    else

    if target.isActor()

    animation 151: user

    MOTION ESCAPE: user

    move user: targets, front, 30, offset x +40

    face user: backward

    wait for movement

    move user: backward, 20, 12

    jump user: 45, 15

    motion attack: user

    attack animation: user, mirror

    face user: backward

    ani wait: 4

    action effect

    wait: 15

    </target action>
  9. How do you move an enemy/actor to a location, and then hold them there? Maybe for 2 turns or something. When I try the move command, they usually snap back, as soon as its done.
  10. WinterDepression said:
    they usually snap back, as soon as its done.
    the default finish action has a call to move the battler back to their home position. you need to give your skill an empty finish action or one without the call.
  11. This is prolly one of the most majestic threads on this site, ppl sharing their kung fu with one another, I'm glad I have YEP, going to visit this thread ceremoniously
  12. sorry for being a noob, but where do you put this code, i recently bought rpg maker mv, like 2 days ago, im trying to create a action sequence but i dont know how to do it, or what to search so i can make one, can someone help me, i would appreciate it a lot if someone can show me on the right direction. thank you so much and sorry for being a noob.
  13. the first thing is you need to download yanfly's battle engine core plugin and the action sequences extension plugins. Then once its installed, you need to place notetags within the corresponding skills in order to tell the game what should happen and when.

    However, i dont suggest playing around with plugins if you only bought the engine a few days ago. Itd be a good idea to learn the engine and become familiar with it first before trying to modify it an learn AS on top of it.
  14. does someone know if it would be possible for an action sequence to play one of several animations at a certain propability?

    For example where an ability would have a character throwing a rock at an enemy but through use of several animations the rock would be either blue, red or green randomly differing with each use of the skill?
  15. simple way is to create a random number and write it to a variable with
    Code:
    eval: $gameVariables.setValue(1, Math.randomInt(3))
    and then use if blocks so that if the variable is 1, you use the green animation, if its 2, red, and so on. im not sure if the "animation: x" command only takes direct numbers or not
  16. I have a Piledriver Action sequence which works fine, but I wanted to add a tweak to it so that if you tried the skill on a Boss, it would reverse the attack in mid air and Piledrive you instead. Two questions:

    1) I'm detecting if an enemy is a Boss by seeing if they have the Collapse Effect trait of Boss. Should I use a Notetag instead? I can't have it on the Troop battle event because it contains non-Boss enemies.

    ◆Script:// Get the target enemy
    :Script:var targetIndex = BattleManager._action._targetIndex;
    :Script:var targetEnemy = $gameTroop.members()[targetIndex];
    :Script:
    :Script:// Check if the enemy has the Boss Collapse Effect (trait code 63 and dataId 1)
    :Script:var isBossCollapse = targetEnemy.traitObjects().some(traitObject =>
    :Script: traitObject.traits &&
    :Script: traitObject.traits.some(trait =>
    :Script: trait.code === Game_BattlerBase.TRAIT_COLLAPSE_TYPE &&
    :Script: trait.dataId === 1)
    :Script:);
    :Script:
    :Script://Assign to Boss switch
    :Script:$gameSwitches.setValue(26, isBossCollapse);

    2) When the Boss reverses the attack I need to apply the damage to the player. How do I do this when the skill damage formulae specifies the enemy? I can do this

    ◆If:Boss is ON
    ◆Comment:------Boss deals damage
    ◆Script:// Get the current user (the actor performing the skill)
    :Script:var user = BattleManager._subject;
    :Script:// Define the damage value (for example, 100)
    :Script:var damageValue = 100;
    :Script:// Apply the damage to the user
    :Script:user.gainHp(-damageValue);
    :Script:// Trigger the damage popup and animation manually
    :Script:user.performDamage(); // This triggers the damage animation
    :Script:user.startDamagePopup();

    :Script:$gameTemp.requestBattleRefresh();
    ◆Plugin Command:VisuMZ_1_BattleCore, ANIM: Balloon Animation
    :Plugin Command:Targets = ["user"]
    :Plugin Command:Balloon Type = Exclamation
    :Plugin Command:Wait for Completion = true
    ◆Text:None, Actor_Danny(2), Window, Bottom
    :Text:Whuh? It reversed my Piledriver!

    :Else
    ◆Comment:------Enemy takes damage
    ◆Plugin Command:VisuMZ_1_BattleCore, MECH: Action Effect
    :Plugin Command:Targets = ["current target"]

    :End
  17. An easier check would be to create a Boss state and have said state be applied on every boss.
    Unfortunately, that's as far as my help can go since I don't have MZ, i have far too much work into my MV project to convert.

    Also this is action sequences for MV not MZ using Yanfly's plugins.
  18. jshunter said:
    1) I'm detecting if an enemy is a Boss by seeing if they have the Collapse Effect trait of Boss. Should I use a Notetag instead?
    Yes. Note tag is absolutely the way to go here. Very easy to check and allows for flexibility in case some bosses don't have the special collapse for whatever reason. Or if you want certain non-bosses to reverse it also.

    jshunter said:
    2) When the Boss reverses the attack I need to apply the damage to the player. How do I do this when the skill damage formulae specifies the enemy? I can do this
    Does yanfly have an action sequence to change the formula mid-sequence? It's been awhile, I forget. if so, use that, but if not, you can set up the formula like so:

    (b.isEnemy() && b.enemy().meta["Boss"]) ? (b.atk * 4 - a.def * 2) : (a.atk * 4 - bb.def * 2)
    Obviously replace the basic-ass formulas in there with the one the boss will use on the player as the first one, and the one the player uses on other enemies as the second one. Not tested, but it should work. Probably. Maybe. Let me know if it doesn't.

    Edit: Replace "Boss" / <Boss> with whatever note tag ID you decide on, case sensitive.

    Edit2: Just realized you're posting an mz sequence in the yanfly/mv thread. I don't know much about how the mz plugins work but everything I said should still apply.
  19. Hi, is there a way to check if an attack hits or not, before running the 'action effect'?
    Basically, I want to time the damage/miss to show at the moment of impact.
    Also got 2 different animations depending on if its a hit or miss.

    This is the current set-up.

    This one looks good, but the damage comes before the impact.
    I have tried putting 'action effect' after the IF, but then it doesn't work properly.
    <target action>
    motion THRUST: user
    perform action
    action effect: target
    if !target.result().missed && !target.result().evaded
    action animation
    motion wait: user
    MOTION DAMAGE: target
    wait for animation
    else
    animation 121: target
    MOTION EVADE: target
    motion wait: user
    wait for animation
    end
    death break
    </target action>


    I came up with a workaround, but it involves 3 different animations (launch, hit, miss) and it looks kinda janky.

    workaround
    <target action>
    motion THRUST: user
    perform action
    animation 122: target
    wait for animation
    action effect: target
    if !target.result().missed && !target.result().evaded
    animation 123: target
    motion wait: user
    MOTION DAMAGE: target
    wait for animation
    else
    animation 124: target
    MOTION EVADE: target
    motion wait: user
    wait for animation
    end
    death break
    </target action>
  20. WinterDepression said:
    Hi, is there a way to check if an attack hits or not, before running the 'action effect'?
    not without altering how accuracy is handled by the engine. the hit rate calcs are made during "action effect" and theres no way to do anything based on the result it creates until after the action effect is finished.