Jump to content

Post-race extended time: make players use warp?


Noob Slayer
 Share

Recommended Posts

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?

  • Like 1
Link to comment
Share on other sites

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

Link to comment
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.

Link to comment
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.

  • Like 3
Link to comment
Share on other sites

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

Link to comment
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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Fluffy Cupcake

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

Link to comment
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.

  • Like 4
Link to comment
Share on other sites

  • 2 weeks later...
ReflectedMantis
On 12/3/2018 at 11:01 AM, grappigegovert said:

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.

When the player turns into an AI, it isn't locked into a regular AI path (until it does a full lap on that path, anyway...). Also, it seems like when the player vehicle moves too far away from the AI path it is following it has no idea where it is. It takes the AI path you finished closest to it's loop point and makes your character loosely follow the nodes. As far as I know, when the character starts running into walls like it does sometimes it is because it is trying to get to the node it didn't come close enough to.  (That's the best I can explain it, and considering you can edit the .exe, you probably know this better than I do anyway XD) 

I'm pretty sure for players that lock on to the AI path (and for normal AI) the warp will work normally, or does it not?

 

 

 

I mean, that doesn't nessasarily answer it, but I'm guessing it must have something to do with it.

Link to comment
Share on other sites

In the first lap upon finishing a race, the warp won't work normally - as you said, the player's car loosely follows an AI path - the warp won't work properly because (my guess) the car doesn't follow every single node in the path until after the *second* lap.

Link to comment
Share on other sites

  • 2 years later...

@grappigegovertI'm not sure how much work you've done with/on LR in the past couple years, I'm getting back into modding the game and still trying to figure out where in the EXE to find the function that changes the camera position after a race is over. I've made some progress in IDA just searching for binary strings copy+pasted from HxD and I've mapped out some of the functions that you have, but I'm at a standstill. If you have enough free time could you point me in the right direction?

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.