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

(Hacker) My notes on character specific codes

Almas

Smash Lord
Joined
Jul 6, 2008
Messages
1,588
Okay, I thought I'd get it down here.

During a fight the ID list for characters seems slightly different to what is used in the CSS.

In training mode, the player is loaded second, with the dummy first. In Brawls, it's always done in player order.

Character IDs are stored at 80623320, +244 for each player (so P2 is 80623568). 4 forwards from there is a link to almost all character specific data.
For characters who can become other characters (Pokémon, Zelda/Sheik, Wario->Warioman etc.), extra IDs are stored at the character ID +8. So if Zelda were at 80623320, we could expect to find Sheik at 80623328. Some of Sheik's info would also be stored at 8062332C.

Interesting values from [80623324] or similar:
+CA4 : Fullhop/Second Hop Height
+CB0 : Shorthop Height
+C68 : Damage Dealt

The first two vary from character to character. The last defaults to float 1.

For Fullhop/Short Hop etc. modifiers:
The break is at 8085765C. f1 stores the relevant value
f31, r0, r29 and r30 are all safe
If unmodified, r0 holds rudimentary information about what exactly is causing the velocity:

2F00: Dash Speed
2F08: Dash Acceleration
2F14: Full Hop/Second Hop: ID at -3A64(r3)
2F20: Short Hop: ID at -0x3A6C(r3).
2F40: Downwards Gravity: ID at -0x3A8C(r3)
2F5C: Fast Fall: ID at -0x3AA8(r3)
2FC4/2FC8: Ledgehops (Both are found, I forget which affects height)

And of course, most importantly:

3020: Position of your name above your character

There's a load of other R0s which correspond to things I can't identify. I think many may be linked to animations, such as the standing pivot animation.

For Char. Specific Gravity Modifiers:
The break is at 8081CAD0 - f1 is the output
r4, r5 and f23 are safe
The other registers generally give a glimpse of what is going on.
Character ID can be found at -0xA60(r8), UNLESS r8 is zero. This is the case for a very small number of moves (DK's Up+B is one example).
I need to find another, more stable place to find character ID.
For Link, r9 contains an address for jumps, or 0xFFFFFFFF for his Up+B. I didn't have time to experiment, but similar behaviour can probably be expected from other characters.

Note this doesn't seem to behave EXACTLY like gravity. Rather, it's called into effect whenever the character initiates something that changes their velocity in the upwards direction, and determines the acceleration during that period of time. If you set it to 0 for DK's Up+B, he still falls at the end of it even though his gravity 'should' be 0 (the change is noticable, though).

Other Char. Specifics
You're probably more aware of this one, it isn't ASM:
At 8128B2C0+0x52000 per player, some other info can be found:
+0: damage dealt
+4: damage received
+8: knockback dealt
+C: knockback received
+10: size (the mushroom effect - also changes knockback etc. without changing the other values)
+14: size (without affecting things like knockback)
+18: gravity (this is the same gravity in the previous section, and how I found the ASM code)

Unlike the other stuff, this is accurate to the player. So the first one is always P1, the second one is always P2 (in training mode, YOU are P1 for this, but you are P2 for the other stuff). They all default to float 1.

Hope you find it useful.
 
D

Deleted member

Guest
wow, nice text there, but I'll have to port over the breaks etc. to make any contributions here.
 

Almas

Smash Lord
Joined
Jul 6, 2008
Messages
1,588
Character IDs
Code:
Mario - 00
Donkey Kong - 01
Link - 02
Samus - 03
Yoshi - 04
Kirby - 05
Fox - 06
Pikachu - 07
Luigi - 08
Captain Falcon - 09
Ness - 0A
Bowser - 0B
Peach - 0C
Zelda - 0D
Sheik - 0E
Ice Climbers - 0F
Marth - 11
Mr. Game & Watch 12
Falco - 13
Ganondorf - 14
Wario - 15
Meta Knight - 16
Pit - 17
Zero Suit Samus - 18
Olimar - 19
Lucas - 1A
Diddy Kong - 1B
Pokémon Trainer - 1C
Charizard - 1D
Squirtle - 1E
Ivysaur - 1F
King Dedede - 20
Lucario - 21
Ike - 22
R.O.B - 23
Jigglypuff - 25
Toon Link - 29
Wolf - 2C
Snake - 2E
Sonic - 2F
 

Igglyboo

Smash Cadet
Joined
Nov 22, 2008
Messages
33
Location
Michigan
+4 then + 60 after the root pointer brings up the file list, here are some files that will most likely be helpful
+88>4C = Horizontal Velocity(+8)
+88>58 = Vertical Velocity(+C)
+88>70 = Vertical Flight Speed(+C)
+88>7C = Horizontal Flight Speed(+8)
 

spunit262

Smash Journeyman
Joined
Oct 15, 2008
Messages
421
I'll post what I send to Almas in a PM here.
with this code

Charactor Id Fix [spunit262]
C28152E4 00000002
819E003C 907EFFFC
60000000 00000000

you can find the id at

80000000 80623320
80000001 00000000
60000006 00000000
60000003 00000001
4A001000 00000000
4A101001 00000000
36000000 00000032
58010000 00000004
DE000000 80008180
58010000 00000060
DE000000 80008180

assume what would be in the po at this point is in r29

lis r0,0x8180
lwz r3,8(r29)
lwz r3,-4(r3)
cmpw r3,r0
bge- 12
lwz r3,0x30(r3)
b 8
li r3,255

This asm code would put the character id in r3, or FF if the address hasn't been stored at.
 
Top Bottom