Jump to content
Sign in to follow this  
Noob Slayer

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

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!

Share this post


Link to post
Share on other sites
LegoWorld

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

Share this post


Link to post
Share on other sites
mumboking
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.

Share this post


Link to post
Share on other sites
LegoWorld
On 10/15/2020 at 10:52 PM, mumboking said:

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

What, where?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • 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.