A python script to control the Farming Simulator 22 Collectors Edition USB beacon outside of the game.
-
Clone this repository
git clone https://github.com/DJHero2903/GaintsBeacon.git
or download as zip archive, -
Install python 3.12.4 or higher ensuring it is added to your system PATH,
-
Open PowerShell and install the required dependencies from pypi using pip with the requirements.txt file.
hidapi
- Used to communitcate with the USB beacon.Cython
- Dependency for the hidapi module.
pip install -r requirements.txt
-
Run the
main.py
script in PowerShell with the below command, apending any of the below options if you wish.python main.py OPTIONS
Note: Indefinate duration isn't supported by this method.
- Create a shortcut with the location set as described to the
no-console.pyw
script, - Add
pythonw
before the start of the path to theno-console.pyw
script, - Add your chosen options after the path to the
no-console.pyw
script, - Click Next,
- Name your shortcut and click Finish,
- Double click your shourtcut to make the beacon flash outside of the game.
- The location box should be in this format.
pythonw SCRIPT_PATH OPTIONS
- Set how many seconds to turn on the beacon for with the
--duration SECONDS
or-d SECONDS
flags (Duration of 60 seconds maximum, set to 0 for an infinate duration, defaults to 2 seconds). - Set the type of flash for the beacon to use with the
--type TYPE
or-t TYPE
flags (Choices of blink or round, defaults to round).
- Thank you to @Microgenital for creating the giants_beacon.py class, you can find it's source here (MIT Licenced).