Page 1 of 1

Custom portraits in old (pre-patch) saved games

Posted: Mon Apr 30, 2012 2:27 am
by Dej
Hi everyone!

I love the game and I was thrilled to see the custom portrait feature was added in the latest patch (1.1.4)! However this option is only available for a new game and being in level 11 now, I lack the courage to start all over again just to enjoy it! ;)

So I wrote a script to patch my old savegame file and add in the custom portraits. This post is to describe the procedure I followed. The way it works is one needs two savegame files: an old one (pre-patch) to be converted, and a newly created one with custom portraits. The script will copy the custom portraits from one savegame to the other, so that you can continue your old game but with the edited portraits!

It goes without saying that this comes with *no* warranty whatsoever, *no* support, and you are *strongly* advised to backup all your save files before fiddling with them! On the win 7, standalone version of the game, the savefiles are in C:\Users\username\Documents\Almost Human\Legend of Grimrock\

The script (parsesavegame.py) is available here: http://pastebin.com/gvqVyUw7

The procedure is the following (I assume that you have python 2.7 installed, and a running version 1.1.4 of LoG as well):

1. Launch the game (1.1.4) and open your last saved game. Then save it again. (I do not know if the latest version of LoG somehow translates the old save games into some slightly different format, so I go through this step, if only to ensure that any translation, if needed, is done.) After doing that, let's say that the newly created savegame (stored in the folder above) is named savegame01.sav.

2. In the main menu start a "New game" and check the "Create characters" option. Create a basic party with whatever races/classes/traits/skillpoints: it doesn't matter. The only thing that matters is that this new game must have the custom portraits. Select those portraits in the correct order so that they match your party in savegame01.sav! Launch the game and save it at the beginning of level 1. After this step you must have a new savegame file, let's say it is called savegame02.sav.

3. Quit LoG

4. Run the python script (I personally use mingw on windows) giving it the two savegames as arguments.
* The first file given as argument is the savegame with the custom portraits
* The second one is the savegame without the portraits.

The console should look like this:

Code: Select all

$ python parsesavegame.py savegame02.sav savegame01.sav
Parsing savegame02.sav:
    Found character Fodok (ID: 3FF0)
    Found character Bardar (ID: 4000)
    Found character Daedoc (ID: 4008)
    Found character Gamdalf (ID: 4010)
    Found custom portrait (ID: 3FF0)
    Found custom portrait (ID: 4000)
    Found custom portrait (ID: 4008)
    Found custom portrait (ID: 4010)
Parsing savegame01.sav:
    Found character Arya Stark (ID: 3FF0)
    Found character Rodrik Cassel (ID: 4000)
    Found character Christopher Johnson (ID: 4008)
    Found character Jaqen H'ghar (ID: 4010)
    Inserted custom portraits
The output of the script is a converted savegame01.sav, named savegame01.edited.sav. Delete the old savegame01.sav from LoG savegame folder, and replace it with savegame01.edited.sav, which you'll rename savegame01.sav. And you can delete savegame02.sav since you don't need it anymore.

5. Launch LoG, load your old game and enjoy!

I hope you will find this interesting. All I can say is it worked for me and I am quite happy with the result! :D The format of the uncompressed saved game makes me believe that it should be easy to edit a lot more things in them. For example, with very little changes to this script it is possible to rename the characters. And so on.

Re: Custom portraits in old (pre-patch) saved games

Posted: Mon Apr 30, 2012 2:55 pm
by kitty
Nice job!

Re: Custom portraits in old (pre-patch) saved games

Posted: Tue May 08, 2012 6:47 pm
by Drapondur
Thanks! It worked!

Re: Custom portraits in old (pre-patch) saved games

Posted: Fri May 11, 2012 8:28 pm
by ksen
IIs there an easier way to do this? Maybe you make a video guide? Its really difficult to do all this if dont have any expirience with python...

Re: Custom portraits in old (pre-patch) saved games

Posted: Mon May 14, 2012 9:49 am
by ksen
Please help me anybody!

Re: Custom portraits in old (pre-patch) saved games

Posted: Mon May 14, 2012 10:15 am
by Darklord
I've not tried myself, I think it's better to start a new game if you want different portraits, as like you point out, this is pretty complex!

Personally I identify my characters with the portraits they have, to change mid game would be like a film getting new actors in for the lead roles half way through, very immersion breaking!

Anyhow, enough of my waffling! ;)

Daniel.