Search the Community
Showing results for tags 'Gen 5'.
-
For the fifth generation of Pokémon games the RAM is actually very easy to read when compared to the fourth generation. This is largely due to the fact that when the RAM is opened in a simple text editor the headers in the RAM are in plain text. However, ripping Pokémon from RAM is both easier, but harder than generation four. In my pervious topic when I broke down the structure of Pokémon in generation four’s RAM I was able to locate all of the important information of the Pokémon, but with generation five important information that one would expect to find does not appear to be present at a first glance. Fortunately that is not where this topic ends; it turns out all Pokémon that are on the field as well as the entire party of all trainers are stored in the RAM in an encrypted format. It appears that the entire party block from the save is copied into the RAM and when a battle starts the other trainer’s Pokémon in loaded into the RAM using the exact same structure as the player’s party Pokémon. This allows for easy ripping of Pokémon at the cost of this topic appearing extremely underwhelming due to this outcome (sorry no table this time). How to Extract Pokémon from RAM Dumps During a Non Vs. Recorder Battle As stated earlier the RAM for generation 5 is very easy to read and this easiness to read makes it easy to rip Pokémon. In order to rip a Pokémon you will need to find it in the RAM and that is where the header N.pokeparty.c comes into play or its hex equivalent 4E 19 70 6F 6B 65 70 61 72 74 79 2E 63. In most cases there will be four instances of this header with the first one being the player’s party, the second one being the NPC’s party, the third one being the player’s party again, and the last one being the NPC’s party again (upon writing this I have realized that I did not test this with a multi-battle so the results my change for that). In some cases there may be an extra header before the first normal instance of it where different functionality such as Wi-Fi is mentioned. In order to start extracting a Pokémon you will need to start 20 bytes after the c in N.pokeparty.c, therefore the 21st byte onwards will be the start of the Pokémon data. Since it follows the same structure as party Pokémon in the save each Pokémon occupies 220 bytes so with some simple multiplication you can find the end of relevant data in the block. At this point I have covered general information and how to find the Pokémon, but now you probably want to know how to get a Pokémon from the RAM to the save even though the data is encrypted. 1. Locate the correct party block that has the Pokémon you want. 2. Copy the entire block or until the end of relevant data (if there is less than six Pokémon only copy up to the end of the last Pokémon). 3. Get a save file where the party Pokémon can be over written. 4. Copy the RAM block into the party block. 5. Open the save in PKHeX 6. Use PKHeX to update the checksum or remove the Pokémon from the same to your main save. For now this is the best method until an application is developed that can do this. How to Extract Pokémon from RAM Dumps During a Vs. Recorder Playback For these kind of RAM dumps the method above does not work as intended and the Pokémon will appear to have incorrect data if opened in PKHeX. The corruption occurs primarily with Pokémon obtained in a fifth generation game and is caused by the 0x5F byte which indicates which game the Pokémon was caught in being set to 00. In order to prevent this the Pokémon needs to be extracted from the RAM, decrypted without the use of PKHeX, opened in a hex editor, and manually change the 0x59 byte to either 14 for Pokémon White or 15 for Pokémon Black. This only needs to be done if the 0x59 byte is set to 00. Now just general remarks and interesting information from looking into this: In Pokémon Black2 and Pokémon White 2 there are NPCs that you can trade with and then have them challenge you to a battle with the traded Pokémon, but is it the same Pokémon? No, it is not the same Pokémon. In the end the Pokémon does maintain its PID, gender, nickname, ID, and SID, but its level is raised to the nearest 5th level, nature is changed, held item removed, met data wiped, IVs are changed to a predetermined set of IVs, EVs are set to 0, moves will reflect the four most recent moves that that species of Pokémon would know at the new level, and OT is wiped. As well, despite not usually being found in the RAM decrypted the Pokémon will have its name, ID, and SID decrypted in the RAM. Going back to generation four, Pokémon are also stored in the RAM encrypted, but it does not appear NPC Pokémon are always stored this way since 1 out of 5 attempts resulted in a good rip and not a glitch Pokémon. Therefore, keep using the information outlined in my earlier topic. For further reading please read my mapping of Pokémon in generation four RAM and generation five Pokémon structure in the technical documents. Special thanks to @BlackSharkfor providing some Pokémon White RAM dumps. Also here is an updated folder of some Pokémon that I dumped from popular NPC’s from Pokémon Black and Pokémon White (this time properly ripped and not using an AR code): Black White Special Trainers Updated.zip
-
My Join Avenue in Pokemon White 2 is no longer working after using AR codes. Shops refuse to restock even after waiting 3 days in-game and out-game (not changing the clock). No visitors show up besides my other character after trading with myself. Rank of the shops and avenue as a whole is now 255, which is well above the limits of rank 10 for shops and 100 for the avenue. These are all the codes I used (at the same time I have to add) I tried fixing this thinking "maybe those ranks are just too high" and changed the avenue rank to 90 and the shop ranks to 10 (which for some reason jumped to 11 if I put 10 in the code line "FF", so I instead put in 09 in FF which changed to 10 in-game, odd thing that happened but worth mentioning, may do 08 next time for rank 9 shops). This didn't restore the shops even after waiting again. However, when I recommended my other character a shop and got 100 points, the rank of the avenue went up to 91, so I know at least that works. My hopes now is that maybe the "popularity" of the shops and avenue are too high and I'll change "0000270F" (3879, what a weird number) to "00008403" (900) and see if that works. If anyone actually knows why this is happening and know a way to fix it, that would help a lot. edit: NVM I got it to work now.
- 2 replies
-
- Join Avenue
- Gen 5
-
(and 3 more)
Tagged with:
-
I have been trying to get Kaphotics' Lua scripts working in Pokemon Black and White, and I have downloaded the kit from his scripting thread and followed his video tutorial. Everything worked according to the tutorial until I was to open the Lua scripting window inside the emulator, and tried to load the zdXow.lua file. I then get an error that says "Lua51.dll was not found". I have tried putting the text file in various folders but it hasn't worked and I can't find any Lua51.dll file either. Does anyone know what is causing this error or how I could solve it? I am using DeSmuMe 0.9.9. Thanks in advance for any help.