FRD Savegame: Difference between revisions

Slattz (talk | contribs)
Fix NEX Password length in account structure
TimmSkiller (talk | contribs)
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
This page describes the contents of the [[Friend_Services|friend]] sysmodule savegame.
This page describes the contents of the [[Friend_Services|friends]] sysmodule savegame.


Save data for the sysmodule has the following general structure:
data
├── [[FRD_Savegame#config|config]]
└── <Local Account ID>
    ├── [[FRD_Savegame#account|account]]
    ├── [[FRD_Savegame#friendlist|friendlist]]
    └── [[FRD_Savegame#mydata|mydata]]
Despite being generally unused, the sysmodule supports the usage of multiple accounts.
Each account gets its own "Local Account ID", and a directory named after this ID. The directory contains all relevant account information.
== config ==
This file only contains the local account ID of the currently active account.
The friends sysmodule uses this file to determine which account to load by default.
{| class="wikitable"
|-
! Offset !! Size !! Description
|-
| 0x00 || 4 || File magic "FPCF" (Friend Presence Config)
|-
| 0x04 || 4 || File magic number (0x20101021)
|-
| 0x08 || 8 || Padding
|-
| 0x10 || 4 || Current Local Account ID
|}


== account ==
== account ==
This file stores various essential data related to the corresponding account.


{| class="wikitable"
{| class="wikitable"
|-
|-
! Offset
! Offset !! Size !! Description
! Size
! Description
|-
|-
| 0x00
| 0x00 || 4 || File magic "FPAC" (Friend Presence Account Config)
| 4
| File magic "FPAC" (Friends Preference Account Config)
|-
|-
| 0x04
| 0x04 || 4 || File magic number (0x20101021)
| 4
| File magic number (0x20101021)
|-
|-
| 0x08
| 0x08 || 8 || Padding
| 8
| Padding
|-
|-
| 0x10
| 0x10 || 4 || Local Account ID
| 4
| Unknown
|-
|-
| 0x14
| 0x14 || 4 || PrincipalID
| 4
| PrincipalID
|-
|-
| 0x18
| 0x18 || 8 || LocalFriendCode
| 8
| LocalFriendCode
|-
|-
| 0x20
| 0x20 || (16 + 1) * 2 || 16-character UTF-16 NEX Password (16 characters + NULL termination)
| (16 + 1) * 2
| NEX Password
|-
|-
| 0x42
| 0x42 || (8 + 1) * 2 || 8-character UTF-16 PrincipalID HMAC (Used for logging into NASC server) (8 characters + NULL termination)
| (8 + 1) * 2
| PrincipalID HMAC (Used for logging into NASC server)
|-
|-
| 0x54
| 0x54 || 1 || NASC Environment (0: Production, 1: Testing, 2: Development)
| 1
| Unknown
|-
|-
| 0x55
| 0x55 || 1 || [[Friend_Services#Server_Types|Server type]] letter value
| 1
| Unknown
|-
|-
| 0x56
| 0x56 || 1 || [[Friend_Services#Server_Types|Server type]] number value
| 1
| Unknown
|-
|-
| 0x57
| 0x57 || 1 || Padding
| 1
| Padding
|}
|}


== mydata ==
== mydata ==
Stores console-specific information related to the account.


{| class="wikitable"
{| class="wikitable"
|-
|-
! Offset
! Offset !! Size !! Description
! Size
|-
! Description
| 0x00 || 4 || File magic "FPMD" (Friend Presence My Data/Device)
|-
| 0x04 || 4 || File magic number (0x20101021)
|-
| 0x08 || 8 || Padding
|-
| 0x10 || 4 || My NC Principal ID
|-
| 0x14 || 4 || MoveCount
|-
| 0x18 || 4 || [[FRD_Savegame#Change_Bit_Flags|Change bit flag]]
|-
| 0x1C || 3 || [[Friend_Services#Preference|Preferences]]
|-
| 0x1F || 1 || Padding
|-
| 0x20 || 0x10 || [[Friend_Services#GameKey|GameKey]] of favorite title
|-
| 0x30 || (16 + 1) * 2 || 16-Character UTF-16 personal message (comment) (16 characters + NULL termination)
|-
|-
| 0x00
| 0x52 || 1 || First byte of the console's LocalFriendCodeSeed
| 4
| File magic "FPMD" (Friends Preference My Data/Device)
|-
|-
| 0x04
| 0x53 || 5 || Padding
| 4
| File magic number (0x20101021)
|-
|-
| 0x08
| 0x58 || 8 || [[Friend_Services#Profile|Profile]]
| 8
| Padding
|-
|-
| 0x10
| 0x60 || 8 || u64, LocalFriendCodeSeed
| 0x20
|-
| Unknown
| 0x68 || (12 + 1) * 2 || 12-character UTF-16 MAC address (only the digits) (12 characters + NULL termination)
|-
| 0x82 || (15 + 1) * 2 || 15-character UTF-16 console serial number without the checksum digit (15 characters + NULL termination)
|-
| 0xA2 || (10 + 1) * 2 || 10-character UTF-16 Display name (10 characters + NULL termination)
|-
| 0xBB || 0x60 || [[Mii#CFLStoreData|Mii data]]
|-
| 0x11B || 5 || Padding
|}
 
=== Change Bit Flags ===
{| class="wikitable" border="1"
|-
|-
| 0x30
! Value !! Description
| 16 * 2
| UTF16 string of personal message
|-
|-
| 0x50
| 1 || [[Friend_Services#GameKey|Game Key]] changed.
| 8
| Unknown
|-
|-
| 0x58
| 2 || Game mode description changed.         
| 8
|  
  u8 region
  u8 country
  u8 area
  u8 language
  u8 platform = 2
  u8 padding[3]
|-
|-
| 0x5C
| 4 || Join availability flag changed.       
| 4
| Unknown padding
|-
|-
| 0x60
| 8 || Matchmake system type changed.         
| 8
| LocalFriendCodeSeed u64
|-
|-
| 0x68
| 16 || Join game ID changed.                 
| (12 + 1) * 2
| UTF16 string of unknown hexadecimal identifier
|-
|-
| 0x82
| 32 || Join game mode changed.               
| (15 + 1) * 2
| UTF16 string of console serial number without the checksum digit
|-
|-
| 0xA2
| 64 || Owner [PID] changed.                   
| (10 + 1) * 2
| UTF16 string of Display name
|-
|-
| 0xBB
| 128 || Join group ID changed.                 
| 0x60
| Unaligned [[Mii#Mii_format|Mii data]]
|-
|-
| 0x11B
| 256 || Application argument changed.         
| 5
| Padding (0x120)
|}
|}


== friendlist ==
== friendlist ==
Contains the friend list associated with the account.


=== Header ===
=== Header ===
Line 136: Line 145:
{| class="wikitable"
{| class="wikitable"
|-
|-
! Offset
! Offset !! Size !! Description
! Size
! Description
|-
|-
| 0x00
| 0x00 || 4 || File magic "FPFL" (Friend Presence Friend List)
| 4
| File magic "FPFL" (Friends Preference Friend List)
|-
|-
| 0x04
| 0x04 || 4 || File magic number (0x20101021)
| 4
| File magic number (0x20101021)
|-
|-
| 0x08
| 0x08 || 8 || Padding
| 8
| Padding
|-
|-
| 0x10
| 0x10 || 100 * 0x100 || [[FRD_Savegame#Friend_entry|Friend entries]] (maximum 100)
| ? * 0x100
| [[FRD_Savegame#Friend_entry|Friend entries]]...
|}
|}


Line 161: Line 160:
{| class="wikitable"
{| class="wikitable"
|-
|-
! Offset
! Offset !! Size !! Description
! Size
|-
! Description
| 0x00 || 0x10 || [[Friend_Services#FriendKey|FriendKey]] of this friend
|-
| 0x10 || 0x4 || NC Principal ID of this friend
|-
| 0x14 || 1 || [[Friend_Services#Relationship_Types|Relationship]] with this friend
|-
| 0x15 || 8 || [[Friend_Services#Profile|Profile]] of this friend
|-
| 0x1D || 3 || Padding
|-
| 0x20 || 0x10 || [[Friend_Services#GameKey|GameKey]] of this friend's favorite title
|-
| 0x30 || (16 + 1) * 2 || 16-character UTF-16 personal message (comment) of this friend (16 characters + NULL termination)
|-
| 0x52 || 0x6 || padding
|-
| 0x58 || 8 || NEX timestamp for the last time this friend updated their personal comment (message)
|-
| 0x60 || 8 || NEX timestamp for the last time this friend updated their Mii
|-
|-
| 0x00
| 0x68 || 8 || NEX timestamp for the last time this friend was seen online
| 0x15
| Unknown
|-
|-
| 0x15
| 0x70 || 0x60 || [[Mii#CFLStoreData|Mii data]]
| 8
|  
  u8 region
  u8 country
  u8 area
  u8 language
  u8 platform = 2
  u8 padding[3]
|-
|-
| 0x1C
| 0xD0 || (10 + 1) * 2 || 10-character UTF-16 Display name (10 characters + NULL termination)
| 0x14
| Unknown
|-
|-
| 0x30
| 0xE6 || 1 || bool, profanity flag
| 16 * 2
| UTF16 string of personal message
|-
|-
| 0x50
| 0xE7 || 1 || u8, [[Mii#Mii_format|Mii character set]]
| 0x20
| Unknown
|-
|-
| 0x70
| 0xE8 || 8 || NEX timestamp for when this friend was added
| 0x60
| [[Mii#Mii_format|Mii data]]
|-
|-
| 0xD0
| 0xF0 || 8 || Appears to be identical to the timestamp at offset 0x58.
| (10 + 1) * 2
| UTF16 string of display name
|-
|-
| 0xE8
| 0xF8 || 8 || Appears to be identical to the timestamp at offset 0x60.
| 0x18
| Unknown
|}
|}