SAVW (File Format): Difference between revisions

Jump to navigation Jump to search
no edit summary
>Aruki
No edit summary
>Aruki
No edit summary
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
''This article is for the SAVW format from Metroid Prime 1 and 2. See [[SAVW (File Format)]] for the other revisions of this format.''
The '''SAVW format''' describes save data in the Metroid Prime series and Donkey Kong Country Returns. It allows any data used by the game's script data that needs to be preserved between play sessions to be saved and retrieved from the save file without the executable having to know anything about it. This is used for, for instance, saving whether a particular MemoryRelay has been activated, or whether a specific layer has been toggled on.
 
The '''SAVW format''' determines what data gets saved to the memory card. It's used to save information on non-hardcoded parts of the game, like whether a particular MemoryRelay has been activated, whether you've scanned a particular scan has been fully scanned, etc.


__TOC__
__TOC__


== Format ==
== Format ==
The format is basically just a series of arrays. The structure remains more or less the same across every game, just with arrays being added or removed. The main difference between formats is that starting in Metroid Prime 3, the engine stores references to saved variables through a combination of a 128-bit state ID and an instance ID instead of implicitly associating them via instance IDs alone. The state ID is mirrored in another file (usually on the object via a property).


{| class="wikitable"
{| class="wikitable"
Line 14: Line 14:
! MP1
! MP1
! MP2
! MP2
! MP3
! DKCR
|-
|-
| u32
| u32
Line 19: Line 21:
| '''Magic'''
| '''Magic'''
| Always <code>0xC001D00D</code>.
| Always <code>0xC001D00D</code>.
| {{check}}
| {{check}}
| {{check}}
| {{check}}
| {{check}}
| {{check}}
Line 25: Line 29:
| 1
| 1
| '''Version'''
| '''Version'''
| See below for a list of possible version numbers.
| [[#Version|See below]] for a list of possible version numbers.
| {{check}}
| {{check}}
| {{check}}
| {{check}}
| {{check}}
| {{check}}
Line 32: Line 38:
| 1
| 1
| '''Area Count'''
| '''Area Count'''
| Number of areas contained in this world.
| Number of areas contained in this world. Always 1 in DKCR.
| {{check}}
| {{check}}
| {{check}}
| {{check}}
| {{check}}
| {{check}}
Line 40: Line 48:
| '''Cinematic Skip Count'''
| '''Cinematic Skip Count'''
| Count of skippable cinematics.
| Count of skippable cinematics.
| {{check}}
| {{check}}
| {{check}}
| {{check}}
| {{check}}
| {{check}}
|-
|-
| u32
| [[#Saved State Descriptor|Saved State Descriptor]]
| ''Cinematic Skip Count''
| ''Cinematic Skip Count''
| '''Cinematic Skip Instance IDs'''
| '''Cinematic Skip Array'''
| Array of instance IDs listing every Cinematic Skip SpecialFunction instance (MP1)/Camera instance with cinematic skip enabled (MP2) in the world.
| Array describing all skippable cinematics in the world. Points to Cinematic Skip SpecialFunctions (MP1) or cameras with cinematic skip enabled (MP2+).
| {{check}}
| {{check}}
| {{check}}
| {{check}}
| {{check}}
| {{check}}
Line 52: Line 64:
| u32
| u32
| 1
| 1
| '''MemoryRelay Count'''
| '''Memory Relay Count'''
| Count of MemoryRelay instances.
| Count of Memory Relay instances.
| {{check}}
| {{check}}
| {{check}}
| {{check}}
| {{check}}
| {{check}}
|-
|-
| u32
| [[#Saved State Descriptor|Saved State Descriptor]]
| ''MemoryRelay Count''
| ''Memory Relay Count''
| '''MemoryRelay Instance IDs'''
| '''Memory Relay Array'''
| Array of instance IDs listing every MemoryRelay instance in the world.
| Array describing all Memory Relays in the world.
| {{check}}
| {{check}}
| {{check}}
| {{check}}
| {{check}}
| {{check}}
Line 70: Line 86:
| {{check}}
| {{check}}
| {{check}}
| {{check}}
| {{nocheck}}
| {{nocheck}}
|-
|-
| [[#Layer Toggle|Layer Toggle]]
| [[#Layer Toggle|Layer Toggle]]
| 1
| ''Layer Toggle Count''
| '''Layer Toggle Array'''
| '''Layer Toggle Array'''
| Array specifying every layer that can be toggled on/off from this world (any layer referenced by a ScriptLayerController). The layers specified can be in other worlds.
| Array specifying every layer toggleable from this world (referenced by a ScriptLayerController). The layers specified can be in other worlds.
| {{check}}
| {{check}}
| {{check}}
| {{check}}
| {{nocheck}}
| {{nocheck}}
|-
|-
| u32
| u32
Line 84: Line 104:
| {{check}}
| {{check}}
| {{check}}
| {{check}}
| {{check}}
| {{nocheck}}
|-
|-
| u32
| [[#Saved State Descriptor|Saved State Descriptor]]
| ''Door Count''
| ''Door Count''
| '''Door Instance IDs'''
| '''Door Array'''
| Array of instance IDs listing every DoorArea/Door instance in the world.
| Array describing all DoorArea/Door instances in the world.
| {{check}}
| {{check}}
| {{check}}
| {{check}}
| {{check}}
| {{nocheck}}
|-
|-
| u32
| u32
Line 98: Line 122:
| {{check}}
| {{check}}
| {{check}}
| {{check}}
| {{check}}
| {{nocheck}}
|-
|-
| [[#Scannable Object|Scannable Object]]
| [[#Scannable Object|Scannable Object]]
Line 105: Line 131:
| {{check}}
| {{check}}
| {{check}}
| {{check}}
| {{check}}
| {{nocheck}}
|-
|-
| u32
| u32
Line 111: Line 139:
| Count of system state env vars modified from this world.
| Count of system state env vars modified from this world.
| {{nocheck}}
| {{nocheck}}
| {{check}}
| {{check}}
| {{check}}
| {{check}}
|-
|-
Line 116: Line 146:
| ''System State Env Var Count''
| ''System State Env Var Count''
| '''System State Env Var Array'''
| '''System State Env Var Array'''
| Array of env vars affecting the entire system. Mainly used for multiplayer music unlocks.
| Array of env vars affecting the entire system.
| {{nocheck}}
| {{nocheck}}
| {{check}}
| {{check}}
| {{check}}
| {{check}}
|-
|-
Line 125: Line 157:
| Count of game state env vars modified from this world.
| Count of game state env vars modified from this world.
| {{nocheck}}
| {{nocheck}}
| {{check}}
| {{check}}
| {{check}}
| {{check}}
|-
|-
Line 130: Line 164:
| ''Game State Env Var Count''
| ''Game State Env Var Count''
| '''Game State Env Var Array'''
| '''Game State Env Var Array'''
| Array of env vars affecting only this save slot. Mainly used to enable the Dark World map button.
| Array of env vars affecting only this save slot.
| {{nocheck}}
| {{nocheck}}
| {{check}}
| {{check}}
| {{check}}
| {{check}}
|-
|-
Line 140: Line 176:
| {{nocheck}}
| {{nocheck}}
| {{check}}
| {{check}}
| {{check}}
| {{nocheck}}
|-
| [[#Saved State Descriptor|Saved State Descriptor]]
| ''Unmappable Object Count''
| '''Unmappable Object Array'''
| Array describing every instance that can be removed from the map. Primarily Translator Door Location SpecialFunctions in MP2 and Pickups in MP3.
| {{nocheck}}
| {{check}}
| {{check}}
| {{nocheck}}
|-
|-
| u32
| u32
| ''Unmappable Object Count''
| 1
| '''Unmappable Object Instance IDs'''
| '''Puzzle Piece Count'''
| Array of instance IDs listing every instance that can be removed from the map. Mainly used by Translator Door Location SpecialFunctions.
| Count of Puzzle Piece Pickups in this world. (This value also controls the level puzzle piece count that displays on the HUD ingame.)
| {{nocheck}}
| {{nocheck}}
| {{nocheck}}
| {{check}}
|-
| [[#Saved State Descriptor|Saved State Descriptor]]
| ''Puzzle Piece Count''
| '''Puzzle Piece Array'''
| Array describing all Puzzle Piece Pickups.
| {{nocheck}}
| {{nocheck}}
| {{nocheck}}
| {{nocheck}}
| {{check}}
| {{check}}
|-
|-
| colspan=6 {{unknown|End of file}}
| colspan=8 {{unknown|End of file}}
|}
|}


=== Versions ===
=== Version ===


Possible version numbers:
Each revision of the SAVW format has a unique version number, which corresponds to the following games:


{| class="wikitable"
{| class="wikitable"
Line 170: Line 228:
| 0x8
| 0x8
| Donkey Kong Country Returns
| Donkey Kong Country Returns
|}
=== Saved State Descriptor ===
In Metroid Prime 1 and 2, saved state values were referenced only via the instance ID of the object that the state is for. In Prime 3 and DKCR, a 128-bit [[GUID]] was introduced that handles references to save file data, and is stored in the file in conjunction with the instance IDs.
{| class="wikitable"
! Type
! Name
! Notes
! MP1
! MP2
! MP3
! DKCR
|-
| [[GUID]]
| '''GUID'''
| ID of this saved state.
| {{nocheck}}
| {{nocheck}}
| {{check}}
| {{check}}
|-
| u32
| '''Instance ID'''
| Instance ID of the object that uses this saved state.
| {{check}}
| {{check}}
| {{check}}
| {{check}}
|-
| colspan=7 {{unknown|End of descriptor}}
|}
|}


Line 203: Line 293:
| u32
| u32
| '''Logbook Category'''
| '''Logbook Category'''
| Enum describing which logbook category this scan is part of. Always 0 in MP2. See below for possible values for MP1.
| Enum describing which logbook category this scan is part of. Always 0 in MP2 and MP3. See below for possible values for MP1.
|-
|-
| colspan=3 {{unknown|End of scan}}
| colspan=3 {{unknown|End of scan}}
Line 228: Line 318:
| 4
| 4
| Research
| Research
|-
| 5
| Artifacts
|}
|}


Line 260: Line 353:
[[Category:Metroid Prime 2 Demo]]
[[Category:Metroid Prime 2 Demo]]
[[Category:Metroid Prime 2: Echoes]]
[[Category:Metroid Prime 2: Echoes]]
[[Category:Metroid Prime 3 Prototype]]
[[Category:Metroid Prime 3: Corruption]]
[[Category:Donkey Kong Country Returns]]
Anonymous user

Navigation menu