Author Topic: Need help with PLT files  (Read 717 times)

Legacy_TheCapulet

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
Need help with PLT files
« on: February 07, 2011, 05:34:49 am »


               I'm trying to make some custom cloak overrides for my PW, but I'm convinced at this point that Satan himself created .PLT files, as a preview to hell.  

After trying all the half assed third party methods from the vault, I finally realized that there was a PLT plugin that joco made... Conveniently only for gimp. *downloads*  

Then after a bit more searching, I find this: 
http://nwn.bioware.c...168_cloaks.html

Well, I've seen that before, but never paid attention. Heh.  Now I read it, and it gives me a pretty good idea of what to do.  So I finally get my cloak the way I want it.  Then I try to export it from bioware's photoshop plugin... Nothing happens.  Can't figure that one out either... I suppose it just doesn't work with new photoshop variants.  (Figures)

So I use joco's plugin to save it to PLT instead.  Only problem is... There are hidious dark outlines over the images I added, that plain just weren't there in the PSD file.  

Can anyone offer a bit of advice please? '<img'> 
               
               

               
            

Legacy_Estelindis

  • Hero Member
  • *****
  • Posts: 935
  • Karma: +0/-0
Need help with PLT files
« Reply #1 on: February 07, 2011, 12:02:12 pm »


               PLT files are great once you're familiar with them, but many things about them are very tricky at first.  I think I have a fairly good guess of what happened to you, going from my own initial experiences.

PLT files do not support transparency of any kind.  If you edit a file using selections with fuzzy edges, then when you save the file the plugin will fill in any element of transparency in any pixel with solid black.  Accordingly, never use anti-aliasing or feathered edges when making selections, as they tend to leave ugly borders around selections (which you only see once you reopen the image after saving it).  If in doubt, sharpen your selection.

A few other facts about PLTs...  

Each and every pixel can only have image data in one layer.  Anything you paste into a higher layer will override what is in a lower layer.  Once you save, close, and reopen a file, anything you might have had in lower layers that was covered over by image data in a higher layer will simply be gone.

Most colours in the palette translate pure white (255, 255, 255) in a PLT as shiny chrome in the game.  In the case of some PLT objects, like clothing icons and cloaks with transparency enabled, this will make those pixels transparent.  Unfortunately, though, this doesn't work with body parts - and PLT Editor (the one that shows the various layers as different high-contrast colours) changes the values of some bright colours.  Namely, it turns the very brightest few colours in the Leather 2 layer (bright yellow) to white.  It also turns pure white to a colour just slightly darker (254, 254, 254), thus ruining the transparent background of clothing icons.

Anyway, enough of that for now.  I hope that helps.  Please feel free to ask any other questions if they occur to you.
               
               

               


                     Modifié par Estelindis, 07 février 2011 - 12:02 .
                     
                  


            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Need help with PLT files
