https://github.com/pvormste/rlr-parser-node
An easy-to-use Rocket League Replay Parser for NodeJS.
https://github.com/pvormste/rlr-parser-node
Last synced: 9 months ago
JSON representation
An easy-to-use Rocket League Replay Parser for NodeJS.
- Host: GitHub
- URL: https://github.com/pvormste/rlr-parser-node
- Owner: pvormste
- License: mit
- Archived: true
- Created: 2015-11-22T14:20:59.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-11-30T12:34:18.000Z (over 10 years ago)
- Last Synced: 2024-04-26T06:04:47.989Z (about 2 years ago)
- Language: JavaScript
- Homepage:
- Size: 2.46 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Rocket League Replay Parser for NodeJS
[](https://badge.fury.io/js/rlr-parser)
A NodeJS Parser for Rocket League Replay Files.
It is a port of [jjbots](https://github.com/jjbott) awesome .Net library for [Rocket League Replays](https://github.com/jjbott/RocketLeagueReplayParser).
## Features
* Parses the meta data (crc, version info, etc.)
* Parses all properties (like team size, team members, goals, etc.)
* Automatically assigns players to the blue or orange team regarding to the match info
* Modular: If you only want to use the parser and build your own object representation - go ahead!
## Todo
* Parse key frame data
* Parse network data
## Installation
```
$ npm install rlr-parser
```
## Usage
There are two ways to use the parser:
```js
var Replay = require('rlr-parser').Replay;
// Replay file location C:\ ... \Documents\my games\Rocket League\TAGame\Demos
var replayfile = 'path/to/replayfile.replay';
fs.readFile(replayfile, function(err, buffer) {
// Create a Replay object directly from buffer
var replay = new Replay.fromBuffer(buffer);
// Print the result
console.log(require('util').inspect(replay, { depth: null }));
});
```
or (using it modular):
```js
var RocketLeagueParser = require('rlr-parser').Parser;
var Replay = require('rlr-parser').Replay;
// Replay file location C:\ ... \Documents\my games\Rocket League\TAGame\Demos
var replayfile = 'path/to/replayfile.replay';
fs.readFile(replayfile, function(err, buffer) {
// Parse replay file first
var parsedReplay = RocketLeagueParser.parse(buffer);
// Convert it then in a more usable way
var replay = new Replay(parsedReplay);
// Print the result
console.log(require('util').inspect(replay, { depth: null }));
});
```
## Issues
* On old replay files, the player list is not part of the properties section. It must be read from network stream.
## Author
* [Patric Vormstein](https://github.com/pvormste)
## License
This project is released under the [MIT-License](https://github.com/pvormste/rlr-parser-node/blob/master/LICENSE).