Pkhex: Pokemon Colosseum and XD Can't trade legal Pokemon

Created on 12 Nov 2018  路  7Comments  路  Source: kwsch/PKHeX

img_2111
I was trying to trade a Pokemon from Colosseum to Emerald, however, I found that for some reason, my legal Deoxys is flagged as illegal by the game and cannot be traded. See in the image that even though it is in the top right of my party, there is no picture there. However, I have another Deoxys which is actually the exact same Deoxys, just not leveled up in my Emerald game. However, even though PKHex labels it as legal, it still cannot be traded. I tried trading in the same Deoxys from Emerald, and it appears and can be traded just fine. But what is wrong with my Deoxys that the game flags it as illegal and cannot be traded All I did was take that same Emerald Deoxys file as a pk3 file and moved it into the game with PKHex so I could use it in a playthrough.

Also note that for some reason, Deoxys has the Fateful Encounter Flag in Emerald before being trading but had it removed after being traded.
deoxyserror

I do not know what is going on, however, the Deoxys that I traded in can be traded back just fine, but the other one isn't even showing up on the trade screen.

I will attach the save file both before the trade and after the trade, as well as the copy of Pokemon Emerald from which it comes (It is located in Box 11, Slot 11). Also, the only legal issue with the Emerald Deoxys is that it is EV trained without receiving experience, yet it can still be traded

PS the same problem is happening in XD with a legal Smeargle that I injected. Although I don't have a picture of it, when I try to trade it to Pokemon Emerald as well, it states "An Illegal Pokemon may not be traded". I will attach its save file as well.

Pokemon Save Files.zip

bug

All 7 comments

Colo was probably checking the fateful encounter flag, and since it wasn't there, it was invalid.

But it seems to be backward. The Deoxys the game is flagging as Illegal is the Deoxys that has the fateful encounter flag checked. However, the Deoxys that can be traded in and out just fine is the Deoxys that lost its flag upon being traded.
deoxyserror2
Why does it even lose the flag upon being traded?

Does it receive the Fateful encounter flag when transferred back to gen3 (legit transfer, not pkhex)
Could be the fateful flag is stored at another offset and PKHeX is read/writing it incorrectly.

Maybe a dump of the two deoxys (legit vs pkhex-transfer) so the data can be compared?

I traded the Deoxys back
img_2114
and then Extracted the Emerald Save into PKHeX
deoxyserror3
sure enough, the Fateful Encounter flag has been "restored" upon returning to Emerald. I also tried removing the fateful encounter flag of the illegal Deoxys to match the legal one, yet it still couldn't be traded. I would hypothesize that the fateful encounter flag is stored somewhere other than where PKHeX thinks it is for Colosseum and XD Pokemon. So when I drag and drop a Pokemon file into a colosseum save, it doesn't actually check the right flag. I would hypothesize that if I could force the game to trade it, it wouldn't have the fateful encounter flag in the GBA game. Although the Smeargle still cannot be traded from XD.
386 - Pokemon Files.zip

https://github.com/kwsch/PKHeX/blob/f38c46f5ec3b052a91f69ec168e0316077382273/PKHeX.Core/PKM/CK3.cs#L186-L187

Looks like they're really the same thing, and that the fateful encounter flag is misplaced.
EncounterType should be deleted and Fateful should read from that offset.

Also looks like -100 is set for the shadow gauge. Maybe this is a requirement too (shadow gauge must be less than 0 to be deemed 'pure').

I'm not sure about the XK3, since there's no 'legal' variant to compare against.

Okay, so doing the same thing again with Smeargle. Like before, the Smeargle was dropped into XD with PKHeX, yet it cannot be traded. So I copied that exact same Smeargle to Emerald with PKHeX, and linked Emerald with XD for a trade. Notice an identical Smeragle in Emerald
img_2115
Trading the legal one from Emerald into XD
img_2116
And notice that the one traded in from Emerald is legal and can be traded like normal
img_2117
Looking at the extraced XD save file, they look completely legal and identical
smeargleerror1
I will attach the two smeargle files and the save file.
XD Pokemon Files.zip

I'm not able to figure out what's blocking the xk3 from trading

  • offset 0x35 is 'current region' so maybe this mismatching prevents trade (the tradable has 03, not 02).
  • offset 0xB9 is undocumented so it could be this
Was this page helpful?
0 / 5 - 0 ratings

Related issues

architdate picture architdate  路  3Comments

ReignOfComputer picture ReignOfComputer  路  4Comments

PrometheusG picture PrometheusG  路  4Comments

ckohnke picture ckohnke  路  4Comments

ijuintekka picture ijuintekka  路  4Comments