Want to race… yourself?
The Ghost Car script records your driving and plays it back again, much like the ghost car feature found in many racing games.
– Saves position, rotation and various car tidbits, including tuning.
– Works on any track or location, you just need to place the start and finish lines.
– Automatically saves, loads and replays your fastest lap.
– Stores unsaved laps so you can save them yourself.
– Supports images for tracks, so you know which track you’re picking.
– Compatible with tracks from ARS and loads them automatically.
– Useful search function for tracks and replays, so you can find that perfect “Nürburgring GP Endurance Short Loop” run in your “911 GT3RS” that you started a week ago on “Dec 10 21:59:13”
Grand Theft Auto V (1.0.1868.0 or newer)
Microsoft Visual C++ 2015-2019 Redistributable (x64)
Extract GhostReplay.asi and the GhostReplay folder to your GTA V folder.
How it works
1. Open the menu using the ghost cheat. (Open the cheat console with the tilde (~) key)
2. Select a track.
3. Select a ghost.
4. Start driving. The ghost will spawn as soon as you cross the start line.
5. Reach the finish. If your lap is faster than the previous ghost, it’s automatically saved and loaded again. Repeat from 4 until you get the perfect track time.
From the menu, you can also create tracks (their start and finish lines), remove tracks, remove ghosts, and add unsaved ghosts.
Sharing replays: The files are stored in (GTA V folder)\GhostReplay\Replays and (GTA V folder)\GhostReplay\Tracks. When sharing a replay, make sure to include the track it was made on.
Ghost saving system: When the option to automatically save ghosts is enabled (it is by default), the script will save a ghost replay to disk, and automatically load it for the new replay, when you make a faster lap than the ghost.
When the option is not enabled, or your lap was slower than the ghosts’ lap, it will be temporarily stored, but won’t be accessible to replay. The temporary recordings will disappear when the game is restarted. You can save these manually in the “Unsaved runs” menu.
To get the menu to show a preview image of your track, place a .jpg or .png image file in the Tracks folder. The file should have the same name as the track Name. For example:
Track file: MyTrack23.json
Track name in the json file: My Awesome Track
Correct image name: My Awesome Track.jpg
Track layout: Point-to-point and circuit tracks both work, but there are a few things you should do when creating these:
The start and finish lines need to be made from left to right, from the perspective of the racing direction. This makes sure the lap is only registered if you cross the finish line in the correct direction.
For creating a circuit track, the finish line should come before the start line.
Performance: By default, the script saves points as quickly as possible, which is every frame. If this impacts performance negatively, or you wish to reduce the recordings’ size, the Recording timestep can be increased, so the script only takes a sample every x milliseconds. This does decrease accuracy of the recorded play, so don’t make it too big.
The ghost replay system smoothens the transition of the ghost, so it won’t be jumpy when replayed on a higher frame rate.
Script causes crashes, doesn’t seem to do anything, forgets laps, etc?
In your report, be sure to include the following:
1. GhostReplay.log – found in the GhostReplay folder.
1a. There’s no GhostReplay.log? ScriptHookV.log and asiloader.log.
1b. Make sure you have installed the VC2015-2019 redists.
2. A CLEAR AND CONCISE description of:
2a. What actions you were doing – saving a ghost, finishing a race, creating a track, etc.
2b. What the problem is – selected ghost didn’t start, selected track doesn’t show, car doesn’t spawn, etc.
3. The track and replay definition, if available.
Otherwise I will be unable to help you in any way or form.
The current driver model is now saved. This includes MP models – though overlays (tattoos, shirt texts) are not saved.
Roof state is now saved.
Create missing directories on startup.
MP Driver model saving is thanks to FiveM (borrowed the code) and alloc8or (for correcting a few of my mistakes).
New features and improvements:
Add optional indicator state recording
Add optional siren state recording (Doesn’t record fast mode)
Change light state recording to optional: To be in line with the new indicators and siren recording optionals.
Add ability to spawn vehicle from replay (to drive with)
Add custom blips for aircraft and emergency vehicles
Increase default sync compensation for physics-based playback: Less overall drift and motorcycles with drivers stop drifting and resetting constantly.
Physics and effects!
A new collision-enabled playback option is available, which allows the game engine to spawn tyre marks, dirt and smoke effects!(Enable in Advanced replay settings menu)
Thanks to Dot., collisions between replay vehicles and the player vehicle is disabled, while keeping world collision enabled.
Drivers can now be added, beware this messes with vehicle engine sound quality though. It’s disabled by default. (Enable in Advanced replay settings menu)
Replays can now be sorted by lap time or recording date, or left at default load order.
Improvements and fixes:
Helicopter blades now spin for replays.
Alpha is reset on setting opacity to 100% to prevent coronas shining through the model.
Replay search: Vehicle manufacturer is now searchable.
Replay search: Individual words are now searched for, instead of matching the whole search string.
Spectator mode: “Passenger mode” is changed to “Spectator mode” in the menus.
Spectator mode: Individual vehicle play states are now shown in vehicle selection option.
Spectator mode: Finished vehicles are now skipped when switching spectated vehicle.
Unsaved runs: Fix performance in Unsaved Runs menu.
Unsaved runs: Menu option is disabled when empty.
Multiple ghost vehicles can now be selected!
They are immediately added to the current playing replay and ghosts can be added and removed at any time.
The “Passenger mode” option can now jump between (still driving) ghosts
Interpolate inputs and RPM, makes steering and RPM smoother when replaying recordings with higher time steps.
Add an option to reduce saved replay file size (enabled by default)
Stop the player ped ambient speech when spectating a replay vehicle
Add current recording/lap time on top left of screen
Active when a track is selected
Displays zero when not recording
Allow changing scrub distance
Various other fixes
Use more accurate timing during recordings: Jitter is completely gone, vehicles even at 1000 kph move smoothly. (Only applies with replays recorded with version 1.3.0 and up. Older recordings are still compatible, but may still suffer from jitter.)
When paused, don’t finish the replay when scrubbing to the end, but stay at the last frame
Improve performance during track selection
Respect data order when saving the json files
Fix StartStopBlips option not saving/loading
Fix replay not advancing if jump time is smaller than recorded time step
Replay offset: Make the ghost start ahead or behind when you start your run
Light control: Force ghost vehicle lights off, on, or leave it as when recorded
View replay as passenger: View the replay from the perspective of the ghost
Replay control: Pause, play, scrub forward and backward
Misc: Key to teleport to starting point of a track, in track selection menu
Fix replays getting invalidated when the list is updated
Fix ghost vehicle colors not applied correctly
Improve replay saving performance
Improve game load time by loading replays in background
Improve ghost vehicle hiding on stopped replay
Add suspension compression to replay data
Add an option to show a blip for a replay vehicle
Add an option to show a blip for a track
Fix a replay/record issue when crossing both finish and start in the same frame
Fix a duplicate track selection issue when ARS and non-ARS tracks have the same name
Fix a replay selection issue when ARS and non-ARS tracks have the same name (this will invalidate replays made on ARS tracks. Prefix the replay name on ARS tracks with “[ARS] ” to get the script to see them again)
Fix physics being applied to replayed ghost, replays are now as accurate as the recording is. Thank you LeeC2202 for pointing this out 🙂