• Welcome to Smashboards, the world's largest Super Smash Brothers community! Over 250,000 Smash Bros. fans from around the world have come to discuss these great games in over 19 million posts!

    You are currently viewing our boards as a visitor. Click here to sign up right now and start on your path in the Smash community!

Request Mewtwo's Confusion

jjhoho

Smash Rookie
Joined
Mar 25, 2017
Messages
24
OK, I've been tearing my hair out for two days trying to figure out how on earth mewtwo's side-b (doesn't) work, and now I'm giving in. So I come to you, the people, for help.

Here's what I know so far:

His side-b sends the opponent into MewtwoThrown, a 27 frame long animation, and manipulates their velocity using the lines that most special moves would use to set the player's own velocity (4D 00 00 01, 4C 00 00 01 and 4D 00 00 02). The second two are "set vertical velocity to zero" and "fall", according to itaru, although this subaction might interpret them differently? They happen on frame 39, 27 frames after the hitbox first came out, I presume so there's no frames of being stuck in MewtwoThrown, but if you change the time that 4C 00 00 01 and 4D 00 00 02 come out, the opponent remains stuck on frame 27 of MewtwoThrown until the frame they're on. After the opponent leaves MewtwoThrown, they take the damage from the Throw data within the subaction and enter DamageFall aka tumble. If you delete 4C 00 00 01 and 4D 00 00 02, or in another way avoid them coming out, you get the souleater glitch, where the opponent is stuck in MewtwoThrown until you use a second Confusion.

I've inferred from what I've learned above that 4C 00 00 01 and 4D 00 00 02 cancel the opponent out of MewtwoThrown, obviously, although I have no good clue as to why. I've also inferred that maybe the reason the throw doesn't work properly is because the opponent never enters a Captured state? In the list of common IDs in this post there's CaptureMewtwo and CaptureMewtwoAir, which seems to imply that it's possible this move was supposed to be a proper command grab at one point. The biggest difference I've noted between this and other command grabs is that this is all in a single subaction, where every other command grab afaik has a different subaction for the start, captured, and ending portions. It's also worth mentioning that this move is the only one I've seen thus far that has the throw data for the move side by side with the grab boxes and the release data. Not sure if that could be a reason it doesn't work.

I've tried searching all over, but there seems to have been little if any discussion of this to ever really take place. Has anyone looked into this before? I'm quite a noob, all the things I wrote above are basically just inference from my messing around in CrazyHand and rooting around in PlMt.dat to no avail.
 

jjhoho

Smash Rookie
Joined
Mar 25, 2017
Messages
24
I worked on this, UnclePunch UnclePunch showed me where to look in the memory for the function, and what was responsible for sending the opponent into damage fall, and disabling that line results in the throw working properly :D albeit with hitlag for some weird reason, but hey

As for the reflector, unclepunch is also currently studying their properties and trying to make a crazy hand subaction type thing.

Basically unclepunch is sick and the melee mod discord is sick.

Edit: I'll add the codes (such as they are) and some gifs showing them off when i get on my computer :D

Edit#2: Here's a gif, they're being a pain rn so I'll probably make a new thread with all of this once i'm certain I know what's going on lol https://gfycat.com/ActiveBigArcticwolf
 
Last edited:

UnclePunch

Smash Ace
Joined
Nov 9, 2014
Messages
673
In this same realm, how do we get his reflector to reflect properly?
Code:
$Mewtwo Can Actually Reflect Stuff [UnclePunch]
04146c58 60000000
For anyone wondering why this phenomenon happens,


the byte at player data offset + 0x2218 (labelled on sheet as IASA flag) is read and rlwinm.'ed upon projectile collision with all reflectors. Mewtwo's IASA flag is set to be 0x18 during his AS and it fails (passes? i dont really get rlwinm) this condition and codeline 80077610 is executed, which sets a flag read by the reflectCalculateDamage function,

 

jjhoho

Smash Rookie
Joined
Mar 25, 2017
Messages
24


here's a couple gfys showing it off. The first is vanilla, just to show it's properties. The second is of it's bizarre hitlag (it's modded, but that doesn't rly matter)

here's the code :D

Confusion
[UnclePunch, jjhoho]
Version -- DOL Offset ------ Hex to Replace ---------- ASM Code
1.02 ----- 0x80146940 --- 4BF49E41 -> 60000000
---------- 0x801468ac --- 4BF49ED5 -> 60000000
 
Last edited:

The Cape

Smash Master
Joined
May 16, 2004
Messages
4,478
Location
Carlisle, PA
That looks kind of funky. Does it keep them in a hitstun stage instead of putting them into tumble fall?

Tried both these codes, seperately and together and they crashed my Dolphin as soon as I loaded a match. (Tried them on 1.02)
 
Last edited:

jjhoho

Smash Rookie
Joined
Mar 25, 2017
Messages
24
Yeah it does, although the vanilla throw data doesn't knock down until rly high percentage (it's 50 bkb 16 kbg 10 DMG at 280 degrees), which is probably the funk. Also the hitlag, throws with hitlag look wholly unnatural :p

