YesNoOk
avatar

ReversalDef (SCTRLs) (Read 19636 times)

Started by Ricepigeon, September 18, 2015, 09:09:39 PM
Share this topic:
ReversalDef (SCTRLs)
#1  September 18, 2015, 09:09:39 PM
  • *****
  • Gaps? Where we're going, we don't need gaps...
    • USA
    • ricepigeon.neocities.org
Defines a reversal. If one of P2's Clns1 boxes comes in contact with one of P1's Clsn1 boxes and a ReversalDef is active, then P1 will reverse P2's attack. Use with p1stateno (and optionally p2stateno) for creating reversal attacks.

ReversalDefs take the HitDef parameters pausetime, sparkno, hitsound, p1stateno, and p2stateno, plus:

Required parameters:
    reversal.attr = attr_string
        attr_string specifies the list of attack attributes that can be reversed by this ReversalDef. It is a standard hit attribute string. For instance, reversal.attr = SA,NA,SA means stand+air, normal attack, special attack.

Optional parameters:
    sparkno = S1500, Overrides P2 hitspark

    sparkxy = 0,0 The sparkxy parameter is treated as an offset to P2's hitdef's sparkxy. The MoveHit trigger can be used to detect if P1 successfully reversed P2

    hitsound = S1,0 Sound upon hit

    p1stateno = The stateno P1 changes to on hit

    p2stateno = The stateno P2 changes to on hit

Example:
Code:
[State 0, ReversalDef]
type = ReversalDef
trigger1 = 1
reversal.attr = S,NA           ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
pausetime = 0 ,0
sparkno = S3000
sparkxy = 0,0
hitsound = S1,0
p1sprpriority = 2
p2sprpriority = 1
p1stateno = 0
p2stateno = 5000
numhits = 1
Id = 0
hitflag = MAF        ;HLAFD+-
ignorehitpause = 1
;persistent =


Additonal Notes:
There is an undocumented "attr" parameter for the ReversalDef SCTRL, which should not be confused with the required "reversal.attr" parameter. This works similar to the attr parameter for the HitDef controller in that it will define attributes of the Reversal occuring from the ReversalDef, allowing the Reversal to be affected by an opponent's HitOverride controller if the Reversal's attributes match that of Player2's HitOverride. If omitted, the Reversal will have no attributes assigned to it, and thus will ignore the effects of Player2's HitOverrides.

You can also use the "ID" parameter for reversaldefs.  Useful with gethitvar(chainid).

Additionally, there is a glitch in the Reversaldef controller which causes Player1 to retain Player2's target information even after Player2 returns to an Idle state. This allows Player1 to use target-based state controllers such as TargetState and TargetLifeAdd, as well as the Target redirection trigger, when they would normally not be allowed to. Through specific coding, it is possible to utilize this glitch to replicate a "damage-over-time" effect such as Poison. Please see these threads for more info.

Another good note about applying this SCTRL to helpers
Yes, a helper's reversaldef supersede the root's vulnerbale hitboxes. As long as the eenemy projectiles come in contact with the helper reversal clsn, it will apply the reversal effects before the enemy projectile's hitdef is registered.

No need for nothitbys, just duplicate your character's clsn into the helper, change the portion that should destroy projectiles to red clsn, and then bind the helper to your character for the desired duration.

There's no way to account for multi hitting projectiles with reversaldefs, the character shooting the projectile would have to do that, and I'm not even sure how this explanation applies to actual projectiles from the projectile state controller.
Last Edit: November 09, 2016, 02:48:24 PM by Odb718
Re: ReversalDef (SCTRLs)
#2  September 23, 2015, 03:18:50 AM
  • ****
  • Vs Style Debuts Tag Project CEO
  • The Dark Wolf Returns
    • USA
