Advantageous Character/Vehicle Selection
#1
Advantageous Character/Vehicle Selection

This code will select the 'best' character/vehicle combination for whatever track is chosen in the lottery for the race. Everything is done automatically. Whatever character you choose to start the WW/Room with is what will be shown during every track vote. Be sure to choose Manual when starting the WW/Room.

NOTE about using this on Wiimmfi: Even though changing characters in between races online is allowed in Wiimmfi, this code may get you banned. Simply because this code does give you quite an advantage in WW's.

Tracks that use Daisy w/ Mach:
rDKJP
rDKM

Tracks that use Toadette w/ Magi:
rSL
rSGB

Tracks that use Funky w/ Spear:
LC
MC
rPB
rYF

All other tracks will use Funky w/ Flame Runner

NTSC-U
C2659400 0000000F
899C003C 2C0C00FF
41820064 2C0C0000
4182004C 2C0C0008
41820044 2C0C0010
4182003C 2C0C0013
4182002C 2C0C0014
4182002C 2C0C001B
4182002C 2C0C001D
41820014 2C0C001F
4182001C 39801617
48000018 39800F16
48000010 39801620
48000008 39800D1E
B19C001C 909C000C
60000000 00000000

PAL
C266133C 0000000F
899C003C 2C0C00FF
41820064 2C0C0000
4182004C 2C0C0008
41820044 2C0C0010
4182003C 2C0C0013
4182002C 2C0C0014
4182002C 2C0C001B
4182002C 2C0C001D
41820014 2C0C001F
4182001C 39801617
48000018 39800F16
48000010 39801620
48000008 39800D1E
B19C001C 909C000C
60000000 00000000

NTSC-J
C26609A8 0000000F
899C003C 2C0C00FF
41820064 2C0C0000
4182004C 2C0C0008
41820044 2C0C0010
4182003C 2C0C0013
4182002C 2C0C0014
4182002C 2C0C001B
4182002C 2C0C001D
41820014 2C0C001F
4182001C 39801617
48000018 39800F16
48000010 39801620
48000008 39800D1E
B19C001C 909C000C
60000000 00000000

NTSC-K
C264F654 0000000F
899C003C 2C0C00FF
41820064 2C0C0000
4182004C 2C0C0008
41820044 2C0C0010
4182003C 2C0C0013
4182002C 2C0C0014
4182002C 2C0C001B
4182002C 2C0C001D
41820014 2C0C001F
4182001C 39801617
48000018 39800F16
48000010 39801620
48000008 39800D1E
B19C001C 909C000C
60000000 00000000



Source:
####################
###START ASSEMBLY###
####################

#

####################
##Load Track Value##
####################

lbz r12, 0x003C (r28) #Load the byte from address of 28 plus offset 0x3C into r12. This is the lottery selected track byte.

######################################
##Check If Track Has Been Picked Yet##
######################################

cmpwi r12, 0xFF #Compare r12 to value of 0xFF
beq- tracknot_pickedyet #If value in r12 is equal to 0xFF, then we know the lottery hasn't been initiated yet. Skip entire code.

######################
##Check Track Values##
######################

cmpwi r12, 0x00 #Mario Circuit
beq- fk_spear
cmpwi r12, 0x08 #Luigi Circuit
beq- fk_spear
cmpwi r12, 0x10 #GCN Peach Beach
beq- fk_spear
cmpwi r12, 0x13 #GCN DK Mountain
beq- daisy_mach
cmpwi r12, 0x14 #DS Yoshi Falls
beq- fk_spear
cmpwi r12, 0x1B #N64 Sherbet Land
beq- toadette_magi
cmpwi r12, 0x1D #N64 DK's Jungle Parkway
beq- daisy_mach
cmpwi r12, 0x1F #GBA Shy Guy Beach
beq- toadette_magi

##All other tracks will set Funky Kong w/ Flame Runner##

li r12, 0x1617 #Load 0x1617 into r12. This will set Funky Kong w/ Flame Runner
b the_end #Jump to the_end label

#########################
##Daisy Mach Bike Label##
#########################

daisy_mach:
li r12, 0x0F16 #Load 0x0F16 into r12. This will set Daisy w/ Mach Bike.
b the_end #Jump to the_end label

##########################
##Funky Kong Spear Label##
##########################

fk_spear:
li r12, 0x1620 #Load 0x1620 into r12. This will set Funky w/ Spear.
b the_end #Jump to the_end label

##############################
##Toadette Magikruiser Label##
##############################

toadette_magi:
li r12, 0x0D1E #Load 0D1E into r12. This will set Toadette w/ Magi.

#################
##The_End Label##
#################

the_end:
sth r12, 0x001C (r28) #Store the character/vehicle halfword value to the address of r28 plus offset 0x1C.

#########################################
##Default ASM; Tracknot_Pickedyet Label##
#########################################

tracknot_pickedyet:
stw r4, 0x000C (r28) #Default ASM

#

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



Code creator: zak
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)