Customizable Scorestreaks [TheNinjaKingOW and Vega]
#1
The code will give players items based on how many players you hit. Your streak will reset if you are hit by an item.

NTSC-U:
c258B0D8 00000003
9004000c 3d808000
39600000 996c01b0
60000000 00000000
c258B0B4 00000003
90040008 3d808000
896c01b0 396b0001
996c01b0 00000000
C27E4B88 00000014
2C1F0000 40820094
3D808000 898C01B0
2C0C0003 39600001
38000002 41820074
2C0C0005 39600001
38000003 41820064
2C0C0008 39600003
38000010 41820054
2C0C000C 39600003
38000011 41820044
2C0C000F 39600001
38000009 41820034
2C0C0012 39600001
3800000B 41820024
2C0C0015 39600001
38000007 41820014
2C0C0019 39600001
38000008 40A2000C
91640090 9004008C
8004008C 00000000
c252E968 00000003
38000001 3d808000
618c01b0 39600000
996c0000 00000000

PAL:
c25918FC 00000003
9004000c 3d808000
39600000 996c01b0
60000000 00000000
c258B0B4 00000003
90040008 3d808000
896c01b0 396b0001
996c01b0 00000000
C27EEE98 00000014
2C1F0000 40820094
3D808000 898C01B0
2C0C0003 39600001
38000002 41820074
2C0C0005 39600001
38000003 41820064
2C0C0008 39600003
38000010 41820054
2C0C000C 39600003
38000011 41820044
2C0C000F 39600001
38000009 41820034
2C0C0012 39600001
3800000B 41820024
2C0C0015 39600001
38000007 41820014
2C0C0019 39600001
38000008 40A2000C
91640090 9004008C
8004008C 00000000
c25334B0 00000003
38000001 3d808000
618c01b0 39600000
996c0000 00000000

NTSC-J:
c259127C 00000003
9004000c 3d808000
39600000 996c01b0
60000000 00000000
c2591258 00000003
90040008 3d808000
896c01b0 396b0001
996c01b0 00000000
C27EE504 00000014
2C1F0000 40820094
3D808000 898C01B0
2C0C0003 39600001
38000002 41820074
2C0C0005 39600001
38000003 41820064
2C0C0008 39600003
38000010 41820054
2C0C000C 39600003
38000011 41820044
2C0C000F 39600001
38000009 41820034
2C0C0012 39600001
3800000B 41820024
2C0C0015 39600001
38000007 41820014
2C0C0019 39600001
38000008 40A2000C
91640090 9004008C
8004008C 00000000
c2532E30 00000003
38000001 3d808000
618c01b0 39600000
996c0000 00000000

NTSC-K:
c257F954 00000003
9004000c 3d808000
39600000 996c01b0
60000000 00000000
c257F930 00000003
90040008 3d808000
896c01b0 396b0001
996c01b0 00000000
C27DD258 00000014
2C1F0000 40820094
3D808000 898C01B0
2C0C0003 39600001
38000002 41820074
2C0C0005 39600001
38000003 41820064
2C0C0008 39600003
38000010 41820054
2C0C000C 39600003
38000011 41820044
2C0C000F 39600001
38000009 41820034
2C0C0012 39600001
3800000B 41820024
2C0C0015 39600001
38000007 41820014
2C0C0019 39600001
38000008 40A2000C
91640090 9004008C
8004008C 00000000
c2521508 00000003
38000001 3d808000
618c01b0 39600000
996c0000 00000000

Reset Score if hit
Code:
loc_0x0:
  stw r0, 12(r4)
  lis r12, 0x8000
  li r11, 0x0
  stb r11, 432(r12)




Add point to score if you hit a player
Code:
loc_0x0:
  stw r0, 8(r4)
  lis r12, 0x8000
  lbz r11, 432(r12)
  addi r11, r11, 0x1
  stb r11, 432(r12)




Scorestreak Table
Code:
start:
  lis r12, 0x8000
  lbz r12, 432(r12)

  cmpwi r12, 0x3 #Item 1
  li r11, 0x1
  li r0, 0x2
  beq- store_to_mem

  cmpwi r12, 0x5 #Item 2
  li r11, 0x1
  li r0, 0x3
  beq- store_to_mem

  cmpwi r12, 0x8 #Item 3
  li r11, 0x3
  li r0, 0x10
  beq- store_to_mem
 
  cmpwi r12, 0xC #Item 4
  li r11, 0x3
  li r0, 0x11
  beq- store_to_mem

  cmpwi r12, 0xF #Item 5
  li r11, 0x1
  li r0, 0x9
  beq- store_to_mem

  cmpwi r12, 0x12 #Item 6
  li r11, 0x1
  li r0, 0xB
  beq- store_to_mem

  cmpwi r12, 0x15 #Item 7
  li r11, 0x1
  li r0, 0x7
  beq- store_to_mem

  cmpwi r12, 0x19 #Item 8
  li r11, 0x1
  li r0, 0x8
  bne+ end

store_to_mem:
  stw r11, 144(r4)
  stw r0, 140(r4)

end:




Reset value to 0 if race countdown occurs (if the value you had of the previous race is kept as the same score as a scorestreak, you will start with an item)
Code:
loc_0x0:
  li r0, 0x1
  lis r12, 0x8000
  ori r12, r12, 0x1B0
  li r11, 0x0
  stb r11, 0(r12)
~MarioKartWii.com #1~
Reply
#2
Video showing off code: https://www.youtube.com/watch?v=staEOPXkoxg
~MarioKartWii.com #1~
Reply
#3
A quick update by Vega. The Scorestreak table source is a bit easier to read.

Known "Issues":
- If the player ends the race on an exact score that would lead to an item, the next race the player will have only 1x of that item. (it is intended to not start at all with it)
~MarioKartWii.com #1~
Reply
#4
It appears you forgot the port the 3rd ASM on the PAL version
Reply
#5
(02-14-2021, 09:54 PM)Vega Wrote: It appears you forgot the port the 3rd ASM on the PAL version
I did? Huh, I'll fix it right away!
~MarioKartWii.com #1~
Reply
#6
4th, my bad, my eyes are old lol
Reply
#7
Hi, nice to meet you!
I want to play online with my friends using this code, but I can't because it doesn't support. Is it possible to make it support online play?
Reply
#8
(02-20-2021, 04:45 PM)Yazuz Wrote: Hi, nice to meet you!
I want to play online with my friends using this code, but I can't because it doesn't support. Is it possible to make it support online play?
Hello! It should support online play, the fact that it crashes is because you are spamming items too fast. Try using this code along side my code (https://mkwii.com/showthread.php?tid=404).
~MarioKartWii.com #1~
Reply
#9
(02-20-2021, 05:41 PM)TheNinjaKingOW Wrote:
(02-20-2021, 04:45 PM)Yazuz Wrote: Hi, nice to meet you!
I want to play online with my friends using this code, but I can't because it doesn't support. Is it possible to make it support online play?
Hello! It should support online play, the fact that it crashes is because you are spamming items too fast. Try using this code along side my code (https://mkwii.com/showthread.php?tid=404).

That's not what I meant. Please watch my video.

https://streamable.com/2lxk9y

This code, as shown in the video, does not give guests any items even if they hit it, and only the room host is able to use items.
Reply
#10
Hmm, interesting. Are you sure everyone in the room is running the code?
~MarioKartWii.com #1~
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)