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

Tournament Style Overtime (for SSBM v1.2)

_glook

Got a Passion for Smashin'
Joined
Sep 30, 2005
Messages
802
Location
Not UC Berkeley anymore
TL;DR: This breaks ties by percent in regulation and makes sudden death mode 3 minutes. Here's the code:
Code:
Tournament Style Overtime (v1.02) [_glook]
C21A415C 00000048
3803FFFF 2C000003
40820230 2C0B0020
41820228 3821FFEC
3C80FFFF 6084FFFF
90810000 90810004
90810008 9081000C
90810010 3A800000
3AA00000 3E208045
62313080 3E408047
62529E00 3E00803F
62100E06 3C808048
608407C8 88840000
2C040001 4182004C
80910008 2C040003
41820028 88920001
5484801E A0B10060
7C842B78 56A5103A
7CA50A14 90850004
7EB409AE 3A940001
3A310E90 3A5200A8
3AB50001 2C150004
4082FFC0 4800005C
80910008 2C040003
41820038 88D00000
54C5103A 7CA50A14
80850004 2C040000
40800014 7CD409AE
3A940001 88920001
5484801E A0D10060
7C843214 90850004
3A100024 3A310E90
3A5200A8 3AB50001
2C150004 4082FFAC
3AA00000 7E41AA14
8A520000 2C1200FF
4182005C 7EB4AB78
2C140000 4182003C
7E21A214 8A31FFFF
5646103A 5625103A
7CC60A14 7CA50A14
80C60004 80A50004
7C062800 40A00014
7E01A214 9A300000
3A94FFFF 4BFFFFC4
7E81A214 9A540000
3AB50001 2C150004
4082FF9C 38600005
38000004 3A400000
3E20FFFF 6231FFFF
3A000000 7CC18214
88C60000 2C0600FF
41820088 54C5103A
7CA50A14 80A50004
7C112800 40A20018
2C120000 40A20018
38600004 38000003
4800000C 7CB12B78
7E128378 3E808048
629407C8 8A940000
2C140000 41A20020
3CA08047 60A59DC8
1CC6000C 7CC62A14
9A460000 9A460001
4800001C 3CA08047
60A59E00 1CC600A8
7CC62A14 9A460001
9A460002 3A100001
2C100004 4082FF70
38210014 3A000000
3A200000 3A400000
3A800000 3AA00000
60000000 00000000
C216DD38 00000008
3CA08046 60A5DB6E
88650000 2C030000
41A20024 38600004
3CA08047 60A59D35
98650000 38600032
3CA08046 60A5DB68
98650000 38BF24C0
881E0000 00000000
C216DDCC 00000004
3C608046 6063DB6E
88630000 2C030000
41A20008 380000B4
901F0028 00000000
C2067E78 00000005
3C608046 6063DB6E
88630000 2C030000
41A20010 38600000
907B1830 48000008
D01B1830 00000000
C20343B4 00000004
3C608046 6063DB6E
88630000 2C030000
41A20008 3BC00000
7FDD032E 00000000
041C0EB4 48000094
04165dc4 38040000
04165e0c 38040000
04165e54 38040000

Tournament Style Overtime (v1.00) [_glook}
C21A3414 00000048
3803FFFF 2C000003
40820230 2C0B0020
41820228 3821FFEC
3C80FFFF 6084FFFF
90810000 90810004
90810008 9081000C
90810010 3A800000
3AA00000 3E208045
623110C0 3E408047
62527E38 3E00803E
6210EF76 3C808047
6084E800 88840000
2C040001 4182004C
80910008 2C040003
41820028 88920001
5484801E A0B10060
7C842B78 56A5103A
7CA50A14 90850004
7EB409AE 3A940001
3A310E90 3A5200A8
3AB50001 2C150004
4082FFC0 4800005C
80910008 2C040003
41820038 88D00000
54C5103A 7CA50A14
80850004 2C040000
40800014 7CD409AE
3A940001 88920001
5484801E A0D10060
7C843214 90850004
3A100024 3A310E90
3A5200A8 3AB50001
2C150004 4082FFAC
3AA00000 7E41AA14
8A520000 2C1200FF
4182005C 7EB4AB78
2C140000 4182003C
7E21A214 8A31FFFF
5646103A 5625103A
7CC60A14 7CA50A14
80C60004 80A50004
7C062800 40A00014
7E01A214 9A300000
3A94FFFF 4BFFFFC4
7E81A214 9A540000
3AB50001 2C150004
4082FF9C 38600005
38000004 3A400000
3E20FFFF 6231FFFF
3A000000 7CC18214
88C60000 2C0600FF
41820088 54C5103A
7CA50A14 80A50004
7C112800 40A20018
2C120000 40A20018
38600004 38000003
4800000C 7CB12B78
7E128378 3E808047
6294E800 8A940000
2C140000 41A20020
3CA08047 60A57E00
1CC6000C 7CC62A14
9A460000 9A460001
4800001C 3CA08047
60A57E38 1CC600A8
7CC62A14 9A460001
9A460002 3A100001
2C100004 4082FF70
38210014 3A000000
3A200000 3A400000
3A800000 3AA00000
60000000 00000000
C216D330 00000008
3CA08046 60A5BBA6
88650000 2C030000
41A20024 38600004
3CA08047 60A57D6D
98650000 38600032
3CA08046 60A5BBA0
98650000 38BF24C0
881E0000 00000000
C216D3C4 00000004
3C608046 6063BBA6
88630000 2C030000
41A20008 380000B4
901F0028 00000000
C2067D54 00000005
3C608046 6063BBA6
88630000 2C030000
41A20010 38600000
907B1830 48000008
D01B1830 00000000
C2034334 00000006
3C608046 6063BBA6
88630000 2C030000
41A20014 38600001
3BDD0000 987E008E
3BC00000 7FDD032E
60000000 00000000
041BFEF8 48000094
041655BC 38040000
04165604 38040000
0416564C 38040000

