YesNoOk
avatar

Reversal/Counter Mechanics Understanding (Read 3232 times)

Started by Plum, June 22, 2019, 11:30:55 pm
Share this topic:
Reversal/Counter Mechanics Understanding
#1  June 22, 2019, 11:30:55 pm
  • **
  • Variables > Boyfriends
I've been looking through code, since I've just recently found out about Reversal and hitoverrides, I wanted to know if it's possible to have a Reversal def or hittoverride happen during a grab? For example Ken from SF Alpha kneeing his opponent over and over, there are no clsn boxes so I was wondering if it's still possible and if how, then what concept do I need to start testing/studying to do so?

Basically I'm asking can you have p2 reverse a grab without hitboxes, and put play p1 in a custom state as well?
Re: Reversal/Counter Mechanics Understanding
#2  June 22, 2019, 11:44:06 pm
  • ****
  • CPU Purple Heart
    • USA
    • https://www.pixiv.net/en/users/8108265
 Are you referring to throw teching/throw escaping? Afaik, every fighting game I've ever played that has throw teching only allows you to escape on the first few frames in order to keep it from being abusable, therefore, not making it cheap. Otherwise, you can't reversaldef/hitoverride a grab since it's just using custom states to manipulate the target. You'll need a selfstate instead that detects both appropriate button presses and if the attack that hits you has a hitdefattr as T (throw)... this method is not 100% guaranteed since if the author has the throw set with 0 pausetime, it won't detect the hitdefattr. Tbf, most authors code their characters to allow for throw teching anyway.
Re: Reversal/Counter Mechanics Understanding
#3  June 23, 2019, 12:08:01 am
  • **
  • Variables > Boyfriends
I guess I was talking about the customstate then, since tech throws wouldn't help. So, if my need a selfstate that detects both states, would there be any examples or characters with said example that you can think of off the top of your head? I just want to know if it's possible to escape/reverse a customstate from p1, like setting up a triggerall so while in the grab state [trigger1 = "command here" could have p2 force p1 into a custom state instead.

And goodness, thanks for the fast response. X3
Re: Reversal/Counter Mechanics Understanding
#4  June 23, 2019, 12:21:25 am
  • ****
  • CPU Purple Heart
    • USA
    • https://www.pixiv.net/en/users/8108265
 The common states most authors use for throws (both ground and air) are states 800 to 899, but there are a lot of authors who also do not abide to these kind of unwritten standards. It's just easier and more reliable to detect enemy,hitdefattr = SCA,NT,ST instead since it'll cover the states that deviate from those standards. Something along the lines of this in your statedef -2...

type = selfstate
triggerall = numenemy
trigger1 = enemy,hitdefsttr = SCA,NT,ST
trigger1 = enemy,movehit
trigger1 = command = "a" || command = "b" || command = "c" || command = "x" || command = "y" || command = "z" ||
value = cond((statetype !=A),0,51)
ctrl = 1

 I would also use a possadd whenever you break out of a throw so that you don't get regrabbed right after throw teching, but that's up to you on how you execute it.

 This is just a very simplified sample, I wouldn't just copypaste this and call it a day otherwise since it could use a little more refinement (also, you may need a helper to buffer commands since custom state force you to use P2's CMD instead). Take my example, study it and experiment so not only will it work properly, but you also have the benefit of learning from it to come up with some of your own code inventions.
Re: Reversal/Counter Mechanics Understanding
#5  June 23, 2019, 02:12:21 am
  • **
  • Variables > Boyfriends
I was probably being long winded again, sorry.^^" I'm not trying to throw tech, I'm just trying to force p1 into a custom state, as in counter p2 custom state with p1 custom state.

I'll study this for an hour or so and see what I come up with and get back to you. Thanks again.~
Last Edit: June 23, 2019, 02:35:27 am by Chartreuse
Re: Reversal/Counter Mechanics Understanding
#6  June 23, 2019, 03:21:26 am
  • **
  • Variables > Boyfriends
Actually this code causes crashing: trigger1 = enemy,hitdefsttr = SCA,NT,ST
Re: Reversal/Counter Mechanics Understanding
#7  June 23, 2019, 03:40:12 am
  • ****
  • CPU Purple Heart
    • USA
    • https://www.pixiv.net/en/users/8108265
That was a typo on my part since I was typing this all on phone earlier.

