Code Monkey home page Code Monkey logo

mpfmaster's Introduction

EA Pathfinder v5 Tool

This tool is designed to decompile and compile the Pathfinder files used for interactive music in EA Games.

Compatibility

This tool should work with any Pathfinder v5 file.

Some of the games are:

  • Need for Speed Most Wanted (2005)

  • Need for Speed Carbon

  • Need for Speed Pro Street

  • Need for Speed Undercover

  • Need for Speed World

  • Red Alert 3

Usage

Basic usage:

USAGE (decompile MPF to TXT): mpfmaster MPFfile [OutFile]
USAGE (compile TXT to MPF): mpfmaster -c sourceMapFile [MPFout]
USAGE (extract by sample num): mpfmaster -s MPFfile MusTrackFile SampleNumber [OutSampleFile]
USAGE (extract all samples): mpfmaster -sa MPFfile MusTrackFile [OutSampleFolder]
USAGE (update samples): mpfmaster -su MPFfile SampleFolder
USAGE (shift sample names): mpfmaster -ss SampleFolder shiftAmount
USAGE (append a new slot): mpfmaster -a sourceMapFile [TrackID] [SectionID]
USAGE (append a new slot (NFS Pro Street)): mpfmaster -ap sourceMapFile [TrackID] [SectionID]
USAGE (concat files): mpfmaster -t destinationMapFile sourceMapFile

For sample updating, the MUS file will be generated with the name of the MPF and placed next to it. You MUST have all files from the lowest to highest number!
If you omit the optional [out] name, it'll inherit the name of the input file.
The compiler is not very well written, so please follow the decompilation syntax closely!
Newly compiled files do not contain samples. Add them with the update samples command.

Example: you want to edit something in the existing track files...

  • Make sure your MPF and MUS files are in the same folder!

  • Decompile the MPF

    mpfmaster MW_Music.mpf
    
  • Extract the samples (NOTE - for multi track files, you need to do this for each mus file separately)

    mpfmaster -sa MW_Music.mpf MW_Music.mus mySampleFolder
    
  • Edit whatever you need to edit

  • Recompile the MPF

    mpfmaster -c MW_Music_decomp.txt mynewMPF.mpf
    
  • Update the samples (NOTE - for multi track files, all samples need to be in a single directory)

    mpfmaster -su mynewMPF.mpf mySampleFolder
    

TODO

This tool isn't perfect. It doesn't generate quite identical files to the originals, but they do work.

  • Big endian support for consoles

  • Try out compiling with gcc/clang -- currently works in macOS, still need to make a CMakeLists

  • Figure out why some variable types don't get updates for certain actions (mostly fixed)

  • Improve the parser - it's currently a hackjob working on a line-per-line basis

  • Clean up the code - everything is jammed in the main cpp file!

  • Documentation about the syntax and available commands!

  • Test with other games!

Credits

  • Nicknine - the initial mpftotext script from which this tool was based on and specific code from VGMStream
  • VGMStream project - header parsing for GSTR / EA Layer 3

mpfmaster's People

Contributors

fridtjof avatar xan1242 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

fridtjof

mpfmaster's Issues

does not support files in big endian [feature] [willing to help]

The game in question is PS3/XB360 Skate 3

Bad header magic! Expected: 0x50464478, Got: 0x78444650, which is clearly due to the generation of consoles being big endian.

I suggest adding another flag to read in big endian.

I am willing to add this myself.

Pathfinder player not working properly or at all

At first launch the prompt asked me to download net. 6.0.0. - I clicked yes, but was redirected to 6.0.11 version of net., which doesn't cooperate with the program - the player still insists on 6.0.0. version, which I eventually downloaded and installed afterwards.
But even after that, the program doesn't even work - no sign of it doing anything - no UI or anything.

Does not open correctly

Hi, The problem is that when you want to run the program it opens and closes automatically in a few seconds.
I don't know what causes this problem, I had used this program before and it worked correctly, now that I have moved to a new computer this is happening to me
I don't know if this helps but I used Windows 10 before, now I use Windows 11 on my new device

Cannot compile and create MPF File

image

Latest version was just stucked at "parsing..." and didn't actually compiled the decompiled txt.

But can decompile the MPF file and extract the samples, the only problem was compiling back the mpf file.

Other types as the output format

Currently in consideration are JSON and XML (or even Apple PLIST).

This would probably greatly reduce the parsing difficulty and would standardize it in some way at least.

Map concatenation

As the title suggests, this should be implemented to allow combining multiple map files together into one.

Doing this would allow for easier adding of song maps into an existing one.

Currently thinking about it this way:

  • Find the last index of each relevant thing that needs to be started from the receiving end - node, part, section
  • Find the first index of each relevant thing that needs to be incremented from the adding end - routers & branches
  • Do the increment on all relevant IDs and append it to the end of the map file source

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.