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

Item-related codes

flieskiller

Smash Journeyman
Joined
Jan 3, 2013
Messages
426
I'll compile a list of addresses everything related to items: Characters-related items, item spawn. I may check Coin Mode. If it is a function, there will be a spoiler with the interesting lines in it.

Some memory addresses in the dynamic stuff. Most of them are always at the same place.
Current number of items on the map:
804a0c64
Amount of food in the map:
804a0c74
Maximum number of items on the map (set every match)
804a0c68

Here are some numbers wrote at the booting of the game. They are wrote 1 time then they don't move forever.
Maximum number of items (in VS mode at least)
80823a1c

ITEM DROP RATE: For each intensity of dropping (very low, low, medium, etc.) The time for the next drop is chosen randomly between 2 values. Number is amount of frames. Crazy and Like Rain can't be chosen in the item menu in-game.
Very low: 80823b18 +0x4 (1600 and 2000)
Low: 80823b20 +0x4 (900 and 1200)
Medium: 80823b28 +0x4 (500 and 800)
High: 80823b30 +0x4 (350 and 600)
Very high: 80823b38 +0x4 (200 and 240)
Crazy: 80823b40 +0x4 (2 and 128)
Like rain: 80823b48 +0x4 (1 and 3)

All characters that spawn projectiles, their ASM line to load their item. More to be added.
Mewtwo, Shadow Ball (on the ground):
80147538 (default 38c00070)


Function check if item spawning reaches limit
8026784c
802678a8: when the item is food, load the maximum limit amount of food (because the limit is higher than from other items)

Function to spawn item:
8026c75c
8026c83c - lbzx r0,r4,r3: r0 = item id to drop
8026c878: Number of item dropped by a cargo. (Load between 1 and 3) (not sure for Party Ball)
 
Last edited:

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
Ice Climber's Ice Block Modifier
Code:
8011f564    li r5,0x6a   #0x6a is item/projectile ID for ice block
Changed to Pokeball:


Unfortunately, the hurtboxes do not continue with the Pokeball :(
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
I figured out how to find any projectile's controlling function, and therefore, the item/projectile ID input line.

1) Set a breakpoint @ 8026bb84.
2) Make projectile spawn in-game.
3) Step once to return back one function, and now you'll be in that projectile's specific spawn function.
4) Go to the end of this function and set a breakpoint at the "blr". Play game.
5) Step once to return to the function that branched into the projectile's spawn function. The lines before the branch linking into the spawn function are setting the inputs, one of which should be the projectile ID to spawn.
 

flieskiller

Smash Journeyman
Joined
Jan 3, 2013
Messages
426
I figured out how to find any projectile's controlling function, and therefore, the item/projectile ID input line.

1) Set a breakpoint @ 8026bb84.
2) Make projectile spawn in-game.
3) Step once to return back one function, and now you'll be in that projectile's specific spawn function.
4) Go to the end of this function and set a breakpoint at the "blr". Play game.
5) Step once to return to the function that branched into the projectile's spawn function. The lines before the branch linking into the spawn function are setting the inputs, one of which should be the projectile ID to spawn.
I've found myself using some steps, but it wasn't as clear as this...

One thing that seems to be way more difficult for me to find: The duration of the projectile. It seems that all durations are in float. In these same functions, what can set the timer for any projectiles?

And I'll update soon the main post with more stuff I found. For instance, I found the function that substracts a frame time for Pikachu's thunderjolt (so its thunderjolt is infinite). The bigger function seems to check a lot of different things (for instance grouping both the ball and the line bouncing thunderbolt as 1), so I feel like it will just be some luck to find these.
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
Disable Capsule Explosions (1.02) [Achilles]
0427CF8C 48000018

Disable Barrel Explosion (1.02) [Achilles]
04288b28 60000000

Disable Box Explosions (1.02) [Achilles]
0428639c 38600001


Capsule - 12.5% chance for explosion
Barrel, Box - 10% chance for explosion
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
Take out their bits (the first four bits) in the possible items to spawn.

C2167EFC 00000002
89FA002F 39EFFFF1
99FA002F 00000000

Untested because I don't feel like it.
 

flieskiller

Smash Journeyman
Joined
Jan 3, 2013
Messages
426
Take out their bits (the first four bits) in the possible items to spawn.

C2167EFC 00000002
89FA002F 39EFFFF1
99FA002F 00000000

Untested because I don't feel like it.
I'll test this later, but I'm searching more deep in the code (without gecko codes), and it seems each items can have their own drop rates in each stages, I'll write something later.
 

davidvkimball

blippi.gg, @MeleeHD Lead
Joined
Jun 21, 2013
Messages
400
Location
Tacoma, WA
Slippi.gg
D#0
NNID
davidvkimball
3DS FC
3196-5240-6546
Switch FC
SW-1880-0689-1110
Is there a Gecko code to make Pokeball items empty? Meaning, when it opens, no Pokemon comes out, but the animation and sounds play out normally other than that?
 
Top Bottom