This tool pretty much just reads in a .phant file (stored in Users/{username}/AppData/LocalLow/Little\ Flag\ Software,\ LLC/Neon\ White/{steam user id})/Ghosts
) and parses it into a rust representation.
Currently there's not much use for this beyond having a reasonably human-readable representation of Neon White ghost files - my aim is to eventually compute some stats on the ghosts to have an indication of if a .phant file is legitimate or not.
I recommend running this in WSL if you're on Windows. If you're on Linux, you can probably figure this out.
To compile this binary, clone this repo, and then invoke cargo build
in this directory:
cargo build
Compiling neon-white-phant-parser v0.1.0 (/neon-white-phant-parser)
Finished dev [unoptimized + debuginfo] target(s) in 0.34s
To use the binary, run it and pipe in the ghost file you want to parse like so:
./target/debug/neon-white-phant-parser < /mnt/c/Users/{windows username}/AppData/LocalLow/Little\ Flag\ Software,\ LLC/Neon\ White/{steam user id}/Ghosts/GRID_FALLING/0.phant
There is currently no output or statistics generated by this parser. That'll be added some time tonight.
Whenever you set a PB, Neon White saves that run to 0.phant
in Ghosts/{Level Name}/
. Ghost recording is not active in 'boss fight' levels or in Hell Rushes, but does seem to be active in Heaven Rush (however, I don't think it's actually used in heaven rush? Still need to poke at what happens there).
Only your most recent PB is stored this way. There's support for phant files to use different numbers (possibly was supposed to be a cache of other players' ghosts?); you should probably rename your phant to {level name}_{steam user id}.phant
before sending it to someone to avoid clobbering ghost files.
The ghost files store the overall time the ghost took, as well as a bunch of captured 'frames' with associated timestamps. These frames are only really snapshots at about 30 ticks [note: verify, this is an assumption] of the position, camera angle and direction, and action states of the ghost (e.g. grappling, stomping, discarding, shooting) at that tick.
The ghost files do not record inputs or velocities - while velocities can sorta be extrapolated from these replays by comparing positions (e.g. to see if someone's godspeed was modded to be 10% faster), there's no way to grab the inputs to re-run them locally or anything of the sort.