How change existing units textures?

Modding, Map Editor, IES Scripting and Other Questions
User avatar
Pabelos
Posts: 27
Joined: 24 Jan 2021, 13:35
Location: Poland

How change existing units textures?

Post by Pabelos »

Like in topic I come here to find out how to change existing units textures??? I found units textures in destination: zips\textures.zip\cache\texcache, and for example I want to edit samurai textures so I have two files for that: CIV1_Samurai_Japanese.texcache and CIV1_Samurai_Japanese_pc.texcache but I don't know how to edit them and pack back to these texcache format, plz help. Btw thank you Mona for how change unit icons tip, now I know how to do it ;)

User avatar
Dr.MonaLisa
High Representative
Posts: 8707
Joined: 17 Jun 2010, 11:21
Location: Poland
Has thanked: 49 times
Been thanked: 108 times

Re: How change existing units textures?

Post by Dr.MonaLisa »

I'm not sure if it would work for replacing textures, but first you need to export textcache to .tga or .dds format.

Please read: viewtopic.php?f=54&t=5086
And the link to: "NifSkope - Tool for 3D models in EE2": viewtopic.php?f=54&t=5097 (The Nifskope version that works the best with EE2).

After you open the .textcache file with Nifskope, click with the right mouse button on the first block (NiPixelData), and select Texture -> Export.
Screenshot 2021-01-27 182545.png
Screenshot 2021-01-27 182545.png (19.85 KiB) Viewed 1402 times
You can then save the exported texture to any folder inside "zips" folder. UP1.5 uses "textures_150" for it, but you can create another one not to get lost, for example: "textures_Pabelos".

Theoretically, the game should read new textures in the priority to textcache, but I don't know... Maybe I remember it wrongly.
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
User avatar
Pabelos
Posts: 27
Joined: 24 Jan 2021, 13:35
Location: Poland

Re: How change existing units textures?

Post by Pabelos »

Yes I have NifSkope, thank you very much for that advices I will try it next time ;) And btw plz in what file is saved info about what textures unit uses?? it will be very helpful when I create new textures ;)
User avatar
Dr.MonaLisa
High Representative
Posts: 8707
Joined: 17 Jun 2010, 11:21
Location: Poland
Has thanked: 49 times
Been thanked: 108 times

Re: How change existing units textures?

Post by Dr.MonaLisa »

In .ddf files inside "Units" folder in db.zip / db_155.zip. For AOS it's obviously different, but easy to figure out.
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
User avatar
Pabelos
Posts: 27
Joined: 24 Jan 2021, 13:35
Location: Poland

Re: How change existing units textures?

Post by Pabelos »

Hi Mona ;) Yesterday I eperiment a little bit and find out that in that .ddf files in "Units" folder in db.zip / db_155.zip theres no info about what textures unit uses so I came up with an idea that maybe its saved somewhere in nifcache file (unit model file) and answer is: YES!!!! :)

Heres some steps what need to do:
1.Open your desire unit model, for example samurai in NifSkope and click on 0 NiNode:
1.png
1.png (71.68 KiB) Viewed 1390 times
2.Click on 3 NiLODNode:
2.png
2.png (72.78 KiB) Viewed 1390 times
3.Than I click on 4 NiTriShape and scroll down a little bit:
3.png
3.png (75.06 KiB) Viewed 1390 times
4.Last click on 6 NiTexturingProperty and u will see what texture that model uses its CIV1_Samurai_Japanese.tga:
4.png
4.png (81.21 KiB) Viewed 1390 times
And I extracted that texture from of course CIV1_Samurai_Japanese_pc.texcache and CIV1_Samurai_Japanese.texcache and modify them a little bit, saved as tga by help of Paint.net software and place them in: zips\textures_150 and after that I deleted that .texcache files from zips\textures.zip\cache\texcache and voila it works, as a proof here some screen from gameplay with changed samurai mask by me:
EE2X_ScreenShot_2021-01-28_12.12.43.739.jpg
EE2X_ScreenShot_2021-01-28_12.12.43.739.jpg (237.74 KiB) Viewed 1390 times
And of course my test textures:
CIV1_Samurai_Japanese.rar
(161.25 KiB) Downloaded 98 times
Btw thx Mona for your help and I look forward to further cooperation ;)
Last edited by Pabelos on 28 Jan 2021, 21:15, edited 1 time in total.
User avatar
Dr.MonaLisa
High Representative
Posts: 8707
Joined: 17 Jun 2010, 11:21
Location: Poland
Has thanked: 49 times
Been thanked: 108 times

Re: How change existing units textures?

Post by Dr.MonaLisa »

Did you read RGV's guide about units adding? viewtopic.php?p=19613#p19613
Might be very helpful for new modders.
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
User avatar
Pabelos
Posts: 27
Joined: 24 Jan 2021, 13:35
Location: Poland

Re: How change existing units textures?

Post by Pabelos »

Thank you very much and btw now I know how to change textures of existing units. Texture name that is used by unit is included in nifcache file ;) Thx again Mona I will study that in free time.
User avatar
Dr.MonaLisa
High Representative
Posts: 8707
Joined: 17 Jun 2010, 11:21
Location: Poland
Has thanked: 49 times
Been thanked: 108 times

Re: How change existing units textures?

Post by Dr.MonaLisa »

No problem. Glad that it worked.

By the way, I don't think you need to update .nif files. I think .tga / .dds textures with the same name would be read in priority from zips/some_folder.
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
User avatar
Pabelos
Posts: 27
Joined: 24 Jan 2021, 13:35
Location: Poland

Re: How change existing units textures?

Post by Pabelos »

Yes you have right there's no need to update nif file, Im just use it in NifSkope to know whats textures name it using for model and Im created the textures(extracted from files: CIV1_Samurai_Japanese_pc.texcache & CIV1_Samurai_Japanese.texcache and edit samurai mask) with thats .tga extension and copy that to zips\textures_150 and delete from textures.zip that files: CIV1_Samurai_Japanese_pc.texcache and CIV1_Samurai_Japanese.texcache :)
User avatar
Dr.MonaLisa
High Representative
Posts: 8707
Joined: 17 Jun 2010, 11:21
Location: Poland
Has thanked: 49 times
Been thanked: 108 times

Re: How change existing units textures?

Post by Dr.MonaLisa »

No need to delete from textures.zip (I think). The game will ignore it, if it exists in folder textures_150. You might also like to use different folder name than textures_150 not to get confused with your own modifications.
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
Post Reply

Return to “Questions”