Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
In RMMZ, there is a trait to set the 'attack skill', instead of equipping a different skill as the basic attack, try setting a trait on the class to change the attack skill to the same exact copy of the default attack skill with no action sequence, and see what happens.
After doing so, she does indeed attack twice, but both damage appear to be mainhand damage. I even set off-hand multiplier to 0.1 and she is still doing the same as her mainhand attack. This is a bit of progress though, since she does attack twice with a skill that isn't the basic attack command.

Let's work with this first. With this specific case, set the new skill as <dual wield skill> and see if the damage is correct. This shouldn't be the case here, as the engine should treat it as the normal attack at this point, but perhaps it's not.

It appears that the default action sequence command (ACSET: Target action?) would be duplicated normally, but since your action sequence doesn't have that, and uses a custom bunch of stuff in the middle there instead, it's not being repeated properly, while the MECH: Action Effect is being duplicated correctly. 

Since you tested all of the original test cases sequentially without resetting the playtest in between, it is most likely that the swing counter is never being reset, even though that might be difficult to see using that one console command I gave you. You can try putting a script call at the end of your action sequence with the following text in it, and it should reset the swing counter completely after the attack:

delete BattleManager._subject._numAttacks

From this I can see that there is definitely something I need to fix about the custom action sequence, I'll need to try to figure out how the duplication of the target action section works in the VS Battle Engine before I can come up with a real solution. As I said above, the YEP BattleCore plugin that it was based on simply repeated the entire target action section, but it doesn't seem like they have sections anymore, at least, based on your sequence there.

(1 edit)

All right, so there is some more progress here! I added the ACSET Each target action instead of just the Action Effect, and my character now actually plays 2 animations now when she attacks! Hooray for progress! Haha! So now, the only thing that doesn't work is that she is still causing both instances of main-hand damage, since she's dealing 2 ~10s and not one 10 and one ~1. I have one animation set to a slash, and the other lightning, and both animations play the way you have in your gif.  Adding the <dual wield skill> skill did nothing to the animations playing or altering the damage - both swings still do mainhand damage.

Interestingly enough, changing the ACSET to All instead of Each plays one animation and shows 2 damage numbers (both mainhand) like before, but Each does the two animations the way you have in your gif.

(+1)

That is interesting.

When I get a chance in the next few days, I'll see about duplicating this in my test project and get to the bottom of why it only seems to do main hand damage. It sort of seems like now it's resetting the swing counter to zero after every hit, but then, if it were actually doing that, the weaponsprites and animations of each swing would also both be the weapon in the main hand. Either way, it's something to do with the action sequence, so I'll try to make a couple test cases and figure it out.

I'll keep you posted when I figure out what's going on, or if I need more info from your project. 

Apologies for this taking as long as it is to figure out, since I stopped actively making RM games before MZ came out, I don't have a lot of experience actually using the plugins I made for it in a live project, so something like action sequences, which changed a lot between MV and MZ are proving difficult for me to get a grasp on.

-Ramza

No worries at all mate. I log on at least once a day and will be more than happy to provide assistance.

I am excited to see what developments you'll make. Thank you!

Alright, I've been working on this a little bit, and I've got it a lot closer to working completely, but TBH, the plugin loses almost all of it's "plug n play" ability when you're not using a default action sequence (or ACSET: all targets).

I'm working on trying to make it properly update the animation for the offhand on the second hit, but currently damage splitting is working.

