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

Kirbys Taunt Without Ability Gives Random Ability v1.1

UnclePunch

Smash Ace
Joined
Nov 9, 2014
Messages
673
Code:
$Kirbys Taunt Without Ability Gives Random Ability v1.1 [UnclePunch]
C216E18C 0000000C
9421FFBC BE810008
7C0802A6 90010040
7C7E1B78 3BE00000
7FE3FB78 7FC4F378
3D808003 618C1DA8
7D8903A6 4E800421
3BFF0001 2C1F001B
4180FFE0 80010040
7C0803A6 BA810008
38210044 3D808016
618CE1D4 7D8903A6
4E800420 00000000
C20DEC2C 0000000D
807F2238 2C030004
40820054 3860001B
3D808038 618C0580
7D8903A6 4E800421
2C030004 4182FFE8
2C03000B 4182FFE0
7C641B78 7FC3F378
38A00001 3D80800F
618C1BAC 7D8903A6
4E800421 3D80800D
618CEC38 7D8903A6
4E800420 387E0000
60000000 00000000
 

Punkline

Dr. Frankenstack
Joined
May 15, 2015
Messages
423
Dude, nice work! I remember looking into this a long time ago and falling short. I'm really excited to see this work!
Do you have any ASM or notes?

I also ran into a bug, but I think it was just caused by being in developer mode. It was causing some assertion in lbdvd.c:
 
Last edited:

UnclePunch

Smash Ace
Joined
Nov 9, 2014
Messages
673
Dude, nice work! I remember looking into this a long time ago and falling short. I'm really excited to see this work!
Do you have any ASM or notes?

I also ran into a bug, but I think it was just caused by being in developer mode. It was causing some assertion in lbdvd.c:
oh yeah, the preload assert. i made this a year ago and posted it because someone on twitter asked for something similar. i do an asynchronous load when the match starts to load all the kirby hats instead of going through the preload table like the game likes to do.

im not sure if ill go back and do this the right way, but heres the source i have for it. its old so comments are lacking =/

Code:
#To be inserted at 8016e18c
.macro backup
stwu    r1,-68(r1)    # make space for 12 registers
stmw    r20,8(r1)    # push r20-r31 onto the stack
mflr r0
stw r0,64(sp)
.endm

.macro restore
lwz r0,64(sp)
mtlr r0
lmw    r20,8(r1)    # pop r20-r31 off the stack
addi    r1,r1,68    # release the space
.endm

backup
  mr    r30,r3        #costume
  li     r31, 0x0

 
Loop:
  mr    r3, r31
  mr    r4,r30
  lis r12, 0x8003
  ori r12, r12, 0x1DA8
  mtctr r12
  bctrl
  addi r31, r31, 0x1
  cmpwi r31, 0x1B
  blt+ Loop
  restore
  lis r12, 0x8016
  ori r12, r12, 0xE1D4
  mtctr r12
  bctr
Code:
#To be inserted at 800dec2c
.macro branchl reg, address
lis \reg, \address @h
ori \reg,\reg,\address @l
mtctr \reg
bctrl
.endm

.macro branch reg, address
lis \reg, \address @h
ori \reg,\reg,\address @l
mtctr \reg
bctr
.endm

.macro backup
stwu    r1,-68(r1)    # make space for 12 registers
stmw    r20,8(r1)    # push r20-r31 onto the stack
mflr r0
stw r0,64(sp)
.endm

.macro restore
lwz r0,64(sp)
mtlr r0
lmw    r20,8(r1)    # pop r20-r31 off the stack
addi    r1,r1,68    # release the space
.endm



lwz    r3,0x2238(playerdata)
cmpwi    r3,0x4
bne    exit

HasNoAbility:

#get random number 0-26
li    r3,0x1B
branchl    r12,0x80380580

#re-roll if its kirby again
cmpwi    r3,0x4
beq    HasNoAbility
cmpwi    r3,0xB
beq    HasNoAbility

#gain ability
mr    r4,r3
mr    r3,r30
li    r5,0x1
branchl    r12,0x800f1bac


#skip lose function
branch    r12,0x800dec38


exit:
addi    r3, r30, 0
 
Last edited:
Top Bottom