Jump to content

[GEN 3] Mystery Event/Gift Research


ajxpk

Recommended Posts

You want the editor to recreate the missing WCs, that's something that can be done with an hex editor (there are not that many missing WCs) using another WC from the same region, and of course we would have to think something that identifies them as recreated (probably changing the ID/background color is more than enough). Recreating the official cards via hex editing is way quicker than a full editor, and with full editor I mean something that can give you any item, any pokemon, trainer card, berries... etc.

That's why my priority would be a way to dump/inject and preserve official events, then comes all the non-released stuff imho. Also, I don't know java (which would be great do to multi-platform), so an editor would be done in c#.

In fact, since BlackShark already posted the offsets, the dumper/injector is trivial. I'll add support for all those.

WC3 file structure will be WC+Deliverymanscript (.wc3)

mistery event structure will be script+item (.me3)

wc news (.wcn)

still thinking extensions for e-trainer card and e-berry.

Well the problem is that the missing Wonder Cards can't be reconstructed as easy as you think!

Especially not if you want to build them based on the Scripts from the official ones...

Because what you might don't know yet is that every Official Event has some Trash Bytes under the Script which is in the 1000 bytes who're calculated with the checksum routine.

So these Trash Bytes are very important indicator to determine a real Mystery Gift Event from a hacked one and if we wanted to make a real and legit one we would have to keep it in mind.

I already tried to reconstruct the missing Events with the Trash Bytes from the other ones.

Just for the record... In the European Wonder Cards you can find the Scripts for the other languages in the Trash Bytes...

So I thought I could do a bit patchwork and get the other ones this way, it was just for fun and to see if it might work...

I hoped that this way I could recreate the missing Wonder Cards we don't have yet, but there are just too many holes...

As you can see on the list, only have the German and the Italian European Mystery Gift Events from FR & LG...

We have an English one downloaded on Emerald as mentioned but it was useless for this purpose...

I think the order the data was stored on the distribution device and written to the save file was this...

English - French - Italian - German - Spanish

So in theory... if we had the English Aurora Ticket on FR & LG we could reconstruct the French one.

Because we already know the Wonder Card text:

[ATTACH=CONFIG]13191[/ATTACH]

And since we have dumped the Italian one we know how the Trash Bytes after the Script should look like.

All we would have to do is filling the space after the French Script till the size reaches 1000 bytes.

So technically I think it could be possible to reconstruct this missing Mystery Gift Event.

But since we don't have the English Mystery Gift Event it's impossible to do this.

I hope what I tried to explain was understandable...

I think it's better to make an Tool that uses the Scripts we already have completed, which I uploaded here.

A Tool that can load and write files and inject Events to save files...

Including an Wonder Card Text Editor to edit the Event ID, Color, Text additionally can change the Pokémon Icon.

And of course it should calculate and add the checksum automatically.

Except this it doesn't has to edit anything, but you could add more features littly by little if you want to.

Btw. I like your idea with the filename extensions!

We (lostaddict and I) already had something like this in mind but haven't made decisions yet!

So I would leave it to you to decide how we should name them.

EDIT: I updated the list in the first post! Now it's easier to understand what's still missing.

Also I added the Master and DMA codes. Thanks suloku.

edit 2:

I added a picture of the French Aurora Ticket Wonder Card.

Edited by ajxpkm
Link to comment
Share on other sites

EDIT: @BlackShark, Mistery event script in emerald is bigger (84 bytes), any reason for that or just nintendo things? I'm still reading the thread.

I don't know the reason. I just read that somewhere, but I can't recall where that was. I'll search it.

still thinking extensions for e-trainer card and e-berry.

Maybe .ect for e-Card Trainers and .ecb for e-Card Berries? Or since they are Mystery Events .met and meb?

By the way, I already dumped all the data for Trainers and Berries from the saves. They currently have the .bin extension, but once you decided for an extension I can rename and upload them.

Link to comment
Share on other sites

Well... I have HUGE news!

I was finally able to collect the officially distributed Spanish Aurora Ticket.

Ori-Ticket.png

Actually, I have this one since 2 days or so in my collection.

