Difference between revisions of "Piñata Vision barcode/Encoded data"

From PinataIsland.info, the Viva Piñata wiki
Jump to: navigation, search
(Add name flag details)
(Add Appear Mate, and Journal UnlockArt subtypes. Organize data by type in ToC)
Line 1: Line 1:
 +
= 000 PlaceTag =
 
== Accessory ==
 
== Accessory ==
  
Line 239: Line 240:
  
 
It's uncertain whether the game ignores the use cost data for free cards, or checks it to see if it was encoded properly.
 
It's uncertain whether the game ignores the use cost data for free cards, or checks it to see if it was encoded properly.
 +
 +
= 101 Reference =
 +
 +
== Appear Mate subtype ==
 +
 +
{| style="width:200px; padding:0.3em; float:right; margin-left:15px; margin-bottom:8px; border:1px solid #A3B1BF; background:#f5faff; text-align:left; font-size:95%; line-height:1.5em;"
 +
|-
 +
!colspan="2" style="text-align:center; background:#cee0f2; padding:0.3em; font-size:1.1em;"|'''Appear Mate subtype'''
 +
|-
 +
|'''Optional:'''||No
 +
|-
 +
|'''Parent:'''||Reference (AM)
 +
|-valign="top"
 +
|'''Offset:'''||36
 +
|-valign="top"
 +
|'''Size:'''||1 bit
 +
|-
 +
|colspan="2" style="text-align:center;"|'''See also'''
 +
|-
 +
|colspan="2"|[[#?|?]]
 +
|}
 +
 +
The Appear Mate subtype differentiates between View Appear Cutscene and View Mate Cutscene cards (which both share the same card type).
 +
 +
=== Decoding ===
 +
 +
*If the Appear Mate subtype is 0(?), the card is a View Appear Cutscene card.
 +
 +
*If the Appear Mate subtype is 1(?), the card is a View Mate Cutscene card.
 +
 +
=== Encoding ===
 +
 +
* ?
 +
 +
== Journal UnlockArt subtype ==
 +
 +
{| style="width:200px; padding:0.3em; float:right; margin-left:15px; margin-bottom:8px; border:1px solid #A3B1BF; background:#f5faff; text-align:left; font-size:95%; line-height:1.5em;"
 +
|-
 +
!colspan="2" style="text-align:center; background:#cee0f2; padding:0.3em; font-size:1.1em;"|'''Journal UnlockArt subtype'''
 +
|-
 +
|'''Optional:'''||No
 +
|-
 +
|'''Parent:'''||Reference (JU)
 +
|-valign="top"
 +
|'''Offset:'''||45
 +
|-valign="top"
 +
|'''Size:'''||1 bit
 +
|-
 +
|colspan="2" style="text-align:center;"|'''See also'''
 +
|-
 +
|colspan="2"|[[#?|?]]
 +
|}
 +
 +
The Journal UnlockArt subtype differentiates between ViewTagInJournal and UnlockArt cards (which both share the same card type).
 +
 +
=== Decoding ===
 +
 +
*If the Journal UnlockArt subtype is 0(?), the card is an UnlockArt card.
 +
 +
*If the Journal UnlockArt subtype is 1(?), the card is a ViewTagInJournal card.
 +
 +
=== Encoding ===
 +
 +
* ?
  
 
[[Category:Pinata Vision barcode]]
 
[[Category:Pinata Vision barcode]]

Revision as of 04:48, 24 February 2011

000 PlaceTag

Accessory

Accessory
Optional: Yes
Parent: PlaceTag
Offset: Varies
36 (?)
?? (?)
Size: Varies
3 + n x AC
Accessory count
Optional: No
Parent: Accessory
Offset: 0
Size: 3 bits
Accessory item
Optional: No
Parent: Accessory
Offset: 3
Size: ? bits
See also
Accessory flag

This optional accessory data is present if the accessory flag is set.

Its offset appears to vary, based on other optional data such as pinata name.

Decoding

  • ?

Encoding

  • ?

Accessory flag

Accessory flag
Optional: No
Parent: PlaceTag
Offset: 29
Size: 1 bit
See also
Accessory

The accessory flag indicates whether or not optional accessory data is encoded on the card. The accessory flag is present for all PlaceTag cards, even if the item being placed is not a pinata.

Decoding

  • If the accessory flag is clear, no optional accessory data is encoded on the card
  • If the accessory flag is set, accessory data is encoded on the card. The inclusion of this optional data appears to shift offsets for fields that follow.

Encoding

  • If the pinata will be wearing accessories, set the accessory flag, and encode the accessory details.
  • If the pinata won't be wearing accessories, clear the accessory flag. No further encoding needs to be done, as the optional accessory data will not be present.

Name flag

Name flag
Optional: No
Parent: PlaceTag
Offset: Varies
39 (AF=0)
?? (?)
Size: 1 bit
See also
Name

The name flag indicates whether or not a pinata name is present.

Its offset appears to vary, based on other optional data such as accessories.

Decoding

  • If the name flag is clear, no optional name data is encoded on the card.
  • If the name flag is set, name data is encoded on the card. The inclusion of this optional data appears to shift offsets for fields that follow.

Encoding

  • If the pinata will have a name, set the name flag, and encode the name data.
  • If the pinata won't have a name, clear the name flag. No further encoding needs to be done, as the optional name data will not be present.

Use cost

Use cost
Optional: No
Parent: PlaceTag
Offset: Varies

41 (AF=0)
?? (AF=1)

Size: 10 bits
Use cost value
Optional: No
Parent: Use cost
Offset: 0
Size: 7 bits
Use cost magnitude
Optional: No
Parent: Use cost
Offset: 7
Size: 3 bits
See also
Use cost flag, accessory flag

The use cost holds the cost to scan the card (if the card is not flagged as free to scan).

Its offset appears to vary, based on other optional data such as accessory information.

Decoding

  • If the use cost flag is clear, the card is free to scan, and the (non-zero) use cost data should be ignored.
  • If the use cost flag is set, use the encoded use cost as the cost to scan the card.

To obtain the use cost, multiply the value by the order of magnitude (power of 10). For example, a use cost value of 18 and a use cost magnitude of 2 would be a use cost of 18 x 102 = 18 x 100 = 1800.

Encoding

  • If the card has a cost to scan, ensure that the use cost flag is set, and encode the use cost value and magnitude.

There does seem to be some variance on how a use cost of 1000 is encoded. Some cards have it stored as 100 x 10, while others have it encoded as 10 x 100. It's uncertain whether the representations are interchangeable or not, although a particular representation may affect other fields such as a checksum.

  • If the card is free to scan, ensure that the use cost flag is clear, and store an ID-derived non-zero value in the use cost to possibly help mask a noticable barcode pattern due to a run of 0s occurring within the encoded data.
Bit(s) Value to encode
V6 to V3 0
V2 1
V1 !ID11
V0 !ID10
M2 ID9
M1 ID8
M0 ID7

Use cost flag

Use cost flag
Optional: No
Parent: PlaceTag
Offset: 35
Size: 1 bit
See also
Use cost

The use cost flag indicates whether or not there is a cost to scan the card.

Decoding

  • If the use cost flag is clear, the card is free to scan (and the non-zero encoded use cost should be ignored).
  • If the use cost flag is set, the cost to scan the card is encoded in the use cost.

Encoding

  • If the card will have a cost to scan, set the use cost flag, and encode the use cost.
  • If the card will be free to scan, clear the use cost flag, and store an ID-derived non-zero value in the use cost.

It's uncertain whether the game ignores the use cost data for free cards, or checks it to see if it was encoded properly.

101 Reference

Appear Mate subtype

Appear Mate subtype
Optional: No
Parent: Reference (AM)
Offset: 36
Size: 1 bit
See also
?

The Appear Mate subtype differentiates between View Appear Cutscene and View Mate Cutscene cards (which both share the same card type).

Decoding

  • If the Appear Mate subtype is 0(?), the card is a View Appear Cutscene card.
  • If the Appear Mate subtype is 1(?), the card is a View Mate Cutscene card.

Encoding

  •  ?

Journal UnlockArt subtype

Journal UnlockArt subtype
Optional: No
Parent: Reference (JU)
Offset: 45
Size: 1 bit
See also
?

The Journal UnlockArt subtype differentiates between ViewTagInJournal and UnlockArt cards (which both share the same card type).

Decoding

  • If the Journal UnlockArt subtype is 0(?), the card is an UnlockArt card.
  • If the Journal UnlockArt subtype is 1(?), the card is a ViewTagInJournal card.

Encoding

  •  ?