Damn, I swore my syntax was wrong but i got the codes to work on my MCM build one 1.02 so i thought they'd worked. I'll try and fix them when i get home, but if you want to troubleshoot before then, the first offset is 0x8014348C iirc, that might be what's causing problems. MCM didn't want me to put 80 in front of that one but did want the 80 in front of the second one. Idk some jank for sure, I'll figure it out
 

The Cape

Smash Master
Joined
May 16, 2004
Messages
4,478
Location
Carlisle, PA
Yeah it does, although the vanilla throw data doesn't knock down until rly high percentage (it's 50 bkb 16 kbg 10 DMG at 280 degrees), which is probably the funk. Also the hitlag, throws with hitlag look wholly unnatural :p

Damn, I swore my syntax was wrong but i got the codes to work on my MCM build one 1.02 so i thought they'd worked. I'll try and fix them when i get home, but if you want to troubleshoot before then, the first offset is 0x8014348C iirc, that might be what's causing problems. MCM didn't want me to put 80 in front of that one but did want the 80 in front of the second one. Idk some jank for sure, I'll figure it out
Likely what we can do to fix how the move looks weird is to move the Autocancel that ends their being held in the move to an earlier point. Its 4D 00 00 02

I tried adjusting that to a later point and eventually the opponent hangs in the position and then falls and hits the ground. I extended it to the end of the animation and it looks funky on some of the slower falling characters like Jigglypuff. Therefore it's best if they are released from the move around the same time (animation wise) into some form of hitstun, it can be WDSK even, but released into hitstun is best.

So I have tried this out for the throw, which works great. There are two throw hitboxes, one of small size for both air and ground and one of larger size for grounded opponents only. I averaged the size, since the move is much better and kept only the one hitbox for the air and ground. I then took the GFX for the little puff of air on the ground and turned that into a terminate collisions as you can see. The hitbox hits the frame they are released and puts them into a meteor state. This puts every character on the ground, and if used over the edge it puts them just below the edge before they can recover (and since it's a throw, it's easy to meteor cancel). The hitstun does not last for long and has no growth. This works very well for the move and makes it work as it should.

Now I just need the reflect thingy... UnclePunch UnclePunch
 

Attachments

Last edited:

jjhoho

Smash Rookie
Joined
Mar 25, 2017
Messages
24
just played around with it, you're right, changing 4D 00 00 02 to happen on frame 29 is much less ugly (although the hitlag still happens).

Looking into that, what appears to be causing it is that throws (as well as falcon and ganon's up-b) seem to skip frame 1 of damagefly, thus skipping hitlag I guess, while Bowser's and Mewtwo's side-bs don't... Curious

I'll check on the codes in just a sec

edit: alright, i updated my post with the (hopefully) correct version of the code, let me know how it comes out!
 
Last edited:

The Cape

Smash Master
Joined
May 16, 2004
Messages
4,478
Location
Carlisle, PA
just played around with it, you're right, changing 4D 00 00 02 to happen on frame 29 is much less ugly (although the hitlag still happens).

Looking into that, what appears to be causing it is that throws (as well as falcon and ganon's up-b) seem to skip frame 1 of damagefly, thus skipping hitlag I guess, while Bowser's and Mewtwo's side-bs don't... Curious

I'll check on the codes in just a sec
For Ganon and Falcon, are you currently using a lower port (P1) against a higher port (P2)? If so, that is the hitstun glitch that occurs and there is a code to remove it. Try as P4 against P3 or something similar and see if you have the same effect. If not, this is because of the nature of the "throw" since it has hitlag and therefore creates this issue.


Edit: As soon as I tried your code the game crashed. I will try again
 
Last edited:

jjhoho

Smash Rookie
Joined
Mar 25, 2017
Messages
24
agh, what madness is this? also you're correct, not all (any?) throws skip frame 1 of damagefly, I was mistaken. Bowser's forward side b throw has a hitbox, which was causing the hitlag. Backwards ends normally.

what build of MCM are you using?
 

The Cape

Smash Master
Joined
May 16, 2004
Messages
4,478
Location
Carlisle, PA
agh, what madness is this? also you're correct, not all (any?) throws skip frame 1 of damagefly, I was mistaken. Bowser's forward side b throw has a hitbox, which was causing the hitlag. Backwards ends normally.

what build of MCM are you using?
Using 3.2 right now and a 1.02 ISO
 

jjhoho

Smash Rookie
Joined
Mar 25, 2017
Messages
24
Aha I think I've figured it out, give me a sec to test before I rush to post it this time but I'm pretty sure I found the root of the issue (spoiler: it's that i'm a fool :p )

alright, here it is:
Confusion
[UnclePunch, jjhoho]
Version -- DOL Offset ------ Hex to Replace ---------- ASM Code
1.02 ----- 0x80146940 --- 4BF49E41 -> 60000000
---------- 0x801468ac --- 4BF49ED5 -> 60000000
I believe the issue was I was writing it as an injection mod instead of a static overwrite

while I'm at it, here's the reflector code in static overwrite form :)

Mewtwo Can Actually Reflect Stuff
[ UnclePunch]
Version -- DOL Offset ------ Hex to Replace ---------- ASM Code
1.02 ----- 0x80146c58 --- 981F2218 -> Branch

60000000
 
Last edited:

The Cape

Smash Master
Joined
May 16, 2004
Messages
4,478
Location
Carlisle, PA
Aha I think I've figured it out, give me a sec to test before I rush to post it this time but I'm pretty sure I found the root of the issue (spoiler: it's that i'm a fool :p )

alright, here it is:
Confusion
[UnclePunch, jjhoho]
Version -- DOL Offset ------ Hex to Replace ---------- ASM Code
1.02 ----- 0x80146940 --- 4BF49E41 -> 60000000
---------- 0x801468ac --- 4BF49ED5 -> 60000000
I believe the issue was I was writing it as an injection mod instead of a static overwrite

while I'm at it, here's the reflector code in static overwrite form :)

