Automatically detects peaks in two different sets of training data to synchronize them.
`training-data.txt` is generated by https://github.com/codeWorth/reliefbot-training.
.replay file can be directly taken from Demos folder.

Run replayToPBZ2.py to convert the .replay file
Run trainingDataToPBZ2 to convert `training-data.txt` (or whatever you named it)
Then run unifyData.py to adjust time to match.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This script is a simple way to extract useable data from replays and package it into accessible easy to use format for use in training an rlbot agent. Carball is required for this script to function and can be viewed here: https://github.com/SaltieRL/carball

Refer to the example script provided to gain an understanding of how to utilize TrainingDataExtractor's functionality.

packet format:
The outter layer of the saved data is simply a list of all the frames.
So data[0] == first frame
data[1] == second frame, etc

each frame is a dict with the following format:
frame{
	frame.GameState{
        	"time" : seconds elapsed 
        	"seconds_remaining" :  game time remaining
        	"deltatime" : time since previous frame

        	frame.GameState.ball {
        		"position" : current location of the ball as a list [x,y,z]
        		"velocity" : current velocity of the ball as a list [x,y,z]
        		"rotation" : current rotation of the ball as a list [x,y,z]
		}
	}
        frame.PlayerData is a list containing the data for each agent by index{ 
		"index" : player's index
    		"name" : player's name
		"team" : team index 0 for blue, 1 for orange
		"position" : current location of the player as a list [x,y,z]
    		"rotation" : current rotation of the player as a list [x,y,z]
    		"velocity" : current velocity of the player as a list [x,y,z]
    		"angular_velocity" : current angular velocity of the player as a list [x,y,z]
		"boost_level" : player's current boost amount
		"boosting" : bool indicating whether player is actively boosting
    		"throttle" : player's emulated throttle input
		"steer" :  player's emulated steering input
 		"pitch": player's emulated pitch input
 		"yaw" : player's emulated yaw input
 		"roll" : player's emulated roll input
		"jump" : player's emulated jump input
 		"handbrake" : player's emulated handbrake input

	}
	
}