Video explanation:


More detailed explanation:

So in order to get this to work, it requires several parts:

Breaking Ties By Percent
The biggest part of this code is after the regulation match is played, if there is a tie for first place, this code will analyze the player and team percentages and adjust the placings based on percentage if players are tied. In a team battle, it does the same thing except it adds all of the team members' percentages together to determine the winner. The code specifically for breaking ties by percentage is here:
Code:
Update (June 10th, 2015): Fixed bug when using with name tags, found by Myougi

Breaking Ties By Percent (v1.02) [_glook]
C21A415C 00000048
3803FFFF 2C000003
40820230 2C0B0020
41820228 3821FFEC
3C80FFFF 6084FFFF
90810000 90810004
90810008 9081000C
90810010 3A800000
3AA00000 3E208045
62313080 3E408047
62529E00 3E00803F
62100E06 3C808048
608407C8 88840000
2C040001 4182004C
80910008 2C040003
41820028 88920001
5484801E A0B10060
7C842B78 56A5103A
7CA50A14 90850004
7EB409AE 3A940001
3A310E90 3A5200A8
3AB50001 2C150004
4082FFC0 4800005C
80910008 2C040003
41820038 88D00000
54C5103A 7CA50A14
80850004 2C040000
40800014 7CD409AE
3A940001 88920001
5484801E A0D10060
7C843214 90850004
3A100024 3A310E90
3A5200A8 3AB50001
2C150004 4082FFAC
3AA00000 7E41AA14
8A520000 2C1200FF
4182005C 7EB4AB78
2C140000 4182003C
7E21A214 8A31FFFF
5646103A 5625103A
7CC60A14 7CA50A14
80C60004 80A50004
7C062800 40A00014
7E01A214 9A300000
3A94FFFF 4BFFFFC4
7E81A214 9A540000
3AB50001 2C150004
4082FF9C 38600005
38000004 3A400000
3E20FFFF 6231FFFF
3A000000 7CC18214
88C60000 2C0600FF
41820088 54C5103A
7CA50A14 80A50004
7C112800 40A20018
2C120000 40A20018
38600004 38000003
4800000C 7CB12B78
7E128378 3E808048
629407C8 8A940000
2C140000 41A20020
3CA08047 60A59DC8
1CC6000C 7CC62A14
9A460000 9A460001
4800001C 3CA08047
60A59E00 1CC600A8
7CC62A14 9A460001
9A460002 3A100001
2C100004 4082FF70
38210014 3A000000
3A200000 3A400000
3A800000 3AA00000
60000000 00000000

