collapse

Author Topic: Wave Dashing System ala VS games (or MvC-MvC2 style games)  (Read 1066 times)

0 Members and 1 Guest are viewing this topic.

Offline FerchogtX

  • The eternal walker
  • Initiate
  • **
  • Posts: 86
  • Last Login:December 19, 2014, 05:13:12 PM
  • Face the final day with dignity...
    • Email
Wave Dashing System ala VS games (or MvC-MvC2 style games)
« on: September 12, 2012, 08:04:52 PM »
Hi there people!!!!

Well, while doing some stuf, I realized that my current dash system is crap, so I decided to take a closer look o the Dash system in MvC and I found interesting info so far, so, as an introduction, I'll writte what I found and after, how you can implement this to your MvC styled chars:

How does it work?
It's quite simple indeed, you alredly know that a dash is a short aproaching movement towards an enemy, can be a hop or a short run, however, this has features that are different from running, the first is that the dash stops automatically after certain amount of ticks and not when releasing the direction arrow.

The second is that you are able to crouch, guard and attack inmediately after executing dash.

But, this is not so simple, you may think: "ctrl 1 will do... isn't it?" Shotr answer: No...

Inside Dashing Codes
When you execute a dash, at least in vs styled games, there are a few features that makes this move somewhat tricky to code, the first is that, when you back dash, if you used ctrl 1 to enable attacks and other moves, and you crouch from it, you inmediately get vel X = 0, which is wrong... when you crouch from a dash, you are supposed to slide before reaching vel x = 0.

Because of this, you need to disable ctrl in all your dash states, yeah... that's right, no control. Now you will find that you cannot do moves as you did before, but a trigger containing stateno = 100 or stateno = [100,106] will do it just fine. For other stuff like guarding and crouching you might add a changestate in the dash states so you can do that inmediately after dashing if needed. This solves sliding stuff, but wave dashing? Here we go then...

Wave Dashing... the headache?
You may notice that, if you played any vs game and you know how to wave dash, most of vs styled chars are not able to do it as they did in their original games, this is why: In mugen, any dash state has a statetype of S and can only be executed while you are in a S statetype also, and here comes the trick... whether is a bug in vs system engine or not, this disables wave dashing in mugen.

In vs games, Dash states INHERIT statetypes from previous states, and also can be executed from state 10 along with state 0, 20 or even 52, yes, state 10, not 11 or 12, 10... Because of this, if you dash from state 0, you inherit statetype S, BUT if you do it from state 10, you inherit C statetype... crazy isn't it? but ths is not the end...

Also, if you press down while you execute the dash command (this leading you to execute from state 10) and inherit this statetype, you can do CROUCHING attacks inmediately without crouching... yes you guessed right, you are already in statetype = C, so you don't need to crouch again. More tricky? if you are in C staetype in dash AND you release down command, you then recover S statetype... CRAZY!!! this is the part that enables wave dashing.

As you can see, is really weird how capcom handles this stuff, but because of this we get a feature widely used in tournaments and stuff, the wave dash.

Enough babling, GIMME THE CODE!!!!!!!!
Sure...

First, override state 10 (DO NOT REPLACE UNLESS YOU KNOW WHAT YOU ARE DOING) with this:
Code: [Select]
;---------------------------------------------------------------------------
; Stand to Crouch
[Statedef 10]
type    = C
physics = N
anim = 10

[State 10, 1]
type = VelSet
trigger1 = abs(vel x) < Const(movement.crouch.friction.threshold)
x = 0

[State 10, 2]
type = VelMul
trigger1 = !(PrevStateNo = [100, 106])
x = const(movement.crouch.friction)

[State 10, 3]
type = ChangeState
triggerall = !ctrl
trigger1 = AILevel = 0 && command != "holddown"
value = 12
ctrl = 1

