Just a random scrub
Smash Ace
I'm referring to the Smash 4 mechanic of the same name. I want to experiment with it a bit in Melee for my mod.
Last edited:
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!
Yeah, me neither (the execution, at least, the concept is fine). I'm really just kinda curious to see what effects it could have.Not a big fan of rage, it can mess up combo consistency >.<
I'll try that, thanks.You could manually create this using UnclePunch's If/Else Subaction Event though!
If you don't wanna have to do that though, someone could probably make a code that raises the Knockback Ratio depending on percent
Not a big fan of rage, it can mess up combo consistency >.<
You could manually create this using UnclePunch's If/Else Subaction Event though!
If you don't wanna have to do that though, someone could probably make a code that raises the Knockback Ratio depending on percent
Just FYI: that's a very handy custom event syntax, but it currently has a bug that corrupts the vanilla “aesthetic wind” subaction event and prevents most data types from working correctly. You may want to wait until it is updated before using it in your mods.Yeah, me neither (the execution, at least, the concept is fine). I'm really just kinda curious to see what effects it could have.
I spotted your request a little while ago, and thought that it would be a perfect code for testing an event system that I’ve been designing for Melee scenes. With the event system, it would be possible to create a little platform that other codes could plug into for the purpose of modifying the knockback calculation based on programmable conditions. By sharing a common event platform, said codes wouldn’t interfere with eachother, and could be prioritized to create an order of operations.I'm referring to the Smash 4 mechanic of the same name. I want to experiment with it a bit in Melee for my mod.
-==-
Rage Knockback PoC 0.1
Implements Rage knockback modifier to knockback calculation.
[Punkline]
1.02 --- 8008d940 ----- 7c7f1b78 -> branch
7C7F1B78 819F1868 A00C0000 2C000004 4082004C 818C002C C02C1830 C002903C FC010040 40810038 C042823C 3C60803C EC420028 EC010028 C063CCDC EC001024 EC030032 FC001840 40A10008 FC001890 C03F1850 EC01083A D01F1850 00000000
#
-==-
ASM - Rage Knockback PoC 0.1
Implements Rage knockback modifier to knockback calculation.
[Punkline]
1.02 --- 8008d940 ----- 7c7f1b78 -> branch
# INJ: on knockback adjustment check, before any math
# player data offsets:
.set xDMGPercent, 0x1830
.set xDMGKnockback, 0x1850
.set xDMGSource, 0x1868
# rtoc offsets:
.set xRageFloor, -0x6FC4 # 35.00
.set xRageCeil, -0x7DC4 # 150.00
.set xRageScale, 0x803BCCDC # 0.15
.set rDEF, 31 # defending player
.set rATK, 12 # attacking player
mr rDEF, r3 # original instruction backs up player GObj_data argument
# r31 = defending player data base
lwz rATK, xDMGSource(rDEF)
lhz r0, 0x0(rATK)
cmpwi r0, 4
bne- _return
lwz rATK, 0x2C(rATK)
# abort if damage source is not a player
# else, rATK = attacking player data base
_get_attacker_percentage:
lfs f1, xDMGPercent(rATK)
lfs f0, xRageFloor(rtoc)
fcmpo cr0, f1, f0
ble- _return
# abort if post-threshold damage is not positive
lfs f2, xRageCeil(rtoc)
lis r3, xRageScale+0x10000@h
fsubs f2, f2, f0
fsubs f0, f1, f0
lfs f3, xRageScale@l - 0x10000(r3)
fdivs f0, f0, f2
fmuls f0, f3, f0
fcmpo cr0, f0, f3
ble+ _apply_bonus_knockback
fmr f0, f3
# if applied scale is >= coef, then cap at maximum
_apply_bonus_knockback:
lfs f1, xDMGKnockback(rDEF)
fmadds f0, f1, f0, f1
stfs f0, xDMGKnockback(rDEF)
# f0 = KB * scale + KB
_return:
.long 0
Does this still work? I was trying it out in training mode and attempted using Marth TIPR F-Smash at multiple percents, to no avail.Just FYI: that's a very handy custom event syntax, but it currently has a bug that corrupts the vanilla “aesthetic wind” subaction event and prevents most data types from working correctly. You may want to wait until it is updated before using it in your mods.
I spotted your request a little while ago, and thought that it would be a perfect code for testing an event system that I’ve been designing for Melee scenes. With the event system, it would be possible to create a little platform that other codes could plug into for the purpose of modifying the knockback calculation based on programmable conditions. By sharing a common event platform, said codes wouldn’t interfere with eachother, and could be prioritized to create an order of operations.
The system I’m designing is fairly in-depth, and I’m still working it all out, so I haven’t attempted to write out this knockback event yet.
---
Here’s a proof of concept that modifies the knockback calculation to implement a “rage” modifier.
It’s just like any normal code, so other codes that use the same hook (such as the defensive knockback modifiers code) will interfere with it -- but if it works well, I’ll eventually rewrite it as a callback event for the system I’m designing to prevent incompatibilities.
If it works to your liking, then I’ll also see about adding a custom body aura to create the flashing/steam visuals:
Code:-==- Rage Knockback PoC 0.1 Implements Rage knockback modifier to knockback calculation. [Punkline] 1.02 --- 8008d940 ----- 7c7f1b78 -> branch 7C7F1B78 819F1868 A00C0000 2C000004 4082004C 818C002C C02C1830 C002903C FC010040 40810038 C042823C 3C60803C EC420028 EC010028 C063CCDC EC001024 EC030032 FC001840 40A10008 FC001890 C03F1850 EC01083A D01F1850 00000000 #
Code:-==- ASM - Rage Knockback PoC 0.1 Implements Rage knockback modifier to knockback calculation. [Punkline] 1.02 --- 8008d940 ----- 7c7f1b78 -> branch # INJ: on knockback adjustment check, before any math # player data offsets: .set xDMGPercent, 0x1830 .set xDMGKnockback, 0x1850 .set xDMGSource, 0x1868 # rtoc offsets: .set xRageFloor, -0x6FC4 # 35.00 .set xRageCeil, -0x7DC4 # 150.00 .set xRageScale, 0x803BCCDC # 0.15 .set rDEF, 31 # defending player .set rATK, 12 # attacking player mr rDEF, r3 # original instruction backs up player GObj_data argument # r31 = defending player data base lwz rATK, xDMGSource(rDEF) lhz r0, 0x0(rATK) cmpwi r0, 4 bne- _return lwz rATK, 0x2C(rATK) # abort if damage source is not a player # else, rATK = attacking player data base _get_attacker_percentage: lfs f1, xDMGPercent(rATK) lfs f0, xRageFloor(rtoc) fcmpo cr0, f1, f0 ble- _return # abort if post-threshold damage is not positive lfs f2, xRageCeil(rtoc) lis r3, xRageScale+0x10000@h fsubs f2, f2, f0 fsubs f0, f1, f0 lfs f3, xRageScale@l - 0x10000(r3) fdivs f0, f0, f2 fmuls f0, f3, f0 fcmpo cr0, f0, f3 ble+ _apply_bonus_knockback fmr f0, f3 # if applied scale is >= coef, then cap at maximum _apply_bonus_knockback: lfs f1, xDMGKnockback(rDEF) fmadds f0, f1, f0, f1 stfs f0, xDMGKnockback(rDEF) # f0 = KB * scale + KB _return: .long 0