Mario Kart Wii Gecko Codes, Cheats, & Hacks
how to change base speed in the middle of the race? - Printable Version

+- Mario Kart Wii Gecko Codes, Cheats, & Hacks (https://mariokartwii.com)
+-- Forum: Hacks/Modding (https://mariokartwii.com/forumdisplay.php?fid=14)
+--- Forum: Code Support / Help / Requests (https://mariokartwii.com/forumdisplay.php?fid=61)
+--- Thread: how to change base speed in the middle of the race? (/showthread.php?tid=1917)



how to change base speed in the middle of the race? - weeg - 11-20-2021

i made this really simple code that changes the base speed of the game if a flag is set. however, when the code gets executed, the speedometer still shows the old speed (speedometer shows 84.01 as max non-wheelie speed before the code is executed on funky flame, same after it gets executed) but if i respawn, speedometer shows 84.85 (updated speed) as the max non-wheelie speed. i tried to run some function in hope that the speedometer would show the updated speed (0x80574304, aka the updateVehicleSpeed function), but the game would just crash.

Code:
#To be inserted at 80571CA4
head:
  lis r11, 0x8000
  lbz r10, 0x1d0(r11)
  cmpwi r10, 1

  beq set
  b not


set:
  lis r12, 0x42b4 #r12=90 in float
  stw r12, 24(r3)
  b def

not:
  lis r12, 0x42a8 #r12=84 in float

def:
  lfs f1, 24(r3) #default instruction



RE: how to change base speed in the middle of the race? - Vega - 11-21-2021

Hello weeg! Welcome to MarioKartWii.com.

In regards to your code issue, it may be an Vehicle Speed vs XYZ Speed ordeal. When you use the term 'speedometer', are you referring to Stebler's pretty speedometer? I know in his old version (he released a new version today), it used vehicle speed. Not sure on the new version though.

Another reason for the issue could be the hook address(s) used on whatever speedometer you used for testing is unreliable.