YesNoOk
avatar

Negative Edge - No Delay Detection!!! (Read 10869 times)

Started by Messatsu, January 24, 2004, 06:12:52 am
Share this topic:
Negative Edge - No Delay Detection!!!
#1  January 24, 2004, 06:12:52 am
  • ******
  • In after lock
    • mugenguild.com/~messatsu/index.html
Negative Edge is the ease of comboing a connecting button attack into a special command attack.  Capcom "invented" the technique in the SF2 days and has stuck with their fighting games through the years.  Guilty Gear also makes use of the technique, but certain characters, like Johnny, do not use it.

Code:
[Command]
name = "MistuFinahH"
command = ~D, DF, F, x
time = 12

[Command]
name = "MistuFinahH"
command = ~D, DF, F, ~x
time = 12

The coding goes in the .cmd file btw.


Many people risk their lives everyday by having Mugen.
Last Edit: November 08, 2004, 03:45:20 am by Messatsu
Re:Negative Edge Repost, Again
#2  January 24, 2004, 07:22:51 am
  • ******
  • [E]
    • Mexico
While we are at it several games (cvs and kof come to mind) also had this restriction:

Code:
[Command]
name = "MistuFinahH"
command = ~D, DF, /F, x
time = 12

[Command]
name = "MistuFinahH"
command = ~D, DF, /F, ~x
time = 12

that means you have to hold the direction as you press the button, otherwise it won't trigger; note that Dps and aerial moves don't follow this rule to allow further short-cutting.
Re:Negative Edge Repost, Again
#3  February 29, 2004, 10:38:50 pm
  • ******
  • In after lock
    • mugenguild.com/~messatsu/index.html
More stuff nobody will use.  I will post an explanation if someone is interested.

2 button negative edge:
Code:
[State 1000, Negative EX Detect]
type     = varset
trigger1 = time < 2
**trigger1 = var(20) != 3 && var(20) != [5,7]**
var(20)  = ifelse(command = "rx", (var(20) | 1), ifelse(command = "ry", (var(20) | 2), ifelse(command = "rz", (var(20) | 4), 0)))

;if(var(20) = (3 || 5 || 6))

3 button negative edge:
Code:
[State 3000, Negative EX Detect]
type     = varset
trigger1 = time < 3
**trigger1 = var(20) != 7**
var(20)  = ifelse(command = "rx", (var(20) | 1), ifelse(command = "ry", (var(20) | 2), ifelse(command = "rz", (var(20) | 4), 0)))

;if(var(20) = 7)



edit:  how to get simultaneous presses to work within EX detection?
Code:
[State 1000, EX]
type     = varset
trigger1 = !time
var(20)  = 1*(command="x") + 2*(command="y") + 4*(command="z")


Many people risk their lives everyday by having Mugen.
Last Edit: September 13, 2004, 03:01:42 am by Dante.

Mercykiller

Re:Negative Edge Repost, Again
#4  March 01, 2004, 12:45:24 am
Actually, I'm interested in this, so I would like a bit more insight into it.;)

What about commands that require multiple punch or kick button entries (a la the Raging Demon)?
Re:Negative Edge Repost, Again
#5  March 01, 2004, 02:37:45 am
  • ******
  • In after lock
    • mugenguild.com/~messatsu/index.html
One button negative edge is pretty much self explanatory.  I don't think I will need to get into that.

Mugen is gay and won't accept more than one release command at once so you have to work around it a bit.  When you release all commands at once they come in from the buffer(?) one at a time.  Knowing this you can't just use a simple "rx" && "ry".  When you do a special move the last button pressed can be detected when time = 0 of that move.  In the example below you need to release x, y, and z at the same time.  Only one of them is detected at time = 0.  On the next tick another one is detected, and on the next tick the last one is detected.  If you didn't release them close enough together or didn't use all three then the move won't activate because the variable will reset and not account for the other commands released.

This is easier for ex moves that are the same as the special moves, because they can be built into the special state itself.  For supers with the same command you need something in the -2/-3 states or something, I haven't bothered with it, yet.

Raging Demon doesn't use negative edge at all.  Maybe it does, but I don't think anybody would notice.  Most people don't even know what negative edge is.


Many people risk their lives everyday by having Mugen.
Last Edit: March 01, 2004, 02:40:41 am by Messatsu

Mercykiller

Re:Negative Edge Repost, Again
#6  March 01, 2004, 02:41:21 am
Quote
Raging Demon doesn't use negative edge at all.

