Chance to multiple hit

● ARCHIVED · READ-ONLY
Started by Wiratamana 8 posts View original ↗
  1. I want my character to have a chance to multiple hit enemy base on character status


    example


    the higher character agility the higher chance character will do multiple hit on enemy when attacking
  2. Well. Poked around trying to figure this out. Best I can do for you is to pop over to Yanfly's site and get the Base Troop Events plugin, then put the common event in the appropriate troop that adds a state (Called Superfast for this discussion) when Player Speed is X amount higher than Enemy speed. Put this event to happen on Turn 0 + 1X, so it happens initially, and again at each turn. The only problem with using this method is that if the conditions are met for any enemy's speed, the actor can double attack any target. Not sure how to fix this, unfortunately. If this works for you (At least for now) I'll go into how to actually make the event.


    In the common event, go to Control Variables->Variable X(We'll call it Player Speed)->SET->GameData->Actor->AGI. This sets this variable equal to the selected actor's Agility. Now do the same for Variable Y(We'll call this Enemy Speed). After those are set, Control Variables->Player Speed->SUB->Variable->Enemy Speed.  This will set Player Speed to the difference between the two. Now we put in a conditional branch that reads IF Variable Player Speed > (Whatever Value you decide they need to beat the enemy's AGI by), Add State Superfast. Make sure you have that state set to remove itself after 1 action and at battle end, and in the Traits section of the state, Add Attack->Attack Times +1.


    Below is a picture of the event in the troop event window. Let me know if that works out for you or if you need any further clarification.


    doubleattack.png
  3. Ugouka said:
    Well. Poked around trying to figure this out. Best I can do for you is to pop over to Yanfly's site and get the Base Troop Events plugin, then put the common event in the appropriate troop that adds a state (Called Superfast for this discussion) when Player Speed is X amount higher than Enemy speed. Put this event to happen on Turn 0 + 1X, so it happens initially, and again at each turn. The only problem with using this method is that if the conditions are met for any enemy's speed, the actor can double attack any target. Not sure how to fix this, unfortunately. If this works for you (At least for now) I'll go into how to actually make the event.


    In the common event, go to Control Variables->Variable X(We'll call it Player Speed)->SET->GameData->Actor->AGI. This sets this variable equal to the selected actor's Agility. Now do the same for Variable Y(We'll call this Enemy Speed). After those are set, Control Variables->Player Speed->SUB->Variable->Enemy Speed.  This will set Player Speed to the difference between the two. Now we put in a conditional branch that reads IF Variable Player Speed > (Whatever Value you decide they need to beat the enemy's AGI by), Add State Superfast. Make sure you have that state set to remove itself after 1 action and at battle end, and in the Traits section of the state, Add Attack->Attack Times +1.


    Below is a picture of the event in the troop event window. Let me know if that works out for you or if you need any further clarification.


    View attachment 36879



    that's mean I need to make event every for every troop.
    And from what you have said, the double attack will always happen as long as your agility are higher than the enemy.

    What i really want is a chance doing multiple hit, or double action base on character status.

    Guess it was impossible without scripting
  4. Don't give up too easily. You can make it a randomized chance pretty simply, and if you use that Yanfly plugin I told you about, you only have to do it for a single troop for it to apply to every battle.


    To randomize it, Make another variable called Extra Attack Chance, in the conditional branch if the speed requirements are met, have that variable set random between 1-4 (Depending on what % chance you want this to be-If you want it to change based on how much higher it is, you'll need to make a few conditional branches for different values of Player Speed) Then make another conditional branch IF Extra Attack Chance=1 (There's only a 25% chance using 1-4), Add state superfast. There you go. Randomized without scripting. If you want an extra action instead of an extra auto-attack, you'd add the trait Action Times instead of Attack Times.


    The Base Troop Events plugin lets you choose a "base" troop. Any eventing you put in that troop's window applies to all troops, so you only have to put it in once.


    And lastly, if you just wanted it so any speed value that's higher than the enemy's will result in a double attack with no minimum threshold, don't do the subtraction portion, just do a straight conditional branch (in place of that >10 one) reading IF Player Speed>Enemy Speed, Then etc etc.
  5. Ugouka's method works, but I think the process can be streamlined with Victor's FollowUp Skills.


    In his example, he has a custom followup skill notetag that allows you to attack with another skill based on certain conditions. You can use actor stats, variables, etc. You can work with both of them to create some pretty deep conditions to trigger a second attack.
  6. I've been looking for same thing and I have managed to achieve something similar. I'm using the HIME Random Repeats plugin as well as Yanfly's Weapon Unleash plugin.

    I made multiple copies of the Attack skill. Then I placed different Repeat note tags using Hime's plugin in each attack. The first one may attack 1-2 times, next one 1-3, then 2-3, and so forth. After having done that I used Yanfly's Weapon Unleashed plugin and added this to each weapon's notetag:
     


    <Custom Replace Attack>


    if (user.agi > 80) {


    id = 455;


    if (user.agi > 105)


    id = 456;


    if (user.agi > 125)


    id = 457;


    if (user.agi > 150)


    id = 458;


    if (user.agi > 170)


    id = 459;


    if (user.agi > 195)


    id = 460;


    if (user.agi > 215)


    id = 461;


    } else {


    id = 1;


    }


    </Custom Replace Attack>


    This will check the wielder's AGI and determine which one of the randomly repeating attacks should be used. If the wielder can't pass any of these AGI scores then it defaults to ID #1 which is the default "Attack" command. The reason I add to each weapon is because I categorize each weapon to sort of give it a "Weight" factor. This way lighter weapons like Daggers are easier to multi-attack with than say a Greataxe. I'd love to add in STR as a factor in conjunction with AGI, but I'm not 100% sure how to format that correctly.
  7. This can be done without scripting. This can be done in the damage formula with states.
  8. kaukusaki said:
    This can be done without scripting. This can be done in the damage formula with states.

    While still making it a random chance based on AGI? I guess I must be overlooking..something. I think i get the whole Attack + 1 state idea, but I didn't think I can make it random chance or a customized % chance, if I did that.