(05-18-2024, 05:20 PM)Fifty Wrote: I've been wondering, is there a way to just modify the 1v1 item probability values? Or are the 1v1 item odds based off of the 12 player odds and you have to modify it that way?
Would be useful to know, since I do 1v1s often with my friends and it would be nice to have items that actually make sense.
Anything below a 12 player room is calculated using values of the 12 player table. Idk the exact formula.
Yes there is a way, via a code. I frankensteined this up really quick. No idea if it works
NTSC-U
C27AC3C0 00000002
3D808000 992C164F
2C09000C 00000000
C27ACBC4 0000000F
3D808000 896C164F
2C0B0002 80850004
40A20060 7D8802A6
48000051 00000000
00000000 00000000
00000000 00000000
00000000 00000000
00000000 00000000
00000000 00000000
00000000 00000000
00000000 00000000
00000000 00000000
00000000 00000000
7C8802A6 7D8803A6
60000000 00000000
PAL
C27BAE20 00000002
3D808000 992C164F
2C09000C 00000000
C27BB624 0000000F
3D808000 896C164F
2C0B0002 80850004
40A20060 7D8802A6
48000051 00000000
00000000 00000000
00000000 00000000
00000000 00000000
00000000 00000000
00000000 00000000
00000000 00000000
00000000 00000000
00000000 00000000
00000000 00000000
7C8802A6 7D8803A6
60000000 00000000
Red font is the Item Table for 1st Place.
Blue font is the Item Table for 2nd Place.
Each halfword is an item probability value. If you don't know what a Halfword is, it's 4 hex digits (i.e. 0000)
So the first red halfword is for 1st Place Green shell. Very next halfword is 1st Place Red shell. etc etc til you hit the final red halfword which is for 1st Place Triple Nana. After that you are now in the blue halfwords. So 1st blue halfword is 2nd Place Green. Next is 2nd Place Red. etc etc til you finally hit the halfword for 2nd Place Triple Nana.
The probability values you insert are not of the standard 0-100% decimal type.
How to change Decimal Percent Value to Hex Value for Code.
- Multiply Percent by 2. Change to Hex. Prepend Zeroes to make it Halfword in width
Example 37.5%
37.5 x 2 = 65
65 converted to Hex is 41
0041 would be the Halfword Value to use
Code:
lis r12, 0x8000 #Load 0x8000 into upper 16 bits of r12, lower 16 bits are cleared)
stb r9, 0x164F (r12) #Store byte of r9 (in-race room size) to address 0x8000164F, offset used to complete 2nd half of address
cmpwi r9, 0xC #Default instruction
Code:
#Conditional Item Probability Table Mod
#r4 = Pointer to Table
#Check if In-Race Room size is 2 and only 2
lis r12, 0x8000
lbz r11, 0x164F (r12)
cmpwi r11, 2
lwz r4, 0x0004 (r5) #Original Instruction
bne+ the_end
#It is, Backup LR
mflr 12
#Make the Table
bl item_table
#Create 1v1 Probability Table
.llong 0x0000000000000000 #1st Place Green thru Fib
.llong 0x0000000000000000 #1st Place Shroom thru Blue
.llong 0x0000000000000000 #1st Place Shock thru Mega
.llong 0x0000000000000000 #1st Place Blooper thru Bill
.long 0x00000000 #1st Place Trip Greens thru Trip Reds
.short 0x0000 #1st Place Trip nana
.llong 0x0000000000000000 #2nd Place Green thru Fib
.llong 0x0000000000000000 #2nd Place Shroom thru Blue
.llong 0x0000000000000000 #2nd Place Shock thru Mega
.llong 0x0000000000000000 #2nd Place Blooper thru Bill
.long 0x00000000 #2nd Place Trip Greens thru Trip Reds
.short 0x0000 #2nd Place Trip nana
item_table:
#Update r4 (Table ptr)
mflr r4
#Restore LR
mtlr r12
#End of Code
the_end: