[Bug?] Custom Portraits - Champion:setPortrait()

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
User avatar
djoldgames
Posts: 107
Joined: Fri Mar 23, 2012 11:28 pm
Contact:

[Bug?] Custom Portraits - Champion:setPortrait()

Post by djoldgames »

Trying to set custom portrait for default party by function Champion:setPortrait(), brings the D3DError message if in parameter is TGA file (in my example is the path to your own portraits_background.tga, just for sure this is the valid TGA).

Image

When I convert portraits to DDS format (D3DFMT_A8R8G8B8 - uncompressed) as custom assets, there is no error, but in game portraits are Empty.
But in Scripting Reference is setPortrait() described for using TGA format...

Thank you for answer
User avatar
petri
Posts: 1917
Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland

Re: [Bug?] Custom Portraits - Champion:setPortrait()

Post by petri »

The scripts refer to texture assets as *.tga. The files themselves have to be in dds format and have the dds extension. The engine will substitute tga with dds in filenames on the fly. It is this way because that's how our internal asset pipeline works.

You are probably missing the alpha channel or the alpha channel is black in the dds file. Black alpha = transparent pixel.
Post Reply