Page 1 of 1
How do I use Champion:setPortrait(filename)
Posted: Wed Oct 17, 2012 9:09 am
by Lollgramoth
Hello everyone.
I was wandering how to use custom Portraits with the Champion:setPortrait(filename) function. I tried but I didn't get it to work. Have any other problems with that or did anyone used this function successful'? I need a hint, besides: "Sets the image file to be used as champion’s portrait. The portrait must be a valid TGA file of size 128*128 pixels. The file must be located in “mod_assets” folder or contained in the base game archive."
Re: How do I use Champion:setPortrait(filename)
Posted: Wed Oct 17, 2012 3:59 pm
by msyblade
I'm not clear on what function difference you're trying to achieve so you may know this already. Place your portraits in mydocuments\Almost Human\Legend of Grimrock\Portraits and they will be available to choose in create party - import portrait, in game.
Re: How do I use Champion:setPortrait(filename)
Posted: Wed Oct 17, 2012 4:24 pm
by Grimwold
Not 100% sure of this, but have you tried
Code: Select all
party:getChampion(1):setPortrait("mod_assets/portraits/myPortrait.tga")
Also, per the discussion here -
viewtopic.php?f=14&t=3260
you need to save your custom portrait in
DDS format and call it myPortrait
.dds
even though in the script you call it myPortrait.tga!!
Re: How do I use Champion:setPortrait(filename)
Posted: Wed Oct 17, 2012 4:33 pm
by Grimwold
Just tried this:
Code: Select all
party:getChampion(1):setPortrait("mod_assets/portraits/dwarvenWarrior.tga")
with a dwarvenWarrior.dds file I created in GIMP and it worked.
Here's a new party of champions with 4 new portraits

Re: How do I use Champion:setPortrait(filename)
Posted: Wed Oct 17, 2012 11:15 pm
by Neikun
Grimwold wrote:Just tried this:
Code: Select all
party:getChampion(1):setPortrait("mod_assets/portraits/dwarvenWarrior.tga")
with a dwarvenWarrior.dds file I created in GIMP and it worked.
Here's a new party of champions with 4 new portraits

I like your friends, Grimwold

Re: How do I use Champion:setPortrait(filename)
Posted: Thu Oct 18, 2012 9:44 am
by Lollgramoth
Exactly that is what I tried
Grimwold wrote:Just tried this:
CODE: SELECT ALL
party:getChampion(1):setPortrait("mod_assets/portraits/dwarvenWarrior.tga")
with a dwarvenWarrior.dds file I created in GIMP and it worked.
Yes, it works. I didn't get to save it as a .dds and call it as a .tga! It works. Thank you very much. Maybe I did compression or something funny ... it seems I need to use the default settings and leave the settings alone in order to get it work. Thanks very much.
Works, works, works.