I am trying to provide a better way of importing old save games but for now you can use this workaround:
How to import old save games into Glamour 0.27
* updated version *
- Use GlamourEdit to export your savegame to a JSON file.
- Open Glamour 0.27 and press CTRL+Shift+I
- A new window will open, on the bottom half you should now see a console where you can enter text. (Click on the Console tab at the top if you can't see it).
- Paste the following code in there (make sure you copy all of it):
-
JavaScript:
const uploadElement = document.createElement("input");
const prepareDom = () => {
uploadElement.type = "file";
uploadElement.addEventListener("change", () => {
const reader = new FileReader();
let file = uploadElement.files[0];
reader.addEventListener("load", function () {
importSavegame(reader.result);
}, false);
reader.readAsText(file);
});
document.body.appendChild(uploadElement);
};
const importSavegame = (savegame) => {
try {
character = JSON.parse(savegame).currentCharacterId;
if (character === undefined) {
showInfo("Could not detect character of the provided save game. Exiting...");
return;
}
console.log(character);
insertNewSave(character, savegame);
} catch (error) {
showInfo("Something went wrong. Make sure you selected an unencrpyted version of your save game");
}
};
const insertNewSave = (character, savegame) => {
let highestSlot = Object.keys(localStorage).filter(n => n.startsWith("save:" + character)).map(item => parseInt(item.split(":")[3]));
let freeSlot = Math.max(-1, ...highestSlot);
let currentTime = Math.round((new Date).getTime() / 1000);
localStorage[`save:${character}:${currentTime}:${++freeSlot}`] = savegame;
showInfo("Your savegame should be imported now.");
document.body.removeChild(uploadElement);
};
const showInfo = alert;
prepareDom();
- Press ENTER. If everything went well you will now see a file picker at the top left of your screen labeled "Choose File". If the game is hanging or not responding, close the game and repeat the steps.
- Click on that button and select the JSON file you exported earlier.
- You will get a success message if your savegame was imported properly. If not, make sure you selected the right file.
- The Choose File button will now vanish. Close the developer tools by pressing CTRL+Shift+I again (you can also just restart the game, but it's not necessary)
- Go to the "LOAD GAME" screen. Your savegame should now appear in that list granted you have the correct character selected.
* alternative version *
- Use GlamourEdit to export the savegame you want to play to a JSON file.
- Open Glamour 0.27 and start a new game and choose the same character your old savegame uses.
- Once inside the game, click the cog wheels, select SAVE GAME and save your game. You will be redirected back to the main menu.
- Open the JSON file you exported earlier in a text editor of your choice and copy its content to your clipboard
- Alternatively just select the save in GlamourEdit, click on the editor on the right, press CTRL+A to select all and CTRL+C to copy to clipboard.
- Do whatever way you prefer but the result must be that your old unencrypted save game is now in your clipboard.
- Back in the game press CTRL+Shift+I to open the Chrome Developer Tools.
- Select the tab "Application" at the top (if you dont see it, try resizing the new window that opened and make it bigger or click on », then Application.
- On the left side click on the arrow next to Local Storage to expand it, then click on file://.
- In the list that showed up check the Key column and look for a string that starts with save. For example: save:kate:1593106068:0. If you selected max it will save max instead. Pick the the one with the highest number at the end after the last colon ). (The format of this string is always save:<maincharacter>:<unixtimestamp>:<slotid>)
- Doubleclick on the text in the "Value" column and you'll notice the whole text will be selected. Press CTRL+V to paste and overwrite this text.
- Press CTRL+Shift+I again to close the Chrome Developer Tools. Back in the game click on Load Game.
You should now see your old save. You should load it and save it again ingame to make sure it stored it correctly.
You must be registered to see the links
TL;DR: DS included the developer tools in this release for whatever reason which makes it very easy to access the browser that's powering the game. Replace a value in the local storage with your save contents and the game will recognize it.
To make it easier in the future we should probably implement a modified loading system in the game. I attached the (somewhat) unobfuscated source code of the game in case anyone feels like doing that. Relevant code starts at line 5624.
Cheers,