Mewtwo Can Actually Reflect Stuff
[ UnclePunch]
Version -- DOL Offset ------ Hex to Replace ---------- ASM Code
1.02 ----- 0x80146c58 --- 981F2218 -> Branch

60000000
No luck on any of those sadly. No luck in MCM and trying to get them to load through a straight overwrite for the reflector


Trying a fresh unaltered ISO to be sure. Edit: Still crashes

Edit again: Fixed it:

Mewtwo Can Actually Reflect Stuff
[ UnclePunch]
Version -- DOL Offset ------ Hex to Replace ---------- ASM Code
1.02 ----- 0x80146c58 --- 981F2218 -> 60000000
 
Last edited:

jjhoho

Smash Rookie
Joined
Mar 25, 2017
Messages
24
that's really odd! any gecko codes or anything enabled in dolphin?

edit: oh whoops, I meant for that to be what I pasted into the post... the one I posted was still injection code
 
Last edited:

The Cape

Smash Master
Joined
May 16, 2004
Messages
4,478
Location
Carlisle, PA
that's really odd! any gecko codes or anything enabled in dolphin?
I was able to get the code I posted (and your throw code) to work with an empty ISO (unlocks only) and that's it. Trying to get it to work on my edited ISO right now.
 

jjhoho

Smash Rookie
Joined
Mar 25, 2017
Messages
24
I actually don't know tbh, I just did it from the memory offset :p i thiiiiiink it should modify a common actionstate (mewtwothrown) and therefore be in start.dol? but i'm not an expert
 

jjhoho

Smash Rookie
Joined
Mar 25, 2017
Messages
24
I would imagine that modifies data in PlMt.dat, but again, could be wrong
 

The Cape

Smash Master
Joined
May 16, 2004
Messages
4,478
Location
Carlisle, PA
The reflect code changes a codeline in the .dol, I believe it is in or related to Mewtwo's Side B AS.
I cannot get the code to work with any modified ISO, and I cannot find the changed line in the .dol. Any thoughts?

Tried to compare two .dol files, one with the change and one without, and I could not find what it was. Tried to go to the offset and had no luck. And the code just straight up does not work.
 
Last edited:

UnclePunch

Smash Ace
Joined
Nov 9, 2014
Messages
673
I cannot get the code to work with any modified ISO, and I cannot find the changed line in the .dol. Any thoughts?

Tried to compare two .dol files, one with the change and one without, and I could not find what it was. Tried to go to the offset and had no luck. And the code just straight up does not work.
I've used this gecko code through Dolphin and it worked,

$Mewtwo Can Actually Reflect Stuff [UnclePunch]
04146c58 60000000

I'm not sure why you can't get it to work.

https://streamable.com/hzv3c
 

The Cape

Smash Master
Joined
May 16, 2004
Messages
4,478
Location
Carlisle, PA
I've used this gecko code through Dolphin and it worked,

$Mewtwo Can Actually Reflect Stuff [UnclePunch]
04146c58 60000000

I'm not sure why you can't get it to work.

https://streamable.com/hzv3c
The code works, I just cannot get it to work with any edited ISO. From that point I wanted to find out what the change was so I could manually change it in the Start.Dol, but I have not had any luck. I checked the Offset and tried to search the original hex to change, but no luck.

Edit:
3F7134: F0 00 00 00 00 > 04 14 6C 58 60

3F713C: 00 00 00 00 > F0 00 00 00