« Reply #2 on: February 07, 2011, 01:33:57 pm »


               not sure if this (http://nwvault.ign.c...r.Detail&id=407)  editor will help you with cloaks since they can be different, but I found this tool perfect for work on heads.
               
               

               
            

Legacy_TheCapulet

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
Need help with PLT files
« Reply #3 on: February 07, 2011, 04:27:37 pm »


               

Estelindis wrote...

PLT files are great once you're familiar with them, but many things about them are very tricky at first.  I think I have a fairly good guess of what happened to you, going from my own initial experiences.

PLT files do not support transparency of any kind.  If you edit a file using selections with fuzzy edges, then when you save the file the plugin will fill in any element of transparency in any pixel with solid black.  Accordingly, never use anti-aliasing or feathered edges when making selections, as they tend to leave ugly borders around selections (which you only see once you reopen the image after saving it).  If in doubt, sharpen your selection.

A few other facts about PLTs...  

Each and every pixel can only have image data in one layer.  Anything you paste into a higher layer will override what is in a lower layer.  Once you save, close, and reopen a file, anything you might have had in lower layers that was covered over by image data in a higher layer will simply be gone.

Most colours in the palette translate pure white (255, 255, 255) in a PLT as shiny chrome in the game.  In the case of some PLT objects, like clothing icons and cloaks with transparency enabled, this will make those pixels transparent.  Unfortunately, though, this doesn't work with body parts - and PLT Editor (the one that shows the various layers as different high-contrast colours) changes the values of some bright colours.  Namely, it turns the very brightest few colours in the Leather 2 layer (bright yellow) to white.  It also turns pure white to a colour just slightly darker (254, 254, 254), thus ruining the transparent background of clothing icons.

Anyway, enough of that for now.  I hope that helps.  Please feel free to ask any other questions if they occur to you.


Thanks, this actually helped me understand the problem.  What I ended up doing was blowing the image up to 3000x3000 rez to work with my images, which let me be a lot more precise, then downsized everything after everything was placed.  It didn't turn out absolutely perfect, but at this point, I don't expect it to anymore.  

One issue I'm having trouble with now is actually getting the overrides to work.  Heh.  I can override default bioware PLT textures just fine.  And I can override both  bioware and CEP .TGA images without a problem.  But I can't seem to get my CEP PLT textures to override.  

Is this common?
               
               

               
            

Legacy_Estelindis

  • Hero Member
  • *****
  • Posts: 935
  • Karma: +0/-0
Need help with PLT files
« Reply #4 on: February 07, 2011, 04:42:27 pm »


               As I'm sure you've gathered, the interpolation when magnifying the image would have caused your black line issue.  If I were you, I'd just work at high zoom.  If you do, then there's really no reason inherit to PLTs for you to expect it to turn out badly.



I'm not entirely sure what you mean about the CEP PLT textures not overriding.  You don't mean that you're expecting an override resource to take priority over a hak resource, do you?  Because hak always takes priority over override (which itself takes priority over the base, unhacked game).  If you simply mean that you extracted PLTs from the CEP and put them in your override, but they don't show up in the base game, then I'm not sure what the problem might be.  Could you post some more details?
               
               

               
            

Legacy_Calvinthesneak

  • Hero Member
  • *****
  • Posts: 1159
  • Karma: +0/-0
Need help with PLT files
« Reply #5 on: February 07, 2011, 06:01:40 pm »


               I know what the problem is, it is haks override the override directory.  In order to make the plt's work to overwrite the CEP info, you'd have to put them in a hak with higher precedence than the CEP files.  Estelendis has the right of your problem.
               
               

               
            

Legacy_TheCapulet

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
Need help with PLT files
« Reply #6 on: February 07, 2011, 06:38:49 pm »


               Ahh, didn't know that.  But in that case, how come I can override other CEP textures without a problem?

I've overridden nearly all of the CEP flags and banners, as well as some floor coverings.  Then some textures on the nwn2 placable buildings, and some CEP tileset textures for good measure, and they all appear perfectly overridden in game.  
               
               

               


                     Modifié par TheCapulet, 07 février 2011 - 06:43 .
                     
                  


            

Legacy_Bannor Bloodfist

  • Hero Member
  • *****
  • Posts: 1578
  • Karma: +0/-0
Need help with PLT files
« Reply #7 on: February 07, 2011, 09:16:13 pm »


               Textures are funny things.  There are 3 different versions of a texture possible.  .DDS, .TGA and .PLT.  From my understanding, if the object in question ONLY has tga textures created, then you can override them via the override folder.  If however, the object in question uses a texture that has a DDS or PLT version somewhere in hak resources, you can NOT override it without placing that texture in a hak that is higher in the hak list.



The override system was grunged to allow Persistant World folks protection from players that would hack (meaning cheats etc) them.  Thus the override was moved from highest priority down to 2nd level, putting .HAK resources as the highest priority.  Since a server controls the hak system on a Persistent World, it doesn't matter what a player may do with the haks on his/her own computer, as it will NOT affect the PW in question.



There are many bits of the game engine that have been modified since the game was first released.  So there are bits of code that take over in different instances etc... the texture controls were modified, at roughly the same point in time that the \\override folder handling was changed.  I believe it is either DDS, PLT, then TGA or PLT, DDS, then TGA.  If the game finds a DDS, it will load it regardless of what is in override.  The same with PLT.  The only way to get YOUR modified version of a DDS texture OR PLT texture to be used in priority is to place it into a hak with the highest priority in the module.



IF there is only a .TGA in game resources (base game, .bifs, or patched data) then your override version of that TGA will work.  But, if there is a DDS version of that texture, by the same name as the .TGA, then placing a TGA in your override does not always work, and typically is not supposed to work.  You have to 1) match the texture type and name, 2) ensure that only one version exists (IE not all 3) in base game resources OR create a modified version of all 3 types and place into override, and 3) ensure that the texture in question is not also located somewhere in the hak resources of the mod.  



