Nintendo Badge Arcade/PrizeCollection: Difference between revisions

DaniElectra (talk | contribs)
m Crane (crb): Add image layout details
DaniElectra (talk | contribs)
m Minor improvements
 
(12 intermediate revisions by the same user not shown)
Line 118: Line 118:
| 0x24
| 0x24
| 0x4
| 0x4
| Start address of component properties
| Start address of crane instance properties
|-
|-
| 0x28
| 0x28
| 0x4
| 0x4
| End address of component properties
| End address of crane instance properties
|-
|-
| 0x2C
| 0x2C
Line 141: Line 141:
|-
|-
| 0xC0
| 0xC0
| 0x14
| 0x4
| Unknown
| [[#Crane availability|Crane availability]]
|-
| 0xC4
| 0x4
| Unknown (usually 0x3?)
|-
| 0xC8
| 0xC
| [[#Crane color|Crane color]]
|-
|-
| 0xD4
| 0xD4
Line 150: Line 158:
| 0xD8
| 0xD8
| 0x8
| 0x8
| Unknown
| Unknown (usually zero?)
|-
|-
| 0xE0
| 0xE0
Line 166: Line 174:
| 0xEC
| 0xEC
| 0x4
| 0x4
| Number of on-screen prizes
| Number of on-machine prizes
|-
|-
| 0xF0
| 0xF0
| 0x4
| 0x4
| Number of properties at 0x23C0
| Number of on-collection prizes
|-
|-
| 0xF4
| 0xF4
| 0x4
| 0x4
| Number of on-screen attachments
| Number of on-machine attachments
|-
|-
| 0xF8
| 0xF8
| 0x4
| 0x4
| Number of on-screen fixed objects
| Number of on-machine fixed objects
|-
|-
| 0xFC
| 0xFC
| 0x4
| 0x4
| Number of properties at 0x3E00
| Number of attachment badges
|-
|-
| 0x100
| 0x100
Line 194: Line 202:
| 0x1C40
| 0x1C40
| 0x2440
| 0x2440
| [[#Component Properties|Component properties]]
| [[#Crane Instance Properties|Crane instance properties]]
|}
 
=== Crane availability ===
This section defines where a machine is available to be used.
 
{| class="wikitable"
|-
! Value
! Crane availability
|-
| 0x0
| Available on crane game
|-
| 0x1
| Unknown
|-
| 0x2
| Available on tutorial crane
|}
 
=== Crane color ===
This section defines the color of a crane. The color is set with three float32 values with a range from 0 to 1 corresponding to RGB values.
 
{| class="wikitable"
|-
! Offset
! Size
! Description
|-
| 0xC8
| 0x4
| Crane red color
|-
| 0xCC
| 0x4
| Crane green color
|-
| 0xD0
| 0x4
| Crane blue color
|}
|}


Line 257: Line 305:
|}
|}


=== Component Properties ===
=== Crane Instance Properties ===
This section has the properties of all the components (prizes, attachments and fixed objects) and sets how many of them are used within a crane instance.
This section has the properties of all the components (prizes, attachments and fixed objects) and defines how many of them are used within a set.


{| class="wikitable"
{| class="wikitable"
Line 268: Line 316:
| 0x1C40
| 0x1C40
| 0x60
| 0x60
| On-screen prize property
| On-machine prize property
|-
|-
|  
|  
| 0x60
| 0x60
| Optional on-screen prize properties
| Optional on-machine prize properties
|-
|-
| 0x23C0
| 0x23C0
| 0x60
| 0x60
| Unknown property (prize related?)
| On-collection prize property
|-
|-
|  
|  
| 0x60
| 0x60
| Optional unknown properties (prize related?)
| Optional on-collection prize properties
|-
|-
| 0x2F00
| 0x2F00
| 0x60
| 0x60
| On-screen attachment property
| On-machine attachment property
|-
|-
|  
|  
| 0x60
| 0x60
| Optional on-screen attachment properties
| Optional on-machine attachment properties
|-
|-
| 0x3680
| 0x3680
| 0x60
| 0x60
| On-screen fixed object property
| On-machine fixed object property
|-
|-
|  
|  
| 0x60
| 0x60
| Optional on-screen fixed object properties
| Optional on-machine fixed object properties
|-
|-
| 0x3E00
| 0x3E00
| 0x20
| 0x20
| Unknown property
| Attachment badge property
|-
|-
|  
|  
| 0x20
| 0x20
| Optional unknown properties
| Optional attachment badge properties
|}
|}


==== On-screen component properties ====
==== Component properties ====
All on-screen properties set the visible components on the crane instance. Each component can be set more than once with different properties.
All component-related properties set the visible components on the crane instance or the collection. Each component can be set more than once with different properties.


In case of prizes, this allows the player to get a prize more than once.
In case of prizes, this allows the player to get a prize more than once or repeat it inside the collection.


Except for the index, all of the properties are saved as float32 values.
Unless stated otherwise, all of the properties are saved as float32 values.


{| class="wikitable"
{| class="wikitable"
Line 322: Line 370:
| 0x0
| 0x0
| 0x4
| 0x4
| Component index
| Component index (u32)
|-
|-
| 0x4
| 0x4
Line 345: Line 393:
|-
|-
| 0x18
| 0x18
| 0x48
| 0x4
| Unknown property (usually around 0.2?)
|-
| 0x1C
| 0x4
| Unknown property
|-
| 0x20
| 0x4
| Unknown property (usually 0.5?)
|-
| 0x24
| 0x4
| Unknown property (linked with 0x28?)
|-
| 0x28
| 0x4
| Unknown property (linked with 0x24?)
|-
| 0x2C
| 0x4
| Component gravity at start (0x0 = gravity, 0x1 = no gravity)
|-
| 0x30
| 0x30
| Unknown properties
| Unknown properties
|}
|}


The position is calculated using the 3DS screen as a reference (400x240).
The position is calculated using the 3DS screen as a reference (400x240).
==== Attachment badge properties ====
This property sets the union of a badge with an attachment.
{| class="wikitable"
|-
! Offset
! Size
! Description
|-
| 0x0
| 0x4
| Unknown (usually zero?)
|-
| 0x4
| 0x4
| Unknown (usually 1?)
|-
| 0x8
| 0x4
| Unknown
|-
| 0xC
| 0x4
| Index of attachment selected
|-
| 0x10
| 0x4
| Index of badge selected
|-
| 0x14
| 0x4
| Width position of attachment (float32)
|-
| 0x18
| 0x4
| Height position of attachment (float32)
|-
| 0x1C
| 0x4
| Unknown (usually zero?)
|}


== Attachment (atb) ==
== Attachment (atb) ==
An attachment file stores the data of an immovable object and its image.
An attachment file stores the data of an object with badges attached and its image.


{| class="wikitable"
{| class="wikitable"
Line 398: Line 512:
| 0x24
| 0x24
| 0x4
| 0x4
| Start address of collision floating points
| Start address of collision data
|-
|-
| 0x28
| 0x28
| 0x4
| 0x4
| End address of collision floating points
| End address of collision data
|-
|-
| 0x2C
| 0x2C
Line 430: Line 544:
| 0x80 + 2 * (w * h)
| 0x80 + 2 * (w * h)
|  
|  
| Collision floating points
| [[#Collision data|Collision data]]
|}
|}


Line 460: Line 574:
| 0x10
| 0x10
| 0x4
| 0x4
| End address of header data
| End address of header data (ORed with 0x80?)
|-
|-
| 0x14
| 0x14
Line 475: Line 589:
|-
|-
| 0x4C
| 0x4C
| 0x80
| 0xB4
| Unknown (usually zero?)
|-
| 0xCC
| 0x34
| Padding
| Padding
|-
|-
Line 554: Line 664:
| 0x64
| 0x64
| 0x4
| 0x4
| Unknown
| Unknown (related to category ID?)
|-
|-
| 0x68
| 0x68
Line 611: Line 721:
|-
|-
| 0x4C
| 0x4C
| 0xB4
| 0x34
| Padding
| Padding
|-
|-
Line 632: Line 742:


== Fixed Object (fob) ==
== Fixed Object (fob) ==
A fixed object file stores the data of the terrain and its image.
A fixed object file stores the data of an immovable object and its image.


{| class="wikitable"
{| class="wikitable"
Line 670: Line 780:
| 0x1C
| 0x1C
| 0x4
| 0x4
| Start address of collision floating points
| Start address of collision data
|-
|-
| 0x20
| 0x20
| 0x4
| 0x4
| End address of collision floating points
| End address of collision data
|-
|-
| 0x24
| 0x24
Line 698: Line 808:
| 0x80 + (w * h)
| 0x80 + (w * h)
|  
|  
| Collision floating points
| [[#Collision data|Collision data]]
|}
|}


Line 720: Line 830:
| 0x8
| 0x8
| 0x4
| 0x4
| File length? (stuck at 0x45XX)
| File length (stuck at 0x45XX, but correct value works)
|-
|-
| 0xC
| 0xC
Line 764: Line 874:
| 0x34
| 0x34
| 0x4
| 0x4
| Start address of collision floating points
| Start address of collision data
|-
|-
| 0x38
| 0x38
| 0x4
| 0x4
| End address of collision floating points? (stuck at 0x45XX)
| End address of collision data (stuck at 0x45XX, but correct value works)
|-
|-
| 0x3C
| 0x3C
Line 776: Line 886:
| 0x40
| 0x40
| 0x4
| 0x4
| Unknown
| Unknown. Same as value in offset 0x0 in [[Home_Menu#BadgeIdentifier|BadgeIdentifier]]
|-
|-
| 0x44
| 0x44
Line 791: Line 901:
|-
|-
| 0xAC
| 0xAC
| 0xC
| 0x4
| Unknown
| Same as 0x40?
|-
| 0xB0
| 0x4
| Unknown (signed int)
|-
| 0xB4
| 0x4
| Unknown (signed int)
|-
|-
| 0xB8
| 0xB8
Line 832: Line 950:
|  
|  
|  
|  
| Collision floating points
| [[#Collision data|Collision data]]
|}
|}


Line 865: Line 983:
| 0x3900
| 0x3900
| 0x800
| 0x800
| 32x32 RGB565 image of full badge (used in badge selector in Home Menu)
| 32x32 RGB565 image of full badge (used in badge selector in Home Menu if badge is 1x1)
|-
|-
| 0x4100
| 0x4100
Line 881: Line 999:
|  
|  
| 0x800
| 0x800
| 32x32 Optional additional RGB565 image tile(s). Only exists if badge is not 1x1 (unknown use)
| 32x32 Optional additional RGB565 image tile(s). Only exists if badge is not 1x1 (used in badge selector in Home Menu if badge is not 1x1)
|-
|-
|  
|  
Line 921: Line 1,039:
# Unknown
# Unknown
# Unknown
# Unknown
== Collision data ==
The collision of an object is defined by a set of polygons combined together.
The polygons are represented using the vertices of each polygon, and those vertices are represented using their coordinates according to the in game image resolution.
{| class="wikitable"
|-
! Offset
! Size
! Description
|-
| 0x0
| 0x4
| Number of polygons
|-
| 0x4
| 0x44
| Polygon data
|-
|
| 0x44
| Additional polygons data
|}
=== Polygon data ===
The data of a polygon starts with the number of vertices. The coordinates of each vertice are then stored as float32 values on an allocated 0x40 byte section.
The vertices can't be next to each other, there is a 2 pixel circular restricted area around each vertice. If the coordinates don't fill the 0x40 byte section, the remaining data is set to null bytes.
{| class="wikitable"
|-
! Offset
! Size
! Description
|-
| 0x0
| 0x4
| Number of vertices
|-
| 0x4
| 0x4
| X coordinate of vertice
|-
| 0x8
| 0x4
| Y coordinate of vertice
|-
|
| 0x4
| X coordinate of additional vertices
|-
|
| 0x4
| Y coordinate of additional vertices
|}