Bakkes / CPPRP

Fast C++ Rocket League replay parser
Mozilla Public License 2.0
30 stars 9 forks source link

How to use?/ How to learn how to use it? #7

Closed LookslikeLenni closed 2 years ago

LookslikeLenni commented 2 years ago

yo, Im a coding noob and want to try to make more advanced stats for rocket leauge by reading the replays, but as you propably know :), its just random symbols. So how can I use this "software", and what does it even spill out ?

AidanShipperley commented 2 years ago

This project just contains the source code for the replay parser, so you need to compile the code yourself before you can use it.

Assuming you're on windows, you just need to run the "buildwindows.bat" file after modifying it a bit. Just right click it and select "Edit", and then change the "C:\Python37\python" to the file location where python is on your computer. If you don't have python, you can download it from the Microsoft Store.

You also need to download MSBuild.exe, which is how windows compiles C++ source code. It comes packaged with Visual Studio 2022, which is free to download.

From Microsoft Documentation: If you have Visual Studio, then you already have MSBuild installed. With Visual Studio 2022, it's installed under the Visual Studio installation folder. For a typical default installation on Windows 10, MSBuild.exe is under the installation folder in MSBuild\Current\Bin.

Same as with python, copy the file location along with MSBuild.exe so it will know the location of the executable. For example, my last line looked like this: D:\School\VisualStudio\MSBuild\Current\Bin\MSBuild.exe CPPRP.sln -p:Configuration=JSONBuild -p:Platform=x64

Save the file with CTRL+S and then just double click the batch file to build the source code into an executable.

After that, you should be able to see a "CPPRPJSON.exe" file in "your-directory\CPPRP\x64\JSONBuild\".

While you're in the directory you can open a powershell window by just typing powershell into the filepath: image

And pressing enter. After that you can just follow the Usage section to run the executable, just make sure you add ".exe" after the CPPRPJSON since we're on windows.

An example run could be something like this: CPPRPJSON.exe -i myReplayFile.replay -o myReplayFileOutput.json

As for picking out specific stats and incorporating it with your project, I don't really think anyone can help you if you don't have coding experience. Trying to understand C++ code without coding experience can be extremely complicated, speaking from my personal experience learning.

Feel free to ask if there are any other general questions though!

rfields1128 commented 2 years ago

As someone new to Linux, I was curious if you could explain briefly how to compile the code in Ubuntu and run the executable. I've tried compiling it myself using make all in the terminal. It compiles successfully but when I try to use CPPRPJSON I just get lost. I don't know how to point it towards a replay. Any help would be appreciated. Thank you.

Edit: I'm using Eclipse IDE if that helps.

LookslikeLenni commented 2 years ago

@AidanShipperley

I already fail at the bat...

usually a window occur (even briefly) when its get started succesfully right? because it didnt :)

Capture

Note: whether the CRPPR nor the CRPPRJSON folder contained a x64 folder and I couldnt find a CRPPRJSON.exe anywhere in the Project