A fork of ironandstee1's swemu-plus-plus to shiny hunt using the fast-travel method and macros in Pokémon Legends: Z-A.
This is only compatible with ATMega32U4 based boards (Arduino Leonardo, Arduino Pro Micro) and compatibility for other boards is not planned.
Designed to be interfaced with using a 25 button (5x5) button matrix, but can be used without. Will just need to reflash when starting a new hunt.
Enclosure: 5x5 macropad by _m40
Parts:
- 1x Arduino Pro Micro/Leonardo board (I used one of these clone boards with USB-C, although USB-C to USB-C directly doesn't seem to work. USB-C to USB-A with a USB-C hub plugged into the console works well, though. USB-C to USB-A on the dock works perfectly as well.)
- 25x any keyboard switches (I used Outemu Switches from AliExpress--around $3.50 for 30 switches)
- 25x 1N4148 diodes for the rows
- 4x any color LEDs
- 4x 100Ω resistors
- (optional) 1x button for a reset button (I used a button from this set, but any random button should be fine)
- wire, solder, soldering iron, flux, etc.
I've included a diagram of my wiring in this repository, which can be found here.
You can use different pins or a different board, but you will have to adjust the code accordingly. Just change the rowPins[ROWS], colPins[COLS], and ledPins[LEDS] variables to match your row/column/LED pins in order.
The button matrix uses 4 LEDs to indicate different "pages".
The bottom row will always be the same 5 functions:
- Refresh Area
- Refresh Bench
simpleScript()- Previous Page
- Next Page
The top 4 rows will change depending on what page you're on. You can consult the Page ID table for more information.
- Download the Arduino IDE (tested on 1.8.19 and 2.3.6)
- Download Arduino LUFA and follow the instructions on its repository to set it up.
- Open
plza-shiny-tool.inoin the Arduino IDE, select your board type and serial port.- If using a button matrix, skip to step 6. Otherwise, continue.
- Set
buttonMatrixtofalse. - Set
zoneIdequal to the desired Wild Zone's number, or other ID from this table (more IDs coming soon). - Upload code to board. You may need to press the reset button/bridge reset pins during upload.
See this documentation for instructions, and see this documentation for explanations of macros.
If you want to create your own scripts, there is an included function called simpleScript in the main.ino file. Simply make the simpleScript(); the only function call in main and write a script such as
simple.Left(1000);
simple.Nothing(1000);
simple.Right(1000);
simple.Nothing(1000);
simple.Up(1000);
simple.Nothing(1000);
simple.X(1000);
simple.Nothing(1000);
simple.Y(1000);
simple.Nothing(1000);
simple.A(1000);
simple.Nothing(1000);
simple.B(1000);
simple.Nothing(1000);
to execute it! This example is aleady provided in the source code.
If you would like to see the available functions or configure the wait time after every function, check out the SimpleScripting.h header. You can also create classes and functions as I did if that's your preference.
- Add coords for non-wild area fly locations
- Fix not being able to press a new button after the old one is running
- .ino file cleanup
All credits go to ironandstee1 as well as fluffymadness for their original projects.
fluffymadness also thanked:
Special thanks to shinyquagsire's and progmem's reverseengineering work for the pokken tournament controller. (https://github.com/progmem/Switch-Fightstick)
Dean Camera for the LUFA Library
zlittell, msf-xinput was very helpful for starting.