This tutorial is made with the presumption that you are capable of understanding and following simple steps.
While you may ask questions on details regarding the subject, you CANNOT ask on the how to inject/extract save file, how to install CFW etc.
There are other tutorials for that (and this tutorial presumes you already know those things)
2. able to extract and inject a modified SWSH save
3. A working internet browser (in case you wanna check what den has what mons, etc)
4. Latest version of Leanny's plugin
1. Load your game on your Switch, save in-game, then export the save with your favorite save manager.
2. Figure out what mon resides at (a) what physical den, and (b) what pool does it reside in. (Our page sorts them out by the physical dens, as listed in Leanny's plugin as well as PKHeX’s raid parameters. Also, you can fight Dens via here.)
In this case, I'll go for G-Butterfree. For (b), it can be found in the Rare Den.
3. Load the save into PKHeX
4. Open Leanny's Plugin (Tools>Display Raids), scroll to den found previously (a), then open Raid Calculator.
In my case, it's Rolling Fields 3.
You should see the seed in Den Search being the same seed as the one displayed on your Raid List.
If it is not the same seed, type in the seed value into Den Search.
5. Now, change the species, IVs and other stats as you deem fit. Once done, hit Search.
Once found, copy the Seed displayed.
In my case, I want Square Shiny Male G-Butterfree.
(Note: may take awhile to find the entry)
6. Exit Leanny's Plugin, with the same PKHeX window, go to SAV > Raids.
Go to the (a), and paste the seed, as well as set the Dentype and flag (parameters based on this page)
For my case, it will be G-Butterfree.
So I scroll to Den 003, as found in (a).
I set Den Type to Rare, as it is a rare den
As per (c) I intend to fight it at 1 star, and it's noted to be 10% chance, and based on the page, it's the last 10% of 1 star on the page.
As such, randroll is 91 - 100 (last ten entries to 100), and star is 0 (for stars, it starts with 0th index, so it's intended -1)
I've drawn arrows at the values that needs to be changed.
Example on how randroll correlates to the percentages on serebii
6. Save the save in PKHeX, import it into your game.
7. Now find the den in your game. If you're lost, Leanny's plugin has a mini-map that can show where the den is.
8. Alas, at the physical den, is your encounter!
For my case, my 1 star square shiny male Butterfree is achieved!