But first I was a bit sceptical if it's really a legit one and of course I will also explain why...

The reason everyone might be able to understand is that the text looks a bit different than those of the other ones.

Besides there are a few spanish hacks out there with similar text, so that's why this was suspicious to me.

This for example are two obvious hacks:

http://www.3djuegos.com/comunidad-foros/tema/15597728/0/si-alguien-quere-conseguir-a-keldeo-genesect-lugia/

Obvious because you can see Pokémon Icons on the Cards + the Mystic Ticket was never distributed in Spain anyway...

Well, now it gets more technical...

I checked the Trash Bytes (most important indicator) and what did I saw?

The famous 0 and 1 Trash Bytes! Those we already know from some of the Japanese and US Mystery Gift Events.

To me it was obvious that I can put this one to the list of hacked Wonder Cards.

(Same as the golden Wonder Card btw. which I already received and checked a while ago... of course... IT WAS A HACK TOO...)

So I thought my work on this one was already done, but then I had some thoughts today after I made my last post...

Remember what I said?

Yeah... the order of Trash Bytes...

ENGLISH - FRENCH - GERMAN - ITALIAN - SPANISH

Then I thought... wait a minute...

We have the Italian one!!!

So what did I do? Back to research...

I compared the Trash Bytes of the Italian save file with the Spanish one...

And to my surprise... this is what I saw...

Auro_Ita_Spa.jpg

On the left you see the Italian Aurora Ticket Script and on the right you see the Spanish Aurora Ticket Script.

What I marked in blue on both is the Spanish Script, which is part of the Trash Bytes in the Italian one.

As you can see the data MATCHES!

Which means that the Spanish Aurora Ticket I received must be legit. :) At least it's highly unlikely that it's not considering all the details.

Because another reason that underscores this is the thing I noticed today that the Spanish language is the last on the distribution device.

This also explains why there are only 0s and 1s (+ the AURO String) are being left as Trash Bytes in the official Spanish Mystery Gift Event.

Ori-Ticket.png.dcbdbde5a48bc48fc97fd786d

Link to comment
Share on other sites

@ajxpkm I think we can trust Dr. Matt on the legitimacy of this one. He claims to have sent his cart to nintendo, and given the fact he has participated in event compilations before I really doubt he would (after all these years) provide a fake wondercard.

Also, on my side, injecting/dumping is working fine for FR/LG and Emerald, but the offsets BlackShark provided were wrong for emerald and had to look for them.

I really need to verify the boundaries of the wc and script.

wc is 336 bytes WITH checksum? I've read a post claiming it to be 332. That leaves the wc icon outside the WC and the checksum. The wondercard works fine, but the icon is part of the wc data in my opinion, leaving it out doesn't make sense to me. Alternatively I can extend the wc to include the icon (348 bytes WITH checksum).

I guess I'll run some tests to verify the boundaries myself, but seems like the icon is outside the wc checksum, but if the icon is left outside the checksum, the question would be: is anything else left outside the checksum? I guess deleting the WC data and comparing might help, luckily we have legit saves for emerald and FR/LG.

BTW, even without the icon, the injected WC3 works fine, so the WC3 needs to change to include at least the icon.

I guess I could check taka's legit tools too, see what they inject to the save and see if I'm missing something. Anyone has jap savefiles that never used mistery event?

EDIT: also, any tutorial about the japanesse tools?

ps: works too with morfeo's wondercards if anyone was wondering.

ps2: after injecting/dumping wc3 is clear, I'll get to the other files (trainer/berry/mistery event)

edit: ps3. as curiosity, the event works even if the mistery gift option isn't enabled.

Link to comment
Share on other sites

I want to say sorry that I was so sceptical. But the fact that I have seen so many hacked Spanish Wonder Cards made me become very leery about them.

And at this point big thanks to Dr.Matt who's the originator of the save file.

To answer your question regarding Emerald...

I can't check it now but if I remember it correctly the offset location in (US) Emerald starts at 0x56C.

Now about the Wonder Card Structure.

It's work that has been already done but literally lost because it was lostaddicts job.

