How do Trash Bytes Work?
Author Message
LatiosMe Offline
Latios+Metagross Combination

Posts: 18
Joined: Aug 2012
3.70
Post: #1
How do Trash Bytes Work?
While using a legality check, it returned this:
Shaymin\xFFFF\x0000\x0000\x0000
All characters in name are valid.
Invalid terminator sequence in trash bytes.
(for nickname)
and this:
Nikki\xFFFF\x0000\x0000
All characters in name are valid.
Invalid trash bytes.
(for OT)
Does anyone know how to fix this easily?
I was editing a Shaymin in PokeGen; also is there anyway to control trash bytes in PokeGen?
I'd appreciate the help.

Shaymin's AR code
Spoiler

94000130 FFFB0000
B2000024 00000000
E000197C 00000088
8A8DFCC2 ECEB0000
7B733105 AEB22FB5
7F43898A 3DC6522F
955E2C9F CE307F1B
BBDF9D44 D3AE50A0
7BC7AF43 8DFA3157
0AB20D36 828D59AB
27292CE7 90F7F3DD
5E3E7C34 5B5D8327
9C789C15 616B077F
A6FD761E A9726490
CA3B3E0B 03B20EDA
AD90DDC2 337AF1E7
9A1DCAF7 CFFE7C2B
6B27AF9E 54F3CBE4
CDE0B5EC 7B40DAD0
5C7AD2A5 6DB263D5
D2000000 00000000

(This post was last modified: 08-12-2012 07:53 PM by LatiosMe.)
08-05-2012 08:20 AM
Donate Reply
Galdr Offline
Spiffy

Posts: 18,338
Joined: Dec 2010
1,551.48
Administrators
Post: #2
RE: I need help with trash bytes...
Hm, interesting. Well, for one thing, you didn't put a location in for Shaymin. I wasn't sure what the code was for (if you were using Pokegen for BW or DPPtHGSS, so I did the latter) Shaymin doesn't have a location. (But you may have chosen "(Poketransfer)" in the BW Pokegen).

Your OT values are this: \004E\0069\006B\006B\0069 which spells Nikki you were intending, so I don't understand why it came up invalid in legality checker.

Shaymin's name is: \0053\0068\0061\0079\006D\0069\006E.

There isn't any way to control the trash bytes in Pokegen, from my experience. You can edit the Extra bytes, (the tooltip doesn't specify clearly if this is the same as Trash bytes). Make sure your Shaymin has the setting of Flower Paradise and having the Extra bytes on 66 (0x42), which is manual. Try this if you haven't yet.
08-05-2012 09:15 AM
Donate Reply
LatiosMe Offline
Latios+Metagross Combination

Posts: 18
Joined: Aug 2012
3.70
Post: #3
RE: I need help with trash bytes...
Thanks for attempting to help Galdr.
The Shaymin was originally set to:
(PokeTransfer) in PokeGen as far as the location goes.
It was made to look like it came from Gen IV but transfered to Gen V.
The code is the AR code generated by PokeGen for the Shaymin in question.
I am now currently revising the Shaymin, and will edit back with the results.
Edit:
Revised everything to match what you said, even using values like \004E\0069\006B\006B\0069 instead of "Nikki", but yet I get the same result in the legality checker.
(This post was last modified: 08-12-2012 07:54 PM by LatiosMe.)
08-05-2012 07:00 PM
Donate Reply
Galdr Offline
Spiffy

Posts: 18,338
Joined: Dec 2010
1,551.48
Administrators
Post: #4
RE: I need help with trash bytes...
Okay, when you set the location to "(PokeTransfer)" in Pokegen for BW, make sure on the first tab, under origin, "Game", that it has Platinum (or wherever the shaymin came from originally). That's another thing.

But I know what's wrong. From what I read on ProjectPokemon, the Legality Checker hasn't been updated for Black and White yet, and only was updated for Generation 4. A suggested tool to use is PokeCheck.org: PokeCheck. It has there that it's not for hacked Pokemon; I'm unsure if you created your Shaymin to use for online matches.
08-06-2012 04:13 AM
Donate Reply
LatiosMe Offline
Latios+Metagross Combination

Posts: 18
Joined: Aug 2012
3.70
Post: #5
RE: I need help with trash bytes...
Well, after researching extensively on the web, the process to implement trash bytes in PokeGen, or any other Pokemon editor goes like this:
1) Type in the name (of the pokemon or the OT);
Example: For Shaymin, type "Shaymin" in the box.
2) Start inputing numbers into the box
after the name until the editor will not allow anymore to be input into the box;
Example: For Shaymin, it will now say "Shaymin1234"
3) Remove the last two numbers
Example: For Shaymin, it will now say "Shaymin12"
4) The number of numbers that remain are the amount of \0000 sequences that must be placed between the escape and terminator sequences: \FFFF;
Example: For Shaymin, it will now say
"Shaymin\FFFF\0000\0000\FFFF"

As I said in Step 1, this works for the nickname and the OT (Only for Gen 4 origin OTs). So rinse and repeat for the OT. In Gen 5, the OT need the escape sequence \FFFF first and finish out the remaining spaces with the sequence \0000;
If you did it correctly using the OT name "Nikki", the final entry will say:
Gen 4 OT = "Nikki\FFFF\0000\FFFF"
Gen 5 OT = "Nikki\FFFF\0000\0000" or simply type "Nikki" (the editor will fill it in for you)

This corrects the previously incorrect trash bytes coming up as invalid in PokeCheck's (the legality checker I was using the entire time)legality checker. Why this works is due to the fact for every space not used, the trash byte sequences are added. This goes up to 11 spaces for nicknames and 8 spaces for OTs. So
S+h+a+y+m+i+n+\FFFF+\0000+\0000+\FFFF = 11 spaces.

Full Guide here.


Thanks for your help again, Galdr.
The Shaymin was actually for use with my sister's game: I'm attempting to teach her the OU metagame with actually using our DS Systems. So I will PokeGen her every team. It gives me satifaction when the legality check comes up with nothing illegal about it. Shaymin's new code, if you care to upload it to PokeCheck yourself to see the legailty check corrected from the original, here it is:
Spoiler

94000130 FFFB0000
B2000024 00000000
E0018C24 00000088
F7B68D5A FAEA0000
9C83C794 1BDC8FC3
47E17050 EB70A196
3F6DC977 C69FF024
1846231A D3594175
68EE3D65 3B93CE60
7E32CC65 09BAE25A
4C6B6BC1 21F590B8
E24DE0B1 554EB308
36B6AAD8 20EA206A
6F4364F9 DC7BED8B
6AB124A3 F5E74FF6
78873FB5 36E83EED
0A36327C F51B0511
FC316CB2 C700387B
00953659 D92F1AE1
54D71CF2 FD6F7E64
D2000000 00000000

(This post was last modified: 08-12-2012 07:58 PM by LatiosMe.)
08-06-2012 05:28 AM
Donate Reply