• 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 Possible to keep Kirby hat forever?

nickisneato

Smash Rookie
Joined
Jan 14, 2017
Messages
15
Would it be possible to make a code that makes Kirby keep his hat/powerup forever? I know there is a way to make him keep it no matter how many times he gets hit, but is it possible to keep it even when he taunts? I wanted to see what it would look like to taunt or Inhale with, say, Mario's hat on, but I couldn't find anything in Crazy Hand, so I don't know if it can happen.

Maybe someone could make a model hack or a code that loads the match with a certain hat on Kirby or overwrites the main Kirby model with one where he has a hat on, so that he can still Inhale and taunt, but he also still has the hat on? Just a thought.
 

The Cape

Smash Master
Joined
May 16, 2004
Messages
4,478
Location
Carlisle, PA
I assume it's a function in his taunt. Possibly try to remove lines in his taunt in Crazy Hand?

Edit: Went to look and currently it only has the "Hiiiii" SFX in there
 
Last edited:

nickisneato

Smash Rookie
Joined
Jan 14, 2017
Messages
15
I assume it's a function in his taunt. Possibly try to remove lines in his taunt in Crazy Hand?

Edit: Went to look and currently it only has the "Hiiiii" SFX in there
Yeah, that's what I noticed too. I even looked in the PlKb.dat file in a hex editor, and I couldn't find anything except the sound effect. Maybe there's something in the specific Kirby Hat files? I'll try to see what I can find, but I'm not very experienced with hex.
 

Punkline

Dr. Frankenstack
Joined
May 15, 2015
Messages
423
or a code that loads the match with a certain hat on
@flieskiller had some notes related to this subject in another request thread not all that long ago. It's not possible to do this without first somehow pre-loading the character-specific hat by some means, but the game seems to be able to do it somehow in the adventure mode match.

I know there is a way to make him keep it no matter how many times he gets hit, but is it possible to keep it even when he taunts? I wanted to see what it would look like to taunt or Inhale with, say, Mario's hat on
I took a peek using some of flieskiller's notes and found an interesting structure at internal player data offset 0x2238

It's used by kirby to store an ID for his B-ability, and 2 pointers that seem to point to the hat graphic (or nothing when 0 for null)

I believe the 2 pointers come from the lookup table at 803C9CC8 (DOL offset 0x3C6CC8)
Code:
From BA 803C9CC8 -- DOL offset 0x3C6CC8
800EFA40    800EFAF0    #0x00 Mario hat
800EFB4C    800EFBFC    #0x01 Fox hat
800EFC58    800EFD08    #0x02 Captain Falcon hat
800F0FC0    800F10A4    #0x03 Donkey Kong hat
00000000    00000000    #0x04 Kirby hat
800EFD64    800EFE1C    #0x05 Bowser hat
800EFE80    800EFF38    #0x06 Link hat
800EFF9C    800F0054    #0x07 Sheik hat
800F00B8    800F0168    #0x08 Ness hat
800F01C4    800F0274    #0x09 Peach hat
800F02D0    800F0380    #0x0A Popo hat
00000000    00000000    #0x0B Nana hat
800F03DC    800F0494    #0x0C Pikachu hat
800F04F8    800F05A8    #0x0D Samus hat
800F0604    800F06B4    #0x0E Yoshi hat
800F10D4    800F11AC    #0x0F Jigglypuff hat
800F11F0    800F12C8    #0x10 Mewtwo hat
800F0710    800F07C0    #0x11 Luigi hat
800F081C    800F08D4    #0x12 Marth hat
800F0938    800F09F0    #0x13 Zelda hat
800F0A54    800F0B0C    #0x14 Young Link hat
800F0B70    800F0C20    #0x15 Dr. Mario hat
800F130C    800F13F0    #0x16 Falco hat
800F0C7C    800F0D34    #0x17 Pichu hat
800F14B4    800F15D8    #0x18 Mr. Game & Watch hat
800F0D98    800F0E48    #0x19 Ganondorf hat
800F0EA4    800F0F5C    #0x1A Roy hat
00000000    00000000    #0x1B Master Hand
00000000    00000000    #0x1C Crazy Hand
00000000    00000000    #0x1D Wireframe Male (Boy)
00000000    00000000    #0x1E Wireframe Female (Girl)
800EFD64    800EFE1C    #0x1F Giga Bowser hat (copy of normal bowser assets)
00000000    00000000    #0x20 Sandbag

