Download PWTE 2.1 by Prof.9
==
So far there have been 4 download tournaments and one secret relic tournament locked away in the ROM; I might as well explain where it's at and how most of the important stuff is stored. I spent a little bit of time figuring out enough to get meaningful data out like text and teams, nothing more than that... so here's what I've found so far.
PWT download events are set into the save file in the latter half along with all of the other downloadable content like mystery gifts. The tournament region is 0x7A000-0x7DFFF, for 0x1400 bytes for each tournament * 3 tournaments. By just looking at a downloaded tournament, it's hard to visually see the general structure via a hex viewer because it doesn't display Japanese characters... for visual help, you can use /a/2/5/8 from B2/W2's files, as this was their hard-coded test tournament that has a bit of English text (and wasn't removed for retail release).
0xA-0x54: Tournament Name
~afterwards, there's text for describing the tournament
PKMs are set up to be as compact as possible, skipping nonessential stuff kinda like battle pkms. 52 bytes per PKM (0x34), one after another to make 6.
Structure of PWT-DLC PKMs:
0x0-0x1: Species
0x2-0x17: 11 character namefield (after names, they are usually 0xFFFF aka terminators, not characters)
0x18-0x19: Held Item
0x1A: Shiny Flag (00 or 01) ~ unconfirmed, hasn't been used except for the ROM tournament
0x1B: Ability
0x1C: HP EV
0x1D: ATK EV
0x1E: DEF EV
0x1F: SPE EV
0x20: SPA EV
0x21: SPD EV
0x22-0x23: Move 1
0x24-0x25: Move 2
0x26-0x27: Move 3
0x28-0x29: Move 4
0x2A: gender? ~ unconfirmed. may just be bitflags for stuff
0x2B: Nature
0x2C-0x2F: IVs (stored same way as pkms)
0x30: ??? always 0. might be secondary sparkle like N's
0x31: Ball
0x32: Current Level
0x33: Happiness
0x270: Start of Trainer 1
PKM1: 0x274-0x2A7
PKM2: 0x2A8-0x2DB
PKM3: 0x2DC-0x30F
PKM4: 0x310-0x343
PKM5: 0x344-0x377
PKM6: 0x378-0x3AB
0x3AC-0x3C1 - Trainer Name ~ not sure on the lengths of these
0x3CC-0x3DD - Trainer Class ~ as I haven't seen longer name/classes
Trainer win messages or something afterwards, didn't care enough to determine how they worked.
Next trainer:
0x650: start of trainer 2
0x654: pkm data....
0x3E0 between each trainer block, always 4 trainer blocks
(0x270, 0x650, 0xA30, 0xE10)
0x1400 next tournament... repeats...
0x1670 trainer 1...
0x1A50 trainer 2...
etc.
that's all I know, however there's certain bytes somewhere which make the game use other stuff in the ROM instead of the programmed PKMs or trainer name/class. I just wanted to get the important team sets out so I didn't bother figuring out the entire structure.
===
resources~
Excel Parser ~ paste in tabulated data strings into the proper cells. PKM related lookup tables from Bulbapedia & pkmcodedepo and character tables from here.
Ripped Tournament from the region I mentioned above (7A000-7BFFF). "PWT Download" for the file extension naming
example results from parsing stuff & (rom example)