Casper6969

Newbie
Jul 17, 2020
41
10
View attachment 568608

Important: Starting with Glamour 0.27 savegames no longer need to be decrypted and thus this tool no longer works. If you want to import your old savegames to 0.27 check this post.

Presenting Glamour Edit. A savegame editor for Glamour.

After countless hours of reverse engineering the glamour-server I was finally able to understand how savegame decryption and encryption in the game work. Since the server application is embedded into a patched node binary (using pkg) and transformed into tokenized V8 compilations it really was a pain in the ass to debug. Turns out, however, the encryption isn't really that special (decompile the SaveGameCipher class inside this binary to see what's happening under the hood).

As has been mentioned plenty times before, savegames are bound to your windows installation since the encryption and decryption keys are derived from your machine GUID. So in order to share savegames (without altering your machine guid) you can use this utility to export the decoded savegame as a json file. Other players can then import your json and have it encoded properly so the game recognizes it.

I added a JSON editor (based on ace) to the program for easier editing. Hit Ctrl+F while inside the editor if you want to search for specific strings. For the editor to show up and work properly you'll want to have at least Internet Explorer 10 installed on your system. If it's not working or if you don't like to use the built-in version you can export your save to a json file, edit it in a JSON editor of your liking and import it back.

Tested on Win7 SP1 64 and Win10 64 v1903 with Glamour saves from v0.21 and v0.22. Requires .NET Framework 4.6. This program was written in managed code, namely C# and thus its source code is readily available via the binary itself.

Let me know if you run into any problems. Any feedback is appreciated.

PS: Since you will be asking this: each character in the characters array holds a money value. Find the character you're playing right now and edit the money property to your liking.

PPS: Make a backup of your save game before tinkering with it. Editing the wrong values might lead to a broken game state. Values are only checked for syntax but not plausibility before saving.

Update: You'll now find the source code including solution files attached to this post. Not all files in this archive are necessary to compile the program. Some things remained there even after refactoring earlier code (e.g. a proper Save class, which is no longer used).

Cheers,

Update 1.0.5
  • You can now resize the tree view on the left
  • Removed old/unneccesary code from several classes
  • Added the possibility to import binary savegames from other machines.
To expand a little on the last point: if the editor finds a file in the savegame folder it can't decrypt (excluding JSON files) it will now show up in the list as Unknown save:
View attachment 583478

Clicking on it now gives you the option to add a machine ID for decrypting this file:
View attachment 583479

If the machine ID provided is valid and the file can be decoded it will appear in the save list just like any other savegame. No further adjustments are neccessary to make the savegame work.
View attachment 583490

Press "Save" to write the new save to your folder overwriting the old one. The save will now appear ingame.
Important: Starting with Glamour v0.27 savegames don't need to be decrypted anymore and thus GlamourEdit is neither working nor needed any longer on newer versions.

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.


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,
How do you make this work ?
 

biometric

Member
Jan 12, 2020
170
139
In case others encounter this issue, rename the C:\Users\<username>\AppData\Roaming\glamour-updater\ folder to something else, and relaunch the game. Worked for me.

Unfortunately, I now don't see any saves from 46.1 :-(
Endpoint pc.ardent.games is for offline client, online client use sandlustgames.com endpoint, online saves only work with online client. Both clients use JSON to store saves data, with offline client you can press Ctrl Shift I, navigate Application tab and then Storage > Local storage to browse all your saves plus auto-saves. Check the saves name at the end of JSON. Each first-run generate an UUID as your client id, or when you deleted old one. Client id used for authorize patreon subcribtions and tell game server which version of the game your current sub. can access and return saves data for current id. I was setup a local proxy to add cheats into online client before :)
 

BigBrotherrrr

Active Member
Aug 28, 2017
738
1,507
4/13/2022

We've decided to make 0.47 our biggest update ever, we've already rendered over 200 new images.
...we're aiming to release 0.47 this month.
4/30/2022

Instead of trying to make bigger and better updates, we will try to make smaller, but more frequent ones.
...Hopefully, both will come out early May.
5/8/2022

All images are ready, so we just have to write code and text, which shouldn't take more than a couple of weeks.
5/20/2022

...so the update is taking some time. But we're still aiming to release it in May.
This is fine.
 

matt26

Newbie
Jan 24, 2018
41
18
In case others encounter this issue, rename the C:\Users\<username>\AppData\Roaming\glamour-updater\ folder to something else, and relaunch the game. Worked for me.

Unfortunately, I now don't see any saves from 46.1 :-(
did this, lost all my saves, thx
 

RenPythagorus

Member
Jun 6, 2017
114
117
Question on the Max side: how do you earn money? I've finished every quest except "New Home" and those that require purchasing an item. I have yet to be offered a way to earn money. Did I run across a bug? I'm using the 0.47 offline. Thanks!
 

Wizardelo1234

New Member
Jan 20, 2022
3
1
i got a wierd bug here also, in .46 i can see the icons fine, but in 0.47 they all darkened out like they aint loading properly. any idea whats wrong,
 

Quick2525

New Member
Dec 19, 2021
1
1
Hello,
I'm blocked when it comes to giving the samples to Zoe. I gave Zoe and Kate at least 20 but nothing changed...
zoe.JPG
How should it be done please?
Thank you
 
Last edited:
  • Like
Reactions: nmiki
2.60 star(s) 186 Votes