I think it's good if we're documenting everything from now and I will make an Index and add links in the first post later.

Let's try to get things together...

As you already figured it out, the Pokémon Icon is not part of the checksum validation.

That's why we can edit it even without changing the checksum.

Possibly it was planned to be used but then they scrapped it and just used the Default Icon (0xFFFF which is the question mark) and now it's still there as a leftover.

Interesting to notice is also the fact that if you use the "Sharing-Feature", the Icon is ALWAYS transferred/activated as 0xFFFF on the receiver's save file regardless if the person who sends the WC has another Icon.

Wonder News Data Structure

Offset     Contents                          Size

0x0        Checksum                           2 Bytes
0x4        Header                             1 Byte
0x6        Sharing Functionality              1 Byte
0x7        Color Theme                        1 Byte
0x8        Text (Header)                     40 Bytes
0x30       Text Line 1                       40 Bytes
0x58       Text Line 2                       40 Bytes
0x80       Text Line 3                       40 Bytes
0xA8       Text Line 4                       40 Bytes
0xD0       Text Line 5                       40 Bytes
0xF8       Text Line 6                       40 Bytes
0x120      Text Line 7                       40 Bytes
0x148      Text Line 8                       40 Bytes
0x170      Text Line 9                       40 Bytes
0x198      Text Line 10                      40 Bytes



Notes:


Checksum:
Computed with the data between 0x4 and 0x1C0. (444 Bytes)

Sharing Functionality:
0x00 = OFF
0x01 = ON

Color Theme:
Yellow 0x00
Crystal 0x01
Red 0x02
Green 0x03
Blue 0x04
Brown 0x05
Gold 0x06
Silver 0x07

Wonder Card Data Structure

Offset     Contents                          Size

0x0        Checksum                           2 Bytes
0x4        Wonder Card ID                     4 Bytes
0xC        Color Theme + Sharing-Feature      1 Byte
0x18       Text (Header 1)                   40 Bytes
0x40       Text (Header 2)                   40 Bytes
0x5E       Text (Center)                     40 Bytes
0xFE       Text (Footer 1)                   40 Bytes
0x126      Text (Footer 2)                   40 Bytes
0x15A      Pokémon Icon                       2 Bytes


Notes:

Checksum:
Computed with the data between 0x4 and 0x150. (322 Bytes)



Known Wonder Card IDs:

Aurora Ticket: E803FFFF
Mystic Ticket: E903FFFF
Old Sea Map:   EA03FFFF



Available Color Themes

Yellow 0x00
Crystal 0x04
Red 0x08
Green 0x0C
Blue 0x10
Brown 0x14
Gold 0x18
Silver 0x1C

Add + 0x80 to the value to make Wonder Card shareable.  

[ATTACH=CONFIG]13214[/ATTACH][ATTACH=CONFIG]13209[/ATTACH][ATTACH=CONFIG]13212[/ATTACH][ATTACH=CONFIG]13211[/ATTACH][ATTACH=CONFIG]13207[/ATTACH][ATTACH=CONFIG]13208[/ATTACH][ATTACH=CONFIG]13210[/ATTACH][ATTACH=CONFIG]13213[/ATTACH]

Mystery Gift Script Data Structure

0x0        Checksum                           2 Bytes
0x4        Header                               4 Bytes
0x5        Space for the Script             996 Bytes

Notes:

Computed with the data between 0x4 and 0x3EB. (1000 Bytes) 

This is for the west versions only for now, I will do the same for the japanese versions later.

I did this quickly so if there's an error somewhere or someone has any suggestions let me know.

The color theme names were picked by me and are not official, it's just what I thought they constitute.

I still have to test the limits regarding the text...

Will do that when I have more time.

Edited by ajxpkm
Link to comment
Share on other sites

Yes, I figured the offsets, as I said my tool works just fine for emerald and fr/lg.

I haven't released yet because I wanted to solve the wc3 structure befor that, right now it is wc+script, which leaves out the icon. My concern is if there's any other data besides the icon that was injected in official distribution, because that would have to also be included in the wc3 file.