[State 10, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

The important part here is the changestate to state 12 when NOT IN CONTROL, you will need that changestate controller otherwise, weird behaviours may occur while crouching from the dash state. Also note that friction is not aplied if you come from dashing states.

Now, the Dash states:
Code: [Select]
;-------------------------------------------------------------------
; Dash Foward
[Statedef 100]
type    = U ;Original Capcom Value, normal should be S
movetype = I
physics = N
anim = 100
ctrl = 0
sprpriority = 1

[State 101, 2]
type = VelSet
trigger1 = Time = 0
y = 0

[State 101, 3]
type = PosSet
trigger1 = Time = 0
y = 0

[State 100, 1]
type = VelSet
trigger1 = AnimElem = 3
x = const(velocity.run.fwd.x)

; Due to Statetype bug in vs games, you obviously
; cannot crouch if your state is already crouch.
[State 1xx, Crouch]
type = ChangeState
triggerall = StateType = S
trigger1 = AILevel = 0 && command = "holddown"
value = 10

[State 1xx, Jump]
type = ChangeState
trigger1 = AILevel = 0 && command = "holdup"
value = 40

[State 1xx, Guard]
type = ChangeState
trigger1 = AILevel = 0 && (command = "holdback" && InGuardDist)
value = 120

 ;Capcom has a bug in their dash states in vs games, this
; is added to emulate that bug...
[State 1xx, DSH-BUG.n] ;This thing makes possible to wavedash ala mvc2
type = StateTypeSet
triggerall = StateType = C
trigger1 = AILevel = 0 && command != "holddown"
statetype = S

[State 100, 2]
type = ChangeState
trigger1 = Time = 20
value = 101

;-------------------------------------------------------------------
; Dash Foward (stop)
[Statedef 101]
type    = U ;Original Capcom Value, normal should be S
movetype = I
physics = S
ctrl = 0
anim = 101

[State 106, 1]
type = VelSet
trigger1 = abs(vel x) < Const(movement.stand.friction.threshold)
x = 0

[State 101, 2]
type = VelSet
trigger1 = Time = 0
y = 0

[State 101, 3]
type = PosSet
trigger1 = Time = 0
y = 0

; Due to Statetype bug in vs games, you obviously
; cannot crouch if your state is already crouch.
[State 1xx, Crouch]
type = ChangeState
triggerall = StateType = S
trigger1 = AILevel = 0 && command = "holddown"
value = 10

[State 1xx, Jump]
type = ChangeState
trigger1 = AILevel = 0 && command = "holdup"
value = 40

[State 1xx, Guard]
type = ChangeState
trigger1 = AILevel = 0 && (command = "holdback" && InGuardDist)
value = 120

 ;Capcom has a bug in their dash states in vs games, this
; is added to emulate that bug...
[State 1xx, DSH-BUG.n] ;This thing makes possible to wavedash ala mvc2
type = StateTypeSet
triggerall = StateType = C
trigger1 = AILevel = 0 && command != "holddown"
statetype = S

[State 101, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Dash Back
[Statedef 105]
type    = U ;Original Capcom Value, normal should be S
movetype = I
physics = N
ctrl = 0
anim = 105
sprpriority = 1

[State 101, 2]
type = VelSet
trigger1 = Time = 0
y = 0

[State 101, 3]
type = PosSet
trigger1 = Time = 0
y = 0

[State 105, VelAdd]
type = VelAdd
trigger1 = AnimElemNo(0) >= 2
y = const(movement.yaccel)

[State 105, 1]
type = VelSet
trigger1 = AnimElem = 2
x = const(velocity.run.back.x)
y = const(velocity.run.back.y)

; Due to Statetype bug in vs games, you obviously
; cannot crouch if your state is already crouch.
[State 1xx, Crouch]
type = ChangeState
triggerall = StateType = S
trigger1 = AILevel = 0 && command = "holddown"
value = 10

[State 1xx, Jump]
type = ChangeState
trigger1 = AILevel = 0 && command = "holdup"
value = 40

[State 1xx, Guard]
type = ChangeState
trigger1 = AILevel = 0 && (command = "holdback" && InGuardDist)
value = 120

 ;Capcom has a bug in their dash states in vs games, this
; is added to emulate that bug...
[State 1xx, DSH-BUG.n] ;This thing makes possible to wavedash ala mvc2
type = StateTypeSet
triggerall = StateType = C
trigger1 = AILevel = 0 && command != "holddown"
statetype = S

[State 105, 2]
type = ChangeState
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 106

;---------------------------------------------------------------------------
; Dash Back (stop)
[Statedef 106]
type    = U ;Original Capcom Value, normal should be S
movetype = I
physics = S
ctrl = 0
anim = 106

[State 106, 1]
type = VelSet
trigger1 = abs(vel x) < Const(movement.stand.friction.threshold)
x = 0

[State 106, 2]
type = VelSet
trigger1 = Time = 0
y = 0

[State 106, 3]
type = PosSet
trigger1 = Time = 0
y = 0

; Due to Statetype bug in vs games, you obviously
; cannot crouch if your state is already crouch.
[State 1xx, Crouch]
type = ChangeState
triggerall = StateType = S
trigger1 = AILevel = 0 && command = "holddown"
value = 10

[State 1xx, Jump]
type = ChangeState
trigger1 = AILevel = 0 && command = "holdup"
value = 40

[State 1xx, Guard]
type = ChangeState
trigger1 = AILevel = 0 && (command = "holdback" && InGuardDist)
value = 120

 ;Capcom has a bug in their dash states in vs games, this
; is added to emulate that bug...
[State 1xx, DSH-BUG.n] ;This thing makes possible to wavedash ala mvc2
type = StateTypeSet
triggerall = StateType = C
trigger1 = AILevel = 0 && command != "holddown"
statetype = S

[State 106, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

As you can see, this thing is very generic, at this point, this allows you to jump, crouch and guard even at time = 0 in that states, changestate to state 10 SHOULD be like that and not giving control, otherwise wave dashing will be overriden by other commands, that's why we overrided state 10.

Then, in your command file you may add:
Code: [Select]
;--------------------------------------------------------------------------
;Dash Back
[State -1, Dash Back]
type = ChangeState
value = 105
triggerall = stateno = 0 || stateno = 5 || stateno = 10 || stateno = 20 || stateno = 52 || stateno = [100,101]
trigger1 = AILevel = 0 && (command = "BB" || ((command = "holdback") && (command = "x") && (command = "y")))

;--------------------------------------------------------------------------
; Dash Fwd
[State -1, Dash Fwd]
type = ChangeState
value = 100
triggerall = stateno = 0 || stateno = 5 || stateno = 10 || stateno = 20 || stateno = 52 || stateno = [105,106]
trigger1 = AILevel = 0 && (command = "FF" || ((command = "x") && (command = "y")))

If you got no state 5 (turning state) you can remove it, otherwise (like me for auto turning after landing) you can keep that.

With all of this you are supposed to enable your char for wave dashing just like it works on vs games.

Extras:
  • This works in both winmugen and mugen 1.0
  • AIlevel can be replaced with any var if you are using winmugen
  • Const(movement.stand.friction.threshold) can be replaced with either 0 or 2 as a value if you use winugen. Or you can simply remove those sctrls since they are used only in MUGEN 1.0 and above...
  • "FF" or "BB" command can be replaced with any comand label you have defined for dashing, in fact any command for dashing can be replaced, but as suggestion, it works beter with x and y commands by themselves and hold back in case of back dash, "FF" and "BB" are the really optional ones...
  • You can customize the velset parameter for aplying your vel to the dash states, in this case is animelem = 3, but can be time = 0 or animelem = 2... with this, the character slides in the wave dash (between state 10 and the new dash) and doesn't stop, just like in vs games!!!. Time to change from state 100 to 101 and 105 to 106 and / or triggers can be customized for you character needs also.
  • Remember to add stateno = [100,106] trigger to your attack states along with ctrl && statetype = whatever (specially for crouching and standing attacks) since this states now have no control, also you don't need to add noutoturn or nowalk assertspecials because ctrl = 0 does that for you.
  • All your stand or crouching attacks should face your opponent if facing is equal to his from dashing (or not), if not, you should add a Turn sctrl to every land attack you have.
  • For crouching attacks, you may notice you cannot execute them inmediately after crouching from any dash, you solve that issue adding a ctrl || stateno = 10 to those state triggers...
  • For any attack you add, you need to add the stateno = [100,106] or/and stateno = [10,12] so you can execute them without issues.

I hope this work for you guys :) If you got questions, feel free to ask.

See ya!!! :D

P.D. Added a lil' change in the state 10 changestate into state 12, added the line ctrl = 1, solving minor issues in super move execution.
« Last Edit: September 16, 2012, 08:42:00 PM by FerchogtX »


This is the era in which we will see reason triumphing against brutality... May be better to open your mind to the future.
------------------------------------------------------
<- [Clicky - Clicky]
Current Universal War Official Artwork

Tags:
 


* IMT Facebook

Help us by Donating!

IMT Discord

Join us at our Discord! Click the image below!

* IMT Shoutbox

Sorry, this shoutbox does not exist.

* Recent Posts

D2TD VS Showcase Thread by D2TD
[November 24, 2024, 09:12:03 AM]


Marvel vs. Capcom: Eternity of Heroes REMAKE Game Update 1.3.0 - N.A.O.H. by LightFlare
[November 21, 2024, 09:44:09 PM]


Terrordrome: Rise of the Boogeymen Extended Version ( jeepers creepers) version by leonardo
[November 19, 2024, 10:22:47 PM]


Hill of the Nameless(1.1 Only) by Vegaz by LightFlare
[November 19, 2024, 10:50:39 AM]


Golden Axe Returns by gokudo99
[November 19, 2024, 03:59:31 AM]


Barkley Shut Up and Jam! Stages by Vegaz by LightFlare
[November 12, 2024, 11:26:21 AM]


[BOR] _Avengers United Battle Force_ by O Ilusionista
[November 11, 2024, 12:35:24 PM]


Eternal Lament Stage 1.1 & 1.0 by O Ilusionista
[November 11, 2024, 12:34:54 PM]


MatreroG's Stages W.I.P. Concepts by MatreroG
[November 11, 2024, 07:00:56 AM]


Spooky House(1.1 Only/AIGS) by Vegaz by LightFlare
[October 31, 2024, 11:31:36 AM]

* IMT Calendar

November 2024
Sun Mon Tue Wed Thu Fri Sat
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 [25] 26 27 28 29 30

SimplePortal 2.3.5 © 2008-2012, SimplePortal