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

● ARCHIVED · READ-ONLY
Started by Blue001 2126 posts Page 61 of 107 View original ↗
  1. @Miseryfactory77 I'm sorry, I never used a 4 sprite animation, so I don't know if it's compatible with YEP plugins. What I'm going to tell you might not work because of that.

    First, your target can't die with your skill, because you set it as immortal during your <setup action>, but forget to turn it false during the <finish action>. You should just add there "immortal: targets, false"

    For the speed of your swing, I think you are using an other plugin to be able to use 4 sprite animation. This is where you should be able to change the speed of the animation.

    To move the target, use "MOVE target: BACKWARD, (distance), (frames)", same with the user (juste use user instead of target)
    To jump your user forward :
    JUMP user: (height), (frames)
    MOVE user: target, FRONT BASE, (frames)

    Just be sure the frames number are the same, because the jump don't make the user move forward or backward. I suggest you to play with these commands to master them, they are easy to use. Then you will be able to move freely your battlers and foes.

    To use the backdash animation, play with these commands :
    movement
    MOTION WALK: target
    MOTION STANDBY: target
    MOTION CHANT: target
    MOTION GUARD: target
    MOTION DAMAGE: target
    MOTION EVADE: target
    MOTION ATTACK: target
    MOTION THRUST: target
    MOTION SWING: target
    MOTION MISSILE: target
    MOTION SKILL: target
    MOTION SPELL: target
    MOTION ITEM: target
    MOTION ESCAPE: target
    MOTION VICTORY: target
    MOTION DYING: target
    MOTION ABNORMAL: target
    MOTION SLEEP: target
    MOTION DEAD: target
    Because of your home made animation, I don't know witch one is the backward dash, and I'm not sure it will work with action sequence pack 2.

    Good luck with your skill, I won't be able to do more for you.
  2. Anorgar said:
    @Miseryfactory77 I'm sorry, I never used a 4 sprite animation, so I don't know if it's compatible with YEP plugins. What I'm going to tell you might not work because of that.

    First, your target can't die with your skill, because you set it as immortal during your <setup action>, but forget to turn it false during the <finish action>. You should just add there "immortal: targets, false"

    For the speed of your swing, I think you are using an other plugin to be able to use 4 sprite animation. This is where you should be able to change the speed of the animation.

    To move the target, use "MOVE target: BACKWARD, (distance), (frames)", same with the user (juste use user instead of target)
    To jump your user forward :
    JUMP user: (height), (frames)
    MOVE user: target, FRONT BASE, (frames)

    Just be sure the frames number are the same, because the jump don't make the user move forward or backward. I suggest you to play with these commands to master them, they are easy to use. Then you will be able to move freely your battlers and foes.

    To use the backdash animation, play with these commands :
    movement
    MOTION WALK: target
    MOTION STANDBY: target
    MOTION CHANT: target
    MOTION GUARD: target
    MOTION DAMAGE: target
    MOTION EVADE: target
    MOTION ATTACK: target
    MOTION THRUST: target
    MOTION SWING: target
    MOTION MISSILE: target
    MOTION SKILL: target
    MOTION SPELL: target
    MOTION ITEM: target
    MOTION ESCAPE: target
    MOTION VICTORY: target
    MOTION DYING: target
    MOTION ABNORMAL: target
    MOTION SLEEP: target
    MOTION DEAD: target
    Because of your home made animation, I don't know witch one is the backward dash, and I'm not sure it will work with action sequence pack 2.

    Good luck with your skill, I won't be able to do more for you.

    No that helps tremendously I would love to know what software or program you guys use to upload your skill animations so I could upload mines to show you guys what im seeing to add a visual to my questions so if anybody has that info that would be cool. I have all day off work and will be working on my game all day.

    Right now I am trying to replicate that double slash skill in the video I posted and everything is perfect except for one thing. My actor slides through the enemy cutting through them on the first attack but for the second attack he wont turn around as he is slashing back through the enemy and I cannot tell what I am doing wrong maybe you can copy past the skill and tell me here it is

    <target action>

    move user: targets, front base, 12

    wait for movement

    move user: targets, back base, 12

    motion swing: user

    animation 128: user, mirror

    action animation: target

    action effect

    wait for movement



    wait: 20





    move user: target, front base, 12

    motion swing: user

    face user: backward

    animation 128: user

    action animation: target

    action effect

    wait for movement

    </target action>
  3. @Miseryfactory77 i copy past your code for test, and it work perfectly for me. Maybe your attack is a bit fast : I slow it a bit.

    double slash
    move user: targets, front base, 12
    wait for movement
    wait: 10
    move user: targets, back base, 12
    motion swing: user
    animation 128: user, mirror
    action animation: target
    action effect
    wait for movement

    wait: 20

    face user: backward
    wait: 10
    move user: target, front base, 12
    motion swing: user
    animation 128: user
    action animation: target
    action effect
    wait for movement
    wait: 20

    Normaly, your battler will look in the right direction. If this code don't work, I'll need the visual on what happend in your screen.
  4. Anorgar said:
    @Miseryfactory77 i copy past your code for test, and it work perfectly for me. Maybe your attack is a bit fast : I slow it a bit.

    double slash
    move user: targets, front base, 12
    wait for movement
    wait: 10
    move user: targets, back base, 12
    motion swing: user
    animation 128: user, mirror
    action animation: target
    action effect
    wait for movement

    wait: 20

    face user: backward
    wait: 10
    move user: target, front base, 12
    motion swing: user
    animation 128: user
    action animation: target
    action effect
    wait for movement
    wait: 20

    Normaly, your battler will look in the right direction. If this code don't work, I'll need the visual on what happend in your screen.

    Thats what I thought it should work their must be a conflict with the plugins or the sv actors I am using or something because they will not obey the face user commands entered in the notetags everything else works fine user float etc but the direction facing is being ignored I am using primarily yanfly and mog hunter plugins hmm I wonder what the problem could be I will test changing the sv actor template to the standard one to see if that could be it.
  5. Yup sadly I confirmed my suspicion something in mog battler motion plugin causes the face user: notetag to be ignored everything else works just find though. The battler motion adds so much life to the enemies though I dont want to get rid of it. Damn this pisses me off I need to find what in the script is causing this conflict there must be some mod or something that can be done. Any idea where I could ask for help with that something is telling me there is a simple fix somewhere that can be done to make it not cause that issue rather than me having to get rid of the whole script.
  6. Anyone knows how you can achieve random targeting using these action sequences?

    Trying to set it to randomly target an ally or foe VIA action sequences.
  7. @Miseryfactory77 I'm sorry, my knowledge is limited to yanfly plugin, I won't be able to help you more. But I still can give you a tips : if you know a bit of javascript, you can debug the code. For that, press F8 during a battle test, it will open the console and scripts running. For yanfly "action sequence pack 2", ctrl+f on "face" or "backward" and put a break point. I don't know what to search for the other, but if you put yanfly plugin first on your plugin list, he must be called first.

    Maybe you can try to inverse the order of your plugins, sometime it work, you can be lucky :)

    @Rink27 If you want to random target a foe, you can use RMMV interface : when you choose scope : select random enemy or random ally. If you want to select random enemy OR ally, you'll need a yanfly plugin : target core.
    <Target: 1 Random Any>
    I never used this one, but normally it should choose a random target, ally or foe, but not the user.

    If you want something different, I'll need more informations on what you want to do to be able to help more.
  8. I specified "VIA action sequences" for a reason. @Anorgar

    I want to optionally cause random targeting. I've been unable to figure out a way to achieve that with target core.
    I have an elaborate way to do it with action sequences, but I believe its inefficient and worry it may not be consistent.

    For you or anyone else, what are the guidelines to using if conditions in action sequences? I notice weird behaviour with them.


    Code:
    <target action>
    
    if $gameVariables.value(25) == 1 && $gameVariables.value(26) == 1
    eval: console.log("Yes")
    else
    eval: console.log("No")
    end
    eval: console.log("Exit")
    
    if $gameVariables.value(25) == 1
    eval: console.log("25Yes")
    end
    
    if $gameVariables.value(26) == 1
    eval: console.log("26Yes")
    end
    
    </target action>

    Variables 25 and 26 are set to 1, but neither of the console logs are executed.
    (If I can use the && operand, it would make my elaborate method a bit more efficient/simple)
  9. @Rink27 I tryed your code, and it work perfectly fine. I was able to see the logs in the console. The "&&" operator work normaly.

    If you want to change the target during the <target action>, it's possible, but I think you'll need the target core (didn't try without).
    use : EVAL: targets[0] = "new target"
    Now the complicated part is to determine the "new target".
    You can creat an array with every possible targets on it, then just random an element on it.
    var possibleTargets = [];
    for (var i = 0; i<$gameParty.aliveMembers().length; i++) {
    possibleTargets.push($gameParty.aliveMembers());
    }
    targets[0]=possibleTargets[Math.randomInt(possibleTargets.length)];

    Be careful, the user is an alive member, if you don't want him, add a "IF" statement.
    You can also add enemies within the possible targets :

    for (var i = 0; i<$gameTroop.aliveMembers().length; i++) {
    possibleTargets.push($gameTroop.aliveMembers());
    }

    Then you just have to put all this code into a single eval :
    Complet code
    EVAL: var possibleTargets = []; for (var i = 0; i<$gameParty.aliveMembers().length; i++) { possibleTargets.push($gameParty.aliveMembers());} for (var i = 0; i<$gameTroop.aliveMembers().length; i++) { possibleTargets.push($gameTroop.aliveMembers()); } targets[0]=possibleTargets[Math.randomInt(possibleTargets.length)];

    EDIT: i added the like it was said after.
  10. @Anorgar Hmm, when you said you got it to work, I tried it in a blank project and it did log correctly. Apparently my problem was the variables were being changed at some point. Got it to work in my main project.

    Incorporating your code though:
    Code:
    <target action>
    
    EVAL: var possibleTargets = []; for (var i = 0; i<$gameParty.aliveMembers().length; i++) { possibleTargets.push($gameParty.aliveMembers());} for (var i = 0; i<$gameTroop.aliveMembers().length; i++) { possibleTargets.push($gameTroop.aliveMembers()); } targets[0]=possibleTargets[Math.randomInt(possibleTargets.length)];
    
    action effect
    
    </target action>

    results in a Type error undefined problem. Is the entire code supposed to be one line of code for the eval?
    And I'm unfamiliar with Math.randomInt (which is giving the error).

    EDIT: I added
    Code:
    [i] to to the possibleTargets.push($gameParty.aliveMembers()) part
    So $gameParty.aliveMembers()[i]
    and now it's targeting randomly. I'd experiment further to adjust it to how I would like it.
  11. So, I've recently begun messing around with actions sequences, but my actor sometimes is turning around for no reason before completing a slash. I tried to search up this problem, because I imagine if I stumbled upon it this early, plenty of others have too, but I can't seem to find the answer, so I apologize if this has been asked before.

    <setup action>

    perform start

    jump user: 110%

    camera focus: user

    zoom: 120%

    move user: backward, 20, 12

    face user: target

    display action

    </setup action>

    <target action>

    jump user: 400%, 50

    move user: target, front center, 30

    wait for movement

    wait: 15

    motion attack: user

    face user: target

    action animation

    move user: target, front base, 5

    flash screen: white, 4

    wait for animation

    action effect

    wait for effect

    wait: 60

    motion evade: user

    jump user: 130%, 20

    move user: backward, 300, 20

    face user: forward

    wait for movement

    wait: 50

    </target action>

    <follow action>

    move user: home, 10

    wait: 30

    </follow action>

    <finish action>

    clear combat log

    perform finish

    </finish action>

    Sometimes when I tweak certain aspects of the movement, the character won't suddenly turn and face an enemy, but sometimes they will. At first I thought the plugin just automatically adjusted based on relative position of the target, but some of my characters are falling from front head to front base, yet they still turn and slash away from the target. If anyone could tell me why this is happening, it would be greatly appreciated.
  12. Sorry for the wrong copy past ^^ I checked and I have the [ i ] in my skill editor.

    When you use EVAL: you have to put the whole javascript code in asingle line, else the plugin will compile only what's in the same line than EVAL.

    Math.randomInt(max) will give a random integer between 0 and max value.
  13. Thanks a lot for the help, @Anorgar.

    Been sorting out different randomization depending on the targeting scope of the skill.
    I allow the action sequence to call a common event that would run the relevant code below (Below is just where I have the code organised in a text editor):

    Code:
    //===================================//
    //Single-Target, Row-Nearby, Type-Any
    
    var allies = BattleManager._subject.friendsUnit().aliveMembers();
    var foes = BattleManager._subject.opponentsUnit().aliveMembers();
    var possibleTargets = [];
    for (var i = 0; i<allies.length; i++) {
        if (allies[i].row() == 1 || allies[i].row() == 2) {possibleTargets.push(allies[i]);}   
    }
    for (var i = 0; i<foes.length; i++) {
        if (foes[i].row() == 1) {possibleTargets.push(foes[i]);}
    }
    $gameVariables.setValue(25,possibleTargets);
    
    //=============================//
    //Row-Target, Row-Any, Type-Any
    
    var allies = BattleManager._subject.friendsUnit().aliveMembers(); var foes = BattleManager._subject.opponentsUnit().aliveMembers();
    var possibleTargets = []; var rowTarget = 1; var chosenTarget = 1; var prePossibleTargets = [];
    if (Math.random() < 0.5) {
        for (var i = 0; i<allies.length; i++) {prePossibleTargets.push(allies[i]);}
        chosenTarget = prePossibleTargets[Math.floor(Math.random() * prePossibleTargets.length)]; rowTarget = chosenTarget.row();
        for (var i = 0; i<allies.length; i++) {if (allies[i].row() == rowTarget) {possibleTargets.push(allies[i]);}}
    } else {
        for (var i = 0; i<foes.length; i++) {possibleTargets.push(foes[i]);}
        chosenTarget = prePossibleTargets[Math.floor(Math.random() * prePossibleTargets.length)]; rowTarget = chosenTarget.row();
        for (var i = 0; i<foes.length; i++) {if (foes[i].row() == rowTarget) {possibleTargets.push(foes[i]);}}
    }     
    $gameVariables.setValue(25,possibleTargets);

    The action sequence still uses the:
    Code:
    eval: var possibleTargets=$gameVariables.value(25);targets[0]=possibleTargets[Math.randomInt(possibleTargets.length)];

    My current challenge is getting the second set of code (Row-Target, Row-Any) to work. I'm getting a cannot read row property of undefined.

    What I do is determine if to select from allies or foes, then select one battler from the determined team. Next, I obtain the row that battler is in and finally I go back through the members of that team and only select those from the row I obtained.

    I'm wondering if the problem occurs here:

    Code:
    chosenTarget = prePossibleTargets[Math.floor(Math.random() * prePossibleTargets.length)]; 
    rowTarget = chosenTarget.row();

    I'm guessing chosenTarget does not have a row property. The error occurs if there are more than 1 battler in the row.
    No pressure to make you figure it out though. I'm grateful for your help. I can always do something else if I can't figure this part out.
  14. @BlackHaloRose Don't worry, this topic is here for you to ask questions on what you don't understand.

    When your battler move backward, even a little, he face backward. That's what causing you truble. You missplaced the "face user: target". It have to be after "move user: target, front base, 5" which is what changing the orientation of your battler.

    Here is your action sequence with your battler looking in the right direction :

    Action sequence
    <setup action>
    perform start
    jump user: 110%
    camera focus: user
    zoom: 120%
    move user: backward, 20, 12
    face user: target
    display action
    </setup action>



    <target action>
    jump user: 400%, 50
    move user: target, front center, 30
    wait for movement
    wait: 15
    motion attack: user
    action animation
    move user: target, front base, 5

    face user: forward

    flash screen: white, 4
    wait for animation
    action effect
    wait for effect
    wait: 60
    motion evade: user
    jump user: 130%, 20
    move user: backward, 300, 20
    face user: forward
    wait for movement
    wait: 50
    </target action>



    <follow action>
    move user: home, 10
    face user: forward
    wait: 30
    </follow action>



    <finish action>
    clear combat log
    perform finish
    </finish action>

    If you want a tips to debug your action sequence, use "wait: 100" between some lines, then you can figure out which line exactly is causing you trouble.
  15. Anorgar said:
    @BlackHaloRose Don't worry, this topic is here for you to ask questions on what you don't understand.

    When your battler move backward, even a little, he face backward. That's what causing you truble. You missplaced the "face user: target". It have to be after "move user: target, front base, 5" which is what changing the orientation of your battler.

    Here is your action sequence with your battler looking in the right direction :

    Action sequence
    <setup action>
    perform start
    jump user: 110%
    camera focus: user
    zoom: 120%
    move user: backward, 20, 12
    face user: target
    display action
    </setup action>



    <target action>
    jump user: 400%, 50
    move user: target, front center, 30
    wait for movement
    wait: 15
    motion attack: user
    action animation
    move user: target, front base, 5

    face user: forward

    flash screen: white, 4
    wait for animation
    action effect
    wait for effect
    wait: 60
    motion evade: user
    jump user: 130%, 20
    move user: backward, 300, 20
    face user: forward
    wait for movement
    wait: 50
    </target action>



    <follow action>
    move user: home, 10
    face user: forward
    wait: 30
    </follow action>



    <finish action>
    clear combat log
    perform finish
    </finish action>

    If you want a tips to debug your action sequence, use "wait: 100" between some lines, then you can figure out which line exactly is causing you trouble.

    Oh, thank you very much! I'll have to keep that in mind from now on!
  16. @Rink27 After some debug, I figured out that foes have a define row, and you can use foes[ i ].row. There was no reason for it not to work.

    So I read carrefuly your common even code, and a there is a little mistake, really hard to fine : in the foes part, you push values in "
    possibleTargets", not "prePossibleTargets".

    try this, and it will work (it work for me)

    Code:
    var allies = BattleManager._subject.friendsUnit().aliveMembers(); var foes = BattleManager._subject.opponentsUnit().aliveMembers();
    var possibleTargets = []; var rowTarget = 1; var chosenTarget = 1; var prePossibleTargets = [];
    if (Math.random() < 0.5) {
    for (var i = 0; i<allies.length; i++) {prePossibleTargets.push(allies[i]);}
    chosenTarget = prePossibleTargets[Math.floor(Math.random() * prePossibleTargets.length)]; rowTarget = chosenTarget.row();
    for (var i = 0; i<allies.length; i++) {if (allies[i].row() == rowTarget) {possibleTargets.push(allies[i]);}}
    } else {
    for (var i = 0; i<foes.length; i++) {prePossibleTargets.push(foes[i]);}
    chosenTarget = prePossibleTargets[Math.floor(Math.random() * prePossibleTargets.length)]; rowTarget = chosenTarget.row();
    for (var i = 0; i<foes.length; i++) {if (foes[i].row() == rowTarget) {possibleTargets.push(foes[i]);}}
    }
    $gameVariables.setValue(25,possibleTargets);

    By the way, if you want to have multiple target, for exemple every target of the random row, you just have to put many elements into the variable "targets", and the yanfly <target action> will repeat for every elements in "targets"

    Code:
    EVAL: targets=$gameVariables.value(25);
  17. Okay so all the support tht people give here has been great I just have a new question now. It involves if else statements I made an attack that I waif nt to be able to have the number of hits dependent on the difference between the users agility and the enemies.

    For example something life if a.agi > b.agi then
    and from there I would proceed to note the skill hiting twice
    with an else like if a.agi > b.agi*2
    and I would code the skill hitting 4 times then
    another else like if a.gi > b.agi * 3
    and then I would code the battle motions and attacks to hit 6 times.
    then an else that makes the skill only hit one time if none of the above conditions are met aka the actors agility is not greater than the enemies.

    I know how I explained that probably sounds very confusing but I feel like somebody will understand what I was trying to say.

    Then aside from the if else statements I wanted to know how I could notetag a crit chance percentage into one of my skills if anybody knew how.

    I know I ask alot of questions but the help here has been truly amazing and not one of my issues from a previously asked question is currently unresolved so thank you so much for that everyone.
  18. @Miseryfactory77 The if statement work with battle angine core :
    For this kind of else if statement, you should start with the harder condition, else it will alwaus be true, and you may have logic error.
    IF statement
    IF a.agi>b.agi*3
    //attack 6 time
    ELSE IF a.agi>b.agi*2
    //attack 4 times
    ELSE IF a.agi>b.agi
    //attack 2 time
    ELSE
    //attack 1 time
    END

    You can use this code in the target action, fill the attack x time by your action sequence.

    To change critical chance I use a temporary state. I think you can do it with javascript, but I didn't take time to look for it.

    Create a state which increase critical by the value you want, then use eval command:
    Code:
    EVAL: user.addState(x)
    EVAL: user.removeState(x)
  19. Anorgar said:
    @Miseryfactory77 The if statement work with battle angine core :
    For this kind of else if statement, you should start with the harder condition, else it will alwaus be true, and you may have logic error.
    IF statement
    IF a.agi>b.agi*3
    //attack 6 time
    ELSE IF a.agi>b.agi*2
    //attack 4 times
    ELSE IF a.agi>b.agi
    //attack 2 time
    ELSE
    //attack 1 time
    END

    You can use this code in the target action, fill the attack x time by your action sequence.

    To change critical chance I use a temporary state. I think you can do it with javascript, but I didn't take time to look for it.

    Create a state which increase critical by the value you want, then use eval command:
    Code:
    EVAL: user.addState(x)
    EVAL: user.removeState(x)


    Wow you are the best you answer all of my questions and so fast as well. Okay so the character with this skill has 2 abilities dual mirage and tri-mirage. Dual mirage creates a twin of his that looks like an after image etc changing his sv actor as well. Tri mirage does the same but with three. So for each of his attack skills I have to also expand upon what you just stated by doing a if state x is applied then the 6 hits become 12 and if state x is applied the 6 hits become 18 where I have space to put in the appropriate attack sequence. from there I also have to do that to the 4 hit 2 hit and standard 1 hit. That is where it gets confusing because I know it can be done.

    I already figured out how to use events etcs to make my shapeshifter characters skills work and change her sv battler etc with events but not sure how I can include all of that neatly in an if statement to make sure no errors persist.

    Its like using the template that you just explained and bulding off of it by also adding an if state x or state x (dual mirage) (Tri mirage) is on this actor then instead of the 6 hits the action sequence i want for 12 hits and instead of 12 hits the action sequence for the 18 hits etc.
  20. Hi, I would like to know if it’s possible to: an ally who has a debuff would be randomly debuffed by another ally ? (ref: Persona)