Custom portraits in old (pre-patch) saved games

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
User avatar
Dej
Posts: 8
Joined: Sun Apr 29, 2012 9:42 pm
Location: Geneva, Switzerland

Custom portraits in old (pre-patch) saved games

Post 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.
User avatar
kitty
Posts: 32
Joined: Fri Apr 06, 2012 9:42 am

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

Post by kitty »

Nice job!
User avatar
Drapondur
Posts: 2
Joined: Sat Mar 03, 2012 12:12 am
Contact:

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

Post by Drapondur »

Thanks! It worked!
User avatar
ksen
Posts: 12
Joined: Wed May 09, 2012 11:24 pm

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

Post 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...
User avatar
ksen
Posts: 12
Joined: Wed May 09, 2012 11:24 pm

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

Post by ksen »

Please help me anybody!
User avatar
Darklord
Posts: 2001
Joined: Sat Mar 03, 2012 12:44 pm
Location: England

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

Post 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.
A gently fried snail slice is absolutely delicious with a pat of butter...
Post Reply