Breaking Ties By Percent (v1.00) [_glook]
C21A3414 00000048
3803FFFF 2C000003
40820230 2C0B0020
41820228 3821FFEC
3C80FFFF 6084FFFF
90810000 90810004
90810008 9081000C
90810010 3A800000
3AA00000 3E208045
623110C0 3E408047
62527E38 3E00803E
6210EF76 3C808047
6084E800 88840000
2C040001 4182004C
80910008 2C040003
41820028 88920001
5484801E A0B10060
7C842B78 56A5103A
7CA50A14 90850004
7EB409AE 3A940001
3A310E90 3A5200A8
3AB50001 2C150004
4082FFC0 4800005C
80910008 2C040003
41820038 88D00000
54C5103A 7CA50A14
80850004 2C040000
40800014 7CD409AE
3A940001 88920001
5484801E A0D10060
7C843214 90850004
3A100024 3A310E90
3A5200A8 3AB50001
2C150004 4082FFAC
3AA00000 7E41AA14
8A520000 2C1200FF
4182005C 7EB4AB78
2C140000 4182003C
7E21A214 8A31FFFF
5646103A 5625103A
7CC60A14 7CA50A14
80C60004 80A50004
7C062800 40A00014
7E01A214 9A300000
3A94FFFF 4BFFFFC4
7E81A214 9A540000
3AB50001 2C150004
4082FF9C 38600005
38000004 3A400000
3E20FFFF 6231FFFF
3A000000 7CC18214
88C60000 2C0600FF
41820088 54C5103A
7CA50A14 80A50004
7C112800 40A20018
2C120000 40A20018
38600004 38000003
4800000C 7CB12B78
7E128378 3E808047
6294E800 8A940000
2C140000 41A20020
3CA08047 60A57E00
1CC6000C 7CC62A14
9A460000 9A460001
4800001C 3CA08047
60A57E38 1CC600A8
7CC62A14 9A460001
9A460002 3A100001
2C100004 4082FF70
38210014 3A000000
3A200000 3A400000
3A800000 3AA00000
60000000 00000000