---

The variables stored in the structure at internal player data offset 0x2238 can be edited for immediate effects; but only if the appropriate character data is loaded.

I made a few codes to see if I could get something close to what you wanted. These aren't thoroughly tested:


$Kirby Keeps Hat/Ability after Taunt [Punkline]
040DEC34 60000000

Code:
    -==-


Kirby Keeps Hat/Ability after Taunt
[Punkline]
Version -- DOL Offset ------ Hex to Replace ---------- ASM Code
1.02 ------ 0xDB814 ---- 480170D1 -> 60000000
1.01 ------ 0xDB5A0 ---- 480170D1 -> 60000000
1.00 ------ 0xDB3C8 ---- 48017075 -> 60000000
PAL ------- 0xDBFC8 ---- 480170D1 -> 60000000
---

$Kirby Copies Hat but not Ability [Punkline]
040f1648 38800004
040f1698 38800004


Code:
    -==-


Kirby Copies Hat but not Ability
[Punkline]
Version -- DOL Offset ------ Hex to Replace ---------- ASM Code
1.02 ------ 0xEE228 ---- 80852238 -> 38800004
----------- 0xEE278 ---- 80852238 -> 38800004
1.01 ------ 0xEDFB4 ---- 80852238 -> 38800004
----------- 0xEE004 ---- 80852238 -> 38800004
1.00 ------ 0xEDD80 ---- 80852238 -> 38800004
----------- 0xEDDD0 ---- 80852238 -> 38800004
PAL ------- 0xEE9DC ---- 80852238 -> 38800004
----------- 0xEEA2C ---- 80852238 -> 38800004
---

Tried this one just to test something:

$Kirby Copies Ability but not Hat [Punkline]
040f1c18 60000000

Code:
    -==-


Kirby Keeps Hat/Ability after Taunt
[Punkline]
Version -- DOL Offset ------ Hex to Replace ---------- ASM Code
1.02 ------ 0xEE7F8 ---- 4E800021 -> 60000000
1.01 ------ 0xEE584 ---- 4E800021 -> 60000000
1.00 ------ 0xEE350 ---- 4E800021 -> 60000000
PAL ------- 0xEEFAC ---- 4E800021 -> 60000000

Edit 3/14/2017 - Found some more thoughtful hooks for the hat-only code. It should be fixed now.
 
Last edited:

The Cape

Smash Master
Joined
May 16, 2004
Messages
4,478
Location
Carlisle, PA
Cool that he keeps the hat when he taunts. Can we stack that with something like D Pad Down gets rid of hat?
 

nickisneato

Smash Rookie
Joined
Jan 14, 2017
Messages
15
This is really cool! The one where he copies the hat, but not the ability, didn't work for me on Dolphin, but I didn't try the DOL mod yet, so I'll give that a try.
 

Punkline

Dr. Frankenstack
Joined
May 15, 2015
Messages
423
This is really cool! The one where he copies the hat, but not the ability, didn't work for me on Dolphin, but I didn't try the DOL mod yet, so I'll give that a try.
I really should have tested the code more before posting it lol. It wasn't good.
I update my previous post with a new hat-only code, so let me know if that one has any problems.

Cool that he keeps the hat when he taunts. Can we stack that with something like D Pad Down gets rid of hat?
Do you mean like something that toggles the appearance, or something that actually gets rid of the copy ability/hat like his taunt normally does?
 

The Cape

Smash Master
Joined
May 16, 2004
Messages
4,478
Location
Carlisle, PA
Do you mean like something that toggles the appearance, or something that actually gets rid of the copy ability/hat like his taunt normally does?
Something that gets rid of the ability like his taunt normally does. That way you can taunt with the power, but still get rid of it if you want to. Maybe something like a button press during his taunt?
 

nickisneato

Smash Rookie
Joined
Jan 14, 2017
Messages
15
I really should have tested the code more before posting it lol. It wasn't good.
I update my previous post with a new hat-only code, so let me know if that one has any problems.
This one works great! It's pretty neat to see Kirby inhaling with another hat on. I wonder if this could make for custom costumes for Kirby, like the red costume could be Mario's hat, the green could be Luigi's, and so on?
 

Punkline

Dr. Frankenstack
Joined
May 15, 2015
Messages
423
Something that gets rid of the ability like his taunt normally does. That way you can taunt with the power, but still get rid of it if you want to. Maybe something like a button press during his taunt?
Good idea~