Figured that much, but was being certain.
Re: Negative Edge Repost, Again
#7  September 13, 2004, 03:02:53 am
  • ******
  • In after lock
    • mugenguild.com/~messatsu/index.html
Slight update on my second post.  Tells how to use the same delay for EX detection to work within pressing the buttons simultaneously with non-release button commands.  New stuff at the bottom or marked by two asterisks. **


Many people risk their lives everyday by having Mugen.
Re: Negative Edge Repost, Again
#8  November 08, 2004, 03:36:36 am
  • ******
  • In after lock
    • mugenguild.com/~messatsu/index.html
Thanks to Winane and/or Cadicle for telling me to use !holda to detect a release.  Although I didn't use any of the code they presented to me. :P  I hope this is the last time I encounter this thread.

Place this somewhere near the top of statedef -1 - before any controllers that depend on negative edge.
Code:
[State -1, Negative Edge]; - Reset // Release // Hold
type     = null
trigger1 = var(9)&4032
trigger1 = (var(9):= 0)
trigger2 = var(9)
trigger2 = (var(9):= var(9) +64*(var(9)&1 && command != "ha") +128*(var(9)&2 && command != "hb") +256*(var(9)&4 && command != "hc") +512*(var(9)&8 && command != "hx") +1024*(var(9)&16 && command != "hy") +2048*(var(9)&32 && command != "hz")) - var(9)
trigger3 = var(9):= var(9)-(var(9)&63) + 1*(command = "ha") + 2*(command = "hb") + 4*(command = "hc") + 8*(command = "hx") + 16*(command = "hy") + 32*(command = "hz")
;above should allow holding to be always updated
;trigger3 = !(var(9)&4032)
;trigger3 = var(9):= 1*(command = "ha") + 2*(command = "hb") + 4*(command = "hc") + 8*(command = "hx") + 16*(command = "hy") + 32*(command = "hz")

trigger1's detect if keys were released in the last tick, but unused and therefore reset.
trigger2's detect if the keys were held the last tick and then checks if any were released during the current time frame.
trigger3's detect which keys are being held, but only if no keys were released in this time frame.  *coughs.  Crap just found a one tick fault. :P  Just ignore that you ever saw that.  Maybe removing trigger3,1... ??? :-[

three simultaneous kicks released: var(9)&448=448
three simultaneous punches released: var(9)&3584=3584
combo of two simul kicks: (var(9)&192=192) || (var(9)&384=384) || (var(9)&320=320)
combo of two simul punches:(var(9)&1536=1536) || (var(9)&3072=3072) || (var(9)&2560=2560)
weak punch and kick: var(9)&576=576
medium punch and kick: var(9)&1152=1152
fierce punch and kick: var(9)&2304=2304

But wait... you don't have any motions, yet.  Include a three way release command, like so:

Code:
[Command]
name    = "KongouKokuretsuzan"
command = ~D, D, D, a + b + c
time    = 18
[Command]
name    = "KongouKokuretsuzanR"
command = ~D, D, D,~a
time    = 18
[Command]
name    = "KongouKokuretsuzanR"
command = ~D, D, D,~b
time    = 18
[Command]
name    = "KongouKokuretsuzanR"
command = ~D, D, D,~c
time    = 18

Put it together and:
Code:
[State -1, Kongou Kokuretsuzan]
type       = Changestate
value      = 3700
triggerall = command = "KongouKokuretsuzan" || (command = "KongouKokuretsuzanR" && var(9)&448=448)
triggerall = statetype = S
trigger1   = var(8) && !(var(8)&16)


Many people risk their lives everyday by having Mugen.
Last Edit: November 08, 2004, 03:55:49 am by Messatsu
Re: Negative Edge - No Delay Detection!!!
#9  May 12, 2006, 06:43:05 am
  • ******
  • [E]
    • Mexico
by the way, i was half off on my previous post.

Code:
[Command]
name = "MistuFinahH"
command = ~D, DF, /F, x
time = 12

becomes

Code:
[Command]
name = "MistuFinahH"
command = ~D, DF, F, ~x
time = 12

but then, in the cmd you have to

Quote
triggerall = command = "QCFx" && command != "holdback" & command != "holddown"

in the case of hcfs is the same, in the case of hcb and qcb sub back for forward.

in teh case of dps, take off the down part.
Re: Negative Edge - No Delay Detection!!!
#10  May 25, 2006, 05:09:01 am
  • avatar
  • *
The delay disappears if you move the [Statedef -1, Negative Edge] state to statedef -3 (and add ignorehitpause = 1).

