Savegame: Difference between revisions
Streetclaw (talk | contribs) (→Global) |
Streetclaw (talk | contribs) (Discord CDN migration - Savegame editor) Tag: 2017 source edit |
||
(8 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
CrossCode has two save systems. The old system (before 0.8.2) stores all | CrossCode has two save systems. The old system (before 0.8.2) stores all saves in [https://en.wikipedia.org/wiki/Web_storage localstorage]. Due to size limitations this was changed to a file-based save system. This new system stores save data in the <code>cc.save</code> file. | ||
0.8.2 has a savegame bug on MacOS and Linux. The Windows exclusive [https://en.wikipedia.org/wiki/Environment_variable Environment variable] <code>appdata</code> is used. Version 0.8.2-2 replaced this with <code>nw.App.dataPath</code>. | Version 0.8.2 has a savegame bug on MacOS and Linux. The Windows exclusive [https://en.wikipedia.org/wiki/Environment_variable Environment variable] <code>appdata</code> is used. Version 0.8.2-2 replaced this with <code>nw.App.dataPath</code>. | ||
== Location == | == Location == | ||
Line 14: | Line 14: | ||
| <code>Windows</code> | | <code>Windows</code> | ||
| <code>%LOCALAPPDATA%\CrossCode\cc.save</code> | | <code>%LOCALAPPDATA%\CrossCode\cc.save</code> | ||
|- | |||
|<code>Windows 10 (Microsoft Store/Xbox Game Pass)</code> | |||
|<code>%LOCALAPPDATA%\Packages\DECK13.CrossCodePC_rn1dn9jh54zft\LocalCache\Local\CrossCode\cc.save</code> | |||
|- | |- | ||
| <code>Linux</code> | | <code>Linux</code> | ||
Line 41: | Line 44: | ||
== Savefile and Localstorage format == | == Savefile and Localstorage format == | ||
The format of the | The format of the save storage is a [https://de.wikipedia.org/wiki/JavaScript_Object_Notation JSON]: | ||
Format overview: | Format overview: | ||
Line 67: | Line 70: | ||
|- | |- | ||
| <code>"autoSlot"</code> | | <code>"autoSlot"</code> | ||
| Containing the | | Containing the autosave | ||
|- | |- | ||
| <code>"globals"</code> | | <code>"globals"</code> | ||
Line 92: | Line 95: | ||
== Savestring == | == Savestring == | ||
A savestring containing the | A savestring containing the actual save data. Every String starts with <code>[-!_0_!-]</code> and is [https://en.wikipedia.org/wiki/Base64 base64] encoded. The decoded result is a [https://en.wikipedia.org/wiki/Advanced_Encryption_Standard AES-256] ([https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Cipher_Block_Chaining_.28CBC.29 CBC mode]) encrypted JSON. The password used to encrypt and decrypt the data has been known since May 2016 and can be found in the source code of the editors below. | ||
The game is using [https://code.google.com/archive/p/crypto-js/ CryptoJS] to encrypt and decrypt the data. | The game is using [https://code.google.com/archive/p/crypto-js/ CryptoJS] to encrypt and decrypt the data. | ||
Line 105: | Line 108: | ||
| <code>Openssl</code> | | <code>Openssl</code> | ||
| Remove <code>[-!_0_!-]</code> from the String | | Remove <code>[-!_0_!-]</code> from the String | ||
Encrypt: <code>openssl enc -e -base64 -A -aes-256-cbc -pass pass:"{password}"</code> | Encrypt: <code>openssl enc -e -base64 -A -aes-256-cbc -md md5 -pass pass:"{password}"</code> | ||
Decrypt: <code>openssl enc -d -base64 -A -aes-256-cbc -pass pass:"{password}"</code> | Decrypt: <code>openssl enc -d -base64 -A -aes-256-cbc -md md5 -pass pass:"{password}"</code> | ||
|- | |- | ||
| <code>CryptoJS</code> | | <code>CryptoJS</code> | ||
Line 114: | Line 117: | ||
Decrypt: <code>CryptoJS.AES.decrypt({savestring},{password})</code> | Decrypt: <code>CryptoJS.AES.decrypt({savestring},{password})</code> | ||
|- | |||
|Decryptor/Editor from RegalMedia | |||
|[https://github.com/RegalMedia/crosscode-save-decryptor Source code on GitHub] | |||
|- | |- | ||
| <code>Editor from Omegalink12</code> | | <code>Editor from Omegalink12</code> | ||
Line 119: | Line 125: | ||
|- | |- | ||
| <code>Editor from Streetclaw</code> | | <code>Editor from Streetclaw</code> | ||
| [https:// | | [https://storage.c2dl.info/tools/cc-savegame-editor/SavegameEditor.zip Download] (savegameEdit.html) | ||
|} | |} | ||
== Import and Export Savestrings == | == Import and Export Savestrings == | ||
The | The menu to import and export Savestrings can be opened by pressing F10. Imported saves will be stored on the last savegame slot. | ||
== Decrypted Savestring (JSON) == | == Decrypted Savestring (JSON) == | ||
Line 142: | Line 148: | ||
|- | |- | ||
| <code>"position"</code> | | <code>"position"</code> | ||
| | |Position in the current map | ||
|- | |- | ||
| <code>"bgm"</code> | | <code>"bgm"</code> | ||
Line 148: | Line 154: | ||
|- | |- | ||
| <code>"gui"</code> | | <code>"gui"</code> | ||
| | |Bottom-right help textbox | ||
|- | |- | ||
| <code>"version"</code> | | <code>"version"</code> | ||
| Game version | | Game version (not updated on PC) | ||
|- | |- | ||
| <code>"saveVersion"</code> | | <code>"saveVersion"</code> | ||
Line 221: | Line 227: | ||
| <code>"quests"</code> | | <code>"quests"</code> | ||
| Quests | | Quests | ||
|- | |||
| <code>"newGamePlus"</code> | |||
| New Game Plus options | |||
|- | |- | ||
| <code>"party"</code> | | <code>"party"</code> | ||
Line 242: | Line 251: | ||
| Game options | | Game options | ||
|} | |} | ||
== Switch version savegame differences == | |||
A key change between the PC and Switch savegames is the latter being saved in plaintext. | |||
Instances of multiple language data have mostly been replaced with just the one chosen language. |
Latest revision as of 17:06, 4 October 2023
CrossCode has two save systems. The old system (before 0.8.2) stores all saves in localstorage. Due to size limitations this was changed to a file-based save system. This new system stores save data in the cc.save
file.
Version 0.8.2 has a savegame bug on MacOS and Linux. The Windows exclusive Environment variable appdata
is used. Version 0.8.2-2 replaced this with nw.App.dataPath
.
Location
Save File (since 0.8.2-2)
System | Path |
---|---|
Windows
|
%LOCALAPPDATA%\CrossCode\cc.save
|
Windows 10 (Microsoft Store/Xbox Game Pass)
|
%LOCALAPPDATA%\Packages\DECK13.CrossCodePC_rn1dn9jh54zft\LocalCache\Local\CrossCode\cc.save
|
Linux
|
~/.config/CrossCode/Default/cc.save
|
MacOS
|
~/Library/Application Support/CrossCode/Default/cc.save
|
Localstorage saves (old system)
System | Path |
---|---|
Windows
|
%LOCALAPPDATA%\CrossCode\Local Storage\
|
Linux
|
~/.config/CrossCode/Default/Local Storage/
|
MacOS
|
~/Library/Application Support/CrossCode/Default/Local Storage/
|
Savefile and Localstorage format
The format of the save storage is a JSON:
Format overview:
{ "slots": [ {savestring_slot1}, {savestring_slot2}, ..., {savestring_slotX} ], "autoSlot": {savestring}, "globals": {savestring}, "lastSlot": {slot_number} }
Element | Description |
---|---|
"slots"
|
Array (List) containing all saves, starting with Slot 1 |
"autoSlot"
|
Containing the autosave |
"globals"
|
Containing all global data |
"lastSlot"
|
Example:
{ "slots": [ "[-!_0_!-]U2FsdGVkX1+K8a2HlAKS...5329sQ69bTU5quQ0UGjIt6DG45kxwJZD", "[-!_0_!-]U2FsdGVkX1/sl4dQyBgHx...jbIn4tmVHPt0ZCxi9ElniMHI13xGxQk", "[-!_0_!-]U2FsdGVkX19zOTWR9ynkq...HZczzbAOZZuyviB4nzTKAdqYcaBEbIU" ], "autoSlot": "[-!_0_!-]U2FsdGVkX19qIZAUL2kZ...Ox8t/0yfkRouUdgaCFWrMT8jup", "globals": "[-!_0_!-]U2FsdGVkX19YItQieykUU...xuFzHg4oeyhlJRR5/CRA/NBE8o", "lastSlot": 0 }
Savestring
A savestring containing the actual save data. Every String starts with [-!_0_!-]
and is base64 encoded. The decoded result is a AES-256 (CBC mode) encrypted JSON. The password used to encrypt and decrypt the data has been known since May 2016 and can be found in the source code of the editors below.
The game is using CryptoJS to encrypt and decrypt the data.
There are multiple ways to decrypt a Savestring:
Method | Info |
---|---|
Openssl
|
Remove [-!_0_!-] from the String
Encrypt: Decrypt: |
CryptoJS
|
Remove [-!_0_!-] from the String
Encrypt: Decrypt: |
Decryptor/Editor from RegalMedia | Source code on GitHub |
Editor from Omegalink12
|
Online Editor (Sourcecode) |
Editor from Streetclaw
|
Download (savegameEdit.html) |
Import and Export Savestrings
The menu to import and export Savestrings can be opened by pressing F10. Imported saves will be stored on the last savegame slot.
Decrypted Savestring (JSON)
Savegame
Element | Description |
---|---|
"map"
|
Current Map |
"vars"
|
Map, Game and Event Storage |
"position"
|
Position in the current map |
"bgm"
|
Background Music |
"gui"
|
Bottom-right help textbox |
"version"
|
Game version (not updated on PC) |
"saveVersion"
|
Savegame version |
"timers"
|
Timer data |
"playtime"
|
Full playtime in seconds |
"stats"
|
Game stats |
"message"
|
Last messages |
"options"
|
(empty) |
"area"
|
Area (Load- / Savescreen) |
"floor"
|
Floor (Load- / Savescreen) |
"specialMap"
|
Special Map (Load- / Savescreen) |
"visitedAreas"
|
Visited Areas |
"landmarks"
|
Reached Landmarks |
"lories"
|
Lore marker |
"tradersFound"
|
Trader found |
"menuNewEntries"
|
Tracks new menu entries |
"logs"
|
Game log |
"drops"
|
Botanic data |
"player"
|
Player data |
"saveBlock"
|
Save disabled |
"forceCombatMode"
|
Combat mode |
"highscore"
|
|
"highscore-obs"
|
|
"permaTask"
|
Current Main Task |
"quests"
|
Quests |
"newGamePlus"
|
New Game Plus options |
"party"
|
Party / Contact data |
"commonEvents"
|
Event data (Combat Art tutorial flags) |
Global
Element | Description |
---|---|
"feats"
|
Trophies |
"options"
|
Game options |
Switch version savegame differences
A key change between the PC and Switch savegames is the latter being saved in plaintext.
Instances of multiple language data have mostly been replaced with just the one chosen language.