Item Warning Offline [Bully]
#1
Item Warning Offline [Bully]

Works Offline only.

With this code you can choose a desired character animation to execute on screen when a desired item is in play.

NTSC-U
C278EEF8 00000003
801D008C 1D9B0004
3D8C8150 900C0000
60000000 00000000
C27BE87C 00000006
A01F00F6 3D80814F
618CFFFC 3960000C
854C0004 2C0A00XX
40A2000C 380000YY
B01F00F6 356BFFFF
4082FFE8 00000000

PAL
C2797F04 00000003
801D008C 1D9B0004
3D8C8150 900C0000
60000000 00000000
C27CD2DC 00000006
A01F00F6 3D80814F
618CFFFC 3960000C
854C0004 2C0A00XX
40A2000C 380000YY
B01F00F6 356BFFFF
4082FFE8 00000000

NTSC-J
C2797570 00000003
801D008C 1D9B0004
3D8C8150 900C0000
60000000 00000000
C27CC948 00000006
A01F00F6 3D80814F
618CFFFC 3960000C
854C0004 2C0A00XX
40A2000C 380000YY
B01F00F6 356BFFFF
4082FFE8 00000000

NTSC-K
C27862C4 00000003
801D008C 1D9B0004
3D8C8150 900C0000
60000000 00000000
C27BB69C 00000006
A01F00F6 3D80814F
618CFFFC 3960000C
854C0004 2C0A00XX
40A2000C 380000YY
B01F00F6 356BFFFF
4082FFE8 00000000

XX = Item to Monitor
YY = Animate to execute when Item is in Play

XX Values:
00 = Green Shell
01 = Red Shell
02 = Banana
03 = Fake Item Box
04 = Mushroom
05 = Triple Mushroom
06 = Bob-omb
07 = Blue Shell
08 = Lightning
09 = Star
0A = Golden Mushroom
0B = Mega Mushroom
0C = Blooper
0D = POW Block
0E = Thunder Cloud
0F = Bullet Bill
10 = Triple Green Shells
11 = Triple Red Shells
12 = Triple Bananas
14 = No Item Available (Mushroom)

YY Values:
00 = Turning
01 = Boosting
02 = Drift left
03 = Drift right
04 = Wheelie
05 = Running
06 = Looking backwards
07 = Idle
08 = Win (two arms)
09 = Win (one arm)
14 = Yeah, I got him!
15 = Lose
17 = Throwing item
1A = Falling
1D = Weird sexual movement
1E = Trick

List of Sources:

1st ASM:
lwz r0, 0x8C (r29) #Default Instruction, r0 holds current Player/CPU's Held Item
mulli r12, r27, 0x4 #Multiple Player Slot value in r27 by 0x4, put result in r11
addis r12, r12, 0x8150 #Add 0x8150 to upper 16 bits of r12. The player slot will increment/separate the address by 0x4 depending on slot value
stw r0, 0x0 (r12) #Store current Player/CPU's Held Item value to address of r12

2nd ASM:
lhz r0, 0x00F6 (r31) #Default Instruction

lis r12, 0x814F #Set address (-0x4 away) in reference where item values are stored in mem81
ori r12, r12, 0xFFFC

li r11, 12 #Max room size is 12 players, max times for loop will be 12

check_item_loop:
lwzu r10, 0x4 (r12) #First, load item from slot 0, increase mem location by 0x4 per every check
cmpwi r10, 0xXX #Compare item value of current slot to monitored item value
bne+ decrement_loop

li r0, 0xYY #Item was found, set character value to replace what's in r0
sth r0, 0x00F6 (r31) #Needs to be restored into memory

decrement_loop:
subic. r11, 11, 1 #Subtract one from r10 every time check is done. Once r10 is 0, the loop will stop
bne+ check_item_loop

Code creator: Bully
Code credits: Vega (improved sources)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)