Skip to content

Usage guide

ercdndrs edited this page Apr 16, 2021 · 8 revisions

If you haven't yet installed all the requisite software as detailed by the Installation Guide, head there now.

Preparing for your first run

Before you run the bot, it needs to know certain things about your hardware setup and about your game. This information needs to be added to a configuration file.

Manual configuration

  1. Open Config.sample.toml in Notepad (or similar text editor).
  2. Click "File" -> "Save As".
  3. Change the name to Config.toml. Ensure that the file is saved as a .toml file (and not a .txt file) by changing "Save as type:" to "All Files (.)".
  4. Following the instructions, modify every value that comes before the ADVANCED section to suit your setup. The bot will hunt the top-most saved legendary path you have by default (although this behaviour can be changed in the ADVANCED section).
  5. If your game language is not in English, change the LANGUAGE value to your game's language. The supported languages are shown in the bottom portion of the file; if you cannot find a section for your language (e.g., [Spanish]) then we do not support your language out of the box. You can manually add your language by copying one of the other language's sections and replacing the values with phrases from your language.

Starting your first run

We recommend running AutoMaxLair for the first time in IDLE (or another Python IDE) so any errors are easily noted in the console.

  1. Open the main script in IDLE by right-clicking auto_max_lair.py and selecting "Edit in IDLE". If that option does not appear, start IDLE and then click "File" -> "Open", then navigate to auto_max_lair.py and select it.
  2. Select the script window and press F5 on the keyboard to run it.
  3. Make note of the messages shown in the Python Shell. Don't be discouraged if an error (indicated by red text) appears! Most users will miss something on their first try.

Troubleshooting

In general, any error or warning shown in the log or in the console should be taken seriously. Errors are often descriptive so please take the time to read and attempt to understand an error before seeking external help in solving it. Some common errors are tabulated below; if you are still unsure what is wrong, please submit an issue on GitHub or reach out on our Discord.

Error Resolution
"No module named xyz" One or more of the additional Python modules was not installed. Revisit the Installation Guide.
"[Errno 2] No such file or directory: 'Config.toml'" Ensure the config file is saved as Config.toml and not Config.sample.toml or Config.toml.txt.
"serial.serialutil.SerialException: could not open port X" The COM port indicated in Config.toml is likely incorrect. For Windows users, the port name should be "COMX" where X is a number that depends on your machine. The number can be found by finding the serial device in the Device Manager.
"AssertionError: XYZ" An internal error raised by the program, usually because of an invalid input. Read the error for the specific issue.
The program starts but video from your webcam is shown. Change the VIDEO_INDEX in Config.toml.
The program starts but no button presses are registered. Repeated warnings appear in the log: "Received "X" instead of sent "Y"." If X is b'', your wires between the UART device and microcontroller may be configured incorrectly, or the wrong hex file may be loaded on the microcontroller. If X is the Y from the previous message, one of the serial buffers may have become desynchronized. Close the program, the completely unplug the UART device and microcontroller from both the Switch and your computer. Plug everything back in and try again.
The program starts but no button presses are registered. No warnings appear in the log. Check that no wireless controllers are connected to the Switch and that it is properly seated in the dock. We recommend starting in the "Change grip/order" screen to avoid this issue altogether.
The program starts and joins a Dynamax adventure, but crashes when choosing a rental Pokemon. The Tesseract path is likely incorrect in Config.toml. Ensure it points to the location where you installed Tesseract. Alternatively, if you specified a non-English language, the corresponding X.traineddata file may not be downloaded or placed in the appropriate folder.
The program runs, but no coloured boxes appear on the screen. The boxes are not necessary for the bot to run. If you would still like to see them, set ENABLE_DEBUG_LOGS to true in Config.toml.
The program starts, but gets stuck in a certain spot (e.g., on the "Fight" menu) with the video playing but no actions being performed. If there is a black border all the way around the game video, the Switch's Screen Size needs to be changed to 100%. See Nintendo's guide for instructions on this step.
When checking the caught Pokemon for shininess, the small red rectangle partially overlaps with the grey Galar symbol. This behaviour is normal; the Galar symbol will be shifted to the right in the case of a shiny.
Clone this wiki locally