02-13-2022, 02:16 AM
(This post was last modified: 03-05-2022, 04:19 PM by _Ro.
Edit Reason: Added NTSC-K
)
Play different item receive sound when receiving Shock, Star & Bullet [Ro]
This code allows you to modify what item receive sound the roulette plays when you receive a Shock, Star & Bullet. This code is a request and I decided to make it. Of course it is customizable to any item and sound you want as long as you know what you are doing. The value to put is the revo_kart.brsar sound index of the sound you want. Look up the source to edit it as you desire.
NTSC-U
C278F140 00000004
388000E3 381CFFF8
28000001 4081000C
2C1C000F 40820008
38800XXX 00000000
PAL (Untested)
C279814C 00000004
388000E3 381CFFF8
28000001 4081000C
2C1C000F 40820008
38800XXX 00000000
NTSC-J (Untested)
C27977B8 00000004
388000E3 381CFFF8
28000001 4081000C
2C1C000F 40820008
38800XXX 00000000
NTSC-K (Untested)
C278650C 00000004
388000E3 381CFFF8
28000001 4081000C
2C1C000F 40820008
38800XXX 00000000
Code by: Ro
Code credits: Seeky (helped me short it and taught me a different way to do checks that saves lines. Thank you very much!)
This code allows you to modify what item receive sound the roulette plays when you receive a Shock, Star & Bullet. This code is a request and I decided to make it. Of course it is customizable to any item and sound you want as long as you know what you are doing. The value to put is the revo_kart.brsar sound index of the sound you want. Look up the source to edit it as you desire.
NTSC-U
C278F140 00000004
388000E3 381CFFF8
28000001 4081000C
2C1C000F 40820008
38800XXX 00000000
PAL (Untested)
C279814C 00000004
388000E3 381CFFF8
28000001 4081000C
2C1C000F 40820008
38800XXX 00000000
NTSC-J (Untested)
C27977B8 00000004
388000E3 381CFFF8
28000001 4081000C
2C1C000F 40820008
38800XXX 00000000
NTSC-K (Untested)
C278650C 00000004
388000E3 381CFFF8
28000001 4081000C
2C1C000F 40820008
38800XXX 00000000
Code:
Write to:
NTSC-U: 8078F140
PAL: 8079814C
NTSC-J: 807977B8
NTSC-K: 8078650C
Source:
li r4, 0xE3 #Play original item receive sound
subi r0, r28, 8 #Subtract R28 (item ID) value by 8 and stores to R0
cmplwi r0, 1 #Checks if R0 is less than the value of 1 (8 - 8 shock ID) = 0 (8 - 9 star ID) = -1
ble custom #If value is less than one, play custom receive sound
cmpwi r28, 0xF #Checks if received item is Bullet
bne end #If not equal, don't do anything, skip to end (return)
custom: #Custom receive sound label
li r4, 0xXXX #Play custom receive sound (revo_kart.brsar sound index ID)
end: #End of the function (return)
Code by: Ro
Code credits: Seeky (helped me short it and taught me a different way to do checks that saves lines. Thank you very much!)