There seem to be a few catches with how your Negative Edge code works, V :\.  At least, for me O_o.  I had to experiment like mad with it til' I got it up and running.

Catch 1: The calculations seem to come out differently than what you posted O_o.  For example, holding C+Z will register as 2340 instead of 2304.  I made a list of what registers as what for me:

; Release Values:
;  x released: var(9)=520
;  y released: var(9)=1040
;  z released: var(9)=2080
;  a released: var(9)=65
;  b released: var(9)=130
;  c released: var(9)=260
;  three simultaneous kicks released: var(9)=455
;  three simultaneous punches released: var(9)=3640
;  combo of two simul kicks: (var(9)=195) || (var(9)=325) || (var(9)=390)
;  combo of two simul punches:(var(9)=1560) || (var(9)=3120) || (var(9)=2600)
;  weak punch and kick: var(9)=585
;  medium punch and kick: var(9)=1170
;  strong punch and kick: var(9)=2340

Catch 2: I can only seem to get the trigger to work if I remove the 'bitwise AND' operator; where:

triggerall = command = "burstmode" || (command = "burstmodeR" && var(9)&2340=2340)

will not work, this:

triggerall = command = "burstmode" || (command = "burstmodeR" && var(9)=2340)

does.  I have no clue why it does this; the dashboard registers all the proper values when I use the 'bitwise AND' operators there but the command states don't seem to recognize the variables if I use them that way @_@.  I'm thinking this might be because they're now in Statedef -3.

The last catch is the hold commands themselves.  Everything came out sluggishly if I used, say, /$a.  So I structured mine like this:

;-| Hold Button |--------------------------------------------------------------
[Command]
name = "hx";Required (do not remove)
command = /x
time = 1

[Command]
name = "hy";Required (do not remove)
command = /y
time = 1

[Command]
name = "hz" ;Required (do not remove)
command = /z
time = 1

[Command]
name = "ha";Required (do not remove)
command = /a
time = 1

[Command]
name = "hb";Required (do not remove)
command = /b
time = 1

[Command]
name = "hc";Required (do not remove)
command = /c
time = 1

From there, it's totally worked like a charm o_o.  It's a bit sluggish in some cases (Although I think that is just my keyboard :P) but everything seems to work A-OK otherwise.  Thanks for providing the code, V~.  It's awesome.
Last Edit: May 25, 2006, 05:22:08 am by LimitedMoon
Re: Negative Edge - No Delay Detection!!!
#11  May 25, 2006, 05:31:06 am
  • ******
  • In after lock
    • mugenguild.com/~messatsu/index.html
Quote
The delay disappears if you move the [Statedef -1, Negative Edge] state to statedef -3 (and add ignorehitpause = 1).
I haven't used my own code in a while, but it was written to avoid delay.  Any comments on delay should be from earlier versions of code in the thread.

Quote
The calculations seem to come out differently than what you posted O_o.
Sloppy copy or I just opted for calculating it and fudged.

Quote
Catch 2: I can only seem to get the trigger to work if I remove the 'bitwise AND' operator; where:
The bitwise and is needed to extract the appropriate buttons, your modification won't work if you also release another key--as var(9) checks what keys are released.  And again, since I forget what I've wrote, var(9) might store keys pressed as well.  I wrote it so it could be free enough to use unrestrictive.

Quote
The last catch is the hold commands themselves.  Everything came out sluggishly if I used, say, /$a.  So I structured mine like this:
/$a isn't even a documentedly usable command string! :o

Quote
Thanks for providing the code, V~.  It's awesome.
I go by Messatsu, but I don't necessarily care if you credit me or not.

Oh, I wrote a wikipedia entry on Negative Edge~.  Wii: http://en.wikipedia.org/wiki/Negative_edge


Many people risk their lives everyday by having Mugen.
Last Edit: May 25, 2006, 05:37:02 am by V for Valodim
Re: Negative Edge - No Delay Detection!!!
#12  May 25, 2006, 06:21:35 am
  • avatar
  • *
EDIT: Actually, I just noticed your last post in this thread was in like 2004 @_@_@.  Whoah, talk about an oversight on my part!  I was wondering why you were saying you haven't used it in a while and all that.  Really sorry about that!

I suppose as long as it works it's all good.  I'll credit you anyway.  Thanks, Messatsu!
Last Edit: May 25, 2006, 06:25:24 am by LimitedMoon
Re: Negative Edge - No Delay Detection!!!
#13  May 25, 2006, 06:40:46 am
  • ******
  • In after lock
    • mugenguild.com/~messatsu/index.html
