NFSAddons Forums

Main Menu

Using ghost files to customize a race [NFS4]

Started by DrSpeed, Oct 01, 2016, 8:10 AM

DrSpeed

Yes, that would work. A Smokey and the Bandit style race would be: you have Bandit and Snowman as the speeders. The police team would be Sheriff Buford with 7 other police cars (who all can have any police car in the game). And the remaining 6 can be regular traffic cars.

Speeders in Hot Pursuit mode are always pitted against each other.

Zalcus20

Don't worry guys. I didn't abandon this project. I'm still here. ;)  I found a few more Offsets that can change the game mode (single race, hot pursuit etc.).

I'll post these offsets soon. In the meantime, I'm trying to find that Getaway/Time Trap timer in the .gst file. If I can locate it (if it's actually stored in the .gst file) I will post all my findings immediately.  I really hope the .gst file gives the user the ability to edit the timer  :-\ :)

FranknFurter

#47
@DrSpeed: That sounds great, but would Bandit and the Snowman nevertheless still be opponents instead of making a team like the cops do? That is what I wonder about. The general aim is to bring Snowman 'home' (after several rounds) without him being arrested, even trying not to let the cops ticketing/stopping him. Normally YOU win a race when the other opponent(s) are all being arrested finally, but this would mean failure in this particulare case.

All I can deliver so far is the cars for this game setup, sry, I'm not into HExediting. Btw now this game setup could even be refined a bit since Evgenys patch allows all this.
I HAD Sally already sitting next to Mr. Reynolds that time, but the female co-driver simply was to high-poly then for starting in Pursuit mode. (displaying those female curves is very uhm .. 'poly heavy' ;)

Now even Smokey's car could become a realistic one since I simply put him in that 'old red Ford' ('83LT), in the movie he had a 1977 Pontiac Lemans as it can be found on several GTA4 sites, poly-heavy, of course. No problem for me to convert those to NFS, did that already, but ...



Ok I could ask NJ (since he loves creating 'proper' damage =D) to produce a damage model of it ... in it's final state :o
Nice task .. or a challenge, isn't it Nils? Btw. the truck can deliver hundreds of beer crates .. =D
'.. eastbound and down, load it up and truck it ...'



Greetings
Frank


XJ220

You could probably put the Tomb Raider I Lara in there to save polygons ^^

@ Zalcus20 / DrSpeed: What I am wondering - how do you find specific addresses? Do you change randomly/systematically and see what happens or do you scan for certain numbers or something completely else? Perhaps by comparing different Ghost files where you know the setup and look for differences?

Zalcus20

@XJ220: I usually compare two or more ghost files depending on what I am trying to find when locating the appropiate offset (pretty much trial and error).

The easiest way to find a specific offset is to hit ctrl+g in Hxden and type it in. The program will automatically put your cursor on that line so you can change the value of that code. To find it manually for example, if you want to get to offset 00001152, in HxDen you have to look for the line on the left side that reads 00001150. Then look at the numbers at the top and look for 2. The area where 00001150 and 2 meet is where you'll find the actual code to edit. Hope this helps. I'll see If I can post some screens showing this.  :)

DrSpeed

@FranknFurter
No, it's not possible to do that. The closest is to change the number of tickets to 1. So when Snowman gets arrested, Bandit doesn't fail until he's arrested too, there's no other way on doing it.

@XJ220
Pretty much what Zalcus said, comparing multiple files is the way I do it. I'm also using Cheat Engine to see the values change while I play the game. Then I compare the offsets I get in Cheat Engine and hopefully can replicate the same result by editing the gst files. And like I said earlier, using Cheat Engine to force change the values crashes the game most of the time (unlike in NFS3).  8)

FranknFurter

@DrSpeed
Nevermind - it is pretty awesome that you care about those issues, thanks alot for your efforts or thoughts!
Apprechiating you guys' work alot!

Greetings
Frank

FranknFurter

#52
@DrSpeed: Started to wonder about some things:
QuoteYes, that would work. A Smokey and the Bandit style race would be: you have Bandit and Snowman as the speeders. The police team would be Sheriff Buford with 7 other police cars (who all can have any police car in the game)
Ok so far, but how would a race like that look like in general? Do all the cars start at the same point (the cops, too?) like in 'race' mode or is it possible to have a 'pursuit' mode race starting with two speeders plus those additional cops? And are they so far spread along the track like normally then in pursuit mode? Asking because if you manage to add two or three cops, where or how would they be placed?

Silly questions maybe, but still trying to understand those new possibilities ...

And, additionally .... would it finally be possible to have 'open' or 'non-circular' tracks since the cars behave somewhat strange when you simply 'cut off' the last block of a track (Did that accidentially once ::)). This happens, as I assume, that when in a whatsoever race the cars try to go into the next lap and cannot find a proper AI driving line, like on some other tracks where blocks were being cut and pasted in sometimes.

This -perhaps- wouldn't happen if it were possible to have a 'only ONE round' option? So, starting the race, running the track and at the finish line the race is allover, but after only a single 'round'?
Perhaps that would also allow 'drag strip' races in the future? For those who like that .. ;)

Greetings
Frank

Zalcus20

#53
Hi.  ;) It seems I can find everything else besides the Getaway and Time Trap timers. I’m beginning to think this data is not stored in the .gst file. However, here is some more helpful info I have found:

Offset 00000FF0 = Game Mode 
00=Single Race 01=Tournament 02=Knockout 03=Hot Pursuit

Offset 0000109C = Hot Pursuit Mode
00=Classic 01=Getaway 02=Time Trap

Offset 00001098 = Opponent Skill
00=Amateur 01=Pro 02=Champion

Offsets 00000FEC-00000FEE = Location, Startpoint in HP Getaway Mode (only applies if you are playing as a racer).

