kwsch / PKHeX

Pokémon Save File Editor
https://projectpokemon.org/pkhex/
Other
3.64k stars 684 forks source link

[FEATURE REQUEST] Set Lowest Legal Level #902

Closed mjd85 closed 7 years ago

mjd85 commented 7 years ago

I have a lot of Level 100 Pokemon in my boxes. I wish I could easily modify them to be their lowest level possible. For example, it would be awesome if I could do this with Charizard, where if I ran the batch editor it would change all Level 100 Instances of him to Level 36, the earliest Level he could be. For Lunala and Solgaleo, it would make them Level 53. This data should already be in the program for legality use.

An instance in the batch editor would be: =CurrentLevel=100 .CurrentLevel=$evolved

Where it would take all Level 100 Pokemon, and make them the level they evolved into their current stage. There would be some legality issues with moves, but overall this seems like the quickest way to edit a lot of Pokemon levels.

The manual way of doing this would be looking at a list of when the Pokemon evolved, and adjusting their level accordingly. I just figured since the data was already in the program it would be easier to change my sets this way, and I'm sure others can benefit as well.

If this can't be implemented, could I get the list as it's shown in the program? It would still be far quicker to look at that list then to go through each Pokemons page on Bulbapedia or something.

kwsch commented 7 years ago

Already done by using suggested met location.

https://github.com/kwsch/PKHeX/blob/master/PKHeX.WinForms/Subforms/PKM%20Editors/BatchEditor.cs#L454-L467

                case nameof(PKM.Met_Location):
                    var encounter = info.SuggestedEncounter;
                    if (encounter == null)
                        return false;

                    int level = encounter.Level;
                    int location = encounter.Location;
                    int minlvl = Legal.getLowestLevel(PKM, encounter.Species);

                    PKM.Met_Level = level;
                    PKM.Met_Location = location;
                    PKM.CurrentLevel = Math.Max(minlvl, level);

                    return true;
mjd85 commented 7 years ago

Sorry if I'm slow with this...

=Box=1 =Slot=3 .CurrentLevel=???

What would I put there?

kwsch commented 7 years ago
=Box=1
=Slot=3
.Met_Location=$suggest
mjd85 commented 7 years ago

That is awesome. Thank you.