Online Name Icon Modifier [B_squo]
#1
Online Name Icon Modifier [B_squo]

# Forces an specific rank icon above yourself online (assuming you're not a Guest)

(PAL)
046436a0 3860000X

(NTSC-U)
04612280 3860000X

(NTSC-J)
04642d0c 3860000X

(NTSC-K)
046319b8 3860000X

X Values:
- 0: No Wii Wheel, No Stars
- 1: No Wii Wheel, 1 Star
- 2: No Wii Wheel, 2 Stars
- 3: No Wii Wheel, 3 Stars
- 4: White Wii Wheel, No Stars
- 5: White Wii Wheel, 1 Star
- 6: White Wii Wheel, 2 Stars
- 7: White Wii Wheel, 3 Stars
- 8: Golden Wii Wheel, No Stars
- 9: Golden Wii Wheel, 1 Star
- A: Golden Wii Wheel, 2 Stars
- B: Golden Wii Wheel, 3 Stars

Code creator: B_squo
Reply
#2
I’ll probably need to test this myself but I have two questions.

1.) Is the icon you set visible on others screens
2.) Could this address be modified in-between races to change the rank above you?
~MarioKartWii.com #1~
Reply
#3
(12-23-2024, 02:18 AM)Zeraora Wrote: I’ll probably need to test this myself but I have two questions.

1.) Is the icon you set visible on others screens
2.) Could this address be modified in-between races to change the rank above you?
1.) Yes
2.) It can be. Made a code to test this. If a player's VR is above a certain threshold, it changes your rank.

NTSC-U:
Code:
C2612280 00000017
3D80809C 818C8F88
A18C0036 3D60809C
816B8F88 816B0014
3D400000 614A8CC0
7D8C51D6 398C00B8
7D8C5A2E 2C0C1195
41800044 2C0C2329
41800044 2C0C34BD
41800044 2C0C4651
41800044 2C0C57E5
41800044 2C0C6979
41800044 2C0C7B0D
41800044 2C0C7B0C
41810044 38600000
48000044 38600004
4800003C 38600005
48000034 38600006
4800002C 38600007
48000024 38600008
4800001C 38600009
48000014 3860000A
4800000C 3860000B
48000004 00000000
------------------
loc_0x0:
.set saveManager, 0x809B8F88

saveManagerCode: 
  lis r12, saveManager@ha
  lwz r12, saveManager@l (r12)
  lhz r12, 0x0036 (r12)

#RKSYS.dat file load
  lis r11, 0x809C
  lwz r11, -0x7078 (r11)
  lwz r11, 0x0014 (r11)

#Take net license value, and use it as the value to multiply 0x8CC0 by
  lis r10, 0
  ori r10, r10, 0x8CC0
  mullw r12, r12, r10
  addi r12, r12, 0xB8
  lhzx r12, r12, r11

#VR Comparing for specifying ranks
  cmpwi r12, 4501
  blt bronze
  cmpwi r12, 9001
  blt silver
  cmpwi r12, 13501
  blt gold
  cmpwi r12, 18001
  blt platinum
  cmpwi r12, 22501
  blt diamond
  cmpwi r12, 27001
  blt masters
  cmpwi r12, 31501
  blt grandmasters
  cmpwi r12, 31500
  bgt champion
  li r3, 0
  b end

#Changes Rank for You
bronze:
  li r3, 0x4
  b end

silver:
  li r3, 0x5
  b end

gold:
  li r3, 0x6
  b end

platinum:
  li r3, 0x7
  b end

diamond:
  li r3, 0x8
  b end

masters:
  li r3, 0x9
  b end

grandmasters:
  li r3, 0xA
  b end

champion:
  li r3, 0xB
  b end

end:
~MarioKartWii.com #1~
Reply
#4
Since we have a symbol map nowadays, you can look thru all the VR related funcs.

The func at 80662d84 (PAL) writes your VR to your USER Packet for the purpose displaying to others right before course vote (all clients can see everyone's USER Packet data)

So an easy way would be to hook a code at the end of that VR func (the instruction that writes the VR via sth), and have it also write the VR to a spot in the EVA

On the second code (making a C2 code hooked at the Name Icon func, it may be better to do some division formula instead of a series of cmpwi-branches. Will be a much shorter code. However, it won't be faster because divide instructions take forever to execute.

The Rank determination is based on the VR of the current specific license used instead of aggregate VR of all licenses.

Untested, here's the source for both codes



#Addresses
#NTSC-U
#PAL 80662dbc
#NTSC-J
#NTSC-K
#Write VR (r0 half) to EVA
lis r12, 0x8000
sth r0, 0x00C0 (r3) #OG Instruction
sth r0, 0x1500 (r12)



#Addresses
#NTSC-U 80612280
#PAL 806436a0
#NTSC-J 80642d0c
#NTSC-K 806319b8
#Set Online Name Icon (r3 byte) based on VR
#VR / 800 is Rank
lis r11, 0x8000
li r12, 800
lhz r10, 0x1500 (r11)
divwu r3, r10, r12 #divw and divwu always round towards zero (i.e. 10.4 rounds to 10, 12.8 rounds to 12, etc)
Reply
#5
(12-23-2024, 06:57 PM)Vega Wrote: Since we have a symbol map nowadays, you can look thru all the VR related funcs.

The func at 80662d84 (PAL) writes your VR to your USER Packet for the purpose displaying to others right before course vote (all clients can see everyone's USER Packet data)

So an easy way would be to hook a code at the end of that VR func (the instruction that writes the VR via sth), and have it also write the VR to a spot in the EVA

On the second code (making a C2 code hooked at the Name Icon func, it may be better to do some division formula instead of a series of cmpwi-branches. Will be a much shorter code. However, it won't be faster because divide instructions take forever to execute.

The Rank determination is based on the VR of the current specific license used instead of aggregate VR of all licenses.

Untested, here's the source for both codes



#Addresses
#NTSC-U
#PAL 80662dbc
#NTSC-J
#NTSC-K
#Write VR (r0 half) to EVA
lis r12, 0x8000
sth r0, 0x00C0 (r3) #OG Instruction
sth r0, 0x1500 (r12)



#Addresses
#NTSC-U 80612280
#PAL 806436a0
#NTSC-J 80642d0c
#NTSC-K 806319b8
#Set Online Name Icon (r3 byte) based on VR
#VR / 800 is Rank
lis r11, 0x8000
li r12, 800
lhz r10, 0x1500 (r11)
divwu r3, r10, r12 #divw and divwu always round towards zero (i.e. 10.4 rounds to 10, 12.8 rounds to 12, etc)

A couple of things:

1.) The method I used in the first code goes into save data and should only reason the VR that is on the currently selected license (That’s what it is supposed to do but I forgot to add in the method for multiplying the offset to read it properly)

2.) Your rank distribution system is really good for systems that don’t have special properties. For example, during the pre-alpha development phase of my ranked play mod, I made a 1:1 copy of the Overwatch 1 ranking system. This system goes from 1vr to 5000vr and has ranks in 500vr increments except if the player is below 1500vr or above 4000vr. So, using your system you’d either need to check for these special properties or, simply edit the Font.szs and copy paste the icons for the ranks that are the same.

I’ll most likely be using your source for my mod (with proper credit to you and b_squo) and I’d be making some adjustments.
~MarioKartWii.com #1~
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)