YodaDaCoda Posted September 23, 2012 Posted September 23, 2012 (edited) Greetz everybody. For as long as I've been playing with PKM files, I've wanted a way to create them through the commandline for quick/batch generation. So, after a lot of searching and re-learning python, I made my PKM Generator. It's designed to make generating legal pokes as easy as possible. There's still a bunch of work to do, but for now it's functional. Example usage: python pkmgen.py --pokemon="larvitar" --move1="bite" --move2="leer" --edate="21,09,12" --mdate="21,09,12" --ivs="31,31,31,31,31,31" --gender="male" --ability="guts" --nature="timid" --level="10" --ot="Name,0,0,male" > newpoke.pkm I'd love some feedback, especially if someone understands better than I how to generate the PID properly (at the moment it only seems to generate a valid PID about 50% of the time). Credits go to Ceol, creator of pypkm (https://github.com/ceol/pypkm), without which I would not have been able to create this. PKM Generator..zip Edited September 25, 2012 by YodaDaCoda
Kaphotics Posted September 23, 2012 Posted September 23, 2012 for PIDs & Ability relation (50% => this is what's wrong...): PID >> 16 % 2 = ability each pokemon has an ability 0 or ability 1, and the ability should match the PID's bit.
YodaDaCoda Posted September 23, 2012 Author Posted September 23, 2012 Thanks for your answer. I understand that each pokemon has an ability 0 or 1, and that the PID needs to match, but I don't understand your PID >> 16 % 2 = ability. Would you mind explaining?
Kaphotics Posted September 23, 2012 Posted September 23, 2012 (edited) pid is 32 bits, bit shift 16 to the right (discard the 16 lowest bits), then modulo 2. this returns the 17th bit of the PID, which sets the ability. mons with only one ability aren't constrained to bit=0. Edited September 24, 2012 by Bond697
YodaDaCoda Posted September 25, 2012 Author Posted September 25, 2012 It's a commandline program, written in Python and using the PYPKM library (which I did not write and is far beyond my coding ability). It requires Python installed on your computer to run. It has no user interface. It takes the arguments given on the commandline and uses them to generate a new PKM file from scratch. It's basically my attempt to take a lot of the work out of generating *legal* pokemon
ceolceol Posted October 7, 2012 Posted October 7, 2012 Oh, awesome! I didn't know anyone actually used that thing. It's a bit of a mish-mash because halfway through, I started using Construct. I also used it to teach myself Python, so I'd really appreciate any feedback. @Kaphotics The PID doesn't necessarily have to match the ability. It just means it's "illegal". The game will still recognize it, but it's up to the author to ensure the proper ability is given if they're aiming for legality.
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