Editing textures

Hopefully these questions weren't asked many times before. I tried looking on this forum and elsewhere, but didn't find the answer.

When I browse the GFX folder I see three types of files:

 

.PNG files: Texture files. Very easy to edit with various photo editing programs

.DDS files: Texture files. I've been able to easily edit These with GIMP (after installing a plug-in)

.HKB files: 3D files with the textures added into them? I have been unable to open these with any program.

 

I have no ambition to edit the 3D assets in the game. However, I do want to re-texture a lot of the items (or rather: add new versions of them for items I invent myself). For example I didn't like that my custom faction had the Krax Spider on their bronze shields, so I created an alternative version with little effort.

Encouraged by that humble first success it got me exited to do more. But I quickly ran into an obstacle. For example I want to add a texture for one of the hats. I found the hat I was looking for in the folder: GFX\HKB\Hair\ K_Male_Hair_Flatcap_Mesh_01.hkb

When I look in the folder I do find the HKB file, but not a DDS or PNG file to edit the texture I am looking to change. Does that mean that the texture is included inside the HKB file and has no seperate texture file? If so, that would be a problem for me as I have no idea how to access those... :(

Does anyone know how to "extract" the textures from a HKB file and re-attach them later?

 

3,219 views 2 replies
Reply #1 Top

The texture reference has been inserted into the 3d model directly instead of the normal way. But the actual texture file is still outside the hkb file, a 3d model (they are never bundled like that).

In this case you can simply search for K_Male_Hair_Flatcap_Mesh_01.hkb in data/english/ inside the files and see how they attached a texture to the item.

             <GameItemTypeModel>
                    <ModelFile>Gfx\HKB\Hair\K_Male_Hair_Flatcap_Mesh_01.hkb</ModelFile>
                    <Texture_All>Gfx\HKB\Hair\K_Male_Hair_Texture_01.png</Texture_All>
                    <AttachmentType>Skinned</AttachmentType>
                </GameItemTypeModel>

 

 

 

 

In rare cases you will come across items that look like this

<GameItemTypeModel>
<ModelFile>kingdom_elite_chest_guard_A.hkb</ModelFile>
<Attachment>chest_center_lcf</Attachment>
/GameItemTypeModel>

in those cases you can fetch the texture reference from the file, open it in notepad and search for .png or something. This will give you the name of the file. Find it in the installation directory, make a copy of it, give it a new name. Then you can overwrite the default texture for that model by doing this

<GameItemTypeModel>
<ModelFile>kingdom_elite_chest_guard_A.hkb</ModelFile>
<Attachment>chest_center_lcf</Attachment>
<Texture_All>nameofyournewtexture.png</Texture_All>
</GameItemTypeModel>

Reply #2 Top

Ahh now I understand. I would have wasted a lot of time figuring this out myself. Thanks, Heavenfall!