Positional Selective Item Max Probability [Vega]
#1
Positional Selective Item Max Probability [Vega]

This code will increase the odds of you getting your desired item to 100% based on the P (position in race, see values below) you set in the code. This doesn't guarantee your item, but if the item is available and you are in the correct position you set in this code, you will get your item. Keep in mind that if you are not in the correct position you set in this code, you won't get your desired item even if it is available.

The 'flaw' in this particular code is that you can possibly get an available item in an illegitimate position (Example: P value 1 for 1st Position, Item set to Bull Shell, Blue Shell is available for play, you get Blue in 1st, this is not possible w/o cheats)

If you are looking for a "Perfect" version of a code editing Item Probabilities, go to this thread - https://mkwii.com/showthread.php?tid=928

How the code works~
When you hit a box, your position is checked
If you are in the correct position, your item probability table is modified for your desired item to it's highest possible value the game allows.
If not in correct position, code simply doesn't execute

NTSC-U
C27ACB64 00000005
3868FFFE 3C808165
396000E4 A5830002
B5840002 356BFFFF
4082FFF4 7FE3FB78
60000000 00000000
C27ACBC4 00000008
80850004 3D808164
818C0000 2C0C0000
40A2002C 3984FFFE
396000E4 7D6903A6
3D608165 A6EC0002
B6EB0002 4200FFF8
3D808164 39600001
916C0000 00000000
2834XXXX YYYYZZZZ
C27ACBC8 00000005
2C19000P 40A20018
7EE41A14 398000WW
7D776214 39807FFF
B18B0000 2C000000
60000000 00000000
E0000000 00000000
2834XXXX YYYYZZZZ
C27ACBC8 00000005
3964FFFE 3D808165
3AE000E4 7EE903A6
A6EC0002 B6EB0002
4200FFF8 2C000000
60000000 00000000
E0000000 80008000

PAL
C27BB5C4 00000005
3868FFFE 3C808165
396000E4 A5830002
B5840002 356BFFFF
4082FFF4 7FE3FB78
60000000 00000000
C27BB624 00000008
80850004 3D808164
818C0000 2C0C0000
40A2002C 3984FFFE
396000E4 7D6903A6
3D608165 A6EC0002
B6EB0002 4200FFF8
3D808164 39600001
916C0000 00000000
2834XXXX YYYYZZZZ
C27BB628 00000005
2C19000P 40A20018
7EE41A14 398000WW
7D776214 39807FFF
B18B0000 2C000000
60000000 00000000
E0000000 00000000
2834XXXX YYYYZZZZ
C27BB628 00000005
3964FFFE 3D808165
3AE000E4 7EE903A6
A6EC0002 B6EB0002
4200FFF8 2C000000
60000000 00000000
E0000000 80008000

NTSC-J
C27BAC30 00000005
3868FFFE 3C808165
396000E4 A5830002
B5840002 356BFFFF
4082FFF4 7FE3FB78
60000000 00000000
C27BAC90 00000008
80850004 3D808164
818C0000 2C0C0000
40A2002C 3984FFFE
396000E4 7D6903A6
3D608165 A6EC0002
B6EB0002 4200FFF8
3D808164 39600001
916C0000 00000000
2834XXXX YYYYZZZZ
C27BAC94 00000005
2C19000P 40A20018
7EE41A14 398000WW
7D776214 39807FFF
B18B0000 2C000000
60000000 00000000
E0000000 00000000
2834XXXX YYYYZZZZ
C27BAC94 00000005
3964FFFE 3D808165
3AE000E4 7EE903A6
A6EC0002 B6EB0002
4200FFF8 2C000000
60000000 00000000
E0000000 80008000

NTSC-K
C27A9984 00000005
3868FFFE 3C808165
396000E4 A5830002
B5840002 356BFFFF
4082FFF4 7FE3FB78
60000000 00000000
C27A99E4 00000008
80850004 3D808164
818C0000 2C0C0000
40A2002C 3984FFFE
396000E4 7D6903A6
3D608165 A6EC0002
B6EB0002 4200FFF8
3D808164 39600001
916C0000 00000000
2833XXXX YYYYZZZZ
C27A99E8 00000005
2C19000P 40A20018
7EE41A14 398000WW
7D776214 39807FFF
B18B0000 2C000000
60000000 00000000
E0000000 00000000
2833XXXX YYYYZZZZ
C27A99E8 00000005
3964FFFE 3D808165
3AE000E4 7EE903A6
A6EC0002 B6EB0002
4200FFF8 2C000000
60000000 00000000
E0000000 80008000

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

WW Item Values:
Green = 00
Red = 02
Banana = 04
Fib = 06
Shroom = 08
Triple Shroom = 0A
Bomb = 0C
Blue = 0E
Shock = 10
Star = 12
Golden = 14
Mega = 16
Blooper = 18
Pow = 1A
TC = 1C
Bullet Bill = 1E
Triple Green = 20
Triple Red = 22
Triple Banana = 24