Not all artists create all versions of a texture, PLT's are special cases, and typically would NOT be created for everything.  Many haks on the vault only have the TGA texture or only the DDS.  Most folks can use DDS with no issues, although the older systems out there are not capable of displaying DDS at all or require updated OR backdated vid Drivers.



Anyway, to repeat for the third or fourth time, DDS takes priority, then PLT, then TGA.  If a given texture has a DDS in general game resources, and you place a TGA in your override, typically the DDS will be what is actually used/seen.  Same with PLT vs TGA.  If your mod has haks, and any of the haks has ANY version of the texture (same name, different extension) residing in the hak, then nothing from your override folder will replace it.



Sorry for all the re-statements, but sometimes the different wording makes more sense to folks.
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Need help with PLT files
« Reply #8 on: February 07, 2011, 09:29:10 pm »


               Interesting, Mr Bloodfist. Thanks for the explanation.
               
               

               
            

Legacy_TheCapulet

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
Need help with PLT files
« Reply #9 on: February 07, 2011, 10:07:58 pm »


               

henesua wrote...

Interesting, Mr Bloodfist. Thanks for the explanation.


Agreed.  That says it perfectly.  Thanks. 
               
               

               
            

Legacy_Estelindis

  • Hero Member
  • *****
  • Posts: 935
  • Karma: +0/-0
Need help with PLT files
« Reply #10 on: February 10, 2011, 11:04:29 am »


               Thanks indeed, Bannor.  :-)  I'm sorry I couldn't come back and see this earlier, because I'd just found out for myself PLTs won't override standard resources at all while testing a new head.  :-/  I guess this also explains some issues I was having with override versions of the KotOR heads - they were using helmet textures, which are inexplicably titled as head textures.  Bah.  Now to fix the problem...
               
               

               
            

Legacy_OldMansBeard

  • Full Member
  • ***
  • Posts: 245
  • Karma: +0/-0
Need help with PLT files
« Reply #11 on: February 10, 2011, 11:37:40 am »


               It's because of texture packs. They get erf'ed in after the module is loaded, long after core and override have been done and supplant anything underneath. Except that, whilst the hi-res plt's for the OC are in Textures_Tpa.erf, so any versions in override are ignored, the additional ones from XP1 & XP2 are in the bif's and you can override them.



Fortunately, we can always rely on "top-most hak still wins, regardless".
               
               

               
            

Legacy_Estelindis

  • Hero Member
  • *****
  • Posts: 935
  • Karma: +0/-0
Need help with PLT files
« Reply #12 on: February 12, 2011, 04:35:12 pm »


               Thank you for the explanation, OMB!  You are a mine of information.  :-)  It's always good to understand why these things work as they do.
               
               

               
            

Legacy_Jedijax

  • Hero Member
  • *****
  • Posts: 692
  • Karma: +0/-0
Need help with PLT files
« Reply #13 on: February 13, 2011, 07:53:17 am »


               Well, when it comes to textures that just won't play nice, wether they be PLT's, DDA's or TGA's, I've found "replace" is a good option. Override submits to both HAK and Texture Pack (Erf). So, if you really can't get that pesky texture to work, you can always delete it from the hak or the erf. It may seem radical, but as long as you backup the original file, you can make all kinds of experimentation.

Some guys go as far as to replace BIF features and re-pack the whole thing! Such is a little too adventurous for an old guy like me, but, whatever floats your boat!
               
               

               


                     Modifié par Jedijax, 13 février 2011 - 07:53 .