Enable Timer During Sudden Death And Next Scene is Sudden Death
One of the things we need to do if we want a 3 minute overtime is we need to enable the timer. Sudden death automatically disables the timer, so this code hooks in right after the timer enabled value is set, sees if we're currently in sudden death, and if we are, we enable the timer (even if it wasn't enabled before).
This is also the perfect time to set the "next subscene" value (at byte 80479D35). Sudden death sets it to 0 (switch scenes no matter what) and never considers that it can go to something else, whereas regulation can potentially set it to 5 (winner has been figured out, and we should go to results screen) and 4 (there's a 1st place tie and we should go to sudden death). Since Sudden Death never sets this to anything and relies on 0 always being set, the place where we enable the timer is a good enough place to make sure that the next screen is always sudden death. Under normal circumstances, this would be bad, because you could never escape sudden death mode. However, the "Break Ties By Percent" code sees if it is going into sudden death and changes it to the results screen if someone has won by percent (if tied by percent, another sudden death match will be played). Break Ties By Percent also has the side effect of making the player still alive win the match as well, because it looks at your overall placing before breaking ties by percent, so all win conditions from sudden death are taken care of.
The code for that part is here (I've included both the version with and without infinite sudden death, in case your tournament's rules are different or you decided not to use Break Ties By Percent code):
Code:
With infinite sudden death (v1.02) [_glook]
C216DD38 00000008
3CA08046 60A5DB6E
88650000 2C030000
41A20024 38600004
3CA08047 60A59D35
98650000 38600032
3CA08046 60A5DB68
98650000 38BF24C0
881E0000 00000000

Without infinite sudden death (v1.02) [_glook]
C216DD38 00000006
3CA08046 60A5DB6E
88650000 2C030000
41A20014 38600032
3CA08046 60A5DB68
98650000 38BF24C0
881E0000 00000000

With infinite sudden death (v1.00) [_glook]
C216D330 00000008
3CA08046 60A5BBA6
88650000 2C030000
41A20024 38600004
3CA08047 60A57D6D
98650000 38600032
3CA08046 60A5BBA0
98650000 38BF24C0
881E0000 00000000

Set Number of Seconds to 180 (3 minutes)
If the timer is enabled, the game will automatically try to set the time, based on the mode being played and the settings you picked. We instead want to simply set the time limit to 3 minutes, so we hook into the part where the game tries to set the timer to either the time option or to the Stock Match Time Limit. In the hook, we check if we are in sudden death, and if we are, we set the number of seconds to 180, which is 3 minutes. The code for that part is:
Code:
Set Number of Seconds to 180 (v1.02) [_glook]
C216DDCC 00000004
3C608046 6063DB6E
88630000 2C030000
41A20008 380000B4
901F0028 00000000

Set Number of Seconds to 180 (v1.00) [_glook]
C216D3C4 00000004
3C608046 6063BBA6
88630000 2C030000
41A20008 380000B4
901F0028 00000000
If you want to set your own number of seconds for overtime, replace the 00B4 with whatever number of seconds you want instead.

Disable Bomb Rain
During sudden death mode, after a while, bombs start to rain from the sky. This isn't exactly tournament legal, so to disable that, we go to the branch right before we see if we want to rain bombs and we make it always branch to the location where we skip bomb rain. The code for that is:
Code:
Disable Bomb Rain (v1.02) [_glook]
041C0EB4 48000094

Disable Bomb Rain (v1.00) [_glook]
041BFEF8 48000094
Note, this disables bomb rain no matter what, so it can't be used in conjunction with other bomb rain hacks.

Set Actual Spawning Percentage to 0%
During sudden death, the starting percentage is set to 300%. This isn't tournament legal. Instead, we want to start with 0%. So during the place where percentage is set on spawn, we want to check if we're in sudden death, and if we are, we want to set that percentage to 0%. The code for that is:
Code:
Set Actual Spawning Percent to 0% (v1.02) [_glook]
C2067E78 00000005
3C608046 6063DB6E
88630000 2C030000
41A20010 38600000
907B1830 48000008
D01B1830 00000000

Set Actual Spawning Percent to 0% (v1.00) [_glook]
C2067D54 00000005
3C608046 6063BBA6
88630000 2C030000
41A20010 38600000
907B1830 48000008
D01B1830 00000000
Note: This shouldn't effect the regulation portion of super sudden death, though if super sudden death goes into overtime, it will likely affect it.

Set Displayed Spawning Percentage to 0%
Setting the actual percentage to 0 is good, as you won't go flying on every hit and after the first hit, the displayed percentage will be correct. However, even when we spawn with 0%, the displayed percentage during sudden death is still 300%, which look odd, even though it is a cosmetic issue. So, we want to hook into where displayed percentage is set on character spawn. If it is sudden death, we set the displayed percentage to 0%.
In v1.00, we also have to set the number of stocks to 1, since it just keeps the old stock count in v1.00.
The code for all this is:
Code:
Set Display Spawning Percentage to 0% (v1.02) [_glook]
C20343B4 00000004
3C608046 6063DB6E
88630000 2C030000
41A20008 3BC00000
7FDD032E 00000000

Set Display Spawning Percentage to 0% (v1.00) [_glook]
C2034334 00000006
3C608046 6063BBA6
88630000 2C030000
41A20014 38600001
3BDD0000 987E008E
3BC00000 7FDD032E
60000000 00000000

If Still Tied After Overtime, Disable Port Priority
If a winner is still not declared after the 3 minutes are up, sudden death will be over with a tie. During ties in sudden death, the game picks the winner by whoever of the remaining players has the highest port priority. This doesn't make much sense, so instead I wrote code that disables incrementing the placement based on player port number. As a result, players who are tied for first will share the winning animation on the results screen and they'll both be displayed as being in 1st place. The code for that is here:
Code:
Disable Overtime Port Priority (v1.02) [_glook]
04165dc4 38040000
04165e0c 38040000
04165e54 38040000

Disable Overtime Port Priority (v1.00) [_glook]
041655BC 38040000
04165604 38040000
0416564C 38040000

Limitations
The biggest limitation is that if no one has won at the end of overtime, the tie is not broken by percentage. This is mostly because sudden death handles game ending in a different code path to the regulation match, so it renders the "Break Ties By Percent" useless for this use case.
Secondly, it doesn't repeat sudden death in case of another tie, for the same reason. Some rulesets I've seen, though, make the players play another match entirely. When I personally run tournaments, I like to just give both players a match point at this point. As a result, this seems to be somewhat tournament dependent. Also, there's the fact that this almost never happens.

Fixed in the latest version, as long as you choose infinite sudden death.

Let me know if you guys find any bugs in any part of this.
 
Last edited:

_glook

Got a Passion for Smashin'
Joined
Sep 30, 2005
Messages
802
Location
Not UC Berkeley anymore
A mere twelve hours after posting this code, I've updated it with the option to go into infinite sudden death mode. This takes care of BOTH limitations, but I'm aware that some tournaments don't repeat overtime indefinitely; the default code in the tldr is the version with infinite sudden death but I've included the original code without it as well in the detailed description.

The change I made was during the code that enables the timer during sudden death, I also set the "Next Subscene" byte to 0x04, so that if you're in sudden death, after sudden death is over you'll go into sudden death again. Normally this would be bad, but if you have the "Break Ties By Percent" code active, it will short circuit this infinite loop in the case of one player actually winning the match (if someone lost their stock) or by percent (which is what its main purpose is), which will make it go to the results screen.

This code is now in line with Apex rules. Enjoy!
 
Last edited:
Top Bottom