The goal of this project is to implement parsers for uncommon game files and save them in widely used format. Supports a variety of files for EA games Need For Speed series 1 - 6. Right now I'm focused on The Need For Speed SE (1996) game only, however some files, like FSH, were used even in NFS HP 2 (2002)
Feel free to contribute
This project, apart from file parsers themselves, provides:
Various kinds of game resources can be easily converted to formats:
- 3D models: obj, blend, glb
- archives: directory
- audio: mp3
- fonts: fnt + png (raster Windows Font). Nice edit tool: https://snowb.org/
- images: png
- info files (palette, positions, skipped resources etc.): txt
- metadata: json
- videos: mp4
Output files are directly used in my project The Need For Speed Web
At this moment, this repo contains the fullest publicly available documentation of formats, used in TNFS SE (PC version). The documentation is auto-generated from this repo's parsers source code
Though it wasn't the initial goal for this project, declarative parsers architecture allows to easily save file back into original structure, which means that you can modify values, save resource back to proprietary format and test how original game behaves. It is handy to use for reverse-engineering and perhaps modding
- install python 3.9, pip, ffmpeg, blender (version 4+)
- make sure that
blender
andffmpeg
commands work in terminal (cmd). If not, either fix your system environment variable PATH, or reboot your system if software was just installed, or set an absolute path to executables in settings.py - install dependencies
pip install -r requirements.txt
python run.py convert /media/fast/NFSSE --out /tmp/NFSSE_PARSED
This command will recursively walk over the /media/fast/NFSSE
directory, parse all supported resources and save them
in common formats in the /tmp/NFSSE_PARSED
directory. Output directory will have the same structure as input one.
Also you can point script to one file to convert single file. Check settings.py to customize converter
behavior
WARNING: please do not set as output existing directory with some data, it can be deleted!
python run.py gui /media/fast/NFSSE/SIMDATA/MISC/AL1.TRI
WARNING: Script does not make backups and saved file consistency not guaranteed! Use only on copied file
Custom commands are more complex scripts, which can be run on particular resource file. They are available in the GUI as flash icon at the top.
Makes open track fully flat. I use it for testing car acceleration/deceleration dynamics. Can be launched from GUI on TRI file, or:
python run.py custom_command --custom-command flatten_track examples/maps/TR3.TRI --out examples/maps/flat/
Makes track go backwards. They have a bunch of issues and glitches for now. All reversed NFSSE tracks can be found here
python run.py custom_command --custom-command reverse_track examples/maps/TR3.TRI --out examples/maps/reversed/
Scales track length. Does not affect road width, props etc. Scale with factor 0.5 (make track 2x shorter):
python run.py custom_command --custom-command scale_track --custom-command-args=0.5 /media/fast/AL1.TRI --out /media/fast/AL1_SCALED.TRI
You can support project by:
- giving any feedback, bug report, feature request, providing missed info about resources to Issues
- fork & submit a Pull Request