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."
How do I use Champion:setPortrait(filename)
-
- Posts: 35
- Joined: Fri Jun 15, 2012 7:31 am
- Location: Germany
Re: How do I use Champion:setPortrait(filename)
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.
Currently conspiring with many modders on the "Legends of the Northern Realms"project.
"You have been captured by a psychopathic diety who needs a new plaything to torture."
Hotel Hades
"You have been captured by a psychopathic diety who needs a new plaything to torture."
Hotel Hades
Re: How do I use Champion:setPortrait(filename)
Not 100% sure of this, but have you tried
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!!
Code: Select all
party:getChampion(1):setPortrait("mod_assets/portraits/myPortrait.tga")
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!!
Puzzle Frameworks - http://www.grimrock.net/forum/viewtopic.php?f=14&t=4564
Magic Pack - https://www.nexusmods.com/grimrock/mods/70
Area of Effect Spell System - http://www.grimrock.net/forum/viewtopic ... 150#p44382
Magic Pack - https://www.nexusmods.com/grimrock/mods/70
Area of Effect Spell System - http://www.grimrock.net/forum/viewtopic ... 150#p44382
Re: How do I use Champion:setPortrait(filename)
Just tried this:
with a dwarvenWarrior.dds file I created in GIMP and it worked.
Here's a new party of champions with 4 new portraits

Code: Select all
party:getChampion(1):setPortrait("mod_assets/portraits/dwarvenWarrior.tga")
Here's a new party of champions with 4 new portraits

Puzzle Frameworks - http://www.grimrock.net/forum/viewtopic.php?f=14&t=4564
Magic Pack - https://www.nexusmods.com/grimrock/mods/70
Area of Effect Spell System - http://www.grimrock.net/forum/viewtopic ... 150#p44382
Magic Pack - https://www.nexusmods.com/grimrock/mods/70
Area of Effect Spell System - http://www.grimrock.net/forum/viewtopic ... 150#p44382
Re: How do I use Champion:setPortrait(filename)
I like your friends, GrimwoldGrimwold wrote:Just tried this:with a dwarvenWarrior.dds file I created in GIMP and it worked.Code: Select all
party:getChampion(1):setPortrait("mod_assets/portraits/dwarvenWarrior.tga")
Here's a new party of champions with 4 new portraits

"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
- Message me to join in!
-
- Posts: 35
- Joined: Fri Jun 15, 2012 7:31 am
- Location: Germany
Re: How do I use Champion:setPortrait(filename)
Exactly that is what I tried
Works, works, works.
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.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.

Works, works, works.