I've coded WereGarurumon with a ReversalDef that has him attack with Wolf Claw if he's struck during his ready stance... you can tell by him flashing. His reversal derives from Mouser's Cammy who has 3 different moves depending on the version of the state but WereGarurumon has one. I don't see many characters with Reversals in MUGEN unless it's in a certain series I don't usually play.

Sorry if I wasn't informative enough earlier. Here's an example of the state I used for WereGarurumon with the ReversalDef.
Spoiler, click to toggle visibilty
Beware the Dark Wolf once more!
Re: ReversalDef (SCTRLs)
#3  June 20, 2016, 06:03:43 PM
  • *****
  • Resident Tosspot
  • Pftheh
    • UK
    • plasmoidthunder.neocities.org
So what's the advantage of using this over HitOverride for Counters, other than the ability to send P2 into a custom state instantly? I mean, you can have the HitOverride send P1 into a state with a HitDef, so...

Oh, I want a diagram. I fucking love diagrams.
Re: ReversalDef (SCTRLs)
#4  June 21, 2016, 09:52:18 AM
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
It works on the red clsn boxes rather than the blue. You can have targetted overrides and define exactly which spark is to show up. Otherwise you'd have to do a weird helper/player mish mash, and it wouldn't work as clsn2's would both be hit at once, so logically you should still take the damage. The reversal takes effect before the "hit" bit and even if the red overlaps the blue you won't take a hit regardless of anything.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: ReversalDef (SCTRLs)
#5  June 21, 2016, 03:43:24 PM
  • *****
  • Resident Tosspot
  • Pftheh
    • UK
    • plasmoidthunder.neocities.org
So basically it'd be better to use HitOverride if you were doing a counter move where the character still takes damage (basically Dudley's Cross Counter). I also take it that even if they don't have collision hitboxes, ReversalDef will still allow you to put the opponent into a custom state?

Oh, I want a diagram. I fucking love diagrams.
Re: ReversalDef (SCTRLs)
#6  June 21, 2016, 04:12:42 PM
  • ******
Weirdly enough the way CvS2 and other games handle reversal detection, hit override would be the more accurate of the two.

But yeah HitOverride is too limited, mainly because what Cyanide said. You won't be able to get P2 in a custom state if they have complete invincibility Better to use ReversalDef. Yes, ReversalDef forces P2 into the custom state, boxes or not.

About Cross Counter: Yeah. It doesn't force P2 a different state, so it's basically a parry with an auto attack.
Re: ReversalDef (SCTRLs)
#7  June 21, 2016, 04:54:41 PM
  • *****
  • Resident Tosspot
  • Pftheh
    • UK
    • plasmoidthunder.neocities.org
So HitOverride would be better for what I'm achieving. Thanks!

Oh, I want a diagram. I fucking love diagrams.
Re: ReversalDef (SCTRLs)
#8  August 11, 2016, 09:32:19 PM
  • ******
    • www.justnopoint.com/
When using FF3 I see all these options are available. These should probably be added to the 1st post with descriptions

type = ReversalDef
trigger1 =
reversal.attr = S,NA           ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT

pausetime = 0,0 Sets the pause for the Root or Helper hitting and the root or helper getting hit


sparkno = S1500, Overrides P2 hitspark?

;sparkxy = 0,0 ;offset The sparkxy parameter is treated as an offset to P2's hitdef's sparkxy. The MoveHit trigger can be used to detect if P1 successfully reversed P2

hitsound = S1,0 Sound upon hit

p1stateno = The stateno P1 changes to on hit

p2stateno = The stateno P2 changes to on hit

Are all of these descriptions correct?
Re: ReversalDef (SCTRLs)
#9  August 11, 2016, 09:38:33 PM
  • ****
  • Vs Style Debuts Tag Project CEO
  • The Dark Wolf Returns
    • USA
Yes, they're all correct.
Beware the Dark Wolf once more!
Re: ReversalDef (SCTRLs)
#10  August 12, 2016, 03:02:30 PM
  • avatar
  • ******
    • Thailand
