• 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!

Completed Updated TopN in ECB Calculation Code + Some Others

PKFreeZZy

Smash Cadet
Joined
Aug 21, 2016
Messages
60
Location
Hungary
Slippi.gg
VETR#758
Posting an update for tauKhan's 'Update TopN Location in ECB Calculation' code, and some other random ones I've made recently.

Code:
Update TopN Location in ECB Calculation v3 [tauKhan, UnclePunch, PKFreeZZy] *Updates character model locations before checks are made for environment collisions and other positional calculations. This can prevent weird looking stage clipping in some cases, especially for grabs. *Revised to ignore 'Thrown' action states from victim, to avoid incorrect behavior on certain throws that rely on 'slamming' the target onto the floor. 
C204250C 0000000D 
3BC40000 807F0000 
8063002C 80630010 
2C0300EF 41800010 
2C0300F3 41810008 
4800003C 807F0000 
80830028 8063002C 
800300B0 90040038 
800300B4 9004003C 
800300B8 90040040 
7C832378 3D808037 
618C32E8 7D8903A6 
4E800421 7FE3FB78 
60000000 00000000
I noticed that some Down Throws (e.g. Mario and Mr. Game & Watch) would behave in a different manner with tauKhan's 'Update TopN Location in ECB Calculation' code enabled, and after some encouragement in Melee Workshop, I decided to try and look into it.

The code now checks if the victim's current Action State is equal to 242 (ThrownLw) or 243 (ThrownLwWomen, only used for Peach and Zelda on Bowser's Down-Throw) and skips the TopN update if the statement returned is 'true.'

Original code by tauKhan, updated by myself with much help and supervision from UnclePunch!

Code:
$Ness - Charge Yo-Yo Over Ledge and Uneven Surfaces v2 [PKFreeZZy]
*Does not allow charging near solid obstacles, such as walls, however.
C2115E1C 00000005
54600421 2C000000
40820018 38000001
3DC08011 61CE5E30
7DC903A6 4E800420
60000000 00000000
C2115498 00000004
54600421 2C030000
40820014 3DC08011
61CE5510 7DC903A6
4E800420 00000000
The following code is a less direct approach to allowing Ness's Yo-Yo to be charged under more circumstances:

Normally, Ness cannot charge his Yo-Yo if there is an obstacle in its way, which is usually a wall or a ledge (thin air, rather.)
There's already a code that bypasses the obstruction check that is run during his Up- and Down Smashes, however, the item jitters back out of walls once the charge is initiated, since the startup animation does not give the Yo-Yo object an ECB, therefore it can clip inside solid obstacles.
This code allows him to charge the Yo-Yo over ledges and some uneven surfaces (some tighter angles are considered walls,) but not against solid objects. It's less practical than the previous version, but my selective OCD didn't like the side effects of that one. :p

These codes fix minor quirks with 'spawned' character held items:

Code:
$Ness - Baseball Bat Scales with Player Size v4 [PKFreeZZy]
*Makes it so the baseball bat's size is now affected by Ness's model scale.
*Need to set 'Ignore Fighter Scale' toggle on baseball bat hitboxes to 'false' in HSDraw.
C22AD564 0000000B
80DE002C 807E0028
80860518 80A4002C
28050000 41820030
808600CC C0250038
C0040060 EC210032
D0260038 3DC08027
61CE2F7C 7DC903A6
4E800421 C002D3F8
D00DB6A8 3DC0802A
61CED56C 7DC903A6
4E800420 00000000
Ness's baseball bat never scales in vanilla Melee, and that's quite hilarious, especially when he's tiny!


(3 0 0 % N O T O K E Y)

The problem is that the reflector hitbox scales regardless of the baseball bat. This is not an issue in vanilla Melee, because you'll likely never hit anyone with the normal-sized hitbox anyway! It is attached to Ness's hip bone and barely extends beyond his nose, meaning it rarely interacts with projectiles and lets the rest of the hitboxes destroy them (they also ignore player scale.)

If one were to fix the reflector by increasing its size, moving it to his Item Hold Bone, and adjusting its position, however, this creates a mismatch between visuals and actual hitbox positions if the player's size is changed: the reflector gets extra range while big and pretty much the same treatment as vanilla Ness, where the reflector is nearly useless, if small.

Rather than making the reflector ignore player scale, I figured it would be cooler if the bat itself scaled accordingly. Again, probably just selective OCD, but I figured it would be a nice polish for the game.

Code:
$Kirby - Hammer Scales with Player Size v4 [PKFreeZZy]
C22ADD1C 0000000C
80DE002C 807E0028
80860518 80A4002C
28050000 41820030
808600CC C0250038
C0040060 EC210032
D0260038 3DC08027
61CE2F7C 7DC903A6
4E800421 C002D3F8
D00DB6A8 807E002C
3DC0802A 61CEDD24
7DC903A6 4E800420
60000000 00000000
Same story as Ness: Hammer doesn't scale in vanilla Melee. Just wanted to make it a bit nicer. Also, its hitboxes DON'T ignore fighter scale by default, so it's a huge mismatch between visuals and actuals.

Currently trying to figure out how to also scale the custom graphic effect Hammer summons from EfKbData.dat, but I'm too dumb for this. Help is of course appreciated!

Code:
$Fox & Falco - Neutral-B Blaster Scales with Player Size [PKFreeZZy]
*Oddly enough, Blaster scales during throws by default.
040E6144 C03E0038
040E6240 C03E0038
Code:
$Kirby - Blaster Scales with Player Size v2 [PKFreeZZy]
C22AE96C 0000000B
80DF002C 807F0028
80860518 80A4002C
28050000 41820030
808600CC C0250038
C0040060 EC210032
D0260038 3DC08027
61CE2F7C 7DC903A6
4E800421 C002D3F8
D00DB6A8 3DC0802A
61CEE974 7DC903A6
4E800420 00000000

Will attempt to make Kirby and the space animals' Up-B graphics scale as well, once I figure out how to do that!

EDIT: 8/26/2021 - Fixed an issue with the ECB code that would cause invalid reads on mainline Dolphin... I made it branch too far ahead, without restoring the pointer in register 3. Oops.

EDIT 2: 8/27/2021 - Added ECB code v3, to retain Up-Throw Kirbycide.

EDIT 3: 8/30/2021 - Revised Yo-Yo and Item Scale codes to use bctr instead of bctrl instruction at the end.

EDIT 4: 9/9/2021 - Removed ECB code v3 - obsolete since it is was not the real cause of Kirby being unable to Kirbycide with Up-Throw, and the problem existed on my end only.

EDIT 5: 10/11/2021 - Added revised ECB TopN Update code v3 - now ignores all Thrown states.
 
Last edited:

PKFreeZZy

Smash Cadet
Joined
Aug 21, 2016
Messages
60
Location
Hungary
Slippi.gg
VETR#758
Updated ECB code to (presumably) final release; now ignores all Catch/CatchDash-induced Thrown states to ensure all characters' throws function properly.

It seems this type of throw-related ECB update is only performed on the frame the target is thrown, therefore, the code will work on all other action states and update character models accordingly!

This update was necessary, since I forgot to take Marth and Roy's side throws (and presumably a few others) into account, which are also 'slam-based' and are therefore negatively affected if the victim's thrown frame is 'properly' updated.
 
Last edited:
Top Bottom