Piñata Vision barcode/Methods for barcode discoveries

From PinataIsland.info, the Viva Piñata wiki
Jump to: navigation, search

This article discusses various methods for discovering valid cards or information about the barcode data. Depending on what you're trying to accomplish, some of these methods may be helpful, or you may find a better way to accomplish what you're trying to discover.

As you learn new details about the barcode, or new ways to discover information, please contribute to the barcode articles, so the community can benefit, and eventually completely solve all details about the Piñata Vision barcode.

Methods for barcode discoveries

Visual comparison

The visual comparison method is the easiest method, and doesn't require any technical background or knowledge of hexadecimal. Many discoveries about the barcode have started off by merely observing similarities or differences between cards. Examples of such visual discoveries include:

  • Discovering different obfuscation sets. For example, looking at the following eight plant cards, you can see that four pairs share similar-looking barcodes, and that the similar cards are located 2 IDs (1068 and 1070, 1069 and 1071, ...) apart. Once this was spotted, it lead to further discoveries about how the cards were obfuscated.
F170687E2D89538F	Vision_Single_PlaceTag_BifPlant_zz1radish_1068.jpg
F170687E2C88538F	Vision_Single_PlaceTag_BifPlant_daisy_1070.jpg
C26EDBA6AA48F646	Vision_Single_PlaceTag_BifPlant_zz2yam_1069.jpg
C27ADBA6AA48F646	Vision_Single_PlaceTag_BifPlant_buttercup_1071.jpg
86A6D1E16B67CB08	Vision_Single_PlaceTag_BifPlant_bluebell_1072.jpg
86A6D0E56B67CB08	Vision_Single_PlaceTag_BifPlant_sunflower_1074.jpg
E07A70521E0989C0	Vision_Single_PlaceTag_BifPlant_poppy_1073.jpg
E07A70A21E098930	Vision_Single_PlaceTag_BifPlant_tulip_1075.jpg

It's easy and natural to spot things that appear similar or different, and by looking at the different tables or barcodes, something might stand out for you which leads to many new discoveries.


Many of the early discoveries about the barcode were made by changing the barcode to see what happens, which helps to identify what the changed part does. For example, if the changed card now costs more to use, then the changed part apparently is related to the use cost of the card. If the changed card produces a different item, then the changed part apparently is related to the ID information that tells the game which item to drop into the garden.

Also, trial-and-error can lead to some surprising discoveries for cards or items that hadn't been released. One discovery that hasn't been found within the developer cards, is red sour pinatas. Yes, you can scan black sours now, but there's never been any cards released for the red ones.

The Choclodocus egg card project used a trial-and-error method, and the fact that the cards we were trying were all turning out to be invalid led us to dig deeper, and realize that the correct card was a 96 card, not a C6 card.

Bit differences

Since the obfuscated data is scattered across several different bytes, and a particular byte may hold data for several unrelated bits of data, it's often helpful to compare differences between the card's 64 bits of binary data.

Identifying which bits change (or stay the same) between similar cards can lead to many discoveries about the data stored on the card.

For example, the Choclodocus egg card project compared pairs of Egg cards whose IDs differed by 32. This showed us that we merely needed to flip bits 12 and 13 to produce a valid barcode, which then led directly to the Choclodocus egg card discovery.

Searching for known data

If you know in advance what specific information is encoded onto the card, then you can search through the bits for that binary information, to identify where and how that data is stored on the card.

This method has been used to identify ID, use cost, and pinata name data. The Use cost example illustrates how it's possible to find known information within an obfuscated card's data.

Alternately, you can approach the problem from the opposite direction, and deduce possible values for encoded data. For example, we don't know what the actual values are for the card type field, but based on the specific data stored in that field for each type of card, we can make a guess at possible values for each type of card.

A method for discovering a specific card

One of the recent projects was to discover the amber gem card. Here's the step-by-step method of exactly how the amber gem card was discovered. You can apply this method to make (PlaceTag) card discoveries of your own.

Identify the ID that you want to discover

If you take a look at the ID table, you'll see plenty of gaps in the ID values, which might be for cards that haven't been released.

Sometimes it's easy to determine the likely ID for the card that you want to discover. (For example, the Egg cards are mostly in alphabetic order, and there was a missing Egg card between deer_207 and dog_209, which turned out to be the dinosaur egg.)

For the amber gem card, it wasn't as obvious as the dinosaur egg, but we made two educated guesses. The first guess is that the card was a produce card, since the item is produced by the well, similar to how the mine produces items.

Now that we had an idea where to look next in the ID table, we noticed that there were cards for dinosaur bones and parts (IDs 720-725), and an adjacent ID of 719 which didn't match up with any card.

So, 719 is the ID for the card that we're trying to discover, in the hope that it's the amber gem card.

Identify the obfuscation set used for that ID

The next step is to start with a barcode that's very similar to the card we want to discover. To do this, we use the details in the obfuscation set article that explains the pattern of obfuscated cards. Looking again at the ID table, we see that ID cards from 716 to 723 show a pattern of DB, C4, DB, ??, 96, FF, 96, FF. Since the obfuscation sets alternate in pairs, it's apparent that the missing card would be a C4 card.

