![]() Print("Game time:", timedelta(milliseconds=replay*100)) Here's an example of using the bindings, copied over from the README with comments removed for brevety: from datetime import timedeltaĬommands.Verif圜hecksum, # For desync detection The bindings are written in Rust using pyo3. The parser is available as a python package for convenience. Note that you need to make sure that the ~/.cargo/bin directory is in your path to be able to run the tool once it's compiled. I would recommend starting with the first command, and if something turns out to be broken, try the second command. You can also install the latest version published on crates.io with $ cargo install faf-replay-parser -features=cliīut it may be less up to date than installing directly from git. If you have cargo installed, you can run: $ cargo install -git -features=cli The parser is written in Rust so you will need to use cargo to compile it. Version 0.5.1 for Linux can be downloaded here. There are also Linux binaries built on each tagged release, but they are a little hard to track down in GitLab CI. I have compiled some binaries for Linux and Windows and hosted them on my server. If anyone finds a replay containing a SetCommandCells command please send it my way as thus far I have been unable to locate any occurrences of this command. This usually means I haven't figured out what they do or don't know a better name for them. Some commands will have a number of fields called arg1, arg2, arg3, etc. Keep in mind that determining the in game time requires parsing Advance commands and using the time option will force these to be included (but not displayed). The commands subcommand lets you explore the meat of the replay file.īy default only a small subset of commands are parsed as these are the most useful: $ fafreplay commands 9000556.scfareplay -limit 10 Here is where things get really interesting, although it requires a lot more work to extract useful information. It aims to provide more of a summary of the most relevant information. Note that this subcommand doesn't show every bit of information available in the replay header. With additional info enabled: $ fafreplay info -mods -options 14210327.fafreplayĬopyright: Copyright � 2006, Gas Powered Games It can also be configured to go into more detail with certain flags enabled. ![]() Stuff like the name of the map, the name of the players and what mods were used. The info subcommand displays the sort of stuff you would expect to see for instance on the vault page. fafreplay will be converted in memory automatically. Note that you do not need to unpack replays before using them with the other features of this tool. Unpacking is very simple: $ fafreplay unpack 9000556.fafreplay ![]() The tool can handle the newest version of the fafreplay format as of release 0.5.0. I expect this to be the most widely useful feature of the tool, as a lot of other software that can parse replays only knows about the scfareplay format. Unpack compressed fafreplay files into scfareplay files.So what the heck does this tool do? Read on to find out. I have been impressed by the work that has done on this front so far (hopefully he will make a post about his work soon). I hope that by sharing it, we can figure out the last few unknowns about the replay format, and that people will be empowered to explore new ways of extracting useful data from FAF replays. I think this tool can be useful for many people in the FAF community who want to understand the replay format and what information is/isn't available in a replay. This project started as my own rewrite of a Parser library written by and quickly evolved to include a more versatile replay inspection tool. Some time ago I started working on a replay parser library for FAF/SCFA replays, and now it's gotten to the point where I think it deserves a forum post.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |