FAF/SCFA Replay Parser Library
-
Really clean. Great work
-
I updated the development version to clean up the command output a bit.
Old:
├── VerifyChecksum { digest: [168, 55, 122, 87, 70, 60, 17, 145, 224, 174, 52, 71, 2, 143, 109, 2], tick: 0 } ├── IssueCommand(GameCommand { entity_ids: [0], id: 0, coordinated_attack_cmd_id: 4294967295, type_: 8, arg2: -1, target: Position(Position { x: 667.5, y: 18.679688, z: 357.5 }), arg3: 0, formation: None, blueprint: "urb1103", arg4: 0, arg5: 1, arg6: 1, upgrades: Nil, clear_queue: None }) ├── LuaSimCallback { func: "SyncValueFromUi", args: Table({Unicode("id"): String("0"), Unicode("Specialization"): String("ALL"), Unicode("AffectName"): String("PowerDamage")}), selection: [] }
New:
├── VerifyChecksum { digest: a8377a57463c1191e0ae3447028f6d02, tick: 0 } ├── IssueCommand(GameCommand { entity_ids: [0], id: 0, coordinated_attack_cmd_id: -1, type: BuildMobile, arg2: -1, target: Position { x: 667.5, y: 18.679688, z: 357.5 }, arg3: 0, formation: None, blueprint: "urb1103", arg4: 0, arg5: 1, arg6: 1, upgrades: Nil, clear_queue: None }) ├── LuaSimCallback { func: "SyncValueFromUi", args: {"id": "0", "Specialization": "ALL", "AffectName": "PowerDamage"}, selection: [] }
The commands should be a lot easier to read now. New versions of the pre-compiled binaries are also pushed, link in the OP.
-
I have downloaded a few thousand replays and used your python libary to parse all chat in them. 12MB of text was parsed for this.
I have quite a big text file for each FAF username. I know it would be better to use userID and I will in future things. Does anyone want this data?
The chat has been filtered to remove "notify" events and also "Units / Mass / Power sent"
I do plan to do some kind of node analysis on who plays with who next
who is associated with which map
association of maps with ratings -
Mavor most iconic unit confirmed.
-
Lol "air".
-
im need mass pls
Could be interesting seeing more replays parsed and data analyzed/presented.
-
I have tested a python binding and it is OK. What kind of the data analyze do you want ?
Winning fraction? most killed fraction ? popular (unpopular) units ? -
@meatontable What information can you extract here?
Relationship of unit experemental built to winning in next 10 mins would be good
-
Sorry for delay. I'm doing this for fun when I'm free. Of course, a detecting winning conditions is a good goal.
-
-
Found this thread after ages to be here. Unbelievable. Guys, you're great!
-
After almost 3 years I have finally released another version of the rust crate, and CLI tool. I also published a new version of the python package which adds binary wheels for python 3.11 and 3.12, and removes support for python 3.7. Note, the version numbers happen to correspond between the rust/python packages but that is just coincidence, I have not updated the python library to use the new changes from the rust one yet.
Rust: https://crates.io/crates/faf-replay-parser/0.6.0
Python: https://pypi.org/project/faf-replay-parser/0.6.0/What's new?
Many, many refactors to the API. If you wrote some rust code that used version 0.5.2 of the rust crate, you'll have to update some syntax to get it to work with 0.6.0. See the improved docs page for the new syntax.
For CLI users things you'll notice are:
- The improvement to the command output is now released on 0.6.0
- Some additional output like game title and game quality in
fafreplay info
- A new
fafreplay info --raw
option for dumping out the entire contents of the replay header - Better detection of file type which does not rely on the file extension
- Some basic support for Supreme Commander 2 replays
Enjoy!