Difference between revisions of "Nintendo Badge Arcade/PrizeCollection"

From 3dbrew
Jump to navigation Jump to search
m (Rename "each tile" to "tile x" to prevent ordering confusion)
(Add Language Names)
Line 85: Line 85:
 
|-
 
|-
 
| 0x30
 
| 0x30
| ?
+
| 0x30
 
| Crane Instance name
 
| Crane Instance name
 
|-
 
|-
 
| 0x60
 
| 0x60
| ?
+
| 0x30
 
| Crane name
 
| Crane name
 
|-
 
|-
 
| 0x90
 
| 0x90
| ?
+
| 0x30
 
| Crane Icon name
 
| Crane Icon name
 +
|-
 +
| 0x100
 +
| 0x1000
 +
| [[#Language Names|Language Names]]
 
|-
 
|-
 
| 0x1100 + Offset
 
| 0x1100 + Offset
Line 121: Line 125:
 
|-
 
|-
 
| 0x2C
 
| 0x2C
| ?
+
| 0x30
 
| Attachment name
 
| Attachment name
 
|-
 
|-
Line 155: Line 159:
 
|-
 
|-
 
| 0x1C
 
| 0x1C
| ?
+
| 0x30
 
| Crane icon name
 
| Crane icon name
 
|-
 
|-
Line 181: Line 185:
 
|-
 
|-
 
| 0x2C
 
| 0x2C
| ?
+
| 0x30
 
| Category name
 
| Category name
 
|-
 
|-
Line 191: Line 195:
 
| 0x4
 
| 0x4
 
| Number of sets (crane instances)
 
| Number of sets (crane instances)
 +
|-
 +
| 0x68
 +
| 0x1000
 +
| [[#Language Names|Language Names]]
 
|-
 
|-
 
| 0x2080
 
| 0x2080
Line 211: Line 219:
 
|-
 
|-
 
| 0x1C
 
| 0x1C
| ?
+
| 0x30
 
| Crane name
 
| Crane name
 
|-
 
|-
Line 233: Line 241:
 
|-
 
|-
 
| 0x24
 
| 0x24
| ?
+
| 0x30
 
| Fixed object name
 
| Fixed object name
 
|-
 
|-
Line 267: Line 275:
 
|-
 
|-
 
| 0x44
 
| 0x44
| ?
+
| 0x30
 
| Badge name
 
| Badge name
 
|-
 
|-
 
| 0x74
 
| 0x74
| ?
+
| 0x30
 
| Name of category it belongs
 
| Name of category it belongs
 
|-
 
|-
Line 285: Line 293:
 
| 0x4
 
| 0x4
 
| Tile height
 
| Tile height
 +
|-
 +
| 0xE0
 +
| 0x1000
 +
| [[#Language Names|Language Names]]
 
|}
 
|}
  
Line 367: Line 379:
 
| 0x4000
 
| 0x4000
 
| 128x128 A8 data of previous image
 
| 128x128 A8 data of previous image
 +
|}
 +
 +
== Language Names ==
 +
Some files, like the badge and the category, store its name displayed on different languages. Here is the language list:
 +
 +
{| class="wikitable"
 +
|-
 +
! Offset
 +
! Size
 +
! Language
 +
|-
 +
| 0x0
 +
| 0x100
 +
| English?
 +
|-
 +
| 0x100
 +
| 0x100
 +
| Unknown
 +
|-
 +
| 0x200
 +
| 0x100
 +
| Unknown
 +
|-
 +
| 0x300
 +
| 0x100
 +
| German
 +
|-
 +
| 0x400
 +
| 0x100
 +
| Italian
 +
|-
 +
| 0x500
 +
| 0x100
 +
| Spanish
 +
|-
 +
| 0x600
 +
| 0x100
 +
| Unknown
 +
|-
 +
| 0x700
 +
| 0x100
 +
| Unknown
 +
|-
 +
| 0x800
 +
| 0x100
 +
| Unknown
 +
|-
 +
| 0x900
 +
| 0x100
 +
| Unknown
 +
|-
 +
| 0xA00
 +
| 0x100
 +
| Unknown
 +
|-
 +
| 0xB00
 +
| 0x100
 +
| Unknown
 +
|-
 +
| 0xC00
 +
| 0x100
 +
| Unknown
 +
|-
 +
| 0xD00
 +
| 0x100
 +
| Unknown
 +
|-
 +
| 0xE00
 +
| 0x100
 +
| Unknown
 +
|-
 +
| 0xF00
 +
| 0x100
 +
| Unknown
 
|}
 
|}

Revision as of 13:05, 18 December 2022

Overview

A PrizeCollection SARC file has the following folder structure:

root
└── pc
    ├── PrizeCollection.xml
    ├── ci
    └── rt
        ├── At
        ├── CI
        ├── Ca
        ├── Cr
        ├── FO
        └── Pr

Each of the subfolders contains a custom file format storing different properties between those. Each of those files are compressed using Yaz0 compression.

Subfolder File type
ci Crane Instance (cib)
At Attachment (atb)
CI Crane Icon (icb)
Ca Category (cab)
Cr Crane (crb)
FO Fixed Object (fob)
Pr Prize (prb)

PrizeCollection.xml

This file has an index of all of the game data stored here. It has the following data:

<?xml version="1.0" encoding="UTF-8"?>
<CenterPrizeCollectionFile>
  <Categories count="x">
    <Category name="CategoryName" />
  </Categories>
  <Cranes count="x">
    <Crane name="CraneName" />
  </Cranes>
  <CraneIcons count="x">
    <CraneIcon name="CraneIconName" />
  </CraneIcons>
  <Prizes count="x">
    <Prize name="PrizeName" />
  <Attachments count="x">
    <Attachment name="AttachmentName" />
  </Attachments>
  <FixedObjects count="x">
    <FixedObject name="FixedObjectName" />
  </FixedObjects>
  <CraneInstances>
    <CraneInstance name="CraneInstanceName" />
  </CraneInstances>
</CenterPrizeCollectionFile>

Crane Instance (cib)

A crane instance file stores the data of a set and the components of the machine.

Offset Size Description
0x0 0x4 Header magic (CIBS)
0x30 0x30 Crane Instance name
0x60 0x30 Crane name
0x90 0x30 Crane Icon name
0x100 0x1000 Language Names
0x1100 + Offset Offset Prize name x
0x1880 + Offset Offset Fixed Object name x

Offset = 0x30 * x

Attachment (atb)

An attachment file stores the data of an immovable object and its image.

Offset Size Description
0x0 0x4 Header magic (ATBS)
0x2C 0x30 Attachment name
0x5C 0x4 Image width
0x60 0x4 Image height
0x80 w * h ETC1A4 image of attachment
0x80 + (w * h) w * h A8 data of previous image

Crane Icon (icb)

A crane icon file stores the icon of a set (crane instance).

Offset Size Description
0x0 0x4 Header magic (ICBS)
0x1C 0x30 Crane icon name
0x100 0x2000 64x64 RGB565 image

Category (cab)

A category file stores the data of a group of sets and its category image.

Offset Size Description
0x0 0x4 Header magic (CABS)
0x24 0x4 Category ID
0x2C 0x30 Category name
0x5C 0x4 Number of badges
0x60 0x4 Number of sets (crane instances)
0x68 0x1000 Language Names
0x2080 0x2000 64x64 RGB565 image of category

Crane (crb)

A crane file stores the background image used on a set (crane instance).

Offset Size Description
0x0 0x4 Header magic (CRBS)
0x1C 0x30 Crane name
0x800 0x10000 ETC1 image? (Unknown resolution)

Fixed Object (fob)

A fixed object file stores the data of the terrain and its image.

Offset Size Description
0x0 0x4 Header magic (FOBS)
0x24 0x30 Fixed object name
0x54 0x4 Image width
0x58 0x4 Image height
0x80 w * h ETC1A4 image of fixed object

Prize (prb)

A prize file stores the badge data and its image.

Offset Size Description
0x0 0x4 Header magic (PRBS)
0x3C 0x4 Badge ID
0x44 0x30 Badge name
0x74 0x30 Name of category it belongs
0xA4 0x8 Title ID it opens (0xFFFFFFFF if none)
0xB8 0x4 Tile width
0xBC 0x4 Tile height
0xE0 0x1000 Language Names

If the tile size is 1x1:

Offset Size Description
0x1100 0x2000 64x64 RGB565 image (used in Home Menu)
0x3100 0x800 64x64 A4 data of previous image
0x3900 0x800 32x32 RGB565 image (used in badge selector in Home Menu)
0x4100 0x200 32x32 A4 data of previous image
0x4300 0x4000 128x128 ETC1A4 image (used ingame)
0x8300 0x4000 128x128 A8 data of previous image

If the tile size is anything other than 1x1:

Offset Size Description
0x1100 0x2000 64x64 RGB565 image of full tile
0x3100 0x800 64x64 A4 data of previous image
0x3900 0x800 32x32 RGB565 image of full tile
0x4100 0x200 32x32 A4 data of previous image
... 0x2000 64x64 RGB565 image of tile x
... 0x800 64x64 A4 data of previous image
... 0x800 32x32 RGB565 image of tile x
... 0x200 32x32 A4 data of previous image
... 0x4000 128x128 ETC1A4 image (used ingame)
... 0x4000 128x128 A8 data of previous image

Language Names

Some files, like the badge and the category, store its name displayed on different languages. Here is the language list:

Offset Size Language
0x0 0x100 English?
0x100 0x100 Unknown
0x200 0x100 Unknown
0x300 0x100 German
0x400 0x100 Italian
0x500 0x100 Spanish
0x600 0x100 Unknown
0x700 0x100 Unknown
0x800 0x100 Unknown
0x900 0x100 Unknown
0xA00 0x100 Unknown
0xB00 0x100 Unknown
0xC00 0x100 Unknown
0xD00 0x100 Unknown
0xE00 0x100 Unknown
0xF00 0x100 Unknown