Skip to content

How does Auto Legality Mod (ALM) work?

Lusamine edited this page Mar 22, 2023 · 8 revisions

Introduction

Auto-Legality Mod (ALM) automatically creates and legalizes a Pokémon based on valid Pokémon Showdown sets which can be made on Pokémon Showdown's website.

All values of the Showdown set must be legal for the mod to find a compatible encounter from a Pokémon game. Once an encounter is identified, extra data is added to the provided Showdown Set's data to create a complete, legal Pokémon.

A Pokémon's trainer details (OT and TID) can be pulled from a directory of trainer data. See the Trainer Data page for instructions.

Generating

  • Friendship is set to 0 for Frustration and otherwise 255 for Return to maximize base power of these moves.
  • Stat Markings are automatically assigned based on the IVs. This can be disabled under Tools > Auto-Legality Mod > Plugin Settings > UseCompetitiveMarkings.
  • Female gender is assigned by default unless specified in the Showdown set. This is to reduce the likelihood of being affected by Pokémon who carry Attract as there is a higher female ratio statistically.
  • IV's are intelligently Hyper Trained. Attack and Speed IVs originally designated as 0 IV or 1 IV are not Hyper Trained since it is common for competitive Pokémon to minimize Attack or Speed.
  • Pokémon sets that are level 50 are assumed to be for ranked, which automatically downlevels a Pokémon to 50. As a result, they will be generated at level 100 where they can take advantage of Hyper-Training for optimal IVs.
  • ALM acknowledges various kinds of PID/IV correlation. This may cause a Pokémon to have imperfect IVs different from the requested set.
    • Previous Generation of Pokémon (Gen 3, Gen 4, and Gen 5) automatically receive PID/IV combos that are compatible with their Nature and Hidden Power. The IVs are then Hyper-Trained automatically if appropriate. Note that if the set specifies 0 or 1 Attack or Speed IVs, the need to respect PID/IV for legality means that these values may not be as low as desired, but they will not be Hyper-Trained to be higher.
    • Generation 3 and 4 encounters with PIDIV restrictions may change the SID to make a Pokémon shiny. This is because changing anything else would require many changes due to PIDIV.
    • Generation 8 SWSH Max Raid and Max Lair Pokémon will generate using Xoroshiro RNG, which act like PID/IV combos in older generations. This can be disabled in settings for less legality and more convenience.
    • Generation 8 SWSH Overworld Pokémon generate using Xoroshiro RNG. This is enforced by PKHeX and cannot be disabled.
    • Generation 8 BDSP Egg Pokémon will generate using Xorshift RNG. Most eggs will be 5 IV as a result.
    • Generation 9 SV Tera Raid Pokémon will generate using Xoroshiro RNG similar to SWSH Max Raids.
  • The priority of games for which the mod searches for encounters is from newest to oldest. This can be changed under the plugin settings.