FAForever Forums
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Login

    Text data output from mods.

    Scheduled Pinned Locked Moved Modding & Tools
    4 Posts 3 Posters 417 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.
    • KaletheQuickK
      KaletheQuick
      last edited by

      I was wanting to make a few mods to collect some data from the game for data analysis, and automatic testing. So I wanted to know if anyone knew how to or knows where an example is, if outputting data to some text file.

      I'm wanting to make some automatic unit testing things, basic engagement testing with large iteration numbers. And I'm hoping to output the data that makes the score graph, then run rated replays and do some big data on all that stuff.

      Thank you!

      You must deceive the enemy, sometimes your allies, but you must always deceive yourself!

      1 Reply Last reply Reply Quote 0
      • JipJ
        Jip
        last edited by

        You can't write to an external file.

        Best approach is to gather the data in-game and when the game ends you write it all to the log in some readable format. Then use an external program to read the log, get the readable format and parse it.

        A work of art is never finished, merely abandoned

        1 Reply Last reply Reply Quote 1
        • S
          Softles
          last edited by

          I have a tool you can install and run relatively easily: https://github.com/HardlySoftly/FAF-AI-Autorun

          It is designed for auto-running AI vs AI games in large batches, so isn't exactly your use case, but it does include a variety of things that will overlap with what you're interested in:

          • Configurable automated launching of skirmish games from the command line.
          • Support for batches of games run in parallel (it can restrict each FA instance to a different core for best performance).
          • Outputting data to logs from each game, then collating those together for overall results.

          Hopefully this is helpful 🙂

          KaletheQuickK 1 Reply Last reply Reply Quote 1
          • KaletheQuickK
            KaletheQuick @Softles
            last edited by

            @softles Holy shit my dude, this is outstanding.

            I was driving myself mad trying to get io.open to do something. I'll be sure to check your code out and ask you a million questions!

            You must deceive the enemy, sometimes your allies, but you must always deceive yourself!

            1 Reply Last reply Reply Quote 0
            • First post
              Last post