Quote
Actually, I just noticed your last post in this thread was in like 2004 @_@_@.  Whoah, talk about an oversight on my part!
That just represents how underused it is.  I'm willing to bet that the number of people who have actually implemented it is less than three, including myself. :-X


Many people risk their lives everyday by having Mugen.

B²92

Re: Negative Edge - No Delay Detection!!!
#14  May 25, 2006, 12:14:10 pm
I will use it when I get my hands back on Rolento.
Re: Negative Edge - No Delay Detection!!!
#15  May 25, 2006, 10:42:29 pm
  • ******
  • Limited time to use Infinite power !
    • France
    • network.mugenguild.com/cybaster/
I'm willing to bet that the number of people who have actually implemented it is less than three, including myself. :-X
False.
Sepp does, you do, and POTS now does it. Which makes already 3. :P And I added it to my character, including the 2-button commands (in the update I'm making), since I play with Negative Edge using POTS' Shin Gouki, ever since I've discovered it, thanks to your code. :)
Re: Negative Edge - No Delay Detection!!!
#16  May 25, 2006, 10:52:38 pm
  • ******
  • In after lock
    • mugenguild.com/~messatsu/index.html
I was close. ;)


Many people risk their lives everyday by having Mugen.
Re: Negative Edge - No Delay Detection!!!
#17  May 26, 2006, 12:01:08 am
  • ******
One more here.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.
Re: Negative Edge - No Delay Detection!!!
#18  May 26, 2006, 03:41:49 am
  • avatar
  • *
The army will grow; and soon the world will bow to negative edge!

Although, to be more on topic; I'm still baffled as to why it doesn't recognize the bitwise and.  I'll post the implementation I've got going:

(Note: Vars are changed to 21 since that's what I'm using them for in Ken.  Also, it's back in Statedef -1; there WAS a delay of sorts, but I found out later that it was visual only.  It works fine there.)

[Statedef -1]

; - Reset // Release // Hold
[State -1, Negative Edge]
type = NULL
trigger1 = (var(21)&4032)
trigger1 = (var(21):= 0)
trigger2 = var(21)
trigger2 = (var(21):= var(21)+64*(var(21)&1 && command !="holda")+128*(var(21)&2 && command !="holdb")+256*(var(21)&4 && command !="holdc")+512*(var(21)&8 && command !="holdx")+1024*(var(21)&16 && command !="holdy")+2048*(var(21)&32 && command !="holdz"))-var(21)
trigger3 = var(21):= var(21)-(var(21)&63) + 1*(command = "holda") +2*(command = "holdb") +4*(command = "holdc") +8*(command = "holdx") +16*(command = "holdy") +32*(command = "holdz")
;trigger3 = !(var(21)&4032)
;trigger3 = var(21):= 1*(command = "holda") + 2*(command = "holdb") + 4*(command = "holdc") + 8*(command = "holdx") + 16*(command = "holdy") + 32*(command = "holdz")
ignorehitpause = 1

;---------------------------------------------------------------------------
[State -1, Burst Mode Change]
type = Changestate
triggerall = command = "burstmode" || (command = "burstmodeR" && var(21)=2340)
trigger1 = Statetype = S && ctrl
value = 930

Here's the problem.  State -1, Burst Mode Change does recognize the bitwise and.  To an extent.  If I replaced var(21)=2340 with var(21)&2340; it will trigger if I'm holding C or Z while performing "burstmodeR".  Just as it's supposed to.  It's when I put var(21)&2340=2340 that it no longer triggers; even when var(21)&2340 is indeed, 2340.

Messatsu or really, anyone; do you guys have any idea at all why this could be?  I can't have been the only one to run into this problem; and I'm sure it's because I'm totally missing something in its implementation :\.  It's no big loss if we can't figure it out as it works great as is, but I dislike leaving answers up in the air and there IS a chance that this information will help somebody. 

Although, if this IS the wrong forum for this kind of thing I'll gladly take it to the Help.
Re: Negative Edge - No Delay Detection!!!
#19  May 26, 2006, 04:05:19 am
  • ******
  • In after lock
    • mugenguild.com/~messatsu/index.html
It's fine commenting here.  I'll take a look at it before Saturday night... if I remember. :P  Is this in your current version of characters online?


Many people risk their lives everyday by having Mugen.
Re: Negative Edge - No Delay Detection!!!
#20  May 26, 2006, 04:22:57 am
  • avatar
  • *
Nope, I can send the command file to you if need be though.