FAForever Forums
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Login
    The current pre-release of the client ("pioneer" in the version) is only compatible to itself. So you can only play with other testers. Please be aware!

    FAF/SCFA Replay Parser Library

    Scheduled Pinned Locked Moved Blogs
    16 Posts 10 Posters 3.5k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ZeldafanboyZ Offline
      Zeldafanboy
      last edited by

      Lol "air".

      put the xbox units in the game pls u_u

      1 Reply Last reply Reply Quote 0
      • GiebmasseG Online
        Giebmasse Team Lead FAF Association Board Moderator Admin
        last edited by Giebmasse

        im need mass pls

        Could be interesting seeing more replays parsed and data analyzed/presented.

        1 Reply Last reply Reply Quote 0
        • M Offline
          meatontable
          last edited by

          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 ?

          N 1 Reply Last reply Reply Quote 1
          • N Offline
            Nooby @meatontable
            last edited by

            @meatontable What information can you extract here?

            Relationship of unit experemental built to winning in next 10 mins would be good

            1 Reply Last reply Reply Quote 0
            • M Offline
              meatontable
              last edited by

              Sorry for delay. I'm doing this for fun when I'm free. Of course, a detecting winning conditions is a good goal.

              1 Reply Last reply Reply Quote 0
              • AskaholicA Askaholic referenced this topic on
              • D Offline
                dragonite
                last edited by

                Found this thread after ages to be here. Unbelievable. Guys, you're great! 🙂

                1 Reply Last reply Reply Quote 1
                • AskaholicA Offline
                  Askaholic
                  last edited by

                  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!

                  1 Reply Last reply Reply Quote 6
                  • G Offline
                    gorleg
                    last edited by

                    This is pretty incredible! I've been wondering if you could theoretically train an AI on the incredible amount of supcom replays out there. To do this though you'd need more than just a list of orders; presumably you'd need things like each player's intel, unit counts and locations, current resources, and more. It doesn't look to me like this is available from the replay data, does that sound right? No idea if this is truly possible, just curious 🙂

                    1 Reply Last reply Reply Quote 0
                    • AskaholicA Offline
                      Askaholic
                      last edited by

                      That is correct. In order to figure out that information you’d have to run the replay through the actual game simulation (I.e. watch the replay). You could probably create some sort of mod that would dump that info out while the replay is running, but I’m not very familiar with that side of things. A mod like that might even exist already.

                      1 Reply Last reply Reply Quote 0
                      • N Offline
                        Nooby
                        last edited by

                        I have created a mod that dumps unit information and economy information into the game log. It is on the vault called unit logger.

                        I created some python code that runs multiple instances of FAF at once on a linux server with this mod enabled and goers through a folder full of replays at high gamespeed generating this data.

                        I created a seperate python program to parse out the log into an unitfile displaying
                        "GameTick,Army,EntityId,UnitId,FractionComplete,Position.x,Position.y,Position.z,MaxHealth,Health,ShieldRatio,IsIdle,MassKilled"

                        and an economy file displaying
                        GameTick,Army,lastUseRequested.MASS,lastUseRequested.ENERGY,lastUseActual.MASS,lastUseActual.ENERGY,stored.MASS,stored.ENERGY,income.MASS,income.ENERGY,maxStorage.MASS,maxStorage.ENERGY,reclaimed.MASS,reclaimed.ENERGY

                        This was done a year ago or so. I have processed 659 replays creating 12GB of CSV files (compressed to ~ 300mb) of unit positions with time, player economies, and if players won or lost. From this data you can absolutley get insight into what units built at what time correlate to a win. If you would like this data please message me.

                        https://forum.faforever.com/topic/7746/unit-logger-mod?_=1756499882431

                        1 Reply Last reply Reply Quote 2

                        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                        With your input, this post could be even better 💗

                        Register Login
                        • First post
                          Last post