Basically (and hopefully I'll be able to change this in the future) the best case is to use the default melee action sequence parameter if you can. Failing that, the ACSET: Each Target Action Set seems to work 100% as well, showing both animations, and splitting damage correctly with no other changes to the sequence, as long as it is your default attack skill.

I am still working on getting non templated sequences to work completely. I suspect I'll have to see if I can get someone from the VS team to assist me, as I'm pretty tapped out on stuff I can fumble around blindly with.

For now, I managed to get damage splitting to work, but the animation for the offhand hit is still showing the mainhand weapon animation, and I currently suspect that is because the action sequence command to 'show attack animation' is just pulling the animation from a skill, rather than calling the function which is supposed to be used for such, a function which I updated specifically so it would update for main and offhand weapons.

In any case, to get what I have working, I just added in a few if checks, and repeated part of what would've once been called the target sequence for the offhand, and added a script at the end to delete the _numAttacks value from the subject, so as to reset the swing counter correctly after the attack.

◆Plugin Command:VisuMZ_1_BattleCore, ACSET: Setup Action Set
:              :Display Action = true
:              :Immortal: On = true
:              :Battle Step = true
:              :Wait For Movement = true
:              :Cast Animation = true
:              :Wait For Animation = true
◆Plugin Command:VisuMZ_1_BattleCore, MOVE: Move To Target(s)
:              :Targets (Moving) = ["user"]
:              :Targets (Destination) = ["current target"]
:              :Target Location = front base
:              :Melee Distance = 24
:              :Offset Adjustment = horz
:              :Offset: X = 0
:              :Offset: Y = 0
:              :Duration = 12
:              :Face Destination? = true
:              :Movement Easing = Linear
:              :Movement Motion = walk
:              :Wait For Movement? = true
◆If:Script:(BattleManager._subject && !BattleManager._subject._numAttacks)
  ◆Plugin Command:VisuMZ_1_BattleCore, MOTION: Motion Type
  :              :Targets = ["user"]
  :              :Motion Type = attack
  :              :Show Weapon? = true
  ◆Plugin Command:VisuMZ_1_BattleCore, MOTION: Wait By Motion Frame
  :              :Motion Frames to Wait? = 1
  ◆Plugin Command:VisuMZ_1_BattleCore, ANIM: Action Animation
  :              :Targets = ["all targets"]
  :              :Mirror Animation = false
  :              :Wait For Animation? = true
  ◆Plugin Command:VisuMZ_1_BattleCore, MOTION: Wait By Motion Frame
  :              :Motion Frames to Wait? = 2
  ◆Plugin Command:VisuMZ_1_BattleCore, MECH: Action Effect
  :              :Targets = ["current target"]
  ◆Plugin Command:VisuMZ_1_BattleCore, MECH: Immortal
  :              :Targets = ["user","all targets"]
  :              :Immortal = false
  ◆If:Script:BattleManager._subject && BattleManager._subject.isCurrentlyDualWielding()
    ◆Script:BattleManager._subject._numAttacks = 1
    ◆
  :End
  ◆
:End
◆If:Script:(BattleManager._subject && BattleManager._subject._numAttacks == 1)
  ◆Plugin Command:VisuMZ_1_BattleCore, MOTION: Motion Type
  :              :Targets = ["user"]
  :              :Motion Type = attack
  :              :Show Weapon? = true
  ◆Plugin Command:VisuMZ_1_BattleCore, MOTION: Wait By Motion Frame
  :              :Motion Frames to Wait? = 1
  ◆Plugin Command:VisuMZ_1_BattleCore, ANIM: Attack Animation
  :              :Targets = ["all targets"]
  :              :Mirror Animation = false
  :              :Wait For Animation? = true
  ◆Plugin Command:VisuMZ_1_BattleCore, MOTION: Wait By Motion Frame
  :              :Motion Frames to Wait? = 2
  ◆Plugin Command:VisuMZ_1_BattleCore, MECH: Action Effect
  :              :Targets = ["current target"]
  ◆Plugin Command:VisuMZ_1_BattleCore, MECH: Immortal
  :              :Targets = ["user","all targets"]
  :              :Immortal = false
  ◆
: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
◆Script:delete BattleManager._subject._numAttacks

This... uhh, obviously isn't ideal. It still doesn't quite work right, and it's a lot more involved than I originally wanted. A side effect to that, though is that you should be able to do this to every skill, not just the attack skill, and it should work just as well.

Another thing worth noting is that Attack Times+ doesn't work at all with a custom sequence, with or without my plugin. The standard function is to simply make the attack skill hit more than once, and unless you're using the auto-sequence, or the ACSET mentioned above, it simply doesn't do that at all.

I'm going to start by submitting a bug report to the VS team to see if they can fix that at least. Not sure where it'll go from there, though.

Thank you so much mate. I appreciate you following through on this plugin. I hope VisuStella can help you, and I believe there is a good chance they will. I submitted a request to them a few weeks ago and they got it fixed almost immediately.


I personally cannot use the basic attack command since I use the battle voice plugin and it doesn't fire correctly if I use action sequence and the camera, oddly enough, so I have to have a unique action for each character so they can play their own sounds. Additionally the mages' attacks are coded differently as well 


I am grateful for your continued work on this plugin and the way you're updating me on it. I am excited to see the progress being made

Okay, I got somewhere with the VS team about this.

So, I've managed to get a sequence to work mechanically, and a fix to BattleCore should be coming out at some point soon to correct the animations issue.

So, and again, this isn't as plug and play as I want it to be, but sometimes we gotta work with what we've got.

So for setup we need to have a state telling the battle engine that the replacement skill is the actor's attack skill, otherwise the second attack will not automatically happen. Since you're using the battle command replacement, and as I understand it, that is class-based, you can also create a passive state on the class, or a trait, which sets the 'attack' skill to the replacement skill instead, and just use the regular attack command.

Next, your replacement attack skill needs to be tagged as <dualwield skill>. All this really does at this point is make sure that the damage splitting is working, and I've tested in my test project, and that appears to be fine, so we're good on this.

Last, we need to modify your action sequence a bit. First, we need a label for what I will call the target action, put the label before the attack motion of your sequence, basically, we're going to use this to repeat a section of it for each weapon. After the label, do the rest of the sequence as normal, and then at the end of the target action, use the plugin command 'TARGET: Next Target' and specify the label we just made. Inside the target action, you've gotta change any action effects or show animations to use 'current target' instead of the default 'all targets', that'll make it so that the effect (and animation) triggers once for each hit, instead of triggering twice at the end.

As for the battle animations, Yanfly has indicated that the common events used for the action sequences don't use the same function to grab the attack animation of the user as default sequences, and that I cannot alias one, as it is a plugin command, so he's going to update the BattleCore plugin at some point to allow the user to specify the offhand weapon animation specifically. When that gets implemented, we'll need to change the sequence again, wrap an 'if' around the 'ANIM: Attack Animation' command, and check for !BattleManager._subject._numAttacks . If true, we'd show the regular attack animation, and in the else case, we'd call the new command to show the offhand animation instead. This'll look something like the below:

◆If:Script:!BattleManager._subject._numAttacks
  ◆Plugin Command:VisuMZ_1_BattleCore, ANIM: Attack Animation
  :              :Targets = ["current target"]
  :              :Mirror Animation = false
  :              :Wait For Animation? = true
  ◆
:Else
  ◆Plugin Command:VisuMZ_1_BattleCore, ANIM: Attack Animation 2+
  :              :Targets = ["current target"]
  :              :Slot = 2
  :              :Mirror Animation = false
  :              :Wait For Animation? = true
  ◆
:End

He's also adding an option to use the attack motion from the offhand weapon as well, but in my experience so far, I don't think we'll need that for this to work correctly.

So uhh, update your sequence a bit, add that note tag to the replacement skills, and set them as the attack attack skill via a trait on the class or actor, or whatever, and then update BattleCore when the update comes out (next week most likely), and that should take care of that.