List of ASM Sources:
Source (1st ASM; re-backup Game's Item Table if In-Race Room Size decreases during Race):
##################
##START ASSEMBLY##
##################

#

###############################
##Loop Loading Address Config##
###############################

addi r3, r8, -0x0002 #Do a minus -0x2 on the mem location of r8 and store it in r3. this mem location is exactly -0x2 away from the very first halfword for the item probability table which is the halfword for 1st place Green Shell probability

####################################
##Item Table Mem 81 Address Config##
####################################

lis r4, 0x8165 #Set 1st half address for where the overwritten table will be stored if room size ever decreases during race

#########################################
##Subic. Loop Countdown Register Config##
#########################################

li r11, 0xE4 #Load E4 in r11, there are a total of E4 halfwords for the entire item probability table

###################
##De_crement Loop##
###################

de_crement:
lhzu r12, 0x0002 (r3) #First, load the first halfword of the item table, increase mem location by 0x2 every time this ASM is done to load the next halfword of the table
sthu r12, 0x0002 (r4) #First, store the current halfword item probability value to mem location 0x81650002. The address will increase by 0x2 every time this ASM is done so each halfword it in its own space.
subic. r11, r11, 1 #Subtract one from r11 every time this ASM is done. Thus this will cause exactly E4 amount of halfwords to be loaded and stored
bne+ de_crement #If r11 does NOT equal 0, jump backwards to lhzu and repeat. If r11 does equal 0, continue down to next ASM

###############
##Default ASM##
###############

mr r3, r31 #Default ASM

#####################################################
##Notes About Using Registers 3 & 4 w/o Restoration##
#####################################################

##In the default ASM, r3 gets written to after this entire code is executed, so it is safe for use##
##The next function at the following address, r4 gets written with the variables of r31 and integer 24##

#

##################
###END ASSEMBLY###
##################



Source (2nd ASM; backup Game's entire Item Table. Please note that if in-race room size decreases before you grab first box, that it is not an issue. As this ASM will be executed after the 1st ASM):
##################
##START ASSEMBLY##
##################

#

###############
##Default ASM##
###############

lwz r4, 0x0004 (r5) #Default ASM


######################
##Load Status Number##
######################

lis r12, 0x8164 #Set up first half address for where the status check number will be read/stored
lwz r12, 0 (r12) #Load the status check number from mem location 0x81640000. If the ASM is being executed for the very first time of race, this number will always be 0, thus the first/original version of the item table for that race room size for the exact time when you pick up your first box

##############################
##Status Number Verification##
##############################

cmpwi r12, 0x0 #Compare status check number value to 0
bne+ dont_backuptable #If NOT equal to 0, skip entire code, don't backup first/original item table

############################
##Loop Load Address Config##
############################

addi r12, r4, -0x0002 #Add -0x2 to mem location of r4, store result into r15. The mem location on r15 will be exactly -0x2 away from the very first halfword for the item table which is the halfword for 1st place Green Shell probability

##############
##CTR Config##
##############

li r11, 0xE4 #Load E4 in r11, there are a total of E4 halfwords for the entire item probability table
mtctr r11 #Copy the value of r11 to the CTR

####################################
##Item Table Mem 81 Address Config##
####################################

lis r11, 0x8165 #Set 1st half address for where the first/original table will be stored (this will be whatever the table is configured as when you pick up your first box)

###################
##De_crement Loop##
###################

de_crement:
lhzu r23, 0x0002 (r12) #First, load the first halfword of the game's item table, increase mem location by 0x2 every time this ASM is done to load the next halfword of the table
sthu r23, 0x0002 (r11) #First, store the current halfword item probability value to mem location 0x81650002. The address will increase by 0x2 every time this ASM is done so each halfword it in its own space.
bdnz+ de_crement #If CTR is not 0, branch back to the start of the loop and repeat

#############################
##Status Number Application##
#############################

lis r12, 0x8164 #Set up first half address for where the status check number will be read/stored
li r11, 0x1 #Now that first/original table is stored. We don't want this code to execute again for the rest of the race. Load 1 into r11 for new status check number
stw r11, 0 (r12) #Store status check number of 1 (don't execute again for rest of race) to mem location 0x81640000. Pls note that Mem 81 is reset by the game every race (cleared), no need for a deactivator for this ASM

dont_backuptable:

########################################
##Note about using r23 w/o restoration##
########################################

##r23 gets written to at a later address with the function add r23, r4, r3##
##Therefore, it is safe to use freely##

#

##################
###END ASSEMBLY###
##################



Source (3rd ASM, Max Out Desired Item's Probability. Only execute if the User's P (Positional) Value is true. Code activated.):
##################
##START ASSEMBLY##
##################

#

##################
##Position Check##
##################

##r25 always holds your position##

cmpwi r25, 0xP #Compare position to user's set value
bne+ dont_execute #If not equal, do not execute code. Jump to dont_execute label

###########################################################################
##Navigate to your 'Positional Row' on the Game's Item Table; Default ASM##
###########################################################################

add r23, r4, r3 #Default ASM; Add contents of item table first halfword location and r3, this will put you on the halfword location for green shell for whatever position you are in when you grab a box. Result is stored in r23.

#######################
##Set Your Item Value##
#######################

li r12, 0xWW #Load user's desired item value (WW)

##############################################################
##Find Your Item Halfword Location On Current Positional Row##
##############################################################

add r11, r23, r12 #Take item value and add it to the mem address of the location for green sheel on the current 'positional row' of the item table. You will now be at your item's exact spot on the item table based on your current position

###########################################
##Apply Max Item Probability Value (7FFF)##
###########################################

li r12, 0x7FFF #Load 0x7FFF into r12
sth r12, 0 (r11) #Store 0x7FFF value to address of r11

###################################
##Dont_execute label; Default ASM##
###################################

dont_execute:
cmpwi r0, 0 

#

################
##END ASSEMBLY##
################



Source (4th ASM; restore latest revision of Game's Table. Code de-activated.):
####################
###START ASSEMBLY###
####################

#

#############################
##Loop Store Address Config##
#############################

addi r11, r4, -0x2 #Add -0x2 to mem location of r4, store result into r11. The mem location on r11 will be exactly -0x2 away from the very first halfword for the item table which is the halfword for 1st place Green Shell probability

####################################
##Item Table Mem 81 Address Config##
####################################

lis r12, 0x8165 #Set 1st half address from where the current item table will be restored

###############################
##Count Register (CTR) Config##
###############################

li r23, 0xE4 #Load E4 in r17, there are a total of E4 halfwords for the entire item probability table
mtctr r23 #Copy r23's value to the PowerPC dedicated count register

###################
##De_crement Loop##
###################

de_crement:
lhzu r23, 0x0002 (r12) #First, load the first halfword of the backed up item table, increase mem location by 0x2 every time this ASM is done to load the next halfword of the backed up table
sthu r23, 0x0002 (r11) #First, store the current halfword backed up item probability value to the halfword value location of the current edited table. The address will increase by 0x2 every time this ASM is done so each halfword it in its own space.
bdnz+ de_crement #Subtract 1 from the CTR every time this loop is done. If the CTR is not equal to zero, jump back to beginning of de_crement loop

###############
##Default ASM##
###############

cmpwi r0, 0 #Default ASM

#########################################
##Notes about using r23 w/o restoration##
#########################################

##The default ASM writes to r23 after this whole code is executed, so it is safe for use w/o restoration##

#

##################
###END ASSEMBLY###
##################



Code creator: Vega
Code credits: XeR (address founder of 2nd, 3rd and 4th ASMs)
Reply
#2
Hi Vega, i think this code is awesome and i have questions in different scenarios:


No one has shock 
1) if i use this to max 9th place prob of getting shock,  10th place can get another lighting ? or this is legit so will be unavailable to 10th place
2) if max out 10th place prob , will be impossible to 9th to get a shock ? 


someone already have shock
3) if 10th place already have shock, this code will give me another one if im in 9th ?
4) if 9th place already have shock, this code will give me another one if im in 10th ?




thanks in andvance !
Reply
#3
can i use the code 3 times ?

i mean one for the shock in 10th, one for the mega in 5th and one fore star in 8th ? or it will just apply one 

thanks
Reply
#4
Photo 
Im getting and error trying to convert code to GCT


Attached Files Thumbnail(s)
   
Reply
#5
You need to fill in the button activator values which are the XXXX, YYYY and ZZZZ.
This link will help you. https://mkwii.com/showthread.php?tid=44
Reply
#6
@Goldi, just an fyi. Most of the item cheats you find on mkwii.com won't work on Wiimmfi-Online due to their security patches.

Btw, here's a better version of this code that follows every item+positional rule in the game - https://mkwii.com/showthread.php?tid=928
Reply
#7
@Vega Isn't that code (Perfect Item Code) banned on wiimmfi as of patcher v71 (2020-06-03) at least thats what Star said on https://mkwii.com/showthread.php?tid=1537
Reply
#8
Yes, all 3 of the item cheats I have made (Selective Max Item Prob, Pos Selective Max Item Prob, and Perfect Item Code) will not work on online public Wiimmfi races/battles. Xer's classic GOD code also doesn't work. According to Leseratte, the codes (plus all other various blocked codes) should still work in private rooms.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)