::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: Structure of My pokemon ranch savegame file (pal and usa, japanesse version unknown). (I know this information is poorly written) ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 1.- The savefile starts with a header of unknown size (probably 0x108 or 0x112 bytes), the following information is knwon: 0x00-0x19: SHA-1 hash of all the following data in the file 0x24-0x27: start offset of mii data entries in the ranch 0x2C-0x2F: start offset of "mii-trainer" data entries in the ranch 0x34-0x37: start offset of pokemon data 0x3C-0x3F: ending offset of pokemon data (after this the savegame is all 0x00) 0x53: language setting. Single language games (NTSC) seem to ignore this setting. More information in the side notes.* 0x60-0x63: unknown, maybe date/time? Value increases everytime the game saves. 2.- From 0x070 to 0x22A8 all is 0x00 on a new savefile, with never connected DS trainers or deposited pokemon. In used savefiles one can find a register of ds trainer names (ascii, not hex) and other data, which I think it may be visitors, maybe somewhere is the ranch's level... On two different savegames I also found 3 trainer entries (TID, SID, Name), but these didn't seem to affect editing the savegame in any way (maybe it is a register of last connected trainers, I don't have 2 game cartriges, so I can't test). 3.- 0x22A8-0x22AB: 00 00 00 28 , seems a marker that the previous section of the savefile has ended. 0x22AC-0x22AF: number of mii stored Variable size: mii data, each mii takes 40 bytes. These are the Mii available at the ranch. 4 bytes: 00 00 00 2C in various savefiles, again it seems a marker that the data ended. 4 bytes: number of trainer-Mii links Variable size: trainer-mii entries, 44 bytes long each entry (each mii in the Ranch is assigned a trainer) 4 bytes: unknown data; 00 00 00 A4 in several savegames, seems the end of data marker/marker of start of pokemon data 4 bytes: total number of pokemon in the ranch (includes Hayleys pokemon) 4.- POKEMON ENTRIES (164 bytes each), structured as following: -136 bytes: encrypted .pkm file (readable by pokegen) -28 bytes: 4 bytes (**read below), then TID (2 bytes), SID (two bytes), trainer name (16 bytes) and 4 more unknown bytes. This data is unencrypted. ** These value seems to be 01 00 00 00 for trainers, 05 00 00 00 for pokemon traded to Hayley, 04 00 00 00 for Hayley's pokemon, and 04 00 00 02 for pokemon that are tradeable with the player and are currently at the ranch (check here for those pokemon: http://bulbapedia.bulbagarden.net/wiki/Hayley%27s_trades). I have found 01 00 00 01 on one ocasion, I think that this is used to indicate to differentiate between two trainers with the same TID, SID and NAME, as it happened to me that I added my trainer TID, SID and NAME to all pokemon in the game and changed the one in the mii-trainer entry, and still my game was recognized as a different trainer. That might have been because I edited a NTSC-U savefile and I was using it on my PAL system. This can probably be changed in the mii-trainer entry, but I couldn't the value (if it was there). It maybe have been also an unfortunate outcome of using a converted savegame. (By the way, PAL saves work on NTSC-U version of My Pokemon Ranch, but NTSC-U pokemon ranch saves don't seem to work directly on the PAL version). 5.- End of data mark? (4 bytes): 00 00 00 28. From this point until the end of the file everything is 0x00, because of the file size I suspect that the savefile has room for 20 mii entries, 8 mii-trainer entries (as stated in wikipedia, only eight carts can connect to the ranch, I can't test what happens when a 9th cart tries to connect), 1000 hayley pokemon and 1000 trainer pokemon (from those 8 allowed carts). ...................... Side notes: TID: trainer ID SID: secret trainer ID Name: the trainer name (not in ascii, but as hex values for the game's character mapping) *The language setting is 1 byte at 0x53 in savedata.bin file. These are the language values: NTSC -------------------- 0x00 - English (NTSC-U?, maybe NTSC-J too) 0x02 - English (NTSC-U) I found 0x02 on a NTSC-U savegame I downloaded and 0x00 on a savegame created on Dolphin running the NTSC-U "My Pokemon Ranch". Both load fine on the NTSC-U as is, probably because the single language games don't really have a language setting, as PAL savegames load fine on the NTSC-U version (on a PAL wii at least), so it doesn't really matter. I don't have a NTSC system for confirming, but I suspect 0x00 for NTSC-J and 0x02 for NTSC-U are the correct values. PAL -------------------- 0x08 - English (PAL) and Dutch (PAL). Text is displayed in english for Dutch. 0x10 - German (PAL) 0x18 - French (PAL) 0x20 - Spanish (PAL) 0x28 - Italian (PAL) On dolphin emulator, if the Language is set to Japanesse, Simplified Chinese, Traditional chinese or Korean the japanesse Safety Screen appears and the language defaults to English (PAL), meaning that My Pokemon Ranch will load English (PAL) savegames. note: entering the DS link on dolphin will corrupt the savegmae :::::::::::::::::::: Best Regards, suloku