architdate / PKHeX-Plugins

Plugins for PKHeX
MIT License
590 stars 132 forks source link

Egg encounters with imperfect IVs (Not specified in showdown set) #118

Closed SteveCookTU closed 2 years ago

SteveCookTU commented 2 years ago

Describe the bug Egg encounters have imperfect IVs when generated from showdown sets and when specific IV info is not given.

To Reproduce Steps to reproduce the behavior:

  1. Supply showdown set to ALM API

Expected behavior All IVs default to max value.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context This is with using ALM's API.

API Settings: EnableEasterEggs = false; AllowTrainerDataOverride = true; AllowBatchCommands = true; ForceSpecifiedBall = true;

Trainer info for all is: TID16 = 52043; SID16 = 34419; OT = "Steve";

Example showdown set: Omanyte @ Damp Rock Ability: Swift Swim Level: 10 Shiny: Yes Modest Nature EVs: 6 HP / 252 SpA / 252 Spe - Surf - Ice Beam - Spikes - Rain Dance

Lusamine commented 2 years ago

This is intended due to PIDIV in BDSP.

Refer to https://github.com/architdate/PKHeX-Plugins/wiki/How-does-Auto-Legality-Mod-(ALM)-work%3F#generating.

SteveCookTU commented 2 years ago

If the IVs are explicitly specified in the showdown set, will the Xorshift search continue until it finds a PID that matches the exact spread? (until the timeout of course)

kwsch commented 2 years ago

No, eggs do not have an IV generation loop in the template->pkm logic.

Keep in mind that this plugin is intended for achieving battle legality, as Hyper Training exists. If targeted IVs are desired, then external tools such as RNG Reporter /etc are to be used for specific preference values.