Is it possible to change a name/portrait

Talk about anything related to Legend of Grimrock 2 here.
Post Reply
User avatar
Luj1
Posts: 168
Joined: Mon Jun 18, 2012 11:12 am
Location: Belgrade, Serbia

Is it possible to change a name/portrait

Post by Luj1 »

As of now, is it possible to subsequently change a character's name and/or portrait after starting a game by tampering with the game's files?
RPG veteran
User avatar
eispfogel
Posts: 77
Joined: Thu Mar 21, 2013 9:51 am

Re: Is it possible to change a name/portrait

Post by eispfogel »

I was asking that myself and also opened a thread about that but sadly receives no other.

There has to be a console command for renaming the characters.
And for changing the avatars i guessed, that they have to have the same name as the ones you are using now. I guess they will overwrite the ones you are using now.
But i don't now the exact naming of all the avatars. I started over with new custom avatars, only to find out that i had an even better one...but starting all over again..no way.

It would be nice if someone could head us in the right direction on how this could be done.
Mr WILSOOOON look i MADE FIRE!
Thanks for the laugh Almost Human :)
User avatar
Isaac
Posts: 3192
Joined: Fri Mar 02, 2012 10:02 pm

Re: Is it possible to change a name/portrait

Post by Isaac »

It was possible to change the portrait in LoG1... and I do think it will be possible to do so in LoG2; but with more control over it... We'll have to wait until they release the scripting docs, or for one of the AH team to comment. I highly expect yes.
minmay
Posts: 2790
Joined: Mon Sep 23, 2013 2:24 am

Re: Is it possible to change a name/portrait

Post by minmay »

Characters' names and the locations of their portrait images are both embedded in save files. The save file format seems to just be a header followed by a stream of zlib data starting at offset 8; you can get it with something like this Python snippet:

Code: Select all

import zlib

data = open({Filename goes here}).read()
raw = zlib.decompress(data[8:])
You could then save that to a file, get a hex editor and search for your character's name or portrait filename (it'll be in plain ascii), change them, and recompress and append to the header. I haven't tried this myself, though. They might only be the names and portraits displayed on the "Load Game" screen, or you might need them to stay the same length.

(Thanks to ali1234)



...Alternatively you can just bring up the console and type "party.party:getChampion(4):setPortrait("assets/textures/portraits/minotaur_male_01.tga")" and "party.party:getChampion(4):setName("John")". But where's the fun in that?
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
User avatar
eispfogel
Posts: 77
Joined: Thu Mar 21, 2013 9:51 am

Re: Is it possible to change a name/portrait

Post by eispfogel »

Lol minmay! Yeah i will take the shorter route of just using the console. Thank you very much!


Tried it out now but it did not work :/
I changed the path like this: party.party:getChampion(1):setPortrait("portraits/xeximone_female.tga")
Of course i also tried the complete path you provided but the outcome is the same.

There is no error message when i press enter, but also the avatar does not change. This also happens with the path you provided.
Maybe that just works for internal avatars(which are stored in assets/textures/portraits) but not with custom ones?

Edit: I also copy pasted the command, closed the console, saved the game and restarted - no change.
ANother theory i had was that custom avatars in the portrait folder would override the original ones if they just have the same name. can you confirm this?
Mr WILSOOOON look i MADE FIRE!
Thanks for the laugh Almost Human :)
User avatar
Luj1
Posts: 168
Joined: Mon Jun 18, 2012 11:12 am
Location: Belgrade, Serbia

Re: Is it possible to change a name/portrait

Post by Luj1 »

minmay wrote: ...Alternatively you can just bring up the console and type "party.party:getChampion(4):setPortrait("assets/textures/portraits/minotaur_male_01.tga")" and "party.party:getChampion(4):setName("John")". But where's the fun in that?

I will try this tonight, thanks


Although we might need someone from AH to comment on this :D
RPG veteran
Post Reply