Additionally, there is a rather interesting way to “hide the ghost car”. There is no offset in the file that you change to do this. Rather, the game reads the extension of the file to determine if there should be a ghost car or not. Since the file’s extension is .gst, the game is automatically going to create a ghost car. Now, to hide the ghost, just change the extension .gst to .kot (Knockout file) or .trn (Tournament file). This will keep the game from causing a ghost car to appear. Just remember when loading the file in-game, to look under Knockouts or Tournaments folder, NOT Ghosts for the file you just changed. The cool thing about doing this is that it enables customizing you car should you quit the game to race results.  =D =D =D

@FranknFurter: Regarding the extra cops, they will be scattered out all over the track (just tested it out).  :D
Regarding the point-to-point tracks, I remember downloading a track from JPRacing that was a drag strip (name was Power Park?) and as long as you set 2 laps you would be able to finish the race without having to go around the track. That's all I know for now  ;) :)

EDIT: I can't believe I forgot to explain how to set the Getaway Startpoint.  :-\  It's Three numbers each representing an axis (X,Y,Z). Minimum for each number is 0 and the Maximum for each number is 255 (hexadecimal FF). So setting these axes to any of the numbers between 0 and 255 will give you custom starting position in getaway mode as a racer. This wouldn't work if you are playing as a cop since you will always begin at the default starting line of the track.  :)

Zalcus20

#54
I finished creating a cheat table that contains all the code that DrSpeed and myself have found for NFSHS. I have called this, GST Editor. You will need to download and install Cheat Engine 6.6 in order to use it. The beautiful feature of this program is that you won't need to use hexadecimals or search for an offset to edit the codes. Here's how to use.

1.Open the GST Editor table.
2.Open the Ghost file you want to edit by clicking File-->Open File
3.You will get a prompt asking to 'keep the current address list/code list?' click Yes.
4.In the box on the bottom screen, you will see all the editable code that me/DrSpeed have found. Make your needed changes.
5.When you are done, there is no need to save anything. Just close the program and make sure your edited file is in the Savedata/Saves folder of your NFSHS directory.

***As always, make a backup of your file before editing, just in case the game crashes and you can't trace what went wrong.  :)

My vision of this is to help other users of NFSHS to enjoy as much customization as possible until hopefully, someone can create a true program that does a better job of customizing these parameters; or even better, one day VEG or another genius programmer can incorporate this in a future patch release of this amazing game. :) :) :)

DrSpeed

Thanks for finding those addresses, I've added them in the first post. Since the timer changes depends on the settings on class/laps, it should be stored in the file somewhere (or not, I could be wrong).

Never thought of changing the file extension. I always thought it would confuse the game and crash like crazy.

Too bad 00000FEC doesn't work with police cars, starting randomly around the track like the AI does would be cool. Maybe this address is how I managed to move the entire starting grid at one point.  :o

Great idea on creating a Cheat Engine Table. Clearly, your skill in using the program is superior to mine, great work! I'll link your post in my first post as well.  8)

Zalcus20

Thanks. :D The info I posted earlier on changing the extension does indeed make the ghost disappear, but the game seems to reset the other offsets (# of perps, # of cops) that were changed to default (doesn't crash though). So it's rather useless (which is why I crossed out that piece of info). Should've stuck to my rule of testing three times before posting, heh heh heh. :)

The Gst Editor Cheat Table is still a work in progress but it should be able to get the job done without the hassle of hex editing.

I'll keep looking for the timer and I'll try to find a more effective way to hide the ghost (if there is another way). In the meantime, I'm going to take a break and actually play the game now.  =D


FranknFurter

#57
@Zalcus20:
QuoteRegarding the extra cops, they will be scattered out all over the track (just tested it out).
That's an amazing fact, thanks for finding this out! =D =D =D
QuoteRegarding the point-to-point tracks, I remember downloading a track from JPRacing that was a drag strip (name was Power Park?) and as long as you set 2 laps you would be able to finish the race without having to go around the track. That's all I know for now
NJ already mentioned that particular track and this fact in my other thread. So it might more or less depend on how the track itself is done to work properly and no HEX editing is probably required to do that. But thanks for finding out -again- ^-^
Never had that track, so I cannot compare/investigate on how it's done :(
QuoteI'm going to take a break and actually play the game now
Yeah, get yourselfs a little rest, this helps from time to time ... Good thing is, that's exactly what our favourite game can be used for, a little recreation and relaxing as well as nice entertainment =D =D =D

On the contrary, either if you are tinkering with tracks, a car's characteristics or other stuff the game often manages to distract you from continuing work and you cannot resist finishing a lap or two .. ;)

Zalcus20

@FranknFurter: It's true. Hex editing has nothing to do with how the track is done.  :) I suddenly remembered opening the Power Park track in T3ED a couple years back and noticed that the author was somehow able to stretch the vertices of block 0 (which is the start and finish line) and create two more block zeros further down the track. Then he assigned the block that the block zeros were connected to as 'neighbors'. Normally doing something like that could crash the game but the way the author did it was skillful and kept it from happening. I was able to replicate that on a test track I was making some time ago, but the laptop I had then crashed beyond repair and I lost everything.  :-[  I guess that's the next project I'll work on when I'm done with this "Ghost Project"  ^-^ =D

FranknFurter

Quote from: Zalcus20 on Oct 17, 2016,  4:34 PM
but the laptop I had then crashed beyond repair and I lost everything
sounds like FUBAR .. sort of .. >:(
QuoteI guess that's the next project I'll work on when I'm done with this "Ghost Project"
Presumed this WILL ever end ..  ^-^

Well, JP Racing doesn't exist anymore ...
Is that particular track somewhere still available? Guess I have to have a look into it ..