How to read image files?

The place to discuss scripting and game modifications for X4: Foundations.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
User avatar
Outliver
Posts: 66
Joined: Thu, 25. Oct 18, 17:53
x4

How to read image files?

Post by Outliver » Wed, 27. Nov 19, 13:12

icons.xml

Code: Select all

<icon name="ware_advancedcomposites" texture="assets\fx\gui\textures\wares\ware_advancedcomposites.tga" height="128" width="128"></icon>
Those files are actually stored as gz files. What would be the proper way to read them? Not from within the game but from a graphics editing software or from an external script?

Thank you :)

User avatar
Axeface
Posts: 2944
Joined: Fri, 18. Nov 05, 00:41
x4

Re: How to read image files?

Post by Axeface » Wed, 27. Nov 19, 20:17

I extract the gz archive and then rename the file to .dds then use gimp.
No idea if thats what you are supposed to do, but it works. I've been doing the same in reverse to make mods that include textures or icons too.

Angsaar
Posts: 151
Joined: Thu, 7. Mar 19, 14:03
x4

Re: How to read image files?

Post by Angsaar » Thu, 28. Nov 19, 00:00

You don't strictly need to extract the gz or give it another extension to read/edit, just import directly into GIMP. But you do need to export as .dds with proper compression/mipmaps, remove the extension and then pack it back into the gz. I actually left GIMP as the default for executing gz's for the sake of convenience, only using the 7zip entry into the windows right-click context menu when I need to pack it back.

Edit: Another tip: if you need to find a texture you don't know the name for in a large number of textures try unpacking, mass-renaming to .dds with Bulk Rename tool or similar, grab WTV (a dds viwer) and set it as default .dds executable in Windows, you'll be able to see their thumbnails if you set the folder to big icons
Last edited by Angsaar on Thu, 28. Nov 19, 18:04, edited 2 times in total.

User avatar
Outliver
Posts: 66
Joined: Thu, 25. Oct 18, 17:53
x4

Re: How to read image files?

Post by Outliver » Thu, 28. Nov 19, 11:05

That's all I needed to know. Thank you guys :)

Post Reply

Return to “X4: Foundations - Scripts and Modding”