codemonkey85 Posted February 21, 2012 Posted February 21, 2012 (edited) EDIT: My current project: https://github.com/codemonkey85/PKMDS Have any suggestions? Let me know in this collaborative document! Check out PKMDS: Save Editor! PKMDS A Pokémon save hacking library written in C++! (currently supports Gen V and limited portions of Gen III / VI) See pictures of the library in action: http://goo.gl/Fg7J1r Project outline: http://goo.gl/4KRDxN Collaboration document: http://goo.gl/iCTKme Created by Michael Bond (aka Codemonkey85) https://plus.google.com/+MichaelBond/ Thanks to Alex "eevee" Munroe at http://veekun.com/ for his SQLite Pokedex database, which powers this software. "veekun-pokedex.sqlite" was built from his database. Thanks to the fine folks at SQLite.org for making it possible to use the Pokedex database... the source files "sqlite3.c" and "sqlite3.h" came from these people. Thanks to those of Project Pokemon who have helped research and document the underlying structure of Pokemon game save files. Thanks to Nicholas Corgan (https://github.com/ncorgan) for contributing directly to this project's code, making it more portable. Thanks to Antidote (https://github.com/Antidote) for plugging memory leaks. Thanks to the folks at Smogon for the stat formula and other things. Special thanks to SCV, Sabresite, loadingNOW, Poryhack, GatorShark, Chase, Jiggy-Ninja, Codr, Bond697, mingot, Guested, coolbho3000 and of course, COM. Some save file documentation available at: http://www.projectpokemon.org/wiki/ This software is in no way affiliated with or endorsed by Nintendo, Creatures Inc. or Game Freak Inc, and is created for solely recreational and non-profit use. Pokémon, Pokémon character names, Nintendo DS and Nintendo 3DS are trademarks of Nintendo. Other trademarks are the property of their respective owners. Edited October 3 by codemonkey85
Guested Posted February 21, 2012 Posted February 21, 2012 Awesome. Window size looks bigger than the old version... is it?
codemonkey85 Posted February 21, 2012 Author Posted February 21, 2012 I don't think so... but since you asked, I'm probably going to introduce a new form factor for the viewer, one that's more streamlined (kind of like the new status screens in B/W actually). Or if nothing else, I'm probably going to cut out the contest stuff.
Guested Posted February 21, 2012 Posted February 21, 2012 Yeah, maybe it is about the same. Not sure, but it just seems like there's a lot of empty space. Oh, and you technically don't NEED the contest stuff if it's a Gen V pokemon. I guess if you design the program to read Gen IV pkm files as well, it wouldn't hurt, since DPP had contests. At any rate, I'm interested in seeing what you cook up.
codemonkey85 Posted February 21, 2012 Author Posted February 21, 2012 There is an awful lot of empty (wasted) space... and I will be attempting to clean that up quite a bit. And yes, I could include contest info for Gen IV, but honestly... who really cares? EDIT: And now there's a poll.
evandixon Posted February 21, 2012 Posted February 21, 2012 I vote no, although that doesn't mean you should give up on it. Perhaps add it later in another version.
KazoWAR Posted February 23, 2012 Posted February 23, 2012 Looking good. I voted for to not worry about the contest info.
codemonkey85 Posted April 6, 2012 Author Posted April 6, 2012 Just a quick update: after playing around with the new code and creating an application to display PC storage boxes, I've come to the conclusion that it's not any faster than my old code after all. So I am now seeking a new approach, including re-writing my library in C++. Stay tuned for more updates.
TeamRocketCollector Posted April 7, 2012 Posted April 7, 2012 Yeah, maybe it is about the same.Not sure, but it just seems like there's a lot of empty space. Oh, and you technically don't NEED the contest stuff if it's a Gen V pokemon. I guess if you design the program to read Gen IV pkm files as well, it wouldn't hurt, since DPP had contests. At any rate, I'm interested in seeing what you cook up. I agree with this. I think the contest/ribbons are only useful if this software can be applied to Gen IV pokemon. If it is only for Gen V, I doubt there will be any need for it. This is looking very nice by the way and I can't wait to see its finished version. I'll be checking back for more updates.
codemonkey85 Posted April 8, 2012 Author Posted April 8, 2012 Even if the user is allowed to edit Gen IV Pokémon, I think I'm going to leave the contest stuff out. It's just a distraction from the more pressing issues. Stay tuned.
TeamRocketCollector Posted April 11, 2012 Posted April 11, 2012 Good point. I'd honestly be happy with all the cool stuff you have for the pokemon already. I can definitely live without the contest stuff. Keep up the good work and good luck. You have the site's continued support and thanks!
codemonkey85 Posted November 6, 2012 Author Posted November 6, 2012 (edited) Just an FYI, I have changed directions for PKMDS once again. I've been coding a new library using Visual C++ (in the hopes to gradually drop the Visual part) and am now hosting most of my source code on Google Drive. My PKMDS source on Google Drive! If you use Google Drive, you should be able to add that folder to your account and sync it to your PC, at which point you can do just about whatever you want with it. I ask only that you link back to me as the original creator. If you have any further questions, feel free to contact me at my Google+ page (or send me a PM here). Edited June 21, 2013 by codemonkey85
codemonkey85 Posted May 7, 2013 Author Posted May 7, 2013 (edited) Just as an update, I have been working away at my C++ library. There's quite a bit of open-ended functionality now. At this point one could use it to create a program that can: Encrypt and / or decrypt a PC storage Pokémon (or party Pokémon) at will Get or set any data for any Pokémon, and do that in a pretty readable way thanks to various value enumerations for species, items, in-game locations, etc. Get or set the values and quantities of bag items Fix checksums for Pokémon data, block data for the party, PC storage system, items, the save file as a whole, and really any other block you know the location for. Sort Pokémon based on criteria of your choosing (work in progress) As another proof of concept, here is a sample of how one could use my library to, say, turn every Pokémon in a given save file into a Psyduck: #include "pkmds_g5_sqlite.h" using namespace std; int main(int argc, char* argv[]) { char * savefile; // Either you can name your in file manually savefile = "IN.sav"; // Or you can drag and drop your in file onto the .exe //savefile = argv[1]; // Name your out file char * saveout = "OUT.sav"; // Declare your SAV and PKM pointers bw2sav_obj* sav = new bw2sav_obj; pokemon_obj* pkm = new pokemon_obj; // Read your SAV object from the file read(savefile,sav); // Open your database file opendb("veekun-pokedex.sqlite"); // Iterate through the members of your Pokemon party for(unsigned int i = 0; i < sav->cur.party.size; i++) { // Set your PKM pointer to the current party member pkm = &(sav->cur.party.pokemon[i].pkm_data); // Decrypt the party member decryptpkm(pkm); // Do stuff with PKM, which is now the party Pokemon at party slot [sLOT + 1] pkm->species = Species::psyduck; // Recalculate the party data of the current party member pctoparty(&(sav->cur.party.pokemon[i]),pkm); // Encrypt the current party member encryptpkm(&(sav->cur.party.pokemon[i])); } // Fix the party block checksum calcpartychecksum(&(sav->cur)); // Iterate through each PC storage box and slot for(int box = 0; box < 24; box++) { for(int slot = 0; slot < 30; slot++) { // Set your PKM pointer to the current stored Pokemon pkm = &(sav->cur.boxes[box].pokemon[slot]); // Decrypt the stored Pokemon decryptpkm(pkm); // Determine whether or not this is an empty slot if(pkm->species != 0) { // Do stuff with PKM, which now points to the Pokemon at box [bOX + 1] and slot [sLOT + 1] pkm->species = Species::psyduck; } // Encrypt the current stored Pokemon encryptpkm(pkm); } // Fix the checksum of the current box calcboxchecksum(&(sav->cur),box,savisbw2(sav)); } // Close the database file closedb(); // Fix the save file checksums fixsavchecksum(sav); // Write the save file to the disk write(saveout,sav); // Clean up your pointers delete sav; sav = 0; pkm = 0; // Exit the program and return 0 return 0; } If there are any further questions, feel free to email or PM me! Edited June 17, 2013 by codemonkey85
codemonkey85 Posted June 18, 2013 Author Posted June 18, 2013 (edited) Okay folks, Github is go! https://github.com/codemonkey85/PKMDS Edited February 13, 2014 by codemonkey85
skylarmt Posted June 29, 2013 Posted June 29, 2013 I want to use this library in a program I am making, and I would like to know what license the code is released under. My program is GPL'd, by the way. Can I use the GNU General Public License v2 (or greater) when dealing with your code? If so, that would be a great help. Thanks!
codemonkey85 Posted June 30, 2013 Author Posted June 30, 2013 @skylarmt Yeah, I never quite bothered to look into licensing and stuff, but I just tossed GNU into the readme for now. I'll add the little blurb to the source files sometime later. Anyway, do what you will. I would love to know more about your project by the way. Feel free to PM (or preferably email) me about it sometime. And don't hesitate to contribute to the repository!
JamesBrownie Posted July 13, 2013 Posted July 13, 2013 This is gonna sound stupid, sorry Im really a big newb when it comes to this computer stuff, I downloaded all the code stuff but what do I do with it now?
Poryhack Posted July 13, 2013 Posted July 13, 2013 I assume you're not a programmer? What this is a building block for other programmers to make useful pokemon apps. It doesn't do you any good by itself. If you're looking for a finished product, try PokeGen.
codemonkey85 Posted July 14, 2013 Author Posted July 14, 2013 Poryhack is 100% correct, although with some time and work I also plan to have a "finished"* product in the form of a sav editor. But yeah, in all likelihood PokeGen has everything you want right now, so you'd best download that. *Technically software is never finished :-P
codemonkey85 Posted July 30, 2013 Author Posted July 30, 2013 (edited) Major thanks to Nicholas Corgan (https://github.com/ncorgan) for contributing directly to this project, making it more portable, and perhaps most excitingly more compatible with Linux! Work has yet to be done to get the Qt project working properly, but things are very exciting right now for the community of Pokémon hacking / open source overlappers! Edited August 4, 2013 by codemonkey85
codemonkey85 Posted August 8, 2013 Author Posted August 8, 2013 Have any suggestions? Let me know in this collaborative document!
codemonkey85 Posted August 18, 2013 Author Posted August 18, 2013 (edited) UPDATE! To make a long story short, this library is going to be CLR compatible pretty soon. What does this mean for you as a developer? It means you can have all the same functionality plus the ability to build a GUI in Visual Studio! WUT I'll be working on extracting the SQL string generation from the existing functions and building another, more generic class for accepting those strings to return data, which means a lot of re-doing my work, unfortunately. But I do it for SCIENCE! Edited February 13, 2014 by codemonkey85
codemonkey85 Posted August 19, 2013 Author Posted August 19, 2013 (edited) After some restructuring of the library, I have now made it possible to develop applications using Visual C++/CLR: For those of you interested in developing Windows applications with my library... I just made your life a whole lot easier. :-D Edited February 13, 2014 by codemonkey85
codemonkey85 Posted October 25, 2013 Author Posted October 25, 2013 Just FYI, I removed the SQLite database files from the Git repository to reduce the amount of bandwidth used when initializing a new environment. The databases can be downloaded from https://www.dropbox.com/sh/2etuv926vyey5ou/jeAXk1qDXc. Of course, they haven't changed since I moved them, so you could just copy them to a local directory yourself. Actually, now that I'm thinking about it, I'll add the folder path I was using before to the .gitignore so that current local branches won't break after syncing the change.
codemonkey85 Posted October 25, 2013 Author Posted October 25, 2013 Just a quick notice - I updated the Qt application to include some memory fixes (thanks to a Githubber named Antidote). You can grab the update at the usual link.
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