You can also use the "ID" parameter for reversaldefs. Might want to add that. Useful with gethitvar(chainid).
Last Edit: August 12, 2016, 03:05:59 PM by Palette Jesus
Re: ReversalDef (SCTRLs)
#11  August 12, 2016, 03:12:10 PM
  • ******
    • www.justnopoint.com/
Thanks! Added!
Re: ReversalDef (SCTRLs)
#12  August 18, 2016, 11:06:54 PM
  • ******
    • www.justnopoint.com/
I saw Jesuszilla use numhits as a parameter. What other values work for reversaldef? I'll have to test some more parameters it seems
Re: ReversalDef (SCTRLs)
#13  August 24, 2016, 11:23:50 AM
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Hitflag oddly enough. Need it for projectile interactions to actually make the projectile go away iirc.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

2OS

Re: ReversalDef (SCTRLs)
#14  October 29, 2016, 06:04:49 AM
  • ****
  • 608 Wannabe
  • Ich schicke dich zur HOELLE!! STIRB DU FEIGLING!!
    • Egypt
Additionally, there is a glitch in the Reversaldef controller which causes Player1 to retain Player2's target information even after Player2 returns to an Idle state. This allows Player1 to use target-based state controllers such as TargetState and TargetLifeAdd, as well as the Target redirection trigger, when they would normally not be allowed to. Through specific coding, it is possible to utilize this glitch to replicate a "damage-over-time" effect such as Poison. Please see these threads for more info.

there is another glitch where if this is done with helpers and the helpers destroyself, any helper that spawns from that point onwards is automatically a target. this plus ""rootchangestate"" through projectile is how the character F1 is killed.
Re: ReversalDef (SCTRLs)
#15  November 09, 2016, 02:54:20 PM
  • *****
  • Shame on you!
    • USA
Added the Example ReversalDef at the top with the few things we've discovered.
I used Fighter factory 3 and tacked on the standard hitdef under it.
p1sprpriority =
and
p2sprpriority =
Both lit up like they worked.
ID and HitFlag show like they dont. FF3 will show these as issues but they seem to work in Mugen 1.0. I dont get any debug flood when using them.
vVv Mauru Mauru Released vVv

2OS

Re: ReversalDef (SCTRLs)
#16  January 04, 2017, 08:12:32 AM
  • ****
  • 608 Wannabe
  • Ich schicke dich zur HOELLE!! STIRB DU FEIGLING!!
    • Egypt
for the record regarding the glitch that disallows targetdropping; you don't actually need to reverse anything. reversaldef simply needs to exist (even in the most undefined way possible). if you have a hitdef in the same state and it hits your target will still remain indefinitely.

Code:
[State ]
type=reversaldef
trigger1=1
reversal.attr=acs,aa,ap,at
ignorehitpause=1
persistent=1

[State ]
type=hitdef
trigger1=
attr=
ignorehitpause=1
persistent=1
Re: ReversalDef (SCTRLs)
#17  January 14, 2017, 01:58:52 AM
  • ****
  • it's me
  • Bat's a Wrap.
    • Chile
    • koakoa@jabber.org
    • Skype - koakumadevil69
Apparently there's a glitch with this controller specifically for Player 2 (i haven't tested with Simul because lol Simul), I tested this in MUGEN 1.0

What apparently happens is that those extra parameters like ID seem to work on the Player 1 side but apparently DO NOT in the player 2 side. As in, MUGEN completely seems to ignore these in the player two side.

For example:



Code:
[State 0, ReversalDef]
type = ReversalDef
trigger1 = animelemtime(4)>=0 && animelemtime(5)<0
reversal.attr = SCA,NA,SA,HA           ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
pausetime = 0,0
sparkno = -1
;sparkxy = 0,0 ;offset
hitsound = S1000,11
;p1stateno = 4001
;p2stateno = 4050
id = 4000
;ignorehitpause =
;persistent =