This is apparently what changed when the code was enabled that I could find. It appears to be overlapping with some of my other Gecko codes


With that, how do I change the location of the Gecko code?

Edit:
Changed it by adding it to the end of my Gecko codes



Edit again: Also apparently SD Remix made the move go into "MissFoot" which works well
 
Last edited:

The Cape

Smash Master
Joined
May 16, 2004
Messages
4,478
Location
Carlisle, PA
SD Remix 3.1 - Mewtwo Missfoot
[Achilles]
Version -- DOL Offset ------ Hex to Replace ---------- ASM Code
1.02 ----- 0x800907e8 --- 38800026 -> Branch
3DE0803D 89EF0D85
2C0F0073 40820020
81FF0010 2C0F012F
41800014 2C0F0131
4080000C 388000FB
48000008 38800026
48000000

This is the 20XX version of the code that they use to call to SD Remix. Not sure what the code is normally (in SD Remix).
 

UnclePunch

Smash Ace
Joined
Nov 9, 2014
Messages
673
SD Remix 3.1 - Mewtwo Missfoot
[Achilles]
Version -- DOL Offset ------ Hex to Replace ---------- ASM Code
1.02 ----- 0x800907e8 --- 38800026 -> Branch
3DE0803D 89EF0D85
2C0F0073 40820020
81FF0010 2C0F012F
41800014 2C0F0131
4080000C 388000FB
48000008 38800026
48000000

This is the 20XX version of the code that they use to call to SD Remix. Not sure what the code is normally (in SD Remix).
That's most likely useless outside of 20XX, since it checks if the .sat file is loaded in.

Here's a code that works with vMelee

Code:
$Mewtwo Side B Goes to Missfoot [Achilles,UnclePunch]
040907e8 388000FB
 
Last edited:

DRGN

Technowizard
Moderator
Joined
Aug 20, 2005
Messages
2,178
Location
Sacramento, CA
Aha I think I've figured it out, give me a sec to test before I rush to post it this time but I'm pretty sure I found the root of the issue (spoiler: it's that i'm a fool :p )

alright, here it is:
Confusion
[UnclePunch, jjhoho]
Version -- DOL Offset ------ Hex to Replace ---------- ASM Code
1.02 ----- 0x80146940 --- 4BF49E41 -> 60000000
---------- 0x801468ac --- 4BF49ED5 -> 60000000
I believe the issue was I was writing it as an injection mod instead of a static overwrite

while I'm at it, here's the reflector code in static overwrite form :)

Mewtwo Can Actually Reflect Stuff
[ UnclePunch]
Version -- DOL Offset ------ Hex to Replace ---------- ASM Code
1.02 ----- 0x80146c58 --- 981F2218 -> Branch

60000000
I see you figured out the fix now in later posts, but I just wanted to explain why the "Mewtwo Can Actually Reflect Stuff" didn't work using a branch. (Btw, that last code is written as an injection mod, not a static overwrite.) Basically, at your injection point, 0x80146c58, you were branching out of the game's original code to execute 60000000, but there was no branch back after that to return to the game's normal execution (the original code where you branched out of). Normally you would put a placeholder for a branch after the custom code you want to inject, so after the 60000000 in this case. This placeholder, designated as a command starting with 48, 49, 4a, 4b (<- these are all branch opcodes), or 00, will be replaced by MCM by a new branch, calculated to go back to just after your injection point. MCM doesn't add this automatically to the end of any injection code, because there can be cases where someone doesn't want it (for example to use a blr or branch to a different function instead).

So you could add a branch back, but writing this code as an injection mod (the method of branching out) is unnecessary anyway. The purpose of injection mods is to replace some amount of original code with some amount of code that's larger than the original. But in this case both the original code (981F2218) and the new code (60000000) are 4 bytes, so you can just directly replace it, which is a static overwrite. And static overwrites don't have to be just 4 bytes too. You could replace larger chunks of code inline like that too, as long as the new code is the same size. You can look in the spoilers in the second post of the MCM thread to see examples of that. Although I really need to update and rewrite some of the explanations there for the new versions.

And what did you mean by "MCM didn't want me to put 80 in front of that one but did want the 80 in front of the second one."? Was it saying that the offset was too big? Did you also try writing it with 0x in front of it?

Where is the static overwrite located? Is it in Start.dol or PiCo.dat?
All of MCM's work is in the DOL. You can check where a static overwrite (or injection point) would be located by using the RAM Address Converter in the tools tab. Entering 0x80146940 into that shows a DOL offset of 0x143520.

I don't know if you already know about this, but one method you can use for debugging is to set a breakpoint (using the breakpoint tab in Debug Dolphin) in your function or nearby/preceding vanilla code, and then while Dolphin is running, game execution will stop on the desired line of code and you can advance line-by-line to try to figure out what's going wrong.
 
Top Bottom