How do I use Champion:setPortrait(filename)

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
Lollgramoth
Posts: 35
Joined: Fri Jun 15, 2012 7:31 am
Location: Germany

How do I use Champion:setPortrait(filename)

Post 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."
User avatar
msyblade
Posts: 792
Joined: Fri Oct 12, 2012 4:40 am
Location: New Mexico, USA
Contact:

Re: How do I use Champion:setPortrait(filename)

Post 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.
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
User avatar
Grimwold
Posts: 511
Joined: Thu Sep 13, 2012 11:45 pm
Location: A Dungeon somewhere in the UK

Re: How do I use Champion:setPortrait(filename)

Post 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!!
User avatar
Grimwold
Posts: 511
Joined: Thu Sep 13, 2012 11:45 pm
Location: A Dungeon somewhere in the UK

Re: How do I use Champion:setPortrait(filename)

Post 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
Image
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: How do I use Champion:setPortrait(filename)

Post 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
Image
I like your friends, Grimwold ;)
"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
  • Message me to join in!
Lollgramoth
Posts: 35
Joined: Fri Jun 15, 2012 7:31 am
Location: Germany

Re: How do I use Champion:setPortrait(filename)

Post 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. :D

Works, works, works.
Post Reply