Online Name Icon Modifier [B_squo]
#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


Messages In This Thread
Online Name Icon Modifier [B_squo] - by Vega - 10-01-2024, 08:05 PM
RE: Online Name Icon Modifier [B_squo] - by Vega - 12-23-2024, 06:57 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)