It should be trigger1 = enemy,hitdefattr = SCA,NT,ST instead.
Re: Reversal/Counter Mechanics Understanding
#8  June 23, 2019, 07:57:06 pm
  • **
  • Variables > Boyfriends
Well I have to rewrite what I wrote, so that's already disappointing....

In short I did find a lot of interesting things thanks to you, like a new way to code AI and use hitdef for a different /kind/ of counter, but not what I was looking for unfortunately, I think I honestly just misunderstand the code's actually purpose after all the testing I did.

I can also say that I tried using Hitoverride and Reversaldef as well and none of them gave me the results I wanted, but this is all new to me so I'm sure I messed up somewhere. But I really, /really/ want to believe there is code out there for breaking out of a suplex/grab five ticks before you get slammed to the ground,forcing your attacker into your own custom state with preset conditions.

I obsess over things like this often enough so I'm pretty sure I'll be trying to find/fix this stuff all next week whenever I have time. If I'm lucky someone had this issue/thought and has already asked the question(s) here and has working code for escaping forced custom states already in progress.^^
Re: Reversal/Counter Mechanics Understanding
#9  June 25, 2019, 07:17:32 am
  • *****
  • Shame on you!
    • USA
If P2 has you in the throw, and you try to break out, the only way to do that would be a helper, P3, or P2 would have to be coded for it.
In practice, this isn't the best idea. A lot of throws break the round for mugen if things get botched.
I can't really imagine a universal way to make P1 break out of P2's throw. P2 would have to have clsn boxes.
vVv Ryuko718 Updated 10/31/22 vVv
Re: Reversal/Counter Mechanics Understanding
#10  June 25, 2019, 03:23:34 pm
  • **
  • Variables > Boyfriends
I did add clsn boxes and removed the nohitby from a character or two and got it functioning to a degree, I was really excited until I then realized that the code was /only/ working when against the same character. So I tried for a few more hours and still couldn't get the triggers to function, that's honestly all I have left to get working just so. XD

I've been using the code below from Seravy since yesterday, and I can't get it to allow p2 to escape/counter at any time, or even against /certain/ states, it's honestly strange since triggers are usually straight forward. I tried to activate triggers based on life, states, time, and still no success.

Code:

First, you need to set a variable in state -3, which is only executed if you are in your own state.

[State -3]
Type=Varset
Trigger1=1
var(44)=Gametime
ignorehitpause=1

Then, if the variable isn't set to the current gametime, it means you aren't in your own state, so you are in the situation when you can use your "break from custom state" ability, like this

[State -2]
Type=Selfstate
Trigger1=var(44)!=Gametime
Trigger1=command="breakfree"
value=Break out from throw state (needs to be movetype=I to stop being a target)
Re: Reversal/Counter Mechanics Understanding
#11  June 26, 2019, 09:28:38 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Its extremely easy to break out of custom states. Movetype = H will do it. But you can't act against their attacks because they aren't actually hitting you which is what both hitoverride and reversaldef rely on.

Full game or lots of personal use only editing sure. You can supply a variable or helper that isn't in use and set/spawn it during the custom state and have the attacker react to that and get fake hit himself so you can real hit him and take control of the counter.


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: Reversal/Counter Mechanics Understanding
#12  June 26, 2019, 06:08:20 pm
  • **
  • Variables > Boyfriends
Thanks for clarifying that, that's what I read before but I wasn't /entirely/ sure that was true since I was just aimlessly searching through post. And I've chosen the "personal use editing" route which will /eventually/ become a full game. So I can't use Hitoverride or reversal def so I'm still trying to use the code posted above by Seravy

The results so far are this:



It's pretty much what I want, but the issue is that it /only/ seems to work when the character is going against themselves. It literally doesn't work on any other character, the moment you're grabbed you put into state 802, and the code above lets me interrupt the grab by pressing "start", and since I've added clsn boxes the hit actually connects and leads to the custom state. If I could figure out how to make this universal then everything would be perfect.~

I've trying for days now and no luck, I've tried so many triggers--the odd thing is I can get it to work off if the trigger is just a statedef, but whenever I add a trigger that involves pressing a button it just doesn't work /unless/ you're fighting the same character.


My current code:

[State -2]
Type=Selfstate
Trigger1=var(44)!=Gametime
Trigger1=command="s"
value=99501

[State -3]
Type=Varset
Trigger1=1
var(44)=Gametime
ignorehitpause=1