Jump to content
RodrigoTR

PkHex Personal database

Recommended Posts

I have been trying to organize my own pokemon database from the save files I extracted from my cartridges in PKHeX, but it defaults for sorting from A-Z but I want to make it go from 001-800, is there any way to do that?

Share this post


Link to post
Share on other sites
29 minutes ago, Kaphotics said:

You can manage your exported files however you want.

I saw that in the tutorial section, but I have not  been able to put it in number order (PkHex Database UI). I created folders numbered from 001-810 and the pokemons keep apperaring out of order. (Maybe could be added a A-Z or Pokedex order button to be toggled).

Edit: I know you can search by species, but I want to make it ordered in the sprites section.

Edited by RodrigoTR

Share this post


Link to post
Share on other sites
4 hours ago, RodrigoTR said:

I saw that in the tutorial section, but I have not  been able to put it in number order (PkHex Database UI). I created folders numbered from 001-810 and the pokemons keep apperaring out of order. (Maybe could be added a A-Z or Pokedex order button to be toggled).

Edit: I know you can search by species, but I want to make it ordered in the sprites section.

The goal of the 'database' is to have the fastest load & search speeds possible. Sorting the database within the GUI isn't really intended; it's more for searching through your dumped pkm & sav backup contents. For speed, the program loads data on parallel threads, so ordering isn't preserved.

If you add the below line of code:

RawDB.Sort((x, y) => x.Species.CompareTo(y.Species));

... right above this line (link) and recompile, the program will sort the database once it's done loading all the files.

For a database of 111,000 -- mine, the Species Sort took 137ms; I have a 4x4GHz processor, others might not have comparable specs. I prefer to keep the original sorted order, as the bak savefiles are loosely grouped together in slot order. Species order is meh, others might prefer ordering by format, or a more complex sort (which would take a non-negligible amount of time for larger databases).

For a more complex sort:

RawDB = RawDB.OrderBy(z => z.Format).ThenBy(z => z.Species).ThenBy(z => z.Gender).ToList();

That will sort by format, then by... but takes a bit more RAM/cpu to process the sorting.

Share this post


Link to post
Share on other sites

I will try to do that, have no experience on how it is done, but I`ll search it up. Thanks! (Btw 111k wow)

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...