The past 6 months I've been working towards becoming a developer. For my first project, I decided to make a small console application to rename and sort/order replays.
here's the github page: https://github.com/CrispyDrone/BWSort
You provide a directory, it will parse all the replays (can include subdirectories), and allow you to both rename them according to a custom format, and order them in a mapping hierarchy.
Currently supported sort criteria:
You can combine multiple sort criteria.
Syntax for renaming replays:
1) T[separator] with separator being one char. This will extract the teams from the replay and separate individual players per team using the separator.
2) WT[separator] only extracts the winning team.
3) LT[separator] only extracts the losing team
4) MU gets the matchup
5) M gets the map
6) DU gets the game length
7) D gets the date the game was played on
8) WR extracts the winning race
9) LR extracts the losing race
You have to use | to separate arguments. So for example:
DU|M|WT[_] => will give a replay of the format: 15min13sFightingSpirit(CrispyDrone_Jaedong).rep
1) clone repository, compile
2) download zip file under Releases, extract, run the application file. You will need .www.gmnlm.com framework 4.6, it might prompt you to install it.
1. Only 1.18 or later replays are currently supported. I was looking into a way to decompress the PKWARE compressed replay files, but the algorithm used in other parsers didn't make much sense to me.
2. There will be errors for certain criteria like playername. If you specify to make a folder for the winner or for both, but the replay doesn't have a winner, it'll show an error.
another common error is the "unable to distinguish player from observer", which means that not a single player did a build or unit morph action. In most cases, this is a replay of a few seconds long where no player did anything, so you can safely ignore these too.
3. If you move the bad replays to the bad replay folder, it's best to move this folder out of your replay directory or it will be scanned next time you use the tool.
4. Just as point 3, it's best to move sort results out of the directory, else they will also be scanned when you use the tool again.
1. When using multiple sort criteria (nested sort), the sort folder's name will not be in the correct order.
2. The order of the matchup from a replay, and using the T argument, will not necessarily be the same (so it could say ZvP, while the first player is the protoss, and the second one the zerg)
3. When using nested sorting, it creates an intermediary folder for each sort criteria, instead of directly adding the result folders. For example: map duration will create the following folders Map,Duration => Fighting spirit => duration => 0-10m instead of Map,Duration => Fighting spirit => 0-10m
4. Teams aren't extracted properly because for most game types the team number is the same for opposing teams... I think I do know a way to fix this.
Towards the future:
1. Bug fixing
2. Allowing the setting of a path for result folders
3. Allowing the setting of a path for the bad replay folder
4. Possibly support for 1.16
5. Fixing team extraction
6. Graphical user interface
Please try it out, and let me know any errors!
Credit to SimplySerenity for porting the replay parser to C#. You can find the original project here: https://github.com/SimplySerenity/SCReplayFileParser