Jump to content
musiclover350

Post-race extended time: make players use warp?

Recommended Posts

musiclover350

So, as we all know, it is possible to hex edit the .exe file to extend the amount of time a race lasts upon completion of the final lap.

 

As an extension of that, I was wondering if anyone had any ideas as to whether it's even possible to mod the game so the player car uses warps after a race is completed? It's always bothered me that my car never uses warps after a race finishes.

 

Hex editor? Editing some file within the extracted jam? Anyone have any thoughts?

Share this post


Link to post
Share on other sites
aidenpons

IIRC the player will use a warp during the post-race period if the "all bricks are green" and "all bricks are max level" cheats are used. This suggests that there might be some way of getting warps to be used post-race.

 

It'd definitely be hiding in the .exe, but I have no clue how you'd find what you are looking for...

Share this post


Link to post
Share on other sites
Quisoves Potoo
3 hours ago, aidenpons said:

IIRC the player will use a warp during the post-race period if the "all bricks are green" and "all bricks are max level" cheats are used. This suggests that there might be some way of getting warps to be used post-race.

Good point. This strengthens my suspicion that the game checks to see if the powerup level is below 4.

3 hours ago, aidenpons said:

It'd definitely be hiding in the .exe, but I have no clue how you'd find what you are looking for...

It probably wouldn't be easy, but if you want to try, IDA is your gal. You'd probably be looking for something to the effect of "JA 3" or "JB 4", although finding the right instance would be like finding a needle in a haystack.

Share this post


Link to post
Share on other sites
grappigegovert

So, I figured out how to make this possible (edit the two bytes at 0x38FD2 from 0x7410 to 0x9090 (1999nodrm ver)),

but unfortunately, the player does not move forward with this warp. I'm not sure why.

Share this post


Link to post
Share on other sites
musiclover350

I suppose there might be some sort of check, not only for the level of powerup being used, but also for the distance being traveled by the warp.

 

Much thanks for the hexedit @grappigegovert but unfortunately, I have the 2001 release...you wouldn't happen to have any idea where in the .exe it would be in that case do you?

 

Edit: @Quisoves PotooI tried using IDA but it was all a bunch of Egyptian hieroglyphics to me. I had no idea where to even begin

Share this post


Link to post
Share on other sites
grappigegovert

For the 2001 version, you'll want to change two bytes at 0x1F772 from 0x7410 to 0x9090.
It looks like in the 2001 version, the car at least keeps driving its intended route (still no warp forward), in the 1999 version, the car kind of got stuck.

After one full lap passes, the car switches over to use an RRB file instead of using the wacky AI, and warps will work from that point on.

Share this post


Link to post
Share on other sites
musiclover350

Perfect, thank you so much!

 

EDIT: If I PM you would you mind explaining to me how you found out what to edit in the EXE? I'd like to find these things out for myself going forward

Share this post


Link to post
Share on other sites
Xir

If I recall, even prior to these bytes changes via cheats active, the warps still don't take you anywhere forward, so useless warps is pretty normal. You know, if you do find what makes them useless, would it be possible you could do the opposite and make them more effective than normal? 🤔

 

14 hours ago, musiclover350 said:

EDIT: If I PM you would you mind explaining to me how you found out what to edit in the EXE? I'd like to find these things out for myself going forward

Why private learn when everyone can learn? :D

Share this post


Link to post
Share on other sites
grappigegovert

I've got bits and pieces of LR mapped out, so I knew that the function at 0x39100 is the function that gets called to use a powerup. (using the 1999nodrm adresses here).
I then debugged this function to see what function called it whenever the player used a powerup after finishing, and ended up in this in this function:

?do=download

(Screenshot from IDA, note that this is only the last part of this function)
In green, I've circled the part where the game checks if the racer has finished the race. (I didn't know beforehand that this particular bit indicated having finished the race, but I knew this address stored some flags).

If the racer has not finished the race, the jz jump is followed (the green arrow), and the code checking for 3 white bricks is skipped.

If the racer has finished the race, the jump is not followed (red arrow), and the amount of white bricks is checked.

In my above posts, I've instructed to change the jump in purple to NOPs, ensuring that the game always follows the red arrow, thus ending up calling the powerup function instead of skipping it.
By the way, this check is only done for green powerups, the other 3 powerups follow the remaining 3 arrows pointing into the 'call powerup' block.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×

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.