Try this modified version of the test code:

Kirby Taunt + D-pad Down to remove Ability
Code:
    -==-


Kirby Taunt + D-pad Down to remove Ability
Kirby may taunt without losing his Hat/Ability
Press D-pad Down durring taunt for normal removal effect
[Punkline]
Version -- DOL Offset ------ Hex to Replace ---------- ASM Code
1.02 ------ 0xDB814 ---- 480170D1 -> 60000000
----------- 0xDB8E4 ---- 7C7F1B78 -> Branch
83E3002C 801F0004 2C000004 40A2001C
809F0668 70840004 41A20010 38800001
bl 0x800f5d04 
807F0000 7C7F1B78 00000000
1.01 ------ 0xDB5A0 ---- 480170D1 -> 60000000
----------- 0xDB670 ---- 7C7F1B78 -> Branch
83E3002C 801F0004 2C000004 40A2001C
809F0668 70840004 41A20010 38800001
bl 0x800F5A90 
807F0000 7C7F1B78 00000000
1.00 ------ 0xDB3C8 ---- 48017075 -> 60000000
----------- 0xDB498 ---- 7C7F1B78 -> Branch
83E3002C 801F0004 2C000004 40A2001C
809F0668 70840004 41A20010 38800001
bl 0x800F585C 807F0000 7C7F1B78 00000000
PAL ------- 0xDBFC8 ---- 480170D1 -> 60000000
----------- 0xDC098 ---- 7C7F1B78 -> Branch
83E3002C 801F0004 2C000004 40A2001C
809F0668 70840004 41A20010 38800001
bl 0x800F64B8 
807F0000 7C7F1B78 00000000
Code:
    -==-


Kirby Taunt + D-pad Down to remove Ability
Kirby may taunt without losing his Hat/Ability
Press D-pad Down durring taunt for normal removal effect
[Punkline]
Version -- DOL Offset ------ Hex to Replace ---------- ASM Code
1.02 ------ 0xDB814 ---- 480170D1 -> 60000000
----------- 0xDB8E4 ---- 7C7F1B78 -> Branch
# 800ded04 : mr r31, r3
# taunt animation interrupt (common between characters)
# r31 about to be clobbered, r3 holds player entity
# r4+ free

lwz r31, 0x2C(r3)        # load internal data from entity
lwz r0, 4(r31)      
cmpwi r0, 4             # we need to check for Kirby
bne+ return

if_kirby:
lwz r4, 0x668(r31)     # instant buttons
andi. r4, r4, 4         # check for d-pad down
beq+ return

if_kirby_and_dpad:
li r4, 1                 # r3 = player entity, r4 = lose copy option (?)
#lis r5, 0x800f   
#ori r5, r5, 0x5d04     # (for gecko codes)
#mtlr r5
#blrl
bl 0x800f5d04             # lose copy function
lwz r3, 0(r31)             # r31 still holds internal data; 0x0 points back to entity

return:
mr r31, r3
.long 0x00000000
$Kirby Taunt + D-pad Down to remove Ability [Punkline]
040DEC34 60000000
C20DED04 00000008
83E3002C 801F0004
2C000004 40A20028
809F0668 70840004
41A2001C 38800001
3CA0800F 60A55D04
7CA803A6 4E800021
807F0000 7C7F1B78
60000000 00000000

This one works great! It's pretty neat to see Kirby inhaling with another hat on. I wonder if this could make for custom costumes for Kirby, like the red costume could be Mario's hat, the green could be Luigi's, and so on?
Like I said, it's a matter of loading the player assets. It's impossible unless the hat is already available in RAM, and we don't currently know how to pre-load them.

You could only get both Mario and Luigi hats if Mario and Luigi were already on the stage.

(See Flieskiller's notes for more details)

---

If that gets figured out at some point, then yeah; you could use the lookup table contents I posted in the spoiler in my first reply; or any function that makes use of it and/or the ID at internal player data offset 0x2238.
 
Last edited:

Punkline

Dr. Frankenstack
Joined
May 15, 2015
Messages
423
I tried the Gecko code and the game crashed
Fixed. Happens a lot when I write codes in MCM and quickly port them to gecko, sorry.

(gecko codes have a 64-bit alignment, so they require a NOP instruction sometimes before the compiled return)
 
Last edited:
Top Bottom