Skip to content

Python script for analyzing end-of-round screenshots of the free-to-play game Mechwarrior Online.

License

LGPL-3.0, GPL-3.0 licenses found

Licenses found

LGPL-3.0
COPYING.LESSER
GPL-3.0
COPYING
Notifications You must be signed in to change notification settings

gnijieb/mwo-screenshot-analyzer

Repository files navigation

Updated mwo-screenshot-analyzer to V0.3 Contact: [email protected] Github: https://github.com/gnijieb/mwo-screenshot-analyzer

DISCLAIMER: Good results will only be achieved when requirements are met.

How do you use it? What does it do?

  • put screenshots in input folder
  • run script
  • get raw data

You basically get the numbers/data from the end-of-round screen (as CSV) to process further (e.g. refer to the google spreadsheet below).

Info/Requirements

  • Supported resolutions: 1920x1080, 1920x1200, 2560x1440
  • Screenshots should be taken in a non-lossy format (e.g. png using FRAPS), lossy formats like jpg will produce significantly more errors.
  • Only Quickplay (Solo or Group) supported

Installation on Windows

  • Python Installer

  • tesseract-ocr

  • Get Python modules:

    • Open a Command Prompt (cmd.exe)

    • Change directory to the location of mwo-screenshot-analyzer

      • e.g.: "cd C:\mwo-screenshot-analyzer"
    • Levenshtein:

    • update pip (package manager)

      • run: "python -m pip install -U pip"
    • Python Imaging Library (PIL fork): Pillow

      • run: "pip install Pillow"
    • pytesseract

      • run: "pip install pytesseract"
  • create directories in mwo-screenshot-analyzer folder (if not exist): input, output, intermediate, processed

Usage

  • You need screenshots of both the player and team stats (end of round) in a specific order (don't mix):

    • first: teamstats, second: playerstats
    • first: playerstats, second: teamstats
  • place your screenshots in input directory

  • Open a Command Prompt (cmd.exe)

  • Change directory to the location of mwo-screenshot-analyzer

    • e.g.: "cd C:\Users\USERNAME\Desktop\mwo-screenshot-analyzer"
  • Example with screenshots created with FRAPS (player stats first, team stats second)

    • run: "python analyze.py -p "PLAYERNAME" -t fraps -m3"
    • run: "python analyze.py --help" to see available arguments/usage
  • if something is not recognized correctly or as expected, you are asked to open the image in input folder and enter the desired value or select from a given list of best matches

  • processed screenshots are moved to the processed folder

  • the result is in form of CSV in: output/2016-05-01 20-56-49_data.csv

Optional: External Processing You can create your own external processing module to e.g. submit the data to a database or save it in a specific format. Refer to ext_example.py.

If anyone is interested, feel free to check it out at https://github.com/gnijieb/mwo-screenshot-analyzer

OR: Download Prepackaged ZIP including Python, Tesseract-OCR installers and prebuilt Python modules (Links to those downloads are also in the README).

Usage is explained in the README file.

EXAMPLE of evaluation: https://docs.google.com/spreadsheets/d/1L7uE4kvwKsK5Vhcz5K5A7WlRuirLKF70BmLtKdE4454/edit?usp=sharing (the data on the input tab is the output of the script)

SAMPLE CSV data: http://pastebin.com/r3rWVTTP

If you want to contribute/help out or if you encounter any issues, please PM me.

About

Python script for analyzing end-of-round screenshots of the free-to-play game Mechwarrior Online.

Resources

License

LGPL-3.0, GPL-3.0 licenses found

Licenses found

LGPL-3.0
COPYING.LESSER
GPL-3.0
COPYING

Stars

Watchers

Forks

Packages

No packages published

Languages