I've finished reading the thread, most important thing is that damn checksum, I'll see if I can figure it out today.

Also, I think a file with all saves collected so far with legit distributed wondercards should be done and made available. You are the only one in possesion of all collected events right now, and if something happens it would be a shame we have to start over compilating events.

ps: seems like checksumed wc data is 332 bytes after all.

EDIT: Emerald offsets (section 4):

Wondercard 0x56C (4 bytes checksum + 332 bytes wc data)

Blue Man script 0x8A8 (4 bytes checksum + 1000 bytes script data)

Link to comment
Share on other sites

It would be certainly possible. I'm not sure about how the sending would work, but we know pokemon box sends a binary to the games so it connects to them, modifying the iso with a custom binary that modifies the save should be possible, but since that would need homebrew to boot the modified iso, directly reading the save and modifying it via GC homebrew is easier.

So good news, I have the working checksum algorythm, WC creation/modification is possible again.

Still need to know if there's more data besides the icon that is part of the wondercard distribution, but not part of the checksum regions. For now I think I'll extend the WC3 (wc+script) so the wc part includes the data until the icon (348 bytes instead of 332 if I'm not mistaken), I could just add the icon byte, but all the other data seems to be 0x00 and might be part of the WC since the icon comes after it.

http://puu.sh/owISL/b7a918be2f.png

A morfeo card with different color and no-distributable.

Basically we are back at page 4 of this thread, the difference is I don't know how to view/edit the WC or the delivery man scripts. I've found a pokemon script editing tool, so it seems the info is around somewhere.

Link to comment
Share on other sites

Congratulations. :biggrin:

Finally another person who can create some Wonder Cards with me.

Btw. I think the only Script that should be interesting for editing is the Pokémon Egg Present one.

Just try to change the Pokémon and the Special Moves it has.

This is something that would be nice in an Editor.

Link to comment
Share on other sites

We could edit a event item script to remove event flags in order to only receive an item, but that's probably what morfeo's berry/doll wcs do.

I think I've read you can obtain gift pokemon this way too? Maybe gen 3 scripting can do much more, maybe the wc scripts could be open with existing script editors for gen 3?

Editing the wc text, background and icon is quite easy.

EDIT:

For a full editor, with some template scripts were we just modify the item/pokemon/egg to be receiveid it would be more than enough.

We can use morpheo's or the ones in the roms for that, or even write them from scratch.

Edited by suloku
Link to comment
Share on other sites

I have been challenging the capabilities of the wonder card gba has some limitations

You can not put PID Pokemons the special types.

You can not give Pokemons with EO and specific ID

To make a good editor I suggest you combine with EXE 1.1

and make a template with commands

Link to comment
Share on other sites

There is no program yet, but we are currently working on it. Hopefully we will have one soon.

Is it close to finally being created or still a long way to go? Cause I've been looking at this thread for months now but I have no idea what you guys always talk about.

Link to comment
Share on other sites

Is it close to finally being created or still a long way to go? Cause I've been looking at this thread for months now but I have no idea what you guys always talk about.

Well the first two people who were working on the tool never finished it, but now we have a third person, who has the knowledge to make a tool and is making it as we speak. I cannot say for him when he will release it or be done. But at the rate he is going, it shouldn't be too long.

Link to comment
Share on other sites

Hey guys, if Nintendo italy still gives event tickets, i'll send them my italian ruby, emerald and red fire. I saw we miss the eon ticket, so i will really like to contribuite with the save file. I wrote to Nintendo and i'm waiting for the answer.

I think someone on this forum already found EON TICKET save file (injected by NINTENDO Italy), but you can do it too. It would be useful.

Link to comment
Share on other sites

I think someone on this forum already found EON TICKET save file (injected by NINTENDO Italy), but you can do it too. It would be useful.

In the OP there is the "?" near Italian Eon Ticket, so i think we miss it. Anyway i'll do it, because i want them. Nintendo just answered me and told me that it's still possibile to send them only Emerald, FireRed for Aurora Ticket and Sapphire for Son Ticket. I'll write here when i'll received back my games to share (if needed) the sapphire save file.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...