FusionBot v8.0.8
Fix Priority Methods that Interfere w/ Shiny Variables
v8.0.8
Typically, when the user requests Shiny: Yes but the encounter ALM picks is shiny-locked, ALM returns the Pokemon non-shiny without trying any other encounter using its SetShinyBoolean. Then in APILegality, ALM checks legality and returns a successful encounter that's non-shiny. A non-shiny PKM on a shiny-locked encounter is legally valid, so ALM just stops and returns it as Regenerated without it being shiny. No retry, no error. Just a silent push, ignoring the shiny request.
Some people running FusionBot would use the default GameVersionPriority & PrioritizeEncounters, which prioritized Static encounters over Egg and Mystery. With Static set higher in the priority list, ALM accepts it using the logic stated above, forcing users to receive non-shiny requests.
GameVersionPriority should follow the PriorityOrder over anything else, relying on the bot host to set the PriorityOrder in the Hub/Config, setting the order from top-to-bottom for each bot with your personal preference.
PrioritizeEncounters should also order the encounters to be more free and open to accept more variables by following the order:
- Slot
- Egg
- Trade
- Mystery
- Static
To fix it for those not running in the same Priority cases, TryGetAsShiny was implemented next to TryGetAsWildOrEgg. The bot will now temporarily set PriorityList = [Slot, Egg, Mystery, Trade, Static] AND temporarily sets APILegality's GameVersionPriority = PriorityOrder (so the user's custom priority list is respected even if they picked NewestFirst). The call to GetLegal will return the PKM instance only if it's both shiny AND legal.
Added a re-entry guard so the GetLegal call doesn't infinitely retry.
Basically, no matter how a user configures PrioritizeEncounters or GameVersionPriority, shiny requests for species capable of being shiny will keep working, because the bot always has a backup search path that's good for a shiny result.
- By default, the PrioritySettings in FusionBot for encounters is set as Slot -> Egg -> Trade -> Mystery -> Static.
- By default, the GameVersionPriority in FusionBot is set as PriorityOrder.
- By default, the Timeout in FusionBot is set to 20.
- PriorityOrder should be set by the bot's use case on an individual basis.
As an example, my Z-A bot's order is:
- ZA
- SL
- VL
- LA
- BD
- SP
- SW
- SH
- GE
- GO
- US
- UM
- S
- M
etc.
Basically, I prioritize the game my bot is running as the first in the list, then set the best fitting order to my own needs in a similar way as above. I mostly try to keep a majority of it going down by generation.