MZ Visustella action sequence MOVE melee distance possible bug

Hello!

I'm using some Visustella plugins and making custom sequences in common events for the skills. There's a particular skill where the user would do a series of 6 quick attacking motions and inbetween each time, they quickly move a small randomized x/y distance.
To avoid the user from straying too much from the attacking position, the third time they move, instead of a random x/y distance they have a "move to target" command with 24 melee distance, so that they return to the same point where the attack starts.

My problem is that it seems to not be consistent, and that third time the user moves, the game ignores the melee distance, and instead they move too close to the target and if feels kinda off.
I'm hoping to know how to avoid this, or if it's a bug the creators could use knowing about.

I am using version 1.80 of VisuMZ_1_BattleCore

Thanks!
I've had issues with spacing in action sequences in which it doesn't seem to respond to the numbers I punch in... but I'm not sure if we're talking about the same. Could you copy-paste the action sequence?
I've had issues with spacing in action sequences in which it doesn't seem to respond to the numbers I punch in... but I'm not sure if we're talking about the same. Could you copy-paste the action sequence?

Sorry for the delayed reply. Here's the sequence as text:


Code:
◆Plugin Command:VisuMZ_1_BattleCore, ACSET: Setup Action Set
:              :Display Action = false
:              :Immortal: On = true
:              :Battle Step = false
:              :Wait For Movement = false
:              :Cast Animation = false
:              :Wait For Animation = false
◆Wait:8 frames
◆Play SE:Evasion1 (75, 100, 0)
◆Plugin Command:VisuMZ_1_BattleCore, MOVE: Jump
:              :Targets = ["user"]
:              :Desired Height = 20
:              :Duration = 16
:              :Wait For Jump? = false
◆Plugin Command:VisuMZ_1_BattleCore, IMPACT: Motion Blur Target(s)
:              :Targets = ["user"]
:              :Angle = 0
:              :Intensity Rate = 3
:              :Duration = 18
:              :Easing Type = InOutSine
◆Plugin Command:VisuMZ_1_BattleCore, MOVE: Move To Target(s)
:              :Targets (Moving) = ["user"]
:              :Targets (Destination) = ["current target"]
:              :Target Location = front center
:              :Melee Distance = 24
:              :Offset Adjustment = horz
:              :Offset: X = 0
:              :Offset: Y = 32
:              :Duration = 16
:              :Face Destination? = true
:              :Movement Easing = Linear
:              :Movement Motion = wait
:              :Wait For Movement? = true
◆Plugin Command:VisuMZ_1_BattleCore, MOTION: Freeze Motion Frame
:              :Targets = ["user"]
:              :Motion Type = attack
:              :Frame Index = 0
:              :Show Weapon? = true
◆Wait:4 frames
◆Plugin Command:VisuMZ_1_BattleCore, MOTION: Freeze Motion Frame
:              :Targets = ["user"]
:              :Motion Type = attack
:              :Frame Index = 1
:              :Show Weapon? = true
◆Wait:4 frames
◆Plugin Command:VisuMZ_1_BattleCore, MOTION: Freeze Motion Frame
:              :Targets = ["user"]
:              :Motion Type = attack
:              :Frame Index = 2
:              :Show Weapon? = true
◆Plugin Command:VisuMZ_1_BattleCore, ANIM: Action Animation
:              :Targets = ["current target"]
:              :Mirror Animation = false
:              :Wait For Animation? = false
◆Wait:4 frames
◆Plugin Command:VisuMZ_1_BattleCore, MOVE: Move Distance
:              :Targets = ["user"]
:              :Distance Adjustment = horz
:              :Distance: X = Math.ceil(Math.random() * 8) * (Math.round(Ma…
:              :Distance: Y = Math.ceil(Math.random() * 8) * (Math.round(Ma…
:              :Duration = 4
:              :Face Destination? = false
:              :Movement Easing = Linear
:              :Movement Motion = walk
:              :Wait For Movement? = true
◆Plugin Command:VisuMZ_1_BattleCore, MOTION: Freeze Motion Frame
:              :Targets = ["user"]
:              :Motion Type = attack
:              :Frame Index = 0
:              :Show Weapon? = true
◆Wait:4 frames
◆Plugin Command:VisuMZ_1_BattleCore, MOTION: Freeze Motion Frame
:              :Targets = ["user"]
:              :Motion Type = attack
:              :Frame Index = 1
:              :Show Weapon? = true
◆Wait:4 frames
◆Plugin Command:VisuMZ_1_BattleCore, MOTION: Freeze Motion Frame
:              :Targets = ["user"]
:              :Motion Type = attack
:              :Frame Index = 2
:              :Show Weapon? = true
◆Wait:4 frames
◆Plugin Command:VisuMZ_1_BattleCore, MOVE: Move Distance
:              :Targets = ["user"]
:              :Distance Adjustment = horz
:              :Distance: X = Math.ceil(Math.random() * 8) * (Math.round(Ma…
:              :Distance: Y = Math.ceil(Math.random() * 8) * (Math.round(Ma…
:              :Duration = 4
:              :Face Destination? = false
:              :Movement Easing = Linear
:              :Movement Motion = walk
:              :Wait For Movement? = true
◆Plugin Command:VisuMZ_1_BattleCore, MOTION: Freeze Motion Frame
:              :Targets = ["user"]
:              :Motion Type = attack
:              :Frame Index = 0
:              :Show Weapon? = true
◆Wait:4 frames
◆Plugin Command:VisuMZ_1_BattleCore, MOTION: Freeze Motion Frame
:              :Targets = ["user"]
:              :Motion Type = attack
:              :Frame Index = 1
:              :Show Weapon? = true
◆Wait:4 frames
◆Plugin Command:VisuMZ_1_BattleCore, MOTION: Freeze Motion Frame
:              :Targets = ["user"]
:              :Motion Type = attack
:              :Frame Index = 2
:              :Show Weapon? = true
◆Wait:4 frames
◆Plugin Command:VisuMZ_1_BattleCore, MOVE: Move To Target(s)
:              :Targets (Moving) = ["user"]
:              :Targets (Destination) = ["current target"]
:              :Target Location = front center
:              :Melee Distance = 24
:              :Offset Adjustment = horz
:              :Offset: X = 0
:              :Offset: Y = 32
:              :Duration = 4
:              :Face Destination? = true
:              :Movement Easing = Linear
:              :Movement Motion = walk
:              :Wait For Movement? = true
◆Plugin Command:VisuMZ_1_BattleCore, MOTION: Freeze Motion Frame
:              :Targets = ["user"]
:              :Motion Type = attack
:              :Frame Index = 0
:              :Show Weapon? = true
◆Wait:4 frames
◆Plugin Command:VisuMZ_1_BattleCore, MOTION: Freeze Motion Frame
:              :Targets = ["user"]
:              :Motion Type = attack
:              :Frame Index = 1
:              :Show Weapon? = true
◆Wait:4 frames
◆Plugin Command:VisuMZ_1_BattleCore, MOTION: Freeze Motion Frame
:              :Targets = ["user"]
:              :Motion Type = attack
:              :Frame Index = 2
:              :Show Weapon? = true
◆Wait:4 frames
◆Plugin Command:VisuMZ_1_BattleCore, MOVE: Move Distance
:              :Targets = ["user"]
:              :Distance Adjustment = horz
:              :Distance: X = Math.ceil(Math.random() * 8) * (Math.round(Ma…
:              :Distance: Y = Math.ceil(Math.random() * 8) * (Math.round(Ma…
:              :Duration = 4
:              :Face Destination? = false
:              :Movement Easing = Linear
:              :Movement Motion = walk
:              :Wait For Movement? = true
◆Plugin Command:VisuMZ_1_BattleCore, MOTION: Freeze Motion Frame
:              :Targets = ["user"]
:              :Motion Type = attack
:              :Frame Index = 0
:              :Show Weapon? = true
◆Wait:4 frames
◆Plugin Command:VisuMZ_1_BattleCore, MOTION: Freeze Motion Frame
:              :Targets = ["user"]
:              :Motion Type = attack
:              :Frame Index = 1
:              :Show Weapon? = true
◆Wait:4 frames
◆Plugin Command:VisuMZ_1_BattleCore, MOTION: Freeze Motion Frame
:              :Targets = ["user"]
:              :Motion Type = attack
:              :Frame Index = 2
:              :Show Weapon? = true
◆Wait:4 frames
◆Plugin Command:VisuMZ_1_BattleCore, MOVE: Move Distance
:              :Targets = ["user"]
:              :Distance Adjustment = horz
:              :Distance: X = Math.ceil(Math.random() * 8) * (Math.round(Ma…
:              :Distance: Y = Math.ceil(Math.random() * 8) * (Math.round(Ma…
:              :Duration = 4
:              :Face Destination? = false
:              :Movement Easing = Linear
:              :Movement Motion = walk
:              :Wait For Movement? = true
◆Plugin Command:VisuMZ_1_BattleCore, MOTION: Freeze Motion Frame
:              :Targets = ["user"]
:              :Motion Type = attack
:              :Frame Index = 0
:              :Show Weapon? = true
◆Wait:4 frames
◆Plugin Command:VisuMZ_0_CoreEngine, Screen Shake: Custom
:              :Shake Style = random
:              :Power = 2
:              :Speed = 2
:              :Duration = 20
:              :Wait for Completion = false
◆Plugin Command:VisuMZ_1_BattleCore, IMPACT: Zoom Blur at Target(s) Center
:              :Targets = ["current target"]
:              :Target Location = middle center
:              :Offset X = +0
:              :Offset Y = +0
:              :Zoom Strength = 0.15
:              :Visible Radius = 120
:              :Duration = 30
:              :Easing Type = InOutSine
◆Plugin Command:VisuMZ_1_BattleCore, MOTION: Freeze Motion Frame
:              :Targets = ["user"]
:              :Motion Type = attack
:              :Frame Index = 1
:              :Show Weapon? = true
◆Wait:4 frames
◆Plugin Command:VisuMZ_1_BattleCore, MOTION: Freeze Motion Frame
:              :Targets = ["user"]
:              :Motion Type = attack
:              :Frame Index = 2
:              :Show Weapon? = true
◆Plugin Command:VisuMZ_1_BattleCore, ACSET: Each Target Action Set
:              :Dual/Multi Wield? = false
:              :Perform Action = false
:              :Wait Count = 0
:              :Action Animation = false
:              :Wait Count = 0
:              :Action Effect = true
:              :Immortal: Off = false
◆Wait:12 frames
◆Plugin Command:VisuMZ_1_BattleCore, MOVE: Jump
:              :Targets = ["user"]
:              :Desired Height = 20
:              :Duration = 16
:              :Wait For Jump? = false
◆Plugin Command:VisuMZ_1_BattleCore, MOVE: Move To Point
:              :Targets = ["user"]
:              :Destination Point = home
:              :Offset Adjustment = horz
:              :Offset: X = 0
:              :Offset: Y = 0
:              :Duration = 16
:              :Face Destination? = false
:              :Movement Easing = Linear
:              :Movement Motion = wait
:              :Wait For Movement? = true
◆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
I may be misunderstanding things, but I'm seeing two instances of Move To Target(s) but in your post you mention a "third" time.

Or did you mean the third time this action sequence is executed (e.g. in one battle)?
I may be misunderstanding things, but I'm seeing two instances of Move To Target(s) but in your post you mention a "third" time.

Or did you mean the third time this action sequence is executed (e.g. in one battle)?

Thanks for the quick reply!

Sorry it's kind of messily explained! Ok, so the first "Move to target" is when the character moves up to melee range. This works perfectly every time.

The instances of "Move Distance" which use random values, are small steps the user makes between each attacking motion (the sequences of Freeze Frames and 4-frame Wait times). What I meant by a "third time" is that, out of these 6 small steps that the user takes between each attacking motion, the third one is instead a "Move to Target", which prevents the user from straying too far in case the RNG makes them step in the same direction 6 times in a row. Like an "anchor" movement.

My problem is that this second "Move to Target" instance, which has "Melee Distance" set to 24, sometimes ignores the melee distance and just moves right up to the target, making it inconsistent.
I suspect that this happens when the user ends up closer to the target after its previous 2 random steps.

As a workaround I could get rid of the random values, and just enter numbers semi-randomly myself, but I like how randomizing the direction of the steps adds a bit of variety each time. Also documenting it might at least help fix the bug 😛
Ah, I see. I don't have an answer as to why it's doing that, but I also had an issue with Melee Distance and decided to work with Offset instead. For example the "thrust" motion:

1706673941296.png


Is done with an Offset: X = -48 instead. You might go "HUH?" on seeing this figure but in my case the weapons are baked into the battler graphic. Hence a negative number is needed. Perhaps using offset instead of melee distance is a workable solution for you too?

Spoiler: Action sequence thrust
JavaScript:
◆Plugin Command:VisuMZ_1_BattleCore, ACSET: Setup Action Set
:              :Display Action = true
:              :Immortal: On = true
:              :Battle Step = false
:              :Wait For Movement = true
:              :Cast Animation = false
:              :Wait For Animation = true
◆Plugin Command:VisuMZ_1_BattleCore, MOTION: Motion Type
:              :Targets = ["user"]
:              :Motion Type = thrust
:              :Show Weapon? = false
◆Wait:12 frames
◆Plugin Command:VisuMZ_1_BattleCore, MOVE: Move To Target(s)
:              :Targets (Moving) = ["user"]
:              :Targets (Destination) = ["current target"]
:              :Target Location = front base
:              :Melee Distance = 0
:              :Offset Adjustment = horz
:              :Offset: X = -48
:              :Offset: Y = 12
:              :Duration = 12
:              :Face Destination? = true
:              :Movement Easing = InQuart
:              :Movement Motion = thrust
:              :Wait For Movement? = false
◆Play SE:Ice3 (90, 150, 0)
◆Wait:6 frames
◆Plugin Command:VisuMZ_1_BattleCore, ANIM: Show Animation
:              :Targets = ["current target"]
:              :Animation ID = 11
:              :Mirror Animation = false
:              :Wait For Animation? = false
◆Wait:12 frames
◆Plugin Command:VisuMZ_1_BattleCore, MECH: Action Effect
:              :Targets = ["current target"]
◆Wait:24 frames
◆Plugin Command:VisuMZ_1_BattleCore, MOVE: Jump
:              :Targets = ["user"]
:              :Desired Height = 100
:              :Duration = 24
:              :Wait For Jump? = false
◆Plugin Command:VisuMZ_1_BattleCore, MOVE: Move To Point
:              :Targets = ["user"]
:              :Destination Point = home
:              :Offset Adjustment = horz
:              :Offset: X = 0
:              :Offset: Y = 0
:              :Duration = 24
:              :Face Destination? = false
:              :Movement Easing = InOutQuad
:              :Movement Motion = escape
:              :Wait For Movement? = false
◆Wait:18 frames
◆Plugin Command:VisuMZ_1_BattleCore, MOTION: Motion Type
:              :Targets = ["user"]
:              :Motion Type = sleep
:              :Show Weapon? = false
◆Wait:6 frames
◆Plugin Command:VisuMZ_1_BattleCore, MOVE: Home Reset
:              :Targets = ["alive battlers"]
:              :Wait For Movement? = false
◆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
Ah, I see. I don't have an answer as to why it's doing that, but I also had an issue with Melee Distance and decided to work with Offset instead. For example the "thrust" motion:

View attachment 293633

Is done with an Offset: X = -48 instead. You might go "HUH?" on seeing this figure but in my case the weapons are baked into the battler graphic. Hence a negative number is needed. Perhaps using offset instead of melee distance is a workable solution for you too?

Spoiler: Action sequence thrust
JavaScript:
◆Plugin Command:VisuMZ_1_BattleCore, ACSET: Setup Action Set
:              :Display Action = true
:              :Immortal: On = true
:              :Battle Step = false
:              :Wait For Movement = true
:              :Cast Animation = false
:              :Wait For Animation = true
◆Plugin Command:VisuMZ_1_BattleCore, MOTION: Motion Type
:              :Targets = ["user"]
:              :Motion Type = thrust
:              :Show Weapon? = false
◆Wait:12 frames
◆Plugin Command:VisuMZ_1_BattleCore, MOVE: Move To Target(s)
:              :Targets (Moving) = ["user"]
:              :Targets (Destination) = ["current target"]
:              :Target Location = front base
:              :Melee Distance = 0
:              :Offset Adjustment = horz
:              :Offset: X = -48
:              :Offset: Y = 12
:              :Duration = 12
:              :Face Destination? = true
:              :Movement Easing = InQuart
:              :Movement Motion = thrust
:              :Wait For Movement? = false
◆Play SE:Ice3 (90, 150, 0)
◆Wait:6 frames
◆Plugin Command:VisuMZ_1_BattleCore, ANIM: Show Animation
:              :Targets = ["current target"]
:              :Animation ID = 11
:              :Mirror Animation = false
:              :Wait For Animation? = false
◆Wait:12 frames
◆Plugin Command:VisuMZ_1_BattleCore, MECH: Action Effect
:              :Targets = ["current target"]
◆Wait:24 frames
◆Plugin Command:VisuMZ_1_BattleCore, MOVE: Jump
:              :Targets = ["user"]
:              :Desired Height = 100
:              :Duration = 24
:              :Wait For Jump? = false
◆Plugin Command:VisuMZ_1_BattleCore, MOVE: Move To Point
:              :Targets = ["user"]
:              :Destination Point = home
:              :Offset Adjustment = horz
:              :Offset: X = 0
:              :Offset: Y = 0
:              :Duration = 24
:              :Face Destination? = false
:              :Movement Easing = InOutQuad
:              :Movement Motion = escape
:              :Wait For Movement? = false
◆Wait:18 frames
◆Plugin Command:VisuMZ_1_BattleCore, MOTION: Motion Type
:              :Targets = ["user"]
:              :Motion Type = sleep
:              :Show Weapon? = false
◆Wait:6 frames
◆Plugin Command:VisuMZ_1_BattleCore, MOVE: Home Reset
:              :Targets = ["alive battlers"]
:              :Wait For Movement? = false
◆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


I was afraid that using offset would behave differently depending on enemy size, but it turns out it works just as it would using melee distance. I just had to change the offset value to -48.

Thanks for the help!!

Original thread: https://forums.rpgmakerweb.com/threads/visustella-action-sequence-move-melee-distance-possible-bug.165247/