Ally Follow up attacks

Discussion in 'Javascript/Plugin Support' started by ArcticPrism, Mar 24, 2019.

  1. ArcticPrism

    ArcticPrism Veteran Veteran

    Messages:
    31
    Likes Received:
    12
    First Language:
    English
    Primarily Uses:
    RMMV
    I was wondering how I would go about implementing a passive ability that gives the user of it a chance to follow up with a basic attack after an ally makes one. For example:

    Actor A has follow up passive
    Actor B attacks the enemy with the attack command
    Actor A has a 25% chance to also use the attack command immediately afterwards if the target isn't dead.

    The second thing would be a skill that can cause a follow up attack on demand.

    Actor A uses attack command skill on an enemy.
    Ally with the highest ATK stat attacks the target.
     
    #1
  2. Magusalfador

    Magusalfador Veteran Veteran

    Messages:
    203
    Likes Received:
    32
    First Language:
    English Spanish
    Are you willing to use Yanfly Plugins? If you are, I think I can help you to develop that mechanic.
     
    #2
  3. ArcticPrism

    ArcticPrism Veteran Veteran

    Messages:
    31
    Likes Received:
    12
    First Language:
    English
    Primarily Uses:
    RMMV
    Yeah. I have some Yanfly stuff already.
     
    #3
  4. Magusalfador

    Magusalfador Veteran Veteran

    Messages:
    203
    Likes Received:
    32
    First Language:
    English Spanish
    Ok, cool. I think we will need the following plug ins:

    http://yanfly.moe/2015/10/11/yep-4-action-sequence-pack-1/
    http://yanfly.moe/2015/10/12/yep-5-action-sequence-pack-2/
    http://yanfly.moe/2015/10/12/yep-6-action-sequence-pack-3/
    http://yanfly.moe/2015/12/25/yep-50-buffs-states-core/

    Now, what I understand is, you want a passive state that gives the actor a chance of making a basic attack after another actor has done one. My questions here are, this state can be given to any actor? or you plan to have it on a specific actor? and, the actor with the possibility of the follow up attack, is he doing it after a SPECIFIC actor did the basic attack, or it will be after any actor(excluding him) have done a basic attack?

    For the skill that invokes a basic attack of the actor with the highest ATK, will it be also a 25% chance or its a 100% guaranteed?

    Im no scripter but I´ve done a lot of things like this, so Ill try my best to help you, I think its pretty doable.
     
    #4
  5. ArcticPrism

    ArcticPrism Veteran Veteran

    Messages:
    31
    Likes Received:
    12
    First Language:
    English
    Primarily Uses:
    RMMV
    Got the plugins.

    I'm currently using Olivia's OTB. It functions mostly like Yanfly's STB at a base.
    https://fallenangelolivia.itch.io/order-turn-battle-system

    As for more specifics, the passive state will be applicable for any actor. I plan to have it be a passive skill(Suppressing Fire) a bow class can learn that gives them a chance to attack with a basic attack after any ally does a basic attack. It'd probably be for the best for follow up attacks not to be able to trigger off of each other to avoid the possibility of a follow up attack loop until an enemy is dead.

    The skill that invokes a basic attack trigger from the ally with the highest ATK is 100%.
     
    #5
  6. Magusalfador

    Magusalfador Veteran Veteran

    Messages:
    203
    Likes Received:
    32
    First Language:
    English Spanish
    Ok, got it. Yes, dont worry, the follow up basic attack will not be triggered by another follow up basic attack. So, lets say 2 actors have the passive skill, if both pass the 25%, both will be doing the follow up attack or you want to limit only one follow up basic attack?

    Ill start with it and if I have any doubts, I will ask you.
     
    #6
  7. ArcticPrism

    ArcticPrism Veteran Veteran

    Messages:
    31
    Likes Received:
    12
    First Language:
    English
    Primarily Uses:
    RMMV
    Only one of them should do the follow up attack.

    Thanks a lot for your help!
     
    #7
  8. ninestigmas

    ninestigmas Villager Member

    Messages:
    19
    Likes Received:
    1
    First Language:
    english
    Primarily Uses:
    RMMV
    did you ever manage to solve your problem? i was lookign for the samething.
     
    #8
    Magusalfador likes this.
  9. ArcticPrism

    ArcticPrism Veteran Veteran

    Messages:
    31
    Likes Received:
    12
    First Language:
    English
    Primarily Uses:
    RMMV
    Thanks to @Magusalfador I was able to! I'll share the code below:

    Required plugins:

    http://yanfly.moe/2015/10/11/yep-4-action-sequence-pack-1/
    http://yanfly.moe/2015/10/12/yep-5-action-sequence-pack-2/
    http://yanfly.moe/2015/10/12/yep-6-action-sequence-pack-3/
    http://yanfly.moe/2015/12/25/yep-50-buffs-states-core/
    http://www.yanfly.moe/wiki/Weapon_Unleash_(YEP) (for the ability to give each weapon type its own attack, which is how mine is built)



    The script uses a state to determine if a party member is able to perform follow up attacks. If the party member has the state, they'll have a 25% chance to follow up a basic attack with their own basic attack. The basic code uses state 10 but you can obviously change that to anything. My code is currently built around having multiple weapon types but you can remove parts of the code if you don't use it. The second half of the code in parts 1 and 3 just checks weapon types. If an actor is using weapon type 1(dagger), it follows up with skill X or if it's weapon type 2(sword), it follows up with skill Y. If you don't care about weapon types you can just remove the weapon type checks.

    It comes in 3 parts(everything goes in the notetag section)

    Part 1:

    Put this inside of the basic attack skill. This is what triggers a follow up attack from another party member. It needs to point to a another skill that has part 2 of the code. This is to prevent follow ups to folow ups aka loops.

    Part 2:

    Make a second skill and put this code in it. This is the actual skill that an actor follows up with. It can be any skill.


    Part 3:

    This part is entirely optional. It's just a skill an actor can use that forces the party member with the highest attack to do a basic attack. Put this in a skill an actor can use.


    I sure did thanks to magusalfador. Let me get the code and I'll share it.

     
    Last edited: Nov 11, 2019
    #9
    Magusalfador and caethyril like this.
  10. ninestigmas

    ninestigmas Villager Member

    Messages:
    19
    Likes Received:
    1
    First Language:
    english
    Primarily Uses:
    RMMV
    thank you so much for your generosity friend, i appreciate it.
     
    #10

Share This Page