Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Positional Shared Item
#1
Positional Shared Item

This code will replace the items that you receive in a certain position, with one of your choosing. It is undetectable if the item received is one that can legitimately be received in your current position.

(NTSC-U)
# Single Position
2834XXXX YYYYZZZZ
C27AB704 00000003
2C19000P 40820008
386000WW 90770020
60000000 00000000
E0000000 00000000
2834XXXX YYYYZZZZ
047AB704 90770020
E0000000 80008000

# Multiple Positions
2834XXXX YYYYZZZZ
C27AB704 00000005
2C19000P 4082000C
386000WW 90770020
2C19000P 4082000C
386000WW 90770020
90770020 00000000
E0000000 00000000
2834XXXX YYYYZZZZ
047AB704 90770020
E0000000 80008000

(PAL)
# Single Position
2834XXXX YYYYZZZZ
C27BA164 00000003
2C19000P 40820008
386000WW 90770020
60000000 00000000
E0000000 00000000
2834XXXX YYYYZZZZ
047BA164 90770020
E0000000 80008000

# Multiple Positions
2834XXXX YYYYZZZZ
C27BA164 00000005
2C19000P 4082000C
386000WW 90770020
2C19000P 4082000C
386000WW 90770020
90770020 00000000
E0000000 00000000
2834XXXX YYYYZZZZ
047BA164 90770020
E0000000 80008000

(NTSC-J)
# Single Position
2834XXXX YYYYZZZZ
C27B97D0 00000003
2C19000P 40820008
386000WW 90770020
60000000 00000000
E0000000 00000000
2834XXXX YYYYZZZZ
047B97D0 90770020
E0000000 80008000

# Multiple Positions
2834XXXX YYYYZZZZ
C27B97D0 00000005
2C19000P 4082000C
386000WW 90770020
2C19000P 4082000C
386000WW 90770020
90770020 00000000
E0000000 00000000
2834XXXX YYYYZZZZ
047B97D0 90770020
E0000000 80008000

(NTSC-K)
# Single Position
2833XXXX YYYYZZZZ
C27A8524 00000003
2C19000P 40820008
386000WW 90770020
60000000 00000000
E0000000 00000000
2833XXXX YYYYZZZZ
047A8524 90770020
E0000000 80008000

# Multiple Positions
2833XXXX YYYYZZZZ
C27A8524 00000005
2C19000P 4082000C
386000WW 90770020
2C19000P 4082000C
386000WW 90770020
90770020 00000000
E0000000 00000000
2833XXXX YYYYZZZZ
047A8524 90770020
E0000000 80008000

[Values]
P = Position to Replace Items

1 = 1st Place
2 = 2nd Place
3 = 3rd Place
4 = 4th Place
5 = 5th Place
6 = 6th Place
7 = 7th Place
8 = 8th Place
9 = 9th Place
A = 10th Place
B = 11th Place
C = 12th Place

WW = Item to Obtain

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)



# Source
# r3 = Item player will receive
# r25 = Player's current position
# Item Definitions
.set ITEM_GREENSHELL, 0x0
.set ITEM_REDSHELL, 0x1
.set ITEM_BANANA, 0x2
.set ITEM_FAKEITEMBOX, 0x3
.set ITEM_MUSHROOM, 0x4
.set ITEM_TRIPLEMUSHROOM, 0x5
.set ITEM_BOBOMB, 0x6
.set ITEM_BLUESHELL, 0x7
.set ITEM_LIGHTNING, 0x8
.set ITEM_STAR, 0x9
.set ITEM_GOLDENMUSHROOM, 0xA
.set ITEM_MEGAMUSHROOM, 0xB
.set ITEM_BLOOPER, 0xC
.set ITEM_POWBLOCK, 0xD
.set ITEM_THUNDERCLOUD, 0xE
.set ITEM_BULLETBILL, 0xF
.set ITEM_TRIPLEGREENSHELLS, 0x10
.set ITEM_TRIPLEREDSHELLS, 0x11
.set ITEM_TRIPLEBANANAS, 0x12
.set ITEM_NOITEM_MUSHROOM, 0x14

cmpwi r25, 0x1 # Compare the word in r25 (Player's Current Position) to 1st place
bne- branch_not_in_1st_place # If they are not in 1st, branch
li r3, ITEM_TO_OBTAIN # If they are in 1st, load the value of the item we want into r3 (Item player will receive)
stw r3, 32(r23) # Store the word in r3 to the address in r23 offset by 32
branch_not_in_1st_place:

cmpwi r25, 0x2
bne- branch_not_in_2nd_place
li r3, ITEM_TO_OBTAIN
stw r3, 32(r23)
branch_not_in_2nd_place:

cmpwi r25, 0x3
bne- branch_not_in_3rd_place
li r3, ITEM_TO_OBTAIN
stw r3, 32(r23)
branch_not_in_3rd_place:

cmpwi r25, 0x4
bne- branch_not_in_4th_place
li r3, ITEM_TO_OBTAIN
stw r3, 32(r23)
branch_not_in_4th_place:

cmpwi r25, 0x5
bne- branch_not_in_5th_place
li r3, ITEM_TO_OBTAIN
stw r3, 32(r23)
branch_not_in_5th_place:

cmpwi r25, 0x6
bne- branch_not_in_6th_place
li r3, ITEM_TO_OBTAIN
stw r3, 32(r23)
branch_not_in_6th_place:

cmpwi r25, 0x7
bne- branch_not_in_7th_place
li r3, ITEM_TO_OBTAIN
stw r3, 32(r23)
branch_not_in_7th_place:

cmpwi r25, 0x8
bne- branch_not_in_8th_place
li r3, ITEM_TO_OBTAIN
stw r3, 32(r23)
branch_not_in_8th_place:

cmpwi r25, 0x9
bne- branch_not_in_9th_place
li r3, ITEM_TO_OBTAIN
stw r3, 32(r23)
branch_not_in_9th_place:

cmpwi r25, 0xA
bne- branch_not_in_10th_place
li r3, ITEM_TO_OBTAIN
stw r3, 32(r23)
branch_not_in_10th_place:

cmpwi r25, 0xB
bne- branch_not_in_11th_place
li r3, ITEM_TO_OBTAIN
stw r3, 32(r23)
branch_not_in_11th_place:

cmpwi r25, 0xC
bne- branch_not_in_12th_place
li r3, ITEM_TO_OBTAIN
stw r3, 32(r23)
branch_not_in_12th_place:


Code Creator: Star
Code Credits: Guru (Shared Item Code)
Reply
#2
Wow. Nice job!
Reply
#3
Updated to support both single and multiple places.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)