Use the power of Python to traverse the cosmos and scout for players within the Football Manager game
Project description
PyScoutFM
Use the power of Python to traverse the cosmos and scout for players within the Football Manager game
Inspired by the fantastic work of @squirrel_plays and the contributors on this thread at FM-Arena
✨ Features
- 🔍 Generate scout reports from your squad and scouting screens within FM
- 📊 Uses a customisable rating system to score players out of 100
- 🔧 Tweak or create your own weightings to evaluate players
- 📂 Exports the scout report into a pretty HTML file
- 🔭 Easily search and sort the players in the scout report
- 🚀 Easily export from the game using the provided views
⚡ Requirements
- Python >= 3.10
- Football Manager (any version that supports the supplied views)
- Windows/MacOS
📦 Installation
- Check if you have Python installed by opening up a Command Prompt/Terminal and typing
python -V
- Install Python if you don't.
Note: If you're on Windows, follow this guide and if you're on Mac, I suggest using Homebrew
- Once installed, in the Command Prompt/Terminal, run:
pip install pyscoutfm
- To verify the installation, run:
pyscoutfm -V
🎮 Generating a Scout Report
Let's get down to business and show you how quickly you can generate a scouting report for your current squad from the command line.
- Firstly, and for reference, to see a list of the commands and options available to you at any step of the way with PyScoutFM, append
--help
to a command:
pyscoutfm generate --help
Export data from FM
The tool requires an extract of data from Football Manager. To make this easy, we can use the views that come supplied with PyScoutFM.
- To save you hunting for them, run:
pyscoutfm copy-views-to --path="MY_LOCATION"
Where
MY_LOCATION
is the path you wish to copy the views to
- Import the views into FM; we'll start with the main squad screen of the team you're managing but note that you could go into your scouting screen as well:
- In the squad screen, use Ctrl+a (Windows) or ⌘+a (Mac) to select all of the players in the screen (this can be laggy!), followed by Ctrl+p/⌘+p, selecting Web Page as the print format:
- Save the printed file into your chosen location:
Generating the Scout Report
The tool comes with a default config file along with some sensible attribute weightings (which were the result of some heavy Machine Learning analysis).
- In your terminal application run the command:
pyscoutfm generate --import-path=MY_LOCATION --export-path=MY_LOCATION
Where MY_LOCATION
is the path from step 5.
Note: The tool is smart enough to only load the most recent html file in the directory you specify
- You should see a Success message confirming the generation of the report.
Using the Scout Report
So you have a Scout Report, now what?
- Open up
latest.html
in your browser and you should see your players from the squad screen alongside their positional ratings which have been calculated with the tool:
-
Clicking on the arrows next to the column headings allows you to sort by that column. Also, a helpful search box makes it easier to find specific players.
-
Each of the rating columns represents a score out of 100. That is, how well suited a player is to a particular position based on the attribute weightings defined in the default weightings file
Hints and Tips
You may find yourself tweaking your search results in Football Manager and re-generating scouting reports often. Below are some tips for doing this optimally:
-
Players that are not fully scouted will not be rated accurately! If you play with attribute masking and they have an attribute of
-
then the tool will convert it to1
. Also, if they have an attribute range of7-11
, the tool will use7
. -
Always export your Football Manager data to the same location. The tool is smart enough to be able to load the most recent HTML file in a directory if you don't pass it an
import_path
parameter. -
You don't need to re-type your command in the Command Prompt/Terminal. Instead use the Up key to scroll through historical commands.
-
Once the report has been generated, just refresh the webpage in the Browser. The tool will always overwrite the
latest.html
. Don't worry though...it also saves a datetime stamped copy of the report as well.
🚀 Commands
To get started, run:
pyscoutfm --help
The available options are:
Usage: pyscoutfm [OPTIONS] COMMAND [ARGS]...
Options:
--version -V Show the version and exit.
--help Show this message and exit.
Commands:
copy-views-to Copy the included views to a specified path before importing into FM
generate Generate a scouting report from the data exported from FM
Copy Views
Usage: pyscoutfm copy-views-to [OPTIONS]
Copy the included views to a specified path before importing into FM
Options:
--path -p TEXT The paths to copy the views to
--help Show this message and exit.
Generate
Usage: pyscoutfm generate [OPTIONS]
Generate a scouting report from the data exported from FM
Options:
--config-path TEXT The path to the config file to use
--import-path TEXT The path to the directory to import from [default: None]
--export-path TEXT The path to the directory to export to [default: None]
--weightings-path TEXT The path to the weightings file to use [default: None]
--weightings-set TEXT The weightings set to use [default: None]
--help Show this message and exit.
🔨 Advanced usage
To be updated
🔭 How does it work?
To be updated
⁉️ FAQs
Q. Why should I use PyScoutFM over Genie Scout?
A. I think it comes down to your workflow and how you play the game. I am on a Mac mostly which doesn't help when it comes to using Genie Scout. I also like to use custom weightings which are easier to update with PyScoutFM and I think the ratings that come out this are more accurate than Genie Scout's defaults.
Q. How does PyScoutFM differ to Squirrel's web app and which is better?
A. Firstly, huge props to Squirrel for starting this movement with Python and Football Manager. I disagreed with how they've setup their weighting/rating system in their tool and valued the work and analysis that had taken place over on FM-Arena's site. As such, I think that PyScoutFM produces more accurate outputs...and even if you don't think so, you can very quickly change the weightings to your liking.
I've put together a comparison table between the two apps:
Feature | PyScoutFM | Squirrel's |
---|---|---|
Online web application | ❌ | ✅ |
Import HTML from Football Manager | ✅ | ✅ |
HTML output | ✅ | ✅ |
Number of player roles/positions in the output file | Unlimited | 8 |
Ratings by role* | ❌ | ✅ |
Ratings by position | ✅ | ❌ |
Ratings are a score out of... | 100 | 20 |
Customisable weightings | ✅ | ❌ |
Evidence for weightings** | Here | Here |
Customisable player positions | ✅ | ❌ |
Customisable attribute groupings*** | ✅ | ❌ |
Customisable columns in the output file | ✅ | ❌ |
* This isn't in PyScoutFM by default but can be added in manually.
** For PyScoutFM this is a little convoluted but the work done by Mark to produce a balanced filter for Genie Scout was translated into the default weightings file.
*** I like to create a club DNA for my saves and this feature allows me to group and weight particular attributes together to produce a DNA rating.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pyscoutfm-1.1.1.tar.gz
.
File metadata
- Download URL: pyscoutfm-1.1.1.tar.gz
- Upload date:
- Size: 49.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5eb8bf3a9e5aad71c37fe238271e64d5cb781217c3d170bb3cfbb6f68e6e703 |
|
MD5 | da2d1c886201150dd453adac44c3c63b |
|
BLAKE2b-256 | 9ed6e0731b7dd77e6e1ff3e3f023b198a7ee2b4e7b269c5321024e0efcf15c77 |
File details
Details for the file pyscoutfm-1.1.1-py3-none-any.whl
.
File metadata
- Download URL: pyscoutfm-1.1.1-py3-none-any.whl
- Upload date:
- Size: 45.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43d807d13dc2539c60c06198317293832b95504337059bb02bd14007ae41a830 |
|
MD5 | e3cf3caa6d568407df445a76471cbe45 |
|
BLAKE2b-256 | 733a6b9faadd0612c4af7719f893db4e051ff12c8804c6c79b1bbf2367ff4f00 |