SCAN (Metroid Prime 2): Difference between revisions

From Retro Modding Wiki
Jump to navigation Jump to search
imported>Antidote
No edit summary
>Aruki
 
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
The '''.SCAN file format''' describes SCAN POI data, and has references to several resources, this variation of the format is completely different that it's [[SCAN (Metroid Prime)|Metroid Prime]] counterpart.
''This article is for the SCAN format from Metroid Prime 2 and 3. For other revisions of this format, see [[SCAN (File Format)]].''


{{researchmajor|reason=Crack SNFO}}
The '''SCAN file format''' describes scannable objects. The format's been updated since Prime 1; the data is now embedded into a script object, using the [[Scriptable Layers (Metroid Prime 2)|scriptable layers]] format. There was also some additional data added to the format to set up the model that displays in the logbook.
 
{{research|minor|There's a couple remaining unknown parameters.}}


__TOC__
__TOC__


=Header=
== Format ==
The header is rather simple, and consists of the following:
 
{|class="wikitable"
The SCAN format sets up a small script layer that contains a single [[#ScannableObjectInfo|ScannableObjectInfo]] instance.
!Offset
 
!Size
=== Header ===
!Description
 
{| class="wikitable"
! Offset
! Size
! Description
|-
| 0x0
| 4
| '''Magic'''; always <code>SCAN</code>
|-
| 0x4
| 4
| {{unknown|Unknown; always 2}}
|-
| 0x8
| 1
| {{unknown|Unknown}}
|-
| 0x9
| 4
| '''Instance count'''; always 1
|}
 
=== ScannableObjectInfo ===
 
This section of the file embeds a ScannableObjectInfo script object.
 
{| class="wikitable"
! Offset
! Size
! Description
|-
| 0x0
| 4
| '''Object type'''; always <code>SNFO</code>
|-
| 0x4
| 2
| '''Instance size'''
|-
| 0x6
| 4
| '''Instance ID'''; always 0
|-
| 0xA
| 2
| '''Connection count'''; always 0
|-
| 0xC
| 4
| '''Base property ID'''; always 0xFFFFFFFF
|-
| 0x10
| 2
| '''Base property size'''
|-
| 0x12
| 2
| '''Property count'''; 0x14 for Prime 2, 0x16 for Prime 3
|}
 
==== Properties (Echoes) ====
 
These are all the properties a ScannableObjectInfo instance contains:
 
{| class="wikitable"
! ID
! Type
! Name
|-
| 0x2F5B6423
| [[STRG (Metroid Prime)|STRG]]
| Scan Text
|-
| 0xC308A322
| long
| Scan Speed (0 for fast, 1 for slow)
|-
| 0x7B714814
| bool
| Is Important? (0 for blue, 1 for red)
|-
| 0x1733B1EC
| bool
| Use Logbook Model After Scan?
|-
| 0x53336141
| [[TXTR (File Format)|TXTR]]
| Post-Scan Override Texture
|-
| 0x3DE0BA64
| float
| Logbook Default X Rotation
|-
| 0x2ADD6628
| float
| Logbook Default Z Rotation
|-
| 0xD0C15066
| float
| Logbook Scale
|-
| 0xB7ADC418
| [[CMDL (Metroid Prime)|CMDL]]
| Logbook Model
|-
| 0x15694EE1
| [[AnimationParameters (Metroid Prime)|AnimationParameters]]
| Logbook AnimSet
|-
|-
|0x0
| 0x58F9FE99
|4
| [[AnimationParameters (Metroid Prime)|AnimationParameters]]
|'''Magic''' FourCC
| {{unknown|Unknown}}
|-
| 0x1C5B4A3A
| [[#ScanInfoSecondaryModel|ScanInfoSecondaryModel]]
| Secondary Model 1
|-
| 0x8728A0EE
| [[#ScanInfoSecondaryModel|ScanInfoSecondaryModel]]
| Secondary Model 2
|-
| 0xF1CD99D3
| [[#ScanInfoSecondaryModel|ScanInfoSecondaryModel]]
| Secondary Model 3
|-
| 0x6ABE7307
| [[#ScanInfoSecondaryModel|ScanInfoSecondaryModel]]
| Secondary Model 4
|-
| 0x1C07EBA9
| [[#ScanInfoSecondaryModel|ScanInfoSecondaryModel]]
| Secondary Model 5
|-
| 0x8774017D
| [[#ScanInfoSecondaryModel|ScanInfoSecondaryModel]]
| Secondary Model 6
|-
| 0xF1913840
| [[#ScanInfoSecondaryModel|ScanInfoSecondaryModel]]
| Secondary Model 7
|-
| 0x6AE2D294
| [[#ScanInfoSecondaryModel|ScanInfoSecondaryModel]]
| Secondary Model 8
|-
| 0x1CE2091C
| [[#ScanInfoSecondaryModel|ScanInfoSecondaryModel]]
| Secondary Model 9
|}
 
==== ScanInfoSecondaryModel ====
 
This struct is used to embed a resource that can be attached to the model in the logbook. The mesh can be either a [[CMDL (Metroid Prime)|model]] or an [[ANCS (File Format)|animset]].
 
{| class="wikitable"
! ID
! Type
! Name
|-
|-
|0x4
| 0x1F7921BC
|4
| [[CMDL (Metroid Prime)|CMDL]]
|'''Version''' Always 2, no matter what game
| Model
|-
|-
|0x8
| 0xCDD202D1
|1
| [[AnimationParameters (Metroid Prime)|AnimationParameters]]
|{{unknown|Boolean?}}
| AnimSet
|-
|-
|0x9
| 0x3EA2BED8
|4
| string
|{{unknown|Unknown}}
| Attach Bone Name
|}
|}


=SNFO Chunk=
=== Dependencies ===
The SNFO header is simply a FourCC and the total length in bytes, due to the fact that there is nothing in the header to determine which version of SCAN we're working with, we have to rely on the size of the SNFO chunk, if it's less than 0x0251 bytes, it's Metroid Prime 2, otherwise it's Metroid Prime 3.


Other than that SNFO is entirely unknown.
After the ScannableObjectInfo instance, there's a list of the scan's dependencies present. The list follows the same format as the [[DGRP (File Format)|DGRP]] format.


=Dependency List=
The dependency list follows the same format as [[DGRP (File Format)|DGRP]]
[[Category:File Formats]]
[[Category:File Formats]]
[[Category:Metroid Prime 2: Echoes]]
[[Category:Metroid Prime 2: Echoes]]
[[Category:Metroid Prime 3: Corruption]]
[[Category:Metroid Prime 3: Corruption]]
[[Category:Major research needed]]

Latest revision as of 06:18, 31 December 2015

This article is for the SCAN format from Metroid Prime 2 and 3. For other revisions of this format, see SCAN (File Format).

The SCAN file format describes scannable objects. The format's been updated since Prime 1; the data is now embedded into a script object, using the scriptable layers format. There was also some additional data added to the format to set up the model that displays in the logbook.


This file format is almost completely documented
There's a couple remaining unknown parameters.


Format

The SCAN format sets up a small script layer that contains a single ScannableObjectInfo instance.

Header

Offset Size Description
0x0 4 Magic; always SCAN
0x4 4 Unknown; always 2
0x8 1 Unknown
0x9 4 Instance count; always 1

ScannableObjectInfo

This section of the file embeds a ScannableObjectInfo script object.

Offset Size Description
0x0 4 Object type; always SNFO
0x4 2 Instance size
0x6 4 Instance ID; always 0
0xA 2 Connection count; always 0
0xC 4 Base property ID; always 0xFFFFFFFF
0x10 2 Base property size
0x12 2 Property count; 0x14 for Prime 2, 0x16 for Prime 3

Properties (Echoes)

These are all the properties a ScannableObjectInfo instance contains:

ID Type Name
0x2F5B6423 STRG Scan Text
0xC308A322 long Scan Speed (0 for fast, 1 for slow)
0x7B714814 bool Is Important? (0 for blue, 1 for red)
0x1733B1EC bool Use Logbook Model After Scan?
0x53336141 TXTR Post-Scan Override Texture
0x3DE0BA64 float Logbook Default X Rotation
0x2ADD6628 float Logbook Default Z Rotation
0xD0C15066 float Logbook Scale
0xB7ADC418 CMDL Logbook Model
0x15694EE1 AnimationParameters Logbook AnimSet
0x58F9FE99 AnimationParameters Unknown
0x1C5B4A3A ScanInfoSecondaryModel Secondary Model 1
0x8728A0EE ScanInfoSecondaryModel Secondary Model 2
0xF1CD99D3 ScanInfoSecondaryModel Secondary Model 3
0x6ABE7307 ScanInfoSecondaryModel Secondary Model 4
0x1C07EBA9 ScanInfoSecondaryModel Secondary Model 5
0x8774017D ScanInfoSecondaryModel Secondary Model 6
0xF1913840 ScanInfoSecondaryModel Secondary Model 7
0x6AE2D294 ScanInfoSecondaryModel Secondary Model 8
0x1CE2091C ScanInfoSecondaryModel Secondary Model 9

ScanInfoSecondaryModel

This struct is used to embed a resource that can be attached to the model in the logbook. The mesh can be either a model or an animset.

ID Type Name
0x1F7921BC CMDL Model
0xCDD202D1 AnimationParameters AnimSet
0x3EA2BED8 string Attach Bone Name

Dependencies

After the ScannableObjectInfo instance, there's a list of the scan's dependencies present. The list follows the same format as the DGRP format.