• 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 Player Damage Multiplier

abysspartyy

Smash Cadet
Joined
May 11, 2015
Messages
55
Is there code that allows you to have the damage increase effect from the super mushroom but staying at normal size?

Would be neat for custom game modes to have players deal 2 or x times the damage while remaining normal size.
 
Last edited:

abysspartyy

Smash Cadet
Joined
May 11, 2015
Messages
55
Last edited:

flieskiller

Smash Journeyman
Joined
Jan 3, 2013
Messages
426
@ A abysspartyy

handicap mode ON = damage reducer (1 handicap = 25%) (1.02) [flieskiller]
C206cc8c 0000000D
3DE08045 61EFBF15
89EF0000 2C0F0002
4082004C 3DE08048
61EF0828 8A3E000C
1E310024 7DF17A14
8A0F0000 3E203FD0
92220020 3A200000
92220024 C9E20020
CA428B90 DA420020
B2020026 CA020020
EE109028 FE1003F2
EC210432 FFE00890
60000000 00000000


This code will make a player's damage RECEIVING (not dealing) with a multiplier based on the player's handicap when handicap is at ON. The higher the handicap is, the more damage that player will receive. The 04 code will remove the basic handicap mode and replace it with this instead.

The table for damage received is as below:
HANDICAP - DAMAGE RECEIVED
1 - 25%
2 - 50%
3 - 75%
4 - 100% (Melee default)
5 - 125%
6 - 150%
7 - 175%
8 - 200%
9 - 225%

If you want to modify the multiplier, like to 0.5 so that 2 handicap is 100%/6 handicap is 300% etc. , you have to change the hex number "3E203FD0" in green to a different number. I use this site: http://gregstoll.dyndns.org/~gregstoll/floattohex/ , and enter a decimal number in the "Double Value" field, convert and pick the 4 first numbers and replace them here.

ASM notes:
lis r15, 0x8045
ori r15, r15, 0xBF15 #load handicap value
lbz r15, 0(r15)
cmpwi r15, 2
bne NOCHANGE #if handicap is not at ON, do not change
lis r15, 0x8048
ori r15, r15, 0x0828 #load offset for loading handicap number
lbz r17, 0xc(r30) #load player number
mulli r17, r17, 0x24 #multiply by player number (defense)
add r15, r17, r15
lbz r16, 0x0(r15) #r16 = handicap number
lis r17, 0x3fd0 #0.25 float
stw r17, 0x20(r2) #store 0.25
li r17, 0
stw r17, 0x24(r2) #store 2nd part of float 0.25
lfd f15, 0x20(r2) #f15 = 0.25
lfd f18,-29808(r2) # 4d8570. loads magic double for int to float conversion
stfd f18,0x20(r2)
sth r16,0x26(r2) # 0x43300000800000xx. put 1st int at end of magic double
lfd f16,0x20(r2)
fsubs f16,f16,f18 #f16 = handicap number
fmul f16, f16, f15 #f16 = handicap value * 0.25
fmuls f1, f1, f16 #damage = damage x multiplier (4 handicap = x1)
NOCHANGE:
fmr f31, f1 #NORMAL LINE
 
Last edited:

abysspartyy

Smash Cadet
Joined
May 11, 2015
Messages
55
yoo i totally forgot about this until now! I've been waiting for this. Thanks ima try it out today
 

helourcompuerhasviru

Smash Rookie
Joined
Apr 16, 2024
Messages
2
@ A abysspartyy

handicap mode ON = damage reducer (1 handicap = 25%) (1.02) [flieskiller]
C206cc8c 0000000D
3DE08045 61EFBF15
89EF0000 2C0F0002
4082004C 3DE08048
61EF0828 8A3E000C
1E310024 7DF17A14
8A0F0000 3E203FD0
92220020 3A200000
92220024 C9E20020
CA428B90 DA420020
B2020026 CA020020
EE109028 FE1003F2
EC210432 FFE00890
60000000 00000000


This code will make a player's damage RECEIVING (not dealing) with a multiplier based on the player's handicap when handicap is at ON. The higher the handicap is, the more damage that player will receive. The 04 code will remove the basic handicap mode and replace it with this instead.

The table for damage received is as below:
HANDICAP - DAMAGE RECEIVED
1 - 25%
2 - 50%
3 - 75%
4 - 100% (Melee default)
5 - 125%
6 - 150%
7 - 175%
8 - 200%
9 - 225%

If you want to modify the multiplier, like to 0.5 so that 2 handicap is 100%/6 handicap is 300% etc. , you have to change the hex number "3E203FD0" in green to a different number. I use this site: http://gregstoll.dyndns.org/~gregstoll/floattohex/ , and enter a decimal number in the "Double Value" field, convert and pick the 4 first numbers and replace them here.

ASM notes:
lis r15, 0x8045
ori r15, r15, 0xBF15 #load handicap value
lbz r15, 0(r15)
cmpwi r15, 2
bne NOCHANGE #if handicap is not at ON, do not change
lis r15, 0x8048
ori r15, r15, 0x0828 #load offset for loading handicap number
lbz r17, 0xc(r30) #load player number
mulli r17, r17, 0x24 #multiply by player number (defense)
add r15, r17, r15
lbz r16, 0x0(r15) #r16 = handicap number
lis r17, 0x3fd0 #0.25 float
stw r17, 0x20(r2) #store 0.25
li r17, 0
stw r17, 0x24(r2) #store 2nd part of float 0.25
lfd f15, 0x20(r2) #f15 = 0.25
lfd f18,-29808(r2) # 4d8570. loads magic double for int to float conversion
stfd f18,0x20(r2)
sth r16,0x26(r2) # 0x43300000800000xx. put 1st int at end of magic double
lfd f16,0x20(r2)
fsubs f16,f16,f18 #f16 = handicap number
fmul f16, f16, f15 #f16 = handicap value * 0.25
fmuls f1, f1, f16 #damage = damage x multiplier (4 handicap = x1)
NOCHANGE:
fmr f31, f1 #NORMAL LINE
That only multiplies the knockback, OP wants damage (i tested with Mario and did a move that did 5 damage with the opponent at 1 and 9 handicap and it did the same damage)
 
Top Bottom