abysspartyy
Smash Cadet
- Joined
- May 11, 2015
- Messages
- 55
According to https://www.ssbwiki.com/Buried, moves that deal more than 100 units of knockback cause the player to be freed from being buried and be launched as usual. This mechanic only applies to Brawl and onwards. So I created a code to replicate this behaviour for Melee!
Please use the latest code version if you are looking for the same bury mechanics that are in Brawl. Note that these codes only works for 1.02 NTSC of Melee.
View the Update Changelog for information on what changed between each code version.
- Strong moves (deal over 100 units of knockback) that bury the player (Grounded effect) will just cause damage
- This prevents reburying loop
- All other strong moves will unbury the player as usual
Please use the latest code version if you are looking for the same bury mechanics that are in Brawl. Note that these codes only works for 1.02 NTSC of Melee.
View the Update Changelog for information on what changed between each code version.
$Brawl Bury Mechanics v1.0.5 [sushie]
*Strong hits unburies players like in Brawl
040c1444 60000000
C208ECBC 0000000D
40820008 48000058
807D0010 2C030127
40820034 807D1860
2C030009 41820028
2C03000A 41820020
C01D1850 48000029
7C6802A6 C0230000
FC000840 40810008
4800001C 3D808008
618CECD4 7D8903A6
4E800420 4E800021
42C80000 887D2220
60000000 00000000
$Brawl Bury Mechanics v1.0.4 [sushie]
*Moves that deal over 100 units of knockback unburies them
C208ECBC 0000000D
40820008 48000058
807D0010 2C030127
40820034 807D1860
2C030009 41820028
2C03000A 41820020
C01D1850 48000029
7C6802A6 C0230000
FC000840 40810008
4800001C 3D808008
618CECD4 7D8903A6
4E800420 4E800021
42C80000 887D2220
60000000 00000000
$Brawl Bury Mechanics V1.0.3 [Odante]
*Moves that deal over 100 units of knockback unburies them
C208ECBC 0000000B
40820008 48000050
807D1860 2C030009
4182002C 2C03000A
41820024 C01D1850
4800002D 7C6802A6
C0230000 FC000840
4081000C 887D2220
4800001C 3D808008
618CECD4 7D8903A6
4E800420 4E800021
42C80000 00000000
$Brawl Bury Mechanics V1.0.1 [Odante]
*Moves that deal over 100 units of knockback unburies them
C208ECBC 0000000B
40820008 48000050
C01D1850 48000041
7C6802A6 C0230000
FC000840 40810020
807D1860 2C030009
4082000C 38600000
907D1860 887D2220
4800001C 3D808008
618CECD4 7D8903A6
4E800420 4E800021
42C80000 00000000
Python:
import geckon
const
MaxUnburyKnockbackUnits = 100
const
RegisterFighterData = r29
OriginalBuryCheckAddress = "0x8008ecd4"
const
Cape = 0xA
Grounded = 0x9
const
BuryWaitActionStateId = 295
defineCodes:
createCode "Brawl Bury Mechanics v1.0.4":
authors "Ronnie"
description "Strong hits unburies players like in Brawl"
patchInsertAsm "8008ecbc":
# Check if we are in a flinchless state
%`bne-`(CheckInBuryWaitState) # we are in flinchless state, so check if we are in a bury action state
b NotInBury # exit as if we are not in a flinchless state
CheckInBuryWaitState:
lwz r3, 0x10({RegisterFighterData}) # load current action state ID
cmpwi r3, {BuryWaitActionStateId}
%`bne-`(OriginalBuryCheck) # if not in bury wait A/S, go back to the original check function
# If in bury, check if knockback is strong enough to unbury the player
# Free to use r3 here but must restore if branch to NotInBury
InBury:
HitEffectChecks:
# If hit is another Grounded/Bury hit OR Cape,
# Do not unbury and go to the original bury check
lwz r3, 0x1860({RegisterFighterData}) # load effect type
# Check if grounded move
cmpwi r3, {Grounded}
beq OriginalBuryCheck
# If not grounded move, check if it's a cape move
cmpwi r3, {Cape}
beq OriginalBuryCheck
# Now we check the knockback and see if we should unbury
block knockbackChecks:
const
RegisterForceApplied = f0
RegisterMaxUnitsToCheck = f1
# f0 = current hit's knockback/force_applied
# f1 = maximum knockback units to unbury
ppc:
lfs {RegisterForceApplied}, 0x1850({RegisterFighterData}) # load force_applied
# Load our maximum knockback units constant
bl Constants
mflr r3
lfs {RegisterMaxUnitsToCheck}, 0x0(r3)
# If the current hit's applied knockback is greater than and
# not equals to the MaxUnburyKnockbackUnits,
# unbury the player
fcmpo cr0, f0, f1
ble OriginalBuryCheck # not enough knockback, so don't unbury
Unbury:
b NotInBury # treat the hit as if the player isn't flinchless
OriginalBuryCheck:
%branch(OriginalBuryCheckAddress)
Constants:
blrl
%`.float`(MaxUnburyKnockbackUnits) # units of knockback
%`.align`(2)
NotInBury:
lbz r3, 0x2220({RegisterFighterData}) # restore r3
%emptyBlock
Rich (BB code):
# Address: 8008ecbc
.macro branch reg, address
lis \reg, \address @h
ori \reg,\reg,\address @l
mtctr \reg
bctr
.endm
.set REG_FighterData, 29
.set EffectType_Grounded, 0x9
.set EffectType_Normal, 0
# f0 - contains the knockback caused by the current damage
# Check if in bury
bne- InBury
b NotInBury_Exit # if not in bury, exit
# If in bury, check if knockback is strong enough to unbury the player
# Free to use r3 here but must restore after
InBury:
# Load the hit's knockback/force_applied
lfs f0, 0x1850(REG_FighterData)
# Load our maximum knockback unit constant
# Free to use r3 here
bl Constants
mflr r3
lfs f1,MaxKnockbackUnits(r3)
# If knockback unit is greater than and not equals to MaxKnockbackUnits,
# skip the damage bury check
fcmpo cr0,f0,f1
ble OriginalBuryCheck_Exit # not enough knockback to unbury, so exit to original bury check
# Otherwise, unbury the player/skip the bury check
# Check if the hit is another Grounded effect
lwz r3, 0x1860(REG_FighterData) # the effect type of the hit
cmpwi r3, EffectType_Grounded # if effect type is grounded
bne Unbury # if not grounded, just unbury the player
# Set the effect type of the hit to Normal
ResetEffectType:
li r3, EffectType_Normal
stw r3, 0x1860(REG_FighterData)
Unbury:
lbz r3, 0x2220(REG_FighterData) # restore r3
b NotInBury_Exit
OriginalBuryCheck_Exit:
branch r12, 0x8008ecd4
Constants:
blrl
.set MaxKnockbackUnits,0x0
.float 100 # units of knockback
.align 2
NotInBury_Exit:
Last edited: