Jump to content

codemonkey85

Innovator
  • Posts

    1162
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by codemonkey85

  1. Hi all, In order to help people use PokeTransporter, I have created a Windows application to remove all HM moves from all Pokemon in a save file. This way, all Pokemon will be transferrable right away. To use it just drag and drop your save file onto the .exe, and your modified save will be created as "OUT.sav". In the case a Pokemon has 4 HM moves, the only move they will know is Return. You can grab the .exe here: http://goo.gl/xlgxLp I'm still testing this for bugs, so if you spot any, let me know. EDIT: This feature has also been added to my PKMDS: Desktop Edition application, so I'll go ahead and close this thread soon.
  2. Bam. void calcchecksum(gbapokemon * pkm) { uint32 sum = 0; uint16 * word = new uint16(); word = reinterpret_cast<uint16*>(&(pkm->encrypted)); for(int i = 0; i < 24; i++) { sum += word[i]; } pkm->checksum = sum; } This is in C++. I used some structs and typedefs but you should get the idea. If you have any questions ask away. You can find me on the IRC as well.
  3. Hey Metropolis - could you provide me with a test Pokemon from Gen III? Or better yet, maybe a quick app that just dumps a bunch from a Gen III save file? I'd like to try doing the checksum myself, and I need some test cases to test it out. If I find any success I'd be happy to share my code with you.
  4. Well according to Bulbapedia, the Pokemon data checksum "is computed by simply adding all the unencrypted values one word at a time". Are you having trouble doing that?
  5. It's safe to say an invalid Gen V species will not be allowed into Transporter.
  6. It is true - the whole reason we use decrypted PKM files is because COM (creator of Pokesav) did it. He didn't do many things correctly, but we learned some of his bad habits all the same. Really? Cleaner than just defining the binary layout in a multi-tier structure then creating a pointer at the memory location of the save file? I find my way so easy to work with in code! struct pokemon_obj : pkmunencryptblock,pkmblocka,pkmblockb,pkmblockc,pkmblockd {}; //... struct box_obj { // size: 0x1000 public: std::array<pokemon_obj,30> pokemon; // uint16 : 16; uint16 checksum; byte buf[0x0c]; box_obj() { memset(this,0,sizeof(box_obj)); } }; //... struct bw2savblock_obj { // //... std::array<box_obj,24> boxes; // size: 0x18000 //... }; Then I get to do nifty stuff like: std::cout << "The Attack IV of the Pokemon stored in Box 1, slot 1 is " << sav->cur.boxes[0].pokemon[0].ivs->attack << "\n";
  7. I know enough about Pokemon GBA save files to tell you a hex editor is going to be pretty useless here. Pokemon GBA save games are divided into a number of blocks, which are rearranged to be "out of order" so that the data you're looking for won't necessarily be where you expect it. Plus, even with an unscrambled save file you'd still have to fix all checksums before the game recognizes any changes.
  8. So pkm is the byte array containing the PKM data and 0x38 is the offset for the IVs, right? This is the syntax for BitConverter.ToUInt32: 'Declaration <CLSCompliantAttribute(False)> _ Public Shared Function ToUInt16 ( _ [b]value[/b] As Byte(), _ [b]startIndex[/b] As Integer _ ) As UShort This is what you are doing: UInt32 Stats = BitConverter.ToUInt32([b]ARRAY[/b], ([b]startIndex[/b] << 0)); See the problem yet? You're shifting the index, not the value at that index. You need to fix your parentheses, I think: UInt32 Stats = BitConverter.ToUInt32(pkm, 0x38) << 0); You do realize [0-31] is the range of values, right? That doesn't go in your code.
  9. Agreed. Any more posts about "what's the point" will be deleted - this is now a contribution thread.
  10. Nintendo 3DS Friend Code: 2750-1320-9316 Pokémon Y Name: Mike Friend Safari Type: Electric Friend Safari Pokémon: Pachirisu Helioptile Galvantula
  11. Seeing as the hexagon is used to represent the Kalos region in other places, this makes sense.
  12. I know a guy who is working on an open source library dealing with save files across every generation. I'm sure his implementation would have no problem handling your use case. https://github.com/ncorgan/Pokemon-sim If you were a programmer, this would be a great place to start.
  13. People, remember what Bond, said. Direct contributions only. This is still a work in progress, and when it is ready for people to use you will know about it. If you don't mind, a better use of your time and resources would be to document the index numbers of new moves and new abilities as you dump the data.
  14. If you're referring to 0x04 - 0x05, I believe those were runtime flags in the previous games that indicated whether or not data was encrypted. One was for box data and one was for party data.
  15. I'm not. Anyway, thanks for this! I threw it into the veekun spreadsheet for the time being - which I highly recommend people refer to when trying to discover new items and things.
  16. The move IDs of moves from previous generations are most likely all the same index numbers as in previous generations (they have been so far anyway). For reference: http://bulbapedia.bulbagarden.net/wiki/List_of_moves However, if you wish to contribute index numbers for new moves, by all means...
  17. Yikes. Thanks for the head's up. Good luck man. I think we're all pretty excited to start getting some real data (well I know I am).
  18. Pretty sure it's 4.0. The backend library is vanilla C++ so I could compile a version for Linux / Mac if people need it. This is just a bare-bones editor for those experimenting with the new format. If you want something polished... wait a while.
  19. Here is a link to the PKX Editor I have created: https://www.dropbox.com/s/bmklyrwq4lwsv7q/PKX%20Editor.exe
  20. Any chance you could upload the straight binary data? I've been curious about these but haven't gotten properly setup to get them. EDIT: In case it's any use to anyone here: as of now the backend functionality for the PKX editor I've been working on is done. All that's left to do now is rearrange the UI and add labels so things actually make sense. I modeled my program after the structure reported by Mat and Xfr, and verified myself that encryption and shuffling work, so anyone who's been able to extract / inject PKX files should find this helpful. The source is on my GitHub (https://github.com/codemonkey85/PKMDS-G5/tree/master/PKX%20Editor). I'll post a binary (for Windows only) later. It will require the .Net Framework for the time being.
  21. Something interesting I noted today - it doesn't look like unicode names like OT name and nickname have terminators (FF FF) anymore.
  22. Well technically... But for the record I think opening this functionality up to the public is a terrible idea.
  23. For that matter I have also added the structure and encryption to my PKMDS library on GitHub. I plan to spend some time figuring out where more of the data is (ribbons, etc.).
  24. Thanks to Mat and Xfr, I have added very early support for Gen VI PKX files - the general structure is outlined and the encryption / shuffling is supported at this time. You can find the structs and methods in pkmds_g6.h and pkmds_g6.cpp.
×
×
  • Create New...