Jump to content


Popular Content

Showing content with the highest reputation since 11/30/16 in Technical Documents

  1. 5 points
    This page is an ongoing progress. It's aim is to list: 1. All the Fly-to points 2. Maps not revisited/cannot be re-accessed after certain points in the story 3. Any Discovered unused maps Fly-To List MELEMELE Image Map Coordinates Comments Credits Route 1 Player's House Map: 0 X: 28213.00000 Y: 0.00000 Z: 18490.00000 @Ruby Genseki Route 1 Ten Carat Hill Map: 0 X: 27578.70000 Y: 0.00000 Z: 23023.70000 @Ruby Genseki Route 1 Pokémon Center Map: 0 X: 25831.30000 Y: 0.00000 Z: 19451.80000 @Ruby Genseki Hau'oli City Shopping District Map: 0 X: 8531.50500 Y: 0.00000 Z: 18201.19000 @Ruby Genseki Route 2 Hau'oli Cementery Map: 0 X: 9249.00000 Y: 0.00000 Z: 14015.00000 Ruby Genseki Route 2 Verdant Cave Map: 0 X: 13879.70000 Y: 0.00000 Z: 7593.20000 Ruby Genseki Route 2 Pokémon Center Map: 0 X: 12629.74000 Y: 0.00000 Z: 6490.64200 Ruby Genseki Melemele Meadow Map: 0 X: 19037.60000 Y: 0.00000 Z: 6979.00000 Ruby Genseki Iki Town Map: 0 X: 18122.30000 Y: 0.00000 Z: 13724.60000 Ruby Genseki Ruins of Conflict Map: 5 X: 1394.34100 Y: 0.00000 Z: 794.84900 Ruby Genseki AKALA Image Map Coordinates Comments Credits Heahea City Map: 49 X: 15253.00000 Y: 0.00000 Z: 30524.60000 @Ruby Genseki Paniola Town Map: 49 X: 19373.00000 Y: 0.00000 Z: 22274.00000 Ruby Genseki Paniola Ranch Map: 88 X: 5839.31800 Y: 0.00000 Z: 3327.02000 Ruby Genseki Route 5 Pokémon Center Map: 49 X: 18523.30000 Y: 0.00000 Z: 16331.50000 Ruby Genseki Route 5 Lush Jungle Map: 49 X: 21419.00000 Y: 0.00000 Z: 12238.00000 Ruby Genseki Royal Avenue Pokémon Center Map: 49 X: 23657.00000 Y: 0.00000 Z: 24250.00000 Ruby Genseki Royal Avenue Battle Royal Dome Map: 49 X: 25242.90000 Y: 0.00000 Z: 21598.06000 Ruby Genseki Route 7 Map: 49 X: 28202.00000 Y: 0.00000 Z: 17408.00000 Ruby Genseki Route 8 Map: 49 X: 18486.57000 Y: 0.00000 Z: 10386.39000 Ruby Genseki Route 9 Map: 49 X: 11662.10000 Y: 0.00000 Z: 39963.90000 Ruby Genseki Konikoni City Map: 49 X: 9274.00000 Y: 0.00000 Z: 36830.00000 Ruby Genseki Ruins of Life Map: 50 X: 1911.44400 Y: 0.00000 Z: 1348.00000 Ruby Genseki Hano Grand Resort Map: 49 X: 25156.00000 Y: 0.00000 Z: 30505.00000 Ruby Genseki ULA'ULA Image Map Coordinates Comments Credits Malie City Map: 97 X: 25782.30000 Y: 0.00000 Z: 18065.57000 @Ruby Genseki Mount Hokulani Map: 103 X: 4472.10000 Y: 0.00000 Z: 3077.18800 Ruby Genseki Route 12 Map: 97 X: 31306.50000 Y: 0.00000 Z: 28674.95000 Ruby Genseki Tapu Village Map: 97 X: 12974.91000 Y: 0.00000 Z: 35026.52000 Ruby Genseki Ruins of Abundance Map: 105 X: 1898.42400 Y: 0.00000 Z: 1342.61300 Ruby Genseki Route 16 Map: 97 X: 5835.00000 Y: 0.00000 Z: 24174.50000 Ruby Genseki Lake of the Sunne/Moone Map: 101 X: 6157.06900 Y: 0.00000 Z: 1612.61100 Technically the entrance, outside of the lake. Whichever one you access, depends on: 1. What game you're playing 2. whether you "crossed the portal" Ruby Genseki Po Town Map: 97 X: 9799.90000 Y: 0.00000 Z: 9905.20000 Ruby Genseki Mount Lanakila Map: 119 X: 6702.00000 Y: 0.00000 Z: 10079.00000 Elite Four gate doesn't check your Trial progress, if warped to here. Ruby Genseki PONI Image Map Coordinates Comments Credits Seafolk Village Map: 168 X: 16024.92000 Y: 0.00000 Z: 17538.70000 @Ruby Genseki Exeggutor Island Map: 185 X: 3764.69100 Y: 0.00000 Z: 7424.45200 Ruby Genseki Ruins of Hope Map: 180 X: 2423.43100 Y: 0.00000 Z: 1251.30000 Ruby Genseki Vast Poni Canyon Map: 168 X: 24716.60000 Y: 0.00000 Z: 14276.30000 Ruby Genseki Altar of the Sunne/Moone Map: 175 X: 2302.09400 Y: 0.00000 Z: 4296.94400 Once again, technically an entrance, so access to whichever, is based on criteria mentioned above at the Lake. Ruby Genseki Poni Meadow Map: 168 X: 31680.90000 Y: 0.00000 Z: 11500.87000 Ruby Genseki Battle Tree Map: 168 X: 25549.25000 Y: 0.00000 Z: 3737.76900 Ruby Genseki AETHER PARADISE Image Map Coordinates Comments Credits Aether Paradise Map: 196 X: 6596.75700 Y: 0.00000 Z: 11714.80000 @Ruby Genseki Limited Access Image Map Coordinates Comments Credits Lusamine's Cryo Chamber Map: 208 X: 2188.56000 Y: 1.00000 Z: 1915.76800 @Ruby Genseki Abandoned Thrifty Megamart (Acerola's Trial) Map: 132 X: 1720.41700 Y: 1.00000 Z: 1472.11200 This version has access to Mimikyu's room @Ruby Genseki Mimikyu's Room Map: 133 X: 925.01460 Y: 0.00000 Z: 825.41140 @Ruby Genseki Ultra Space Map: 211 X: 2050.87400 Y: 0.00000 Z: 6355.98400 @theSLAYER Iki Town (Hau's Ceremonial Battle) Map: 1 X: 16910.58000 Y: 0.00000 Z: 11564.29000 Ruby Genseki Iki Town (Champion Party) Map: 2 X: 16974.28000 Y: 0.00000 Z: 11512.06000 Ruby Genseki Unused Maps Image Map Coordinates Comments Credits Unused Garage Map: 16 X: 18953.10000 Y: 0.00000 Z: 10722.50000 Same Map ID as Mother's Room Also holds a second surfboard. @Ruby Genseki Unused Bathroom Map: 16 X: 10538.05000 Y: 0.00000 Z: 10429.66000 @Lady Ariel @Ruby Genseki Unused Toilet Unused Toilet Map: 16 X: 27427.50000 Y: 0.00000 Z: 2074.60300 Lady Ariel Ruby Genseki
  2. 2 points
    6th and 7th Generation Wonder Card Map Mystery Gift Data WCxFULL Offset WCx Offset Gen 6 Gen 7 0x00-0x03 - Bit 0 - Y Bit 1 - X Bit 2 - AS Bit 3 - OR Bit 0 - S Bit 1 - M Bit 2 - US Bit 3 - UM 0x04-0x01FD - Redemption Text 0x01FE - 0x01 - Green Background 0x01 - Halo Animation 0x01FF - Allowed Languages 0x00 - Any Language Otherwise Language ID 0x200 - Once Per Week Bit 0 - Multiple WCs 0x201 - Unused? SubID 0x0202-0x0203 - Checksum 0x0204 - Unused? Set Count 0x205 - Always 0x46 Rarity Weight 0x206-0x207 - Always 0x4646 0x208-0x209 0x00-0x01 Card ID 0x20A-0x253 0x02-0x4B Card Title 0x254-0x257 0x4C-0x4F Card Reception Date YYYYMMDD Card Redemption Date YYMMDD 0x258 0x50 Card Location 0x259 0x51 Card Type 0x0 - Pokemon 0x1 - Item Card Type 0x0 - Pokemon 0x1 - Item 0x3 - BP 0x25A 0x52 Statuses Bit 0 - Only Once Bit 1 - Used Statuses Bit 0 - Only Once Bit 1 - Used Bit 2 - Once per Day 0x25B 0x53 Animation Background Color 0x0 - Blue 0x1 - Green (0x53 offset only) Card Background Color 0x0 - Blue 0x1- Purple 0x2 - Gold 0x25C-0x26F 0x54-0x67 Unknown/Unused 0x26E - Always 0xFF Pokémon Cards WCxFULL Offset WCx Offset Gen 6 Gen 7 0x270-0x271 0x68-0x69 Trainer ID 0x272-0x273 0x6A-0x6B Secret ID 0x274 0x6C Game of Origin 0x0 - Receiver's Game 0x274-0x277 0x6D-0x70 Unused 0x278-0x27B 0x71-0x73 Encryption Constant 0x0 - Randomly Generated 0x27C-0x27D 0x74-0x75 Ribbons See Ribbon Data Below 0x27E-0x27F 0x76-0x77 PokéBall Caught In 0x280-0x281 0x78-0x79 Held Item 0x282-0x283 0x7A-0x7B Move #1 0x284-0x285 0x7C-0x7D Move #2 0x286-0x287 0x7E-0x7F Move #3 0x288-0x289 0x80-0x81 Move #4 0x28A-0x28B 0x82-0x83 PokéDex Number 0x28C 0x84 Form Index 0x28D 0x85 Language 0x0 - Receiver's Language Otherwise Language ID 0x28E-0x2A7 0x86-0x9F Pokémon Nickname No terminator if no nickname 0x2A8 0xA0 Nature 0xFF - Random 0x2A9 0xA1 Pokémon Gender 0x0 - Male 0x1 - Female 0x2 - Genderless 0x3 - Random 0x2AA 0xA2 Pokémon Ability 0x0 - Ability 1 0x1 - Ability 2 0x2 - Hidden Ability 0x3 - Ability Random (No HA) 0x4 - Ability Random (All) 0x2AB 0xA3 Personality ID Generation Method 0x0 - Use specified PID 0x1 - Random can be shiny PID 0x2 - Random always shiny PID 0x3 - Random never shiny PID 0x2AC-0x2AD 0xA4-0xA5 Egg Met Location 0x2AE-0x2AF 0xA6-0xA7 Met Location 0x2B0 0xA8 Met Level 0x2B1-0x2B6 0xA9-0xAE Contest Stats Last byte is Sheen 0x2B7-0x2BC 0xAF-0xB4 IVs 0xFFFFFFFF - Random 0xFFFFFFFE - 3 31s 0xFFFFFFFD - 2 31s 0x2BD 0xB5 Trainer Gender 0x0 - Male 0x1 - Female 0x3 - Recipient's Gender 0x2BE-0x2D7 0xB6-0xCF Trainer Name All 00's - Recipient's Name 0x2D8 0xD0 Current Level 0x2D9 0xD1 Egg Flag 0x1 - Is Egg 0x2DA-0x2DB 0xD2-0xD3 Unused Bundled Item ID 0x2DC-0x2DF 0xD4-0xD7 Personality ID Almost Always 0xEE6B2802 Sometimes 0x00000000 0x2E0-0x2E1 0xD8-0xD9 Relearn Move 1 0x2E2-0x2E3 0xDA-0xDB Relearn Move 2 0x2E4-0x2E5 0xDC-0xDD Relearn Move 3 0x2E6-0x2E7 0xDE-0xDF Relearn Move 4 0x2E8-0x2E9 0xE0-0xE1 Trainer Memory Intensity Unused 0x2EA-0x2EB 0xE2-0xE3 Trainer Memory Line Unused 0x2EC-0x2ED 0xE4-0xE5 Trainer Memory TextVar 0xE5-0xEA: EVs 0x2EF-0x2F0 0xE6-0xE7 Trainer Memory Feeling 0x2F1-0x2F3 0xE8-0xEA Unused 0x2F4-0x30F 0xEB-0x107 Unused Unused Item Cards WCxFULL Offset WCx Offset Gen 6 Gen 7 0x270-0x271 0x68-0x69 Item ID Item 1 ID 0x272-0x273 0x6A-0x6B Unused Item 1 Quantity 0x274-0x275 0x6C-0x6D Unused Item 2 ID 0x276-0x277 0x6E-0x6F Unused Item 2 Quantity 0x278-0x279 0x70-0x71 Item Quantity Item 3 ID 0x27A-0x27B 0x72-0x73 Unused Item 3 Quantity 0x27C-0x27D 0x74-0x75 Unused Item 4 ID 0x27E-0x27F 0x76-0x77 Unused Item 4 Quantity 0x280-0x281 0x78-0x79 Unused Item 5 ID 0x282-0x283 0x7A-0x7B Unused Item 5 Quantity 0x284-0x285 0x7C-0x7D Unused Item 6 ID 0x286-0x287 0x7E-0x7F Unused Item 6 Quantity Ribbon Set Flag Value 0x74 0x75 0x01 Battle Champ Ribbon World Champ Ribbon 0x02 Regional Champ Ribbon Birthday Ribbon 0x04 National Champ Ribbon Special Ribbon 0x08 Country Ribbon Souvenir Ribbon 0x10 National Ribbon Wishing Ribbon 0x20 Earth Ribbon Classic Ribbon 0x40 World Ribbon Premier Ribbon 0x80 Event Ribbon Empty
  3. 1 point
    banner.bin and banner_s.bin are both found in the /FONT/ folder. They contain data for the dungeon title font. File Structure The file uses SIR0 headers to store its pointers. General SIR0 details can be found in the main SIR0 documentation. The sections below will cover only banner.bin-specific blocks of data. Name Offset Size (Per Element) # of Elements Description SIR0 Header 0x00 16 Bytes 1 Details in the SIR0 documentation Glyph Textures Pointed by Glyph Metadata Varies Specified by Content Header Each element is read nibble-by-nibble to assemble the glyph. Glyph Metadata Pointed by Content Header 8 Bytes Specified by Content Header Each element contains a pointer to the glyph texture, the letter it represents, and how many pixels wide the letter is. Content Header Pointed by SIR0 Header 12 Bytes 1 Contains the pointer to Glyph Metadata, and the number of elements in that data block. Pointer Offsets List Pointed by SIR0 Header 1 Byte Varies Details in the SIR0 documentation SIR0 Padding After Pointer Offsets List Varies --- Details in the SIR0 documentation Content Header 3 Sections containing 4 bytes each: AA AA AA AA BB BB BB BB CC CC CC CC A. Pointer to the start of the Glyph Metadata block. Little-Endian. B. Pointer to the number of elements in the Glyph Metadata block. Little-Endian. C. Unknown. Glyph Metadata This is an array of elements, each 8 bytes. Contains 3 sections: AA AA AA AA BB BB CC CC A. Pointer to this element's texture data in the Glyph Textures block. Little-Endian. B. The letter that the glyph represents. Little-Endian. The encoding varies by language, which is covered in the strings documentation. C. The number of pixels to move the cursor to the right, when drawing the text in-game. Little-Endian. Appears to be signed. Glyph Textures Individual elements in the Glyph Textures block have a variable length. Data is read nibble-by-nibble: First, the high bit of the nibble is checked. If it is 1, then the game will read the next nibble as pixel data and draw it N times. N is the other 3 bits of the first nibble. If it is 0, then the game will read the next N nibbles as pixel data and draw them in that order. N is the other 3 bits of the first nibble. The game draws pixels in order of left to right, top to bottom. It moves on to the next row when 24 pixels have been drawn, and ends the parsing when 24 rows have been drawn. Parsing For convenience, the following python code is provided below to parse these files: import sys import os import re import shutil import math import struct import glob from PIL import Image GLYPH_SIZE_D = 24 PALETTE_MAP = [0,8,24,41,57,74,90,107,123,140,156,173,189,206,214,231] def ReadNextNib(reader, next_nibbles): if len(next_nibbles) > 0: return next_nibbles.pop() byte = int.from_bytes(reader.read(1), 'little') next_nibbles.append(byte & 15) return byte >> 4 def ExportDChar(reader, char_val): pixels = [] next_nibbles = [] while len(pixels) < GLYPH_SIZE_D * GLYPH_SIZE_D: control_nib = ReadNextNib(reader, next_nibbles) draw_repeat = control_nib >> 3 draw_amount = control_nib & 7 if draw_repeat == 1: pixel_nib = ReadNextNib(reader, next_nibbles) pixel_val = PALETTE_MAP[pixel_nib] for ii in range(draw_amount): pixels.append(pixel_val) else: for ii in range(draw_amount): pixel_nib = ReadNextNib(reader, next_nibbles) pixel_val = PALETTE_MAP[pixel_nib] pixels.append(pixel_val) return_img = Image.new('RGBA', (GLYPH_SIZE_D, GLYPH_SIZE_D), (0, 0, 0, 0)) datas = [(0, 0, 0, 0)] * (GLYPH_SIZE_D * GLYPH_SIZE_D) for yy in range(GLYPH_SIZE_D): for xx in range(GLYPH_SIZE_D): pixel_idx = yy * GLYPH_SIZE_D + xx if pixels[pixel_idx] > 0: datas[pixel_idx] = (255,255,255,pixels[pixel_idx]) return_img.putdata(datas) return return_img def ReadChars(reader, amt): return_imgs = [] for ii in range(amt): glyph_ptr = int.from_bytes(reader.read(4), 'little') glyph_val = int.from_bytes(reader.read(2), 'little') advance = int.from_bytes(reader.read(2), 'little') cur_ptr = reader.tell() reader.seek(glyph_ptr) return_img = ExportDChar(reader, glyph_val) return_imgs.append((return_img, glyph_val, advance)) reader.seek(cur_ptr) return return_imgs def ReadFont(input_file): output_parent, basename = os.path.split(input_file) dir, _ = os.path.splitext(basename) output_dir = os.path.join(output_parent, dir) if not os.path.exists(output_dir): os.mkdir(output_dir) with open(input_file, "rb") as reader: ##Read SIR0 Header: ptr to font header reader.seek(4) font_ptr = int.from_bytes(reader.read(4),'little') ##Read font header: ptr to charmap, amount of chars reader.seek(font_ptr) list_ptr = int.from_bytes(reader.read(4),'little') char_amt = int.from_bytes(reader.read(4),'little') _ = int.from_bytes(reader.read(4), 'little')#don't know what this is reader.seek(list_ptr) imgs = ReadChars(reader, char_amt, mode) for idx, img_pair in enumerate(imgs): img = img_pair[0] code = img_pair[1] advance = img_pair[2] if advance > 0: img = img.crop((0,0,advance,GLYPH_SIZE_D)) img.save(os.path.join(output_dir, str(code) + '.png'))
  4. 1 point
    Background These games do not save the wonder card in their saves, however some details are left behind, in the form of the Wonder Card Records Album (or Gift Records Album). Findings may be incomplete, until more events gets released. Save Offsets Starts at 0x45600, taking up every 0x140 Save Offset (First Slot) Data Offset (from 0x0) Gen 7 0x45600 to 0x45604 0x000 to 0x004 Epoch Time code of Event received 0x45608 to 0x45609 0x008 to 0x009 Wonder Card ID 0x4560A 0x00A Gift Title/Wonder Card Type (as listed below) 0x4560C 0x00C Gift Type 0x01 are for Pokémon type and 0x02 are for Item type. 0x4560D 0x00D Number of kinds of Items, max 06 (for Item-Type gift only) 0x4570C to 0x4570D 0x10C to 0x10D Species Value for Pokémon Item ID 1 for Items only 0x4570E to 0x4570F 0x10E to 0x10F Amount of Item ID 1, for Item-Type gift only 0x45710 to 0x45724 0x110 to 0x124 Item IDs and Amounts (2 byte of Item ID, 2 byte for amount, repeat) 0x45710 to 0x45711 0x110 to 0x111 Move 1 ID, for Pokémon-Type Gift. 0x45714 to 0x45715 0x114 to 0x115 Move 2 ID, for Pokémon-Type Gift. 0x45718 to 0x45719 0x118 to 0x119 Move 3 ID, for Pokémon-Type Gift. 0x4571C to 0x4571D 0x11C to 0x11D Move 4 ID, for Pokémon-Type Gift. 0x45720 to 0x45739 0x120 to 0x139 Original Trainer (used for Pokémon-Type Gift) (follows trainer name if it's unset) 0x4573A 0x13A Language tag assigned upon being received. Gift Title/Wonder Card Type ID Titles ripped from Game Text Example (based on modifying Counterattack Mewtwo) 0 [VAR PKNAME(0000)] Gift Mewtwo Gift 1 [VAR ITEM2(0008)] Gift None Gift Chesto Berry Gift (modified to item-type) 2 Item Set Gift 3 [VAR 0104(0001)] [VAR PKNAME(0000)] Gift Genetic Pokémon Mewtwo Gift 4 Mythical Pokémon [VAR PKNAME(0000)] Gift Mythical Pokémon Mewtwo Gift 5 [VAR TRNAME(0003)]’s [VAR PKNAME(0000)] Gift はかせ's Mewtwo Gift 6 Shiny [VAR PKNAME(0000)] Gift Shiny Mewtwo Gift 7 [VAR PKNAME(0000)] ([VAR 01CA(0002)]) Gift Mewtwo () Gift * (12) Gift (modified to item-type) 8 [VAR 01CA(0002)] Gift Gift 12 Gift (modified to item-type) 9 Hidden Ability [VAR PKNAME(0000)] Gift Hidden Ability Mewtwo Gift 10 [VAR MOVE(0004)] [VAR PKNAME(0000)] Gift Psychic Mewtwo Gift 11 [VAR PKNAME(0000)] with [VAR MOVE(0005)] Gift Mewtwo with Shadow Ball Gift 12 [VAR PKNAME(0000)] with [VAR MOVE(0006)] Gift Mewtwo with Barrier Gift 13 [VAR PKNAME(0000)] with [VAR MOVE(0007)] Gift Mewtwo with Calm Mind Gift 14 [VAR PKNAME(0000)] & [VAR ITEM2(0009)] Gift Mewtwo & None Gift * & None Gift (modified to item-type) 15 Downloadable Version Bonus 16 Special Pack Purchase Bonus 17 Store Purchase Bonus 18 Strategy Guide Purchase Bonus 19 Purchase Bonus 20 Happy Birthday! 21 Virtual Console Bonus 22 Pokémon Trainer Club Gift 23 Pokémon Global Link Gift 24 Pokémon Bank Gift Note: The * appears to be based on total amount of records in the album. I've seen the number change when I add or remove records. If you have 6 records, it'll be 6 & None Gift Additional Notes Can't get WC type 14 to function properly. Keep getting "Mew & None Gift" (Mew intended, None unintended). When I swap past an item entry, the None get's updated to the third item. Maybe this type is a remnant of Gen 8's system? WC type 10 seems to work as per normal, however can't get WC type 11 to 13 to function, even after various tests. I have concluded that it is possibly leftover/unused, as those 3 entries were phrased different from WC type 10, on top of the "not working" issue. Either that, or there's a byte that controls the amount of moves a Pokemon has, and I'm clearly missing it., and so are the other 3! Images: Big thanks to @wo0ts for the various contributions for gift records!
  5. 1 point
    Pokemon Temp Data Offset Type Description Before Generation 0x0 u64 Encryption Constant If = 0xFFFFFFFF FFFFFFFF, random u32 0x8 u32 PID If = 0xFFFFFFFF, random 0xC u32 PID Type 1: Anti-Shiny 2: Forced Shiny 3: Random 0x10 u64 OT TID/SID If = 0xFFFFFFFF FFFFFFFF, random u32 0x18 u16 Species ID 0x1A u16 Form ID If = 0xFF, random according to personal info 0x1C u16 Level 0x1E u16 Gender If = 0xFF, random(252) according to personal info 0x20 u16 Nature If = 0xFFFF, random(25) 0x22 u8 Ability Number If = 0xFF, random 1/2; If = 0xFE random 1/2/H. 0x23 u8 PID Roll Count For PID type = 3 (random), related to shiny chance 0x24 u16 HP IV If = 0xFFFF, random(32) 0x26 u16 Attack IV If = 0xFFFF, random(32) 0x28 u16 Defense IV If = 0xFFFF, random(32) 0x2A u16 SpA IV If = 0xFFFF, random(32) 0x2C u16 SpD IV If = 0xFFFF, random(32) 0x2E u16 Speed IV If = 0xFFFF, random(32) 0x30 u16 Friendship If = 0xFFFF, set default friendship 0x34 u8 Perfect IV Count If > 0, clear all IV locks SOS Status Data RAM location: 0x30038E20 (USUM v1.2); 0x30038C44 (SM v1.2) Offset Type Description 0x10 u32 [624] SFMT RNG Table 0x9D0 u16 SFMT RNG Table Index 0x9D8 u8 Adrenaline Orb Used 0x9D9 u8 Chain Length 0x9DA u8 Ally Identifier? 0x9DB u8 Last SOS Call Succeeded Berry Pile Data RAM location: 0x32DE3208 (USUM v1.2) Offset Type Description 0x25 u8 Bit flag for Crabrawler existence 0x26 u16 Crabrawler level 0x28 u16 [6] Regular random berry ID
  6. 1 point
    Pokemon Gold, Silver and Crystal introduced the concept of Shiny Pokemon, and in order to retain shininess of a Pokemon that was traded to Pokemon Red, Blue, Yellow, Green, Shininess was set to be determined by a Pokemon's Determinant Values (DVs). As such, this mechanic also allowed for Pokemon caught or received in Gen I with the correct DV combination to become shiny when traded to Gen II. Additionally, with the introduction of Generation I & II to the Virtual Console on the Nintendo 3DS, these shiny Pokemon can be transported up to Generation VII and remain shiny. Generation I's RNG - DV correlation has been analyzed, and it has been discovered that only certain Pokemon can be encountered legitimately shiny (ignoring using glitches), mainly: (1) received by in-game trade, (2) encountered by fishing, (3) stationary encounters, (4) gift (starters, Eevee, game corner, etc). Do note that confusion may arise, if a shiny Pokemon was hatched/caught in Gen II, and traded back to Gen I, before transported to Gen VII. (Even if hatched/caught in Gen II, it will say from Kanto if it was transferred from Gen I) The google sheet below shows the list of Pokemon relating to Gen I shiny legality, and other pages involving RNG-DV correlation based on encounter rate. Sources: Various Encounter Rates on Smogon @Collector Togami's Excel and collected data Pokemon Red and Blue DVs generation
  7. 1 point
  8. 1 point
    Balls 0x0001 = Master Ball 0x0002 = Ultra Ball 0x0003 = Great Ball 0x0004 = Poké Ball 0x0005 = Safari Ball 0x0006 = Net Ball 0x0007 = Dive Ball 0x0008 = Nest Ball 0x0009 = Repeat Ball 0x000A = Timer Ball 0x000B = Luxury Ball 0x000C = Premier Ball 0x000D = Dusk Ball 0x000E = Heal Ball 0x000F = Quick Ball 0x0010 = Cherish Ball Medicine 0x0011 = Potion 0x0012 = Antidote 0x0013 = Burn Heal 0x0014 = Ice Heal 0x0015 = Awakening 0x0016 = Parlyz Heal 0x0017 = Full Restore 0x0018 = Max Potion 0x0019 = Hyper Potion 0x001A = Super Potion 0x001B = Full Heal 0x001C = Revive 0x001D = Max Revive 0x001E = Fresh Water 0x001F = Soda Pop 0x0020 = Lemonade 0x0021 = Moomoo Milk 0x0022 = EnergyPowder 0x0023 = Energy Root 0x0024 = Heal Powder 0x0025 = Revival Herb 0x0026 = Ether 0x0027 = Max Ether 0x0028 = Elixir 0x0029 = Max Elixir 0x002A = Lava Cookie 0x002B = Berry Juice 0x002C = Sacred Ash 0x002D = HP Up 0x002E = Protein 0x002F = Iron 0x0030 = Carbos 0x0031 = Calcium 0x0032 = Rare Candy 0x0033 = PP Up 0x0034 = Zinc 0x0035 = PP Max 0x0036 = Old Gateau Battle Items 0x0037 = Guard Spec. 0x0038 = Dire Hit 0x0039 = X Attack 0x003A = X Defend 0x003B = X Speed 0x003C = X Accuracy 0x003D = X Special 0x003E = X Sp. Def 0x003F = Poké Doll 0x0040 = Fluffy Tail 0x0041 = Blue Flute 0x0042 = Yellow Flute 0x0043 = Red Flute 0x0044 = Black Flute 0x0045 = White Flute General Items 1 0x0046 = Shoal Salt 0x0047 = Shoal Shell 0x0048 = Red Shard 0x0049 = Blue Shard 0x004A = Yellow Shard 0x004B = Green Shard 0x004C = Super Repel 0x004D = Max Repel 0x004E = Escape Rope 0x004F = Repel 0x0050 = Sun Stone 0x0051 = Moon Stone 0x0052 = Fire Stone 0x0053 = Thunderstone 0x0054 = Water Stone 0x0055 = Leaf Stone 0x0056 = TinyMushroom 0x0057 = Big Mushroom 0x0058 = Pearl 0x0059 = Big Pearl 0x005A = Stardust 0x005B = Star Piece 0x005C = Nugget 0x005D = Heart Scale 0x005E = Honey 0x005F = Growth Mulch 0x0060 = Damp Mulch 0x0061 = Stable Mulch 0x0062 = Gooey Mulch 0x0063 = Root Fossil 0x0064 = Claw Fossil 0x0065 = Helix Fossil 0x0066 = Dome Fossil 0x0067 = Old Amber 0x0068 = Armor Fossil 0x0069 = Skull Fossil 0x006A = Rare Bone 0x006B = Shiny Stone 0x006C = Dusk Stone 0x006D = Dawn Stone 0x006E = Oval Stone 0x006F = Odd Keystone 0x0070 = Griseous Orb (Platinum only) 0x0087 = Adamant Orb 0x0088 = Lustrous Orb Mail 0x0089 = Grass Mail 0x008A = Flame Mail 0x008B = Bubble Mail 0x008C = Bloom Mail 0x008D = Tunnel Mail 0x008E = Steel Mail 0x008F = Heart Mail 0x0090 = Snow Mail 0x0091 = Space Mail 0x0092 = Air Mail 0x0093 = Mosaic Mail 0x0094 = Brick Mail Berries 0x0095 = Cheri Berry 0x0096 = Chesto Berry 0x0097 = Pecha Berry 0x0098 = Rawst Berry 0x0099 = Aspear Berry 0x009A = Leppa Berry 0x009B = Oran Berry 0x009C = Persim Berry 0x009D = Lum Berry 0x009E = Sitrus Berry 0x009F = Figy Berry 0x00A0 = Wiki Berry 0x00A1 = Mago Berry 0x00A2 = Aguav Berry 0x00A3 = Iapapa Berry 0x00A4 = Razz Berry 0x00A5 = Bluk Berry 0x00A6 = Nanab Berry 0x00A7 = Wepear Berry 0x00A8 = Pinap Berry 0x00A9 = Pomeg Berry 0x00AA = Kelpsy Berry 0x00AB = Qualot Berry 0x00AC = Hondew Berry 0x00AD = Grepa Berry 0x00AE = Tamato Berry 0x00AF = Cornn Berry 0x00B0 = Magost Berry 0x00B1 = Rabuta Berry 0x00B2 = Nomel Berry 0x00B3 = Spelon Berry 0x00B4 = Pamtre Berry 0x00B5 = Watmel Berry 0x00B6 = Durin Berry 0x00B7 = Belue Berry 0x00B8 = Occa Berry 0x00B9 = Passho Berry 0x00BA = Wacan Berry 0x00BB = Rindo Berry 0x00BC = Yache Berry 0x00BD = Chople Berry 0x00BE = Kebia Berry 0x00BF = Shuca Berry 0x00C0 = Coba Berry 0x00C1 = Payapa Berry 0x00C2 = Tanga Berry 0x00C3 = Charti Berry 0x00C4 = Kasib Berry 0x00C5 = Haban Berry 0x00C6 = Colbur Berry 0x00C7 = Babiri Berry 0x00C8 = Chilan Berry 0x00C9 = Liechi Berry 0x00CA = Ganlon Berry 0x00CB = Salac Berry 0x00CC = Petaya Berry 0x00CD = Apicot Berry 0x00CE = Lansat Berry 0x00CF = Starf Berry 0x00D0 = Enigma Berry 0x00D1 = Micle Berry 0x00D2 = Custap Berry 0x00D3 = Jaboca Berry 0x00D4 = Rowap Berry General Items 2 (Held Items) 0x00D5 = BrightPowder 0x00D6 = White Herb 0x00D7 = Macho Brace 0x00D8 = Exp. Share 0x00D9 = Quick Claw 0x00DA = Soothe Bell 0x00DB = Mental Herb 0x00DC = Choice Band 0x00DD = King's Rock 0x00DE = SilverPowder 0x00DF = Amulet Coin 0x00E0 = Cleanse Tag 0x00E1 = Soul Dew 0x00E2 = DeepSeaTooth 0x00E3 = DeepSeaScale 0x00E4 = Smoke Ball 0x00E5 = Everstone 0x00E6 = Focus Band 0x00E7 = Lucky Egg 0x00E8 = Scope Lens 0x00E9 = Metal Coat 0x00EA = Leftovers 0x00EB = Dragon Scale 0x00EC = Light Ball 0x00ED = Soft Sand 0x00EE = Hard Stone 0x00EF = Miracle Seed 0x00F0 = BlackGlasses 0x00F1 = Black Belt 0x00F2 = Magnet 0x00F3 = Mystic Water 0x00F4 = Sharp Beak 0x00F5 = Poison Barb 0x00F6 = NeverMeltIce 0x00F7 = Spell Tag 0x00F8 = TwistedSpoon 0x00F9 = Charcoal 0x00FA = Dragon Fang 0x00FB = Silk Scarf 0x00FC = Up-Grade 0x00FD = Shell Bell 0x00FE = Sea Incense 0x00FF = Lax Incense 0x0100 = Lucky Punch 0x0101 = Metal Powder 0x0102 = Thick Club 0x0103 = Stick 0x0104 = Red Scarf 0x0105 = Blue Scarf 0x0106 = Pink Scarf 0x0107 = Green Scarf 0x0108 = Yellow Scarf 0x0109 = Wide Lens 0x010A = Muscle Band 0x010B = Wise Glasses 0x010C = Expert Belt 0x010D = Light Clay 0x010E = Life Orb 0x010F = Power Herb 0x0110 = Toxic Orb 0x0111 = Flame Orb 0x0112 = Quick Powder 0x0113 = Focus Sash 0x0114 = Zoom Lens 0x0115 = Metronome 0x0116 = Iron Ball 0x0117 = Lagging Tail 0x0118 = Destiny Knot 0x0119 = Black Sludge 0x011A = Icy Rock 0x011B = Smooth Rock 0x011C = Heat Rock 0x011D = Damp Rock 0x011E = Grip Claw 0x011F = Choice Scarf 0x0120 = Sticky Barb 0x0121 = Power Bracer 0x0122 = Power Belt 0x0123 = Power Lens 0x0124 = Power Band 0x0125 = Power Anklet 0x0126 = Power Weight 0x0127 = Shed Shell 0x0128 = Big Root 0x0129 = Choice Specs 0x012A = Flame Plate 0x012B = Splash Plate 0x012C = Zap Plate 0x012D = Meadow Plate 0x012E = Icicle Plate 0x012F = Fist Plate 0x0130 = Toxic Plate 0x0131 = Earth Plate 0x0132 = Sky Plate 0x0133 = Mind Plate 0x0134 = Insect Plate 0x0135 = Stone Plate 0x0136 = Spooky Plate 0x0137 = Draco Plate 0x0138 = Dread Plate 0x0139 = Iron Plate 0x013A = Odd Incense 0x013B = Rock Incense 0x013C = Full Incense 0x013D = Wave Incense 0x013E = Rose Incense 0x013F = Luck Incense 0x0140 = Pure Incense 0x0141 = Protector 0x0142 = Electirizer 0x0143 = Magmarizer 0x0144 = Dubious Disc 0x0145 = Reaper Cloth 0x0146 = Razor Claw 0x0147 = Razor Fang TMs & HMs 0x0148 = TM01 0x0149 = TM02 0x014A = TM03 0x014B = TM04 0x014C = TM05 0x014D = TM06 0x014E = TM07 0x014F = TM08 0x0150 = TM09 0x0151 = TM10 0x0152 = TM11 0x0153 = TM12 0x0154 = TM13 0x0155 = TM14 0x0156 = TM15 0x0157 = TM16 0x0158 = TM17 0x0159 = TM18 0x015A = TM19 0x015B = TM20 0x015C = TM21 0x015D = TM22 0x015E = TM23 0x015F = TM24 0x0160 = TM25 0x0161 = TM26 0x0162 = TM27 0x0163 = TM28 0x0164 = TM29 0x0165 = TM30 0x0166 = TM31 0x0167 = TM32 0x0168 = TM33 0x0169 = TM34 0x016A = TM35 0x016B = TM36 0x016C = TM37 0x016D = TM38 0x016E = TM39 0x016F = TM40 0x0170 = TM41 0x0171 = TM42 0x0172 = TM43 0x0173 = TM44 0x0174 = TM45 0x0175 = TM46 0x0176 = TM47 0x0177 = TM48 0x0178 = TM49 0x0179 = TM50 0x017A = TM51 0x017B = TM52 0x017C = TM53 0x017D = TM54 0x017E = TM55 0x017F = TM56 0x0180 = TM57 0x0181 = TM58 0x0182 = TM59 0x0183 = TM60 0x0184 = TM61 0x0185 = TM62 0x0186 = TM63 0x0187 = TM64 0x0188 = TM65 0x0189 = TM66 0x018A = TM67 0x018B = TM68 0x018C = TM69 0x018D = TM70 0x018E = TM71 0x018F = TM72 0x0190 = TM73 0x0191 = TM74 0x0192 = TM75 0x0193 = TM76 0x0194 = TM77 0x0195 = TM78 0x0196 = TM79 0x0197 = TM80 0x0198 = TM81 0x0199 = TM82 0x019A = TM83 0x019B = TM84 0x019C = TM85 0x019D = TM86 0x019E = TM87 0x019F = TM88 0x01A0 = TM89 0x01A1 = TM90 0x01A2 = TM91 0x01A3 = TM92 0x01A4 = HM01 0x01A5 = HM02 0x01A6 = HM03 0x01A7 = HM04 0x01A8 = HM05 0x01A9 = HM06 0x01AA = HM07 0x01AB = HM08 Key Items 0x01AC = Explorer Kit 0x01AD = Loot Sack 0x01AE = Rule Book 0x01AF = Poké Radar 0x01B0 = Point Card 0x01B1 = Journal 0x01B2 = Seal Case 0x01B3 = Fashion Case 0x01B4 = Seal Bag 0x01B5 = Pal Pad 0x01B6 = Works Key 0x01B7 = Old Charm 0x01B8 = Galactic Key 0x01B9 = Red Chain 0x01BA = Town Map 0x01BB = Vs. Seeker 0x01BC = Coin Case 0x01BD = Old Rod 0x01BE = Good Rod 0x01BF = Super Rod 0x01C0 = Sprayduck 0x01C1 = Poffin Case 0x01C2 = Bicycle 0x01C3 = Suite Key 0x01C4 = Oak's Letter 0x01C5 = Lunar Wing 0x01C6 = Member Card 0x01C7 = Azure Flute 0x01C8 = S.S. Ticket 0x01C9 = Contest Pass 0x01CA = Magma Stone 0x01CB = Parcel 0x01CC = Coupon 1 0x01CD = Coupon 2 0x01CE = Coupon 3 0x01CF = Storage Key 0x01D0 = SecretPotion 0x01D1 = Vs. Recorder (Platinum only) 0x01D2 = Gracidea Flower (Platinum only) 0x01D3 = Secret Key (Platinum only) HeartGold and SoulSilver Exclusive Balls x01EC = Fast Ball 0x01ED = Level Ball 0x01EE = Lure Ball 0x01EF = Heavy Ball 0x01F0 = Love Ball 0x01F1 = Friend Ball 0x01F2 = Moon Ball 0x01F3 = Competition Ball 0x01F4 = Park Ball HeartGold and SoulSilver Exclusive Key Items 0x01D4 = ぼんぐりケース (Apricorn Case) 0x01D5 = アンノーンノート (Unown Notebook) 0x01D6 = きのみプランター (Berry Planter) 0x01D7 = ダウジングマシン (Dowsing Machine) 0x01D8 = ブルーカード (Blue Card) 0x01D9 = おいしいシッポ (Slowpoke Tail) 0x01DA = とうめいなスズ (Clear Bell) 0x01DB = カードキー (Card Key) 0x01DC = ちかのかぎ (Basement Key) 0x01DD = ゼニガメじょうろ (Squirtbottle) 0x01DE = あかいウロコ (Red Scale) 0x01DF = おとしもの (Lost Property) 0x01E0 = リニアパス (Linear Pass) 0x01E1 = きかいのぶひん (Weird Part) 0x01E2 = ぎんいろのはね (Silver Wing) 0x01E3 = にじいろのはね (Rainbow Wing) 0x01E4 = ふしぎなタマゴ (Mystery Egg) 0x01E5 = Red Apricorn 0x01E6 = Yellow Apricorn 0x01E7 = Blue Apricorn 0x01E8 = Green Apricorn 0x01E9 = Pink Apricorn 0x01EA = White Apricorn 0x01EB = Black Apricorn 0x01F5 = フォトアルバム (Photo Album) 0x01F6 = GBプレイヤー (GB Player) 0x01F7 = うみなりのスズ (Sea Bell) 0x01F8 = いかりまんじゅう (Manju Anchor?) 0x01F9 = データカード01 (Date Card 01) 0x01FA = データカード02 (Date Card 02) 0x01FB = データカード03 (Date Card 03) 0x01FC = データカード04 (Date Card 04) 0x01FD = データカード05 (Date Card 05) 0x01FE = データカード06 (Date Card 06) 0x01FF = データカード07 (Date Card 07) 0x0200 = データカード08 (Date Card 08) 0x0201 = データカード09 (Date Card 09) 0x0202 = データカード10 (Date Card 10) 0x0203 = データカード11 (Date Card 11) 0x0204 = データカード12 (Date Card 12) 0x0205 = データカード13 (Date Card 13) 0x0206 = データカード14 (Date Card 14) 0x0207 = データカード15 (Date Card 15) 0x0208 = データカード16 (Date Card 16) 0x0209 = データカード17 (Date Card 17) 0x020A = データカード18 (Date Card 18) 0x020B = データカード19 (Date Card 19) 0x020C = データカード20 (Date Card 20) 0x020D = データカード21 (Date Card 21) 0x020E = データカード22 (Date Card 22) 0x020F = データカード23 (Date Card 23) 0x0210 = データカード24 (Date Card 24) 0x0211 = データカード25 (Date Card 25) 0x0212 = データカード26 (Date Card 26) 0x0213 = データカード27 (Date Card 27) 0x0214 = もえぎいろのたま (Green Orb) 0x0215 = ロックカプセル (Rock Capsule) 0x0216 = べにいろのたま (Red Orb) 0x0217 = あいいろのたま (Blue Orb) 0x0218 = なぞのすいしょう (Crystal Puzzle)
  9. 1 point
    Communication with the GTS is done over regular HTTP with http://gamestats2.gs.nintendowifi.net/. The same protocol is used for all five Gen IV games. HTTP headers The games don't seem to care about these at all. The GTS sends back a bunch of boilerplate response headers, but the game happily accepts a response with only a Content-Length. Protocol All requests to the server are GET requests of the form page.asp?pid=pid followed by page.asp?pid=pid&hash=hash&data=data. The hash variable in the latter, is a hash of the string returned by the former, as described bellow. pid The pid is an unsigned 32-bit integer that appears to uniquely identify a game cartridge. Although this has not been confirmed entirely: Your PID is generated when you get your friendcode for the first time and is set to: friendcode & 0x7fffffff When you change the device and are forced to change your friendcode with it, your PID doesn't change but you get a new friendcode. Your new Friend Code appears to be set by appending a random byte (likely sent from Nintendo's servers) to the end of your PID. For example, nicholas's Soul Silver PID is 258303618 (0x8266650f)and his Friend Code is 4297 5503 3218 (0xf8266650f64) taking endianness into account. Challenge/response Before each "real" request, the game sends a request of the form page.asp?pid=pid and the server responds with a 32-byte challenge token. The game computes sha1("sAdeqWo3voLeC5r16DYv" + token) and uses that as the hash value which it sends to the server. The data parameter is encrypted, as explained further down. For 5th gen GTS, the hash is instead, generated by sha1("HZEdGCzcGGLvguqUEKQN" + token) That is, each request looks like the following: Game requests GET /pokemondpds/page.asp?pid=pid Server responds with token Game requests GET /pokemondpds/page.asp?pid=pid&hash=sha1(...)&data=data Server responds with payload Data The data sent to the server consists of a checksum, your pid, and a payload. The 5th gen GTS also adds the length of the payload, after the pid. In generation 5, the server must append to all its responses a footer generated by sha1("HZEdGCzcGGLvguqUEKQN"+urlsafe_base64(response)+"HZEdGCzcGGLvguqUEKQN"). Checksum The checksum is a 32-bit integer, computed by simply taking the sum of every byte of the pid and payload. It is the first four bytes of the data, xor-ed with 0x4a3b2c1d (0x2db842b2 for 5th gen) and packed in network byte order (big-endian). Payload The pid and payload are encrypted with a stream cipher in for the 4th gen protocol. This encryption algorithm, like others used in the game, uses a Linear Congruential Generator (not a very strong choice). The multiplicative constant is 0x45, and the additive constant is 0x1111. It appears that the game uses a signed dword to store the seed, which doesn't really matter; it shouldn't affect anything. (It means that the modulus is effectively 0x80000000.) GRNG[n+1] = (GRNG[n] * 0x45 + 0x1111) & 0x7fffffff The GRNG is seeded with the checksum, like so: GRNG[0] = checksum | (checksum << 16) The keystream is composed of the lower byte of the high word of successive GRNG values. keystream[n] = (GRNG[n] >> 16) & 0xff Xor the keystream with the plaintext to get the ciphertext. Xor the keystream with the ciphertext to get the plaintext. The entire data string is then encoded with urlsafe-base64. Conversation The first request the game makes is to /pokemondpds/worldexchange/info.asp. The server responds with 0x0001. Platinum, Heart Gold, and Soul Silver will then make a request to /pokemondpds/common/setProfile.asp. The server responds with eight NULs (0x00000000 0x00000000). After the above step(s) or performing any of the tasks below other than searching, the game makes a request to /pokemondpds/worldexchange/result.asp. If the game has had a Pokémon sent to it via a trade, the server responds with the entire encrypted Pokémon save struct. Otherwise, if there is a Pokémon deposited in the GTS, it responds with 0x0004; if not, it responds with 0x0005. Receiving a traded Pokémon If the game receives a Pokémon from a successful trade as a response from result.asp, it next requests /pokemondpds/worldexchange/delete.asp. The server responds with 0x0001. A note on sendpkm.py After doing the above, some Platinum, Heart Gold, and Soul Silver games will report a communication error and dump the player back to the title screen. The Pokémon is still successfully received. At least one person with HG/SS has received a Pokémon from a fake server without getting the error, and Diamond/Pearl have never been reported to have the problem. Depositing a Pokémon Pokémon are offered on the GTS by requesting /pokemondpds/worldexchange/post.asp. If the Pokémon is rejected by the server, the response is 0x000c; otherwise, if the deposit is successful, 0x0001. Note that in generation 5, some tests are performed on a pokémon before it is deposited. If the pokémon is rejected at this stage (a problem was detected or one of the OT name or nickname is inappropriate) it is NOT sent to the GTS and error 13267 is displayed. The game then saves. After the save is complete, it issues a request to /pokemondpds/worldexchange/post_finish.asp. In generation 5, the sent data is 444 bytes long as follows: Offset Contents 0x00-0x03 Checksum (sum of all bytes xor 0x2db842b2) 0x04-0x07 pid 0x08-0x09 Data length (minus the 12 bytes of header) 0x0A-0x0B Unknown / Zero 0x0C-0xE7 Encrypted party pokemon data structure 0xE8-0xF7 Unknown / Zero 0xF8-0xF9 Nat. Dex ID 0xFA Gender 0xFB Level 0xFC-0xFD Requested Nat. Dex ID 0xFE Requested Gender 0xFF Requested Min Level 0x100 Requested Max Level 0x101 Unknown / Always 0 0x102 Trainer gender 0x103 Trainer nature 0x104-0x107 Always 0? 0x108-0x117 Timestamp placeholder, always 0 (set by server) 0x118-0x119 Trainer ID 0x11A-0x11B Secret ID 0x11C-0x12B OT Name (Unicode, must end with 0xFFFF) 0x12C Country 0x12D City 0x12E Trainer class/sprite 0x12F Is Exchanged Flag (Always 0) 0x130 Game version 0x131 Region/language 0x132 Unknown (0 to 8) 0x133 Unlocked floors in Unity Tower 0x134-0x137 Unused 0x138-0x1B7 Signature of pokémon struct 0x1B8-0x1BB Terminator (0x80000000) In generation 4, the sent data is 296 bytes long and as follows: Offset Contents 0x00-0x04 PID 0x04-0xEF Encrypted party pokemon data structure 0xF0-0xF1 Nat. Dex ID 0xF2 Gender 0xF3 Level 0xF4-Fx05 Requested Nat. Dex ID 0xF6 Requested Gender 0xF7 Requested Min Level 0xF8 Requested Max Level 0x09 Always 0 0x0A Trainer's Gender 0xF9-0x109 Zero / Timestamps and PID placeholders 0x110-0x11F Trainer's Name 0x120-0x121 Trainer's OT ID 0x122 Country 0x123 City 0x124 Trainer's Sprite 0x125 Is Exchanged Flag 0x126 Game Version 0x127 Language Retrieving the deposited Pokémon Checking on the deposited Pokémon is apparently done by /pokemondpds/worldexchange/get.asp. The response appears to be a Pokémon save struct. Retrieving the deposited Pokémon is done by /pokemondpds/worldexchange/return.asp. The response is merely 0x0001; the actual Pokémon data is taken from the get.asp request. Searching Searching is done through /pokemondpds/worldexchange/search.asp. The sent data is either 15 or 16 bytes long. The server responds with a full 292-byte Pokémon struct for each result. If there are n results, the response will be 292 * n bytes long. If there are no results, the server will give an empty response (0 bytes). Pokémon struct The Pokémon data for the Generation IV GTS is 292 bytes—56 bytes larger than a party Pokémon struct. The extra 56 bytes are GTS-specific data, such as the player's name & country, and what Pokémon they are requesting. In Generation IV, the trainer name is encoded with the Pokémon character table, while in Generation V, the trainer name is Unicode encoded. They are as follows: Generation IV Encrypted Bytes Offset Contents 0x00-0x01 Nat. Dex ID 0x02 Gender 0x03 Level 0x04-0x05 Requested Nat. Dex ID 0x06 Requested Gender 0x07 Requested Min Level 0x08 Requested Max Level 0x09 Unknown - always 0? 0x0A Trainer's Gender 0x0B Unknown - always 0? 0x0C-0x13 Timestamp - deposited time 0x14-0x1B Timestamp - time traded? 0x1C-0x1F PID 0x20-0x2F Trainer's Name 0x30-0x31 Trainer's OT ID 0x32 Country 0x33 City 0x34 Trainer's Sprite 0x35 Is Exchanged Flag 0x36 Game Version 0x37 Language The data for the Generation V GTS is 296 bytes (16 bytes of padding in between the encrypted party data and the GTS data) and adds the trainer's secret ID, an additional two unknown bytes at the end, and shifts the position of the trainer name to after the trainer and secret IDs. Generation V Encrypted Bytes Offset Contents 0x00-0x01 Nat. Dex ID 0x02 Gender 0x03 Level 0x04-0x05 Requested Nat. Dex ID 0x06 Requested Gender 0x07 Requested Min Level 0x08 Requested Max Level 0x09 Unknown - always 0? 0x0A Trainer's Gender 0x0B Unknown - always 0? 0x0C-0x13 Timestamp - deposited time 0x14-0x1B Timestamp - time traded? 0x1C-0x1F PID 0x20-0x21 Trainer's OT ID 0x22-0x23 Trainer's Secret ID 0x24-0x33 Trainer's Name 0x34 Country 0x35 City 0x36 Trainer's Sprite 0x37 Is Exchanged Flag 0x38 Game Version 0x39 Language 0x3A-0x3B Unknown Pokémon Gender Value Type 0x01 Male 0x02 Female 0x03 Either/neither Trainer Gender Value Type 0x00 Male 0x01 Female Timestamp Format The timestamps are set by the server, and are always PST (UTC-8). Offset Contents 0x00-0x01 Year 0x02 Month 0x03 Day 0x04 Hour 0x05 Minute 0x06 Second 0x07 Unknown - always 0? Trainer Class (for generation 5) Value Class 0x00 Youngster 0x01 Ace Trainer 0x02 Pokémon Ranger 0x03 Pokémon Breeder 0x04 Researcher 0x05 Hiker 0x06 Skinhead 0x07 Day-Care student 0x08 Lass 0x09 Ace Trainer (female) 0x0a Pokémon Ranger (female) 0x0b Pokémon Breeder (female) 0x0c Researcher (female) 0x0d Parasol Lady 0x0e Nurse 0x0f Day-Care student (female) Game Version Value Version 0x0A Diamond 0x0B Pearl 0x0C Platinum 0x07 HeartGold 0x08 SoulSilver 0x15 Black 0x14 White
  10. 1 point
    85h 85h Values 85h is an offset in the data structure of 4th Generation Pokémon, and shows how a Pokémon was encountered. Currently 85h has no relevance to gameplay, but in certain cases it can be used to determine the Legality of a Pokémon. 85h List 00 - Egg/Pal Park/Event 02 - Tall Grass/Honey Tree 04 - Dialga/Palkia 05 - Cave/Hall of Origin 07 - Caught in the Water 09 - Caught in Buildings 0A - Great Marsh/Safari Zone 0C- Starter Pokemon/Fossils (D/P) 18 - Starter Pokemon/Bebe's Eevee (Platinum) 17- Giratina (Origin)(Platinum) ??- Giratina (Another)(Platinum) ??- Fossils (Platinum)- 18? ??- Honey Tree (Platinum)- Pretty sure its 02 but not confirmed. ??- Dialga/Palkia (Platinum)
  11. 1 point
    5th Generation Wonder Card Map Gift Data Offset Description 0x00-0x01 Trainer ID Number, Item Number, Power Type 0x02-0x03 Secret ID Number 0x04 Hometown 00 - Game Received In 01 - Hoenn(Sapphire) Values follow in standard order through 21 0x05-0x07 Unused 0x08-0x0B PID Unset = 00000000 0x0C Primary Ribbons Ribbon data available below. 0x0D Secondary Ribbons Ribbon data available below. 0x0E PokéBall 0x0F Unused 0x10-0x11 Held Item 0x12-0x13 Move ID #1 0x14-0x15 Move ID #2 0x16-0x17 Move ID #3 0x18-0x19 Move ID #4 0x1A-0x1B PokéDex Number 0x1C Unused 0x1D Language 00 for Game Received In 0x1E-0x33 Pokémon Nickname (0x32-0x33 FF FF terminated) If no nickname, all FF. 0x34 Nature FF - Unset 0x35 Pokémon Gender 00 - Male 01 - Female 02 - Random 0x36 Pokémon Ability 00 - Ability 1 01 - Ability 2 02 - Dream World Ability 03 - RND(Abil1, Abil2) 04 - RND(Abil1, Abil2, AbilDW) 0x37 Shiny Toggle 00 - Not Shiny 01 - Allow Shiny 02 - Generate Shiny PID Shows Shiny Pokemon on Card 0x38-0x39 Egg Met Location 0x3A-0x3B Met Location of Pokémon 0x3C Level - unused(?) 0x3D-0x42 Contest Stats Last byte is Sheen 0x43-0x48 IVs FFs for unset IVs 0x49 Unused 0x4A-0x59 OT Name 0x5A OT Gender 00 - Male 01 - Female 03 - Recipient's Gender 0x5B Level(random if set to 0) 0x5C Egg Flag 00 - Is Not Egg 01 - Is Egg 0x5D-0x5F Unused Card Data Offset Description 0x60-0xA9 Card Title 0xAA-0xAB Unknown 0xAC-0xAF Date Card Received 0xB0-0xB1 Card ID 0xB2 "Card From" Location 0xB3 Card Type 01 - Pokémon [Blue] 02 - (Key) Item [Pink] 03 - Power [Yellow] 0xB4 Gift Status: Used / Unused 00 - Repeatable gift 01 - Unused 03 - Used 0xB5-0xCB Unused Ribbon Sets These are the values for each ribbon byte: Flag Value 0x0C 0x0D 0x01 Country Ribbon Special Ribbon 0x02 National Ribbon Memorial Ribbon 0x04 Earth Ribbon Wish Ribbon 0x08 World Ribbon Battle Champ Ribbon 0x10 Classic Ribbon Regional Champ Ribbon 0x20 Premiere Ribbon National Champ Ribbon 0x40 Event Ribbon World Champ Ribbon 0x80 Birthday Ribbon No Ribbon(Empty) First Appearance in the Memory The Wonder Cards do appear in the active memory while the game is running, however there are certain things that are set in addition to the card data in addition to it being in two locations. The cards appear in the region of 0x0226BE30-0x0226C87F in Black, and 0x0226BE50-0x0226C89F for White. Card data is unencrypted when viewing, but encrypted at all other times. Each card is separated by 220 bytes of data. Memory Offsets of each Card when viewing, including the leading 4 bytes: Card # Offset (Black) Offset (White) 1 0x0226BE30 0x0226BE50 2 0x0226BF0C 0x0226BF2C 3 0x0226BFE8 0x0226C008 4 0x0226C0C8 0x0226C0E8 5 0x0226C1A4 0x0226C1C4 6 0x0226C280 0x0226C2A0 7 0x0226C35C 0x0226C37C 8 0x0226C438 0x0226C458 9 0x0226C514 0x0226C534 10 0x0226C5F0 0x0226C610 11 0x0226C6CC 0x0226C6EC 12 0x0226C7A8 0x0226C7C8 The card is preceded by 4 bytes, in which the first is 1 to indicate that there is a card present in that slot, being 0 when a card is not present. Meaning Data Card Present 0x00000001 No Card Present 0x00000000 The card data is then present, byte for byte for the entire 204 bytes. After the card data, there are 4 bytes (pointer?). Card # Trash Value (Black) Trash Value (White) 1 0x0226CAA4 0x0226CAC4 2 0x0226CD88 0x0226CDA8 3 0x0226D06C 0x0226D08C 4 0x0226D350 0x0226D370 5 0x0226D388 0x0226D3A8 6 0x0226D3C0 0x0226D3E0 7 0x0226D3F8 0x0226D418 8 0x0226D430 0x0226D450 9 0x0226D468 0x0226D488 10 0x0226D4A0 0x0226D4C0 11 0x0226D4D8 0x0226D4F8 12 0x02270248 0x02270268 There are then 8 unused bytes (all 00), leading up to the next card. Second Appearance in the Memory The second appearance of the unencrypted card data while viewing is varied based on the number of cards currently on the save. Since it has not been tested whether or not active/inactive gifts may change the locations, trash all used cards before using any memory codes. Cards and the surrounding data follow the first appearance's format. Kaphotics' Test Card 1 Memory Location of N Cards [Stop at (N) cards]: Black: 02277F20(1 card) +58C(2c) +590(3) +58C(4) +2E8(5) +2E4(6) +2E8(7) +2E4(8) [9-12 still testing] White: 02277F40(1 card) +58C(2c) +590(3) +58C(4) +2E8(5) +2E4(6) +2E8(7) +2E4(8) [9-12 still testing] Card 2 = Card 1 Memory + 420 Card n = Card 1 Memory + 5020 + (n-3)*4C34 || Number of cards: 13>n>2 For other DS's (with different MAC addresses) the 1st location is the same but the rest follow different additive constants between cards. The second appearances will appear in the block range of 0x02270000-0x022AFFFF.
  • Newsletter

    Want to keep up to date with all our latest news and information?
    Sign Up
  • Create New...