[State 1000, CS]
type = changestate
trigger1 = movecontact
trigger1 = numtarget(4000)
trigger1 = target(4000),ishelper=0
value = 4001

This will NOT trigger for P2 side, it will simple do the reversaldef and act as a Super Armor of some sorts. (basically how a reversaldef acts if it doesn't have a changestate or p1stateno.)

However if you change the following controller to THIS:

Code:
[State 1000, CS]
type = changestate
trigger1 = movecontact
trigger1 = numtarget
trigger1 = target,ishelper=0
value = 4001

IT WORKS (for P2 and P1 now)!! But, there's a little problem coming up as well...

Now let's say this attack has multiple states and multiple targetstates, targetlifeadds, all that. Now let's assume state 4001 has the following targetstate:

Code:
[State 4001, TS]
type = targetstate
trigger1 = animelemtime(1)=0
value = 4050

This will work, but there's a catch apparently, if you change to ANY OTHER STATE via this way, for player 2 side, the effects of TargetState,TargetLifeAdd,TargetPowerAdd,etc. will only be affecting your target for the first tick of that state and then is completely dropped.



Now you might be asking why not just use p1stateno, this is because we cannot separate a helper from the main character otherwise, and then we would end up with clones.

How to fix this?

I assumed that the only way that a target would drop was if there was no reason to keep said target, and I think MUGEN dropped the target because the reversaldef was not being asserted anymore after that first tick. Since a reversaldef has more or less similar properties as a hitdef, then I thought that you could keep the target in if the reversaldef stayed in one way, and apparently the way to do this is by using hitdefpersist = 1 on each of the statedefs of the move you're coding.

I really wonder why this actually happens only for P2. But I assume that the coding for ReversalDef is significantly incomplete for P2 and can be unstable compared to what you'd expect from P1's side.

PS: I checked all of youmu's negative states and nothing that could screw this up via extra target states would trigger at a point like this.
Yeaaaah im shootign ducks wiht the paino
Re: ReversalDef (SCTRLs)
#18  April 08, 2021, 08:00:39 AM
  • avatar
  • **
    • Vietnam
Additionally, there is a glitch in the Reversaldef controller which causes Player1 to retain Player2's target information even after Player2 returns to an Idle state. This allows Player1 to use target-based state controllers such as TargetState and TargetLifeAdd, as well as the Target redirection trigger, when they would normally not be allowed to. Through specific coding, it is possible to utilize this glitch to replicate a "damage-over-time" effect such as Poison. Please see these threads for more info.

there is another glitch where if this is done with helpers and the helpers destroyself, any helper that spawns from that point onwards is automatically a target. this plus ""rootchangestate"" through projectile is how the character F1 is killed.

It's called Konsen which many of Japanese author called that glitch you mentioned above
------Tremble Mortal and Despair. Doom has come to this world------
Re: ReversalDef (SCTRLs)
#19  April 08, 2021, 08:04:32 AM
  • avatar
  • **
    • Vietnam
for the record regarding the glitch that disallows targetdropping; you don't actually need to reverse anything. reversaldef simply needs to exist (even in the most undefined way possible). if you have a hitdef in the same state and it hits your target will still remain indefinitely.

Code:
[State ]
type=reversaldef
trigger1=1
reversal.attr=acs,aa,ap,at
ignorehitpause=1
persistent=1

[State ]
type=hitdef
trigger1=
attr=
ignorehitpause=1
persistent=1

The simple reason is Reversaldef using the same address with Hitdef in character memory. So whenever there is a hitdef are activating behind the reversaldef. That reversaldef effect will be overwritten by the hitdef after it.
------Tremble Mortal and Despair. Doom has come to this world------
Re: ReversalDef (SCTRLs)
#20  February 25, 2022, 08:31:46 PM
  • ******
    • www.justnopoint.com/
If you wish to have a helper be immune to reversaldefs be sure that theu have a hitoverride set for everything that you want them to be immune for.

Even if you have them without CLSN or nothitby