(If you can't identify a specific barcode to start with, perhaps because other nearby cards are also missing, you can sort the ID table by set, to see which cards end in a 4. Since the only barcodes that end in 4 are C4 and D4, try both of those as a starter barcode, and it's likely that one will work.)

We've now identified that ID 719 is a C4 card.

Determine which ID bit needs to be changed

Since the closest C4 card is 2 cards prior -- ID card 717 -- and we want to generate a card with an ID value of 719, we need to increase card 717's ID by 2.

Feel free to skip the technical details and move on to the next step if you wish, since this method doesn't require you to understand this minor detail.

Since the ID data is stored on the card as a binary value, we need to convert 2 from decimal to binary. 2 => 0b00000010. (0b is just a way to show that the displayed number is in binary, or base 2, as it's also called.)

That single bit with the 1 value is ID bit 1 (since 2 to the first power is 2). If you're unsure about these technical details, don't worry, since it's really not necessary to understand, to use this method. Just continue along.

Find a similar pair of cards that differ by 2

To change the ID from 717 to 719, there's a very easy way to discover which obfuscated bits need to change.

Take a look again at the ID table, looking for nearby Produce cards that are C4 cards, and differ by 2.

honey_680 and wool_682 are both C4 cards, and the IDs differ by 2.

If you want a warm fuzzy feeling that you're on the right track, you can convert 680, 682, 717, and 719 to binary.

680 => 0b1010101000 717 => 0b1011001101

682 => 0b1010101010 719 => 0b1011001111

Notice that the only ID bit that changes between 680 and 682, and 717 and 719 is ID bit 1 (the second from the right, since bits are numbered starting with 0)?

Make a similar change to the barcode

If you look at the barcodes now for ID cards 680 and 682, you'll see that the obfuscated barcodes change in 2 different places. CBE... changes to CB7... and ...156... changes to ...154...

If you don't care about binary or hexadecimal, and just want to get to the result, make those similar changes to the barcode for ID card 717.

CBE6D156B86F82E4 changes to CB76D154B86F82E4. And that's all we need to do, to come up with the barcode for missing ID card 719. All that's left to do is to scan it (using the site's card generator), and see if you get an amber gem.

That's it. We determined to discover ID card 719, determined it was a C4 card, found a nearby ID 717 C4 card whose ID bit we'd change, and compared two other existing C4 cards' barcodes to see how the ID 717 barcode needed to change.

It only takes a few minutes to do this all by hand, and it's really not necessary to even understand the binary part.

In addition to using cards that are 2 IDs apart, larger intervals can be used to potentially find similarly obfuscated cards to alter. Cards that are 8, 32, 512, 1024, or 2048 IDs apart may also use the same obfuscation as the card you are attempting to discover. As an example, by automating this same method discussed here, we can predict possible barcodes for ID 107, by using one of several obfuscation set 2 bitmaps that flip bit 9 (512) for PlaceTag ID 619:

% ./predict_id_table_barcodes.pl --id=107 | ./reader.pl 
Was 619 key 29	107	A2684406480B5672                                                	ID = 000001101011  107
Was 619 key 29	107	A2685406480B5672                                                	ID = 000001101011  107
Was 619 key 29	107	A2682406480B5672                                                	ID = 000001101011  107

This larger interval illustrates that PlaceTag cards appear to share a single card type, since it's possible to alter a PlaceTag ID in the Home range (Vision_Single_PlaceTag_Home_zz3tiger_619) to become a PlaceTag species ID.

Using predictions to generate other predictions

Sometimes there's no known card 2, 8, 32, 512, 1024, or 2048 IDs apart to use in generating the card you are looking for. Let's consider the Sour Shellybean card. Its ID would be 160. If there was a species ID 162 card, we could flip ID bit 1 of its barcode to generate a barcode with ID 160.

Let's see if we can predict what a barcode might be for an ID 162 card.

% ./predict_id_table_barcodes.pl --id=162 | ./reader.pl 
Was 130 key 45	162	CB7FFA14F96B90B4                                                	ID = 000010100010  162

Aha, there's a known ID 130 card from obfuscation set 4. When the script flips bit 5 (which would add 32 to the ID), we get a barcode which, although invalid to the game (since there's no such species with ID 162), might still happen to be a valid barcode prediction for ID 162 if such a species were to exist.

Let's take this predicted barcode, and now change its ID from 162 to 160, by flipping ID bit 1.

CB7FFA14F96B90B4 Possibly valid barcode for ID 162, if such a species existed
0090000200000000 Bitmask to flip bit 1 for obfuscation set 4
CBEFFA16F96B90B4 Possible barcode for ID 160?

Whew! We used one predicted barcode (which was unknown to the game, but happened to be encoded correctly) to then predict the Sour Shellybean barcode (which the game did recognize).

Have fun turning one barcode into another, and good luck in your discoveries! If you find better methods to discover new cards or information about the barcode, please feel free to update this article!