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
#2
was this code always ever meant to be used once per gct file?
Reply
#3
I'm not sure what you mean by your question? Codes are always meant to be applied once per GCT. Unless you are talking about a code meant to be used with activators and deactivators.
Reply
#4
i mean by having the same code with different values in a gct, like both a lightning warning and a blue shell warning at the same time


sorry if i just cannot word it right
Reply
#5
Each copy would need to be under a button activator of some sorts.

Like this (first code is Shock warning, second code is Star Warning)...

C278EEF8 00000003
801D008C 1D9B0004
3D8C8150 900C0000
60000000 00000000
2384XXXX YYYYZZZZ <------ Controller button combo for first Item Warning
C27BE87C 00000006
A01F00F6 3D80814F
618CFFFC 3960000C
854C0004 2C0A0008 <-- Check for Shock
40A2000C 380000YY
B01F00F6 356BFFFF
4082FFE8 00000000
E0000000 00000000
2834XXXX YYYYZZZZ <-- Controller button combo for second Item Warning code
C27BE87C 00000006
A01F00F6 3D80814F
618CFFFC 3960000C
854C0004 2C0A0009 <-- Check for Star
40A2000C 380000YY
B01F00F6 356BFFFF
4082FFE8 00000000
E0000000 80008000
Reply
#6
oh yeah, forgot to ask… 182 days later, but you won’t mind if you do the same for the online version of item warning?
Reply
#7
C265EE14 00000003
88030001 1D960004
3D8C8168 980C0193
60000000 00000000
C265EE30 00000003
88100011 1D960004
3D8C8168 980C0193
60000000 00000000
2834XXXX YYYYZZZZ <--- controller button combo for item 1
C27BE87C 00000006
A01F00F6 3D808168
618C018C 3960000C
854C0004 2C0A00XX <--- item 1
40A2000C 380000YY
B01F00F6 356BFFFF
4082FFE8 00000000
E0000000 00000000
2834XXXX YYYYZZZZ <--- controller button combo for item 2
C27BE87C 00000006
A01F00F6 3D808168
618C018C 3960000C
854C0004 2C0A00XX <--- item 2
40A2000C 380000YY
B01F00F6 356BFFFF
4082FFE8 00000000
E0000000 80008000
Reply
#8
(12-12-2023, 10:43 PM)Vega Wrote: C265EE14 00000003
88030001 1D960004
3D8C8168 980C0193
60000000 00000000
C265EE30 00000003
88100011 1D960004
3D8C8168 980C0193
60000000 00000000
2834XXXX YYYYZZZZ <--- controller button combo for item 1
C27BE87C 00000006
A01F00F6 3D808168
618C018C 3960000C
854C0004 2C0A00XX <--- item 1
40A2000C 380000YY
B01F00F6 356BFFFF
4082FFE8 00000000
E0000000 00000000
2834XXXX YYYYZZZZ <--- controller button combo for item 2
C27BE87C 00000006
A01F00F6 3D808168
618C018C 3960000C
854C0004 2C0A00XX <--- item 2
40A2000C 380000YY
B01F00F6 356BFFFF
4082FFE8 00000000
E0000000 80008000

thanks!!!
Reply
#9
(12-12-2023, 10:43 PM)Vega Wrote: C265EE14 00000003
88030001 1D960004
3D8C8168 980C0193
60000000 00000000
C265EE30 00000003
88100011 1D960004
3D8C8168 980C0193
60000000 00000000
2834XXXX YYYYZZZZ <--- controller button combo for item 1
C27BE87C 00000006
A01F00F6 3D808168
618C018C 3960000C
854C0004 2C0A00XX <--- item 1
40A2000C 380000YY
B01F00F6 356BFFFF
4082FFE8 00000000
E0000000 00000000
2834XXXX YYYYZZZZ <--- controller button combo for item 2
C27BE87C 00000006
A01F00F6 3D808168
618C018C 3960000C
854C0004 2C0A00XX <--- item 2
40A2000C 380000YY
B01F00F6 356BFFFF
4082FFE8 00000000
E0000000 80008000

This code is very ugly. You need button activators to switch between which Item you want to have a warning for. Would be better if we have one code to show warnings for both Items if they are in play.
I am currently testing out a new (online) code which features multiple warnings at a time. I hope I can post it this week...
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)