Replace Item with Shared Item [Star]
#1
Replace Item with Shared Item [Star]

This code will replace an item that you receive from the roulette, to one of your choosing. I originally created it to avoid getting Thunder Clouds. It is undetectable if the item replaced is one that can legitimately be received in your current position.

(NTSC-U)
# Single Item
2834XXXX YYYYZZZZ
C27AB704 00000003
2C0300RR 40A20008
386000WW 90770020
60000000 00000000
E0000000 00000000
2834XXXX YYYYZZZZ
047AB704 90770020
E0000000 80008000

# Multiple Items
2834XXXX YYYYZZZZ
C27AB704 00000005
2C0300RR 40A2000C
386000WW 48000010
2C0300RR 40A20008
386000WW 90770020
60000000 00000000
E0000000 00000000
2834XXXX YYYYZZZZ
047AB704 90770020
E0000000 80008000

(PAL)
# Single Item
2834XXXX YYYYZZZZ
C27BA164 00000003
2C0300RR 40A20008
386000WW 90770020
60000000 00000000
E0000000 00000000
2834XXXX YYYYZZZZ
047BA164 90770020
E0000000 80008000

# Multiple Items
2834XXXX YYYYZZZZ
C27BA164 00000005
2C0300RR 40A2000C
386000WW 48000010
2C0300RR 40A20008
386000WW 90770020
60000000 00000000
E0000000 00000000
2834XXXX YYYYZZZZ
047BA164 90770020
E0000000 80008000

(NTSC-J)
# Single Item
2834XXXX YYYYZZZZ
C27B97D0 00000003
2C0300RR 40A20008
386000WW 90770020
60000000 00000000
E0000000 00000000
2834XXXX YYYYZZZZ
047B97D0 90770020
E0000000 80008000

# Multiple Items
2834XXXX YYYYZZZZ
C27B97D0 00000005
2C0300RR 40A2000C
386000WW 48000010
2C0300RR 40A20008
386000WW 90770020
60000000 00000000
E0000000 00000000
2834XXXX YYYYZZZZ
047B97D0 90770020
E0000000 80008000

(NTSC-K)
# Single Item
2833XXXX YYYYZZZZ
C27A8524 00000003
2C0300RR 40A20008
386000WW 90770020
60000000 00000000
E0000000 00000000
2833XXXX YYYYZZZZ
047A8524 90770020
E0000000 80008000

# Multiple Items
2833XXXX YYYYZZZZ
C27A8524 00000005
2C0300RR 40A2000C
386000WW 48000010
2C0300RR 40A20008
386000WW 90770020
60000000 00000000
E0000000 00000000
2833XXXX YYYYZZZZ
047A8524 90770020
E0000000 80008000

[RR and WW Values]
RR = Item to Replace
WW = Item Replaced With

00 = Green Shell
01 = Red Shell
02 = Banana
03 = Fake Item Box
04 = Mushroom
05 = Triple Mushrooms
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)

Code Creator: Star
Code Credits: Guru
Reply
#2
Good stuff. So its like Replace Item code but based on Shared code instead of Forced. Has this been tested against CTGP IIB? If not and you end up testing it and it fails, try using Anti-Item spy equipped.
Reply
#3
Updated to support both single and multiple items.
Reply
#4
Have you tested the multiple item version? And can the single item version be used multiple times in a GCT (I ask this because of the limitations with the Forced-based Replace Item Code)
Reply
#5
Yes, the multiple item version works as expected.
No, the single item version cannot be used multiple times in a GCT. You can see why this is by looking at the game's memory.

The instruction is replaced:
807B97D0: 4B8490F8 b 0x800028c8

However when I apply the code again:
807B97D0: 4B849118 b 0x800028e8

The first code is still in RAM, but since the branch address is updated to the latter code, so only that one will be executed.
Reply
#6
For those who are wanting to use this code, it's best imo to run it without any activators/deactivators.
Reply
#7
Updated the multiple items version to improve performance. It still functions identical to the original version. The only difference is it will store the item immediately when it reaches your current item, rather than redundantly checking the rest of the items.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)