Author Topic: Trying to make a custom portrait Hakpak...  (Read 459 times)

Legacy_Verilazic

  • Sr. Member
  • ****
  • Posts: 263
  • Karma: +0/-0
Trying to make a custom portrait Hakpak...
« on: August 18, 2014, 02:20:52 am »


               

What am I doing wrong?


 


I put together a hakpak with a bunch of new portraits in it, complete with a modified portraits.2da. Since i'm combining it with Project Q, I started at a very high 2da line, then entered sex, race, and BaseResRef, without the size letter at the end. I left the inanimate type and plot columns blank or at 0 for every portrait. But when I tried to make an npc with one of the new portraits, I couldn't find them anywhere. I even tried going through without race or sex set in the toolset, and I still couldn't find them.


 


I did some searching, and found that maybe the portraits need to have "po_" at the front of every file name, but not in the 2da file. So I tried that, but the portraits I tested that on still didn't show up.


 


Please, does anyone have any idea what I could be missing? I hate messing around with hakpak files. '<img'>



               
               

               
            

Legacy_Proleric

  • Hero Member
  • *****
  • Posts: 1750
  • Karma: +0/-0
Trying to make a custom portrait Hakpak...
« Reply #1 on: August 18, 2014, 08:33:37 am »


               

First thing to check is that your hak is higher priority than any others in the module properties, and contains your custom 2da.


 


The portraits.2da should look something like this (where dots stand for the rows you're adding to) :



2DA V2.0
        BaseResRef      Sex     Race    InanimateType    Plot    LowGore
:
:
4111    trollop_        1       6       ****             1       ****
4112    uncle_toby_     0       6       ****             1       ****
4113    vampirebh_      0       6       ****             1       ****
4114    zavazuma_       0       6       ****             1       ****
4115    cat_bobtail_    1       6       ****             1       ****
4116    guzzle_         0       6       ****             1       ****
4117    panda_wiles_    1       6       ****             1       ****
4118    cclaw_l_        0       7       ****             1       ****
4119    cclaw_          0       7       ****             1       ****
4120    COTBL_          0      15       ****             1       ****
4121    gremlin_        0      12       ****             1       ****
4122    zk_             0      24       ****             1       ****
4123    ravenna_        1       6       ****             0       ****

Best practice is to pad the 2da (i.e. no gaps in the line numbers), though I understand that only affects scripts that reference line numbers.


 


The plot flag is set for those playable race portraits that you don't want to see at character creation.


 


You'll need a set of tga files in 24 bit format for each portrait. For example, for uncle_toby_, the largest one will be named po_uncle_toby_h.tga. This must be 256 x 512 pixels, but only the top 256 x 400 pixels is used in game. You need four more images, each half the size of the one before, suffixed _l, _m, _s and _t respectively. The suffixes stand for huge, large, medium, small and tiny. You can omit the "huge" image if the portrait is not for PCs, and the "large" image if it is not for henchmen / companions / summoned creatures, but the other three must be present.


 


Hope this isn't motherhood, but any tiny deviation from the above cookbook results in failure, I find.



               
               

               
            

Legacy_Verilazic

  • Sr. Member
  • ****
  • Posts: 263
  • Karma: +0/-0
Trying to make a custom portrait Hakpak...
« Reply #2 on: August 20, 2014, 05:47:53 am »


               

Thanks, always good to check all the details. I padded the 2da a lot, and got the file names correct. The pixel count is correct, and I have 3-5 images for every portrait. The only thing I'm not 100% sure on is whether the files are 24-bit or not... Seems like they should be, since they work when I place them in my portraits folder. They just don't seem to work inside a hakpak. >'<img'>



               
               

               
            

Legacy_Proleric

  • Hero Member
  • *****
  • Posts: 1750
  • Karma: +0/-0
Trying to make a custom portrait Hakpak...
« Reply #3 on: August 20, 2014, 08:24:19 am »


               

Easy to check. In Photoshop, for example, Save As .tga will tell you the current bit setting with the option to change it. There are lots of free .tga viewers out there, too.



               
               

               
            

Legacy_Tarot Redhand

  • Hero Member
  • *****
  • Posts: 4165
  • Karma: +0/-0
Trying to make a custom portrait Hakpak...
« Reply #4 on: August 20, 2014, 02:23:40 pm »


               

The little thing that worries me is that you say each portrait has from 3 to 5 images. Surely you need 5 image files of the correct size for each portrait?


 


TR



               
               

               
            

Legacy_Verilazic

  • Sr. Member
  • ****
  • Posts: 263
  • Karma: +0/-0
Trying to make a custom portrait Hakpak...
« Reply #5 on: August 20, 2014, 03:35:30 pm »


               


The little thing that worries me is that you say each portrait has from 3 to 5 images. Surely you need 5 image files of the correct size for each portrait?


 


TR




 


Sorry, i'm being careless with my words. Regardless of whether it's necessary or not, every single portrait that I'm using has 5 images, each of the correct dimensions for the suffix it's paired with. The portrait that I tested in my portraits folder displayed correctly, but at the same time that I could use it, I was unable to use the version of it that was in the hakpak to create a new character in the module using that hakpak (in fact, all of those portraits showed up as blank/white in the character creation screen). This leads me to believe that there is only something wrong with how I set up portraits.2da?


               
               

               
            

Legacy_Verilazic

  • Sr. Member
  • ****
  • Posts: 263
  • Karma: +0/-0
Trying to make a custom portrait Hakpak...
« Reply #6 on: August 20, 2014, 05:37:56 pm »


               

Hm, I think I figured it out. I was leaving off "po_" from the beginning of the files, and for some reason the first test I did to check if that was the problem still didn't work, so I assumed it was something else.... confusing. =/ Thanks for the help guys.