Jump to content

Tutorial: Make Player Car Use AI Physics (post-race)


Noob Slayer
 Share

Recommended Posts

Noob Slayer

First, to clarify: during a race, you will not be able to use AI physics, however after a race ends, this is a different story.

In this tutorial, we will be changing the length of time the race continues after the third lap. Upon completing a lap after the race is over, the player car will start driving using AI physics!

 

Note: This tutorial does require editing your .exe file using a hex editor (HxD is your best bet), so you should make a backup of your .exe file in case you make a mistake. Also, you'll need to enable write permissions for your .exe file. Just right click your .exe (in the LEGO Racers folder, not the desktop shortcut) and click "properties" and go to the security tab.

Permissions.jpg.69928a0716ccb12052d042982ef63584.jpg

 

Open your .exe file in your hex editor. You'll want to go to the offset 0x34EBD (for the 1999 version) or 0x1B4FD (for the 2001 version). This entry is the amount of time until the screen starts fading to black. You'll probably see the value "23 28" here. Take any amount of time in milliseconds (for example, I changed mine to 180,000 milliseconds - 3 minutes) and convert that value to hexadecimal. Your stock Windows calculator should be able to do this.

Calc.jpg.f664344894010c44147adab5b9fdec91.jpg

 

Once you've got your hex value (for mine, it's 2BF20), you'll want to go to this website: https://www.scadacore.com/tools/programming-calculators/online-hex-converter/ and convert the data to float - little endian (DCBA) format. In my case, it's 00 20 BF 02. This is the value you'll want to place into your .exe file. From 00 23 28 00, we get 00 20 BF 02.

HxD.jpg.49d8c847c5db9289420d3cdf8cc024c2.jpg

 

The second entry you'll want to find is at offset 0x34F31 (1999) or 0x1B572 (2001). This is when your race ends and you go back to the menu screen or onto the next race in the circuit. The value you replace this with should be 1 second more than the value you placed earlier. For example, since my race length was changed to 180 seconds, this value should be changed to 181 seconds (181,000 milliseconds). Again, convert this to hex and go to the same website to find your DCBA hex value. For me, it was 00 08 C3 02. This is the value you'll be placing into your .exe.

 

After replacing the data at both offsets, you're ready to save the changes to your .exe file.

 

Special thanks to grappiegovert for helping me out with this!

  • Like 2
Link to comment
Share on other sites

  • 2 years later...
On 10/12/2020 at 8:39 AM, LegoWorld said:

Where can I find the offset 0x34EBD in the hex editor?

Exactly where you said it is. At offset 0x34EBD.

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...

@Noob Slayer When I want to save my changes in HeX Editor I got this message: During backup creation the following error occured: System Error. Code: 5. So I can save but after this  when I start game game then the game will quit from the main menu when I want to click onto something. Pleas could you solve me this problem? But I should put the first entry into the "34EBD" or into the "1B4FC"? Becuase I see here on the picture "1B4FC" and not "34EBD". Thank you in advance.

Link to comment
Share on other sites

  • 7 months later...
On 12/21/2020 at 2:38 PM, LegoWorld said:

@Noob Slayer When I want to save my changes in HeX Editor I got this message: During backup creation the following error occured: System Error. Code: 5. So I can save but after this  when I start game game then the game will quit from the main menu when I want to click onto something. Pleas could you solve me this problem? But I should put the first entry into the "34EBD" or into the "1B4FC"? Becuase I see here on the picture "1B4FC" and not "34EBD". Thank you in advance.

Different hex values for different versions of the game. 34EBD is for the 1999 release, 1B4FD is for the 2001 release. The 1999 version here is the original release requiring the disc to play the game. If you don't need a disc, you probably have the 2001 release. So use 0x1B4FD

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.