1582 Posted 4 hours ago Posted 4 hours ago Greetings, Super noob here when it comes to this kind of stuff, but for my CS50 final project I decided to create an offline .pkx bank-like app in python using tkinter, sort-of how PKHeX looks, but basically just for storage. For that, I need to parse the .pkx files to get some needed info for the mons displayed. I could just theoretically create a separate text file that stores all of this info from some other source and just look it up with the Pokemon national dex index that PKHeX automatically puts at the start of the file upon extraction, but I feel like that would be extremely inefficient. How exactly would one go from a .pkx file to something akin to a dictionary for practical use in python? This might be a question asked a hundred thousand times and I have very little technical knowledge, so any help would be appreciated. Thanks.
Kaphotics Posted 3 hours ago Posted 3 hours ago Depends how much you want to read, and which formats you wish to support. pk* files are normally saved in their decrypted & unshuffled state. You can probably ignore that, but here's gen4's reference. For reading the byte array into a structure, however you want to do it. To read species, you need to read it from the correct offset. Gen6's reference. Converting to json isn't really advisable; there are so many properties.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now