NFSAddons Forums

Main Menu

NFS High Stakes EXE addresses and modifications.

Started by Zalcus20, Jun 11, 2024, 3:04 AM

nikon

Quote from: pete9516 on Today at  5:20 AM
Quote from: nikon on Sep 08, 2026, 11:05 PMFor Tournament mode, you can theoretically set more than 7 AI opponents as well, but in that case you won't be able to complete the entire tournament.
Why is that, i wonder?

There are quite a few places in the game where arrays are hardcoded for 8 slots.
Probably the most obvious example is the points table - it's an array of 8.
But there are many other places like that.
Actually, getting a 16-car tournament race to start is pretty easy.
You only need to change this byte:
00146B22  10 → 11
Just in case the offsets don't match, here's the surrounding code:

Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
00146B10  8B 9C 24 20 01 00 00 83 FB 01 0F 86 F6 00 00 00
00146B20  83 FB 10 0F 83 23 01 00 00 8B 84 24 08 01 00 00
00146B30  89 84 24 34 01 00 00 85 C0 0F 8E D7 00 00 00 89


This switches the sorting mode when there are more than 15 objects (I still haven't figured out why the game does that).
But this change only lets you start a race with 16 cars - all the other problems I mentioned above are still there.
NFS4 Online Career editor:   https://nfs4.com/editor

nikon

Quote from: pete9516 on Today at  5:15 AM
Quote from: nikon on Sep 08, 2026,  6:31 PMIn the video where I was testing the 16-car knockout, I came across an interesting sorting (?) issue.
In the second race, two AI drivers had exactly the same finish time, and they happened to be right on the elimination cutoff.
There were 11 participants, with 4 to be eliminated. The two AI drivers were clearly in a close battle and crossed the finish line at the same time, taking 7th and 8th places respectively.
However, the AI driver who finished in 7th place was eliminated instead of the one in 8th place.
I think this might be related to how the results are sorted when the finish times are identical, but it needs further investigation. In practice, I think this is probably a fairly rare occurrence.

This is a known issue, i had that happen multiple times and it's quite funny to happen but yeah it's there. Maybe it's like in TrackMania United Forever where the game displays hundreds of a second but it actually counts thousands of a second but won't display

I didn't know about that, or maybe I just forgot... :)

I haven't really investigated this issue yet (I already knew it couldn't have been caused by my changes).
But this is actually normal behavior for quicksort: if the values being compared are equal, their relative order isn't guaranteed.
The comparison function returns 0 for such objects,
so you'd need some kind of secondary criterion: the driver's name, for example,
or something ese, to decide which one goes above the other.

I remember being a bit surprised at first that the game only renders half of the car,
actually even less than that, when you're using the cokpit camera.
When I was testing the mouse look idea, I was initially a little disappointed,
because it seemed like the game simply didn't render the full object.
But it turns out it can be made to work properly just by removing the filter that decides which parts to render depending on the side.
(that might increase the hardware requirements a little, though...)
NFS4 Online Career editor:   https://nfs4.com/editor