Advertisement
Civilization Fanatics' Center  

Go Back   Civilization Fanatics' Forums > CIVILIZATION V > Civ5 - Creation & Customization > Civ5 - Utility Programs

Reply
 
Thread Tools
Old Oct 07, 2010, 10:35 AM   #1
Sterkhov
Chieftain
 
Sterkhov's Avatar
 
Join Date: Oct 2010
Location: Russia
Posts: 11
DDS unpacker for interface textures

I made DDS unpacker.
It unpack some packed interface textures. These textures consist of two files (filename-index.dds and filename.dds). This utility creates filename.png from these files.
Attached Files
File Type: zip CivDdsUnpacker.zip (9.1 KB, 2308 views)
Sterkhov is offline   Reply With Quote
Old Oct 07, 2010, 01:14 PM   #2
Supercheese
Zeppelin Commander
 
Supercheese's Avatar
 
Join Date: Aug 2009
Location: Idaho
Posts: 378
Quote:
Originally Posted by Sterkhov View Post
I made DDS unpacker.
It unpack some packed interface textures. These textures consist of two files (filename-index.dds and filename.dds). This utility creates filename.png from these files.
You, sir, are awesome. May many cookies be bestowed upon you.
__________________
Currently playing: Star Trek Online, OpenTTD

Bring back rigid airships, the most awesome aircraft ever built by mankind!
Supercheese is offline   Reply With Quote
Old Oct 07, 2010, 05:13 PM   #3
Tabris
Chieftain
 
Join Date: Oct 2005
Posts: 98
Nice! Time for some serious modding.
Tabris is offline   Reply With Quote
Old Oct 07, 2010, 06:53 PM   #4
CyberChrist
You caught my attention
 
CyberChrist's Avatar
 
Join Date: Dec 2001
Location: The Matrix
Posts: 1,384
This program is working as advertised, but only for the contents of the DX9 dir.

EDIT: btw
__________________
CyberChrist

Last edited by CyberChrist; Oct 07, 2010 at 07:03 PM.
CyberChrist is offline   Reply With Quote
Old Oct 07, 2010, 07:09 PM   #5
CyberChrist
You caught my attention
 
CyberChrist's Avatar
 
Join Date: Dec 2001
Location: The Matrix
Posts: 1,384
Any chance you could make it unpack into the original DDS format instead of converting them to PNG? Would be nice to have the alpha channel data as well.
__________________
CyberChrist
CyberChrist is offline   Reply With Quote
Old Oct 08, 2010, 02:42 AM   #6
Sterkhov
Chieftain
 
Sterkhov's Avatar
 
Join Date: Oct 2010
Location: Russia
Posts: 11
Quote:
Originally Posted by CyberChrist View Post
This program is working as advertised, but only for the contents of the DX9 dir.
only DX9 dir contain UI packed textures.

Quote:
Originally Posted by CyberChrist View Post
Any chance you could make it unpack into the original DDS format instead of converting them to PNG? Would be nice to have the alpha channel data as well.
PNG has the alpha channel.

Last edited by Sterkhov; Oct 08, 2010 at 03:55 AM.
Sterkhov is offline   Reply With Quote
Old Oct 08, 2010, 07:52 PM   #7
CyberChrist
You caught my attention
 
CyberChrist's Avatar
 
Join Date: Dec 2001
Location: The Matrix
Posts: 1,384
There is no alpha channel in the PNGs your program creates - none that I can spot in Photoshop anyway.

EDIT: Ok, if I save them as DDS files and then reloads the file the alpha channel appears. Odd stuff.
__________________
CyberChrist

Last edited by CyberChrist; Oct 08, 2010 at 07:59 PM.
CyberChrist is offline   Reply With Quote
Old Oct 09, 2010, 01:45 PM   #8
RandomPete
Chieftain
 
Join Date: Oct 2010
Posts: 34
Quote:
Originally Posted by CyberChrist View Post
There is no alpha channel in the PNGs your program creates - none that I can spot in Photoshop anyway.
This is an oddity of how Photoshop opens PNG files. The transparency IS there - you can see by the fact that the underlying white/grey checkered background is visible. However it's treating them as transparent RGB pixels rather than a separate alpha channel.

See this thread for a variety of ways around this problem:
http://forums.cgsociety.org/archive/.../t-665136.html
RandomPete is offline   Reply With Quote
Old Oct 10, 2010, 03:07 PM   #9
smeagolheart
Monarch
 
smeagolheart's Avatar
 
Join Date: Sep 2007
Location: Phoenix, AZ
Posts: 924
Or dump photoshop and use theGimp
__________________
My Mods: Smeagolheart's Studio
including the Destiny Megamod
smeagolheart is offline   Reply With Quote
Old Oct 14, 2010, 12:06 PM   #10
NeverMind
Proud to be Russian
 
NeverMind's Avatar
 
Join Date: Apr 2005
Location: Moscow, Russia
Posts: 603
Cool! Спасибо, земляк!
NeverMind is offline   Reply With Quote
Old Nov 07, 2010, 09:16 AM   #11
Zyxpsilon
Running Spider
 
Zyxpsilon's Avatar
 
Join Date: Oct 2009
Location: On Earth
Posts: 2,356
Many thanks for this tiny "tool". It's puzzling to know that the official Firaxis ModTools package (re-Nexus) doesn't even give us such stuff.

I also believe you might need to contact Alexandre at Dragon-Unpacker to see if he could integrate your little prog into his own Civ-V FPK-files decoding process.
Zyxpsilon is offline   Reply With Quote
Old Nov 07, 2010, 10:01 AM   #12
lemmy101
Emperor
 
lemmy101's Avatar
 
Join Date: Apr 2006
Posts: 1,064
Sterkhov you are amazing!

Very nice!!!



Any chance you could make a version that supports command line arguments so I could incorporate support for loading up all the texture atlases in the tech tree editor? Like the user can set a path to it or something? Or put it in the same directory? Credit obviously will be provided.

Last edited by lemmy101; Nov 07, 2010 at 10:08 AM.
lemmy101 is offline   Reply With Quote
Old Nov 08, 2010, 09:32 AM   #13
Sterkhov
Chieftain
 
Sterkhov's Avatar
 
Join Date: Oct 2010
Location: Russia
Posts: 11
Quote:
Originally Posted by lemmy101 View Post
Sterkhov you are amazing!

Very nice!!!



Any chance you could make a version that supports command line arguments so I could incorporate support for loading up all the texture atlases in the tech tree editor? Like the user can set a path to it or something? Or put it in the same directory? Credit obviously will be provided.
I can give you the source code and you'll be able to integrate this functionality into your project
Sterkhov is offline   Reply With Quote
Old Nov 08, 2010, 09:46 AM   #14
lemmy101
Emperor
 
lemmy101's Avatar
 
Join Date: Apr 2006
Posts: 1,064
aw well that's awesome of you

I already had a nose at the code in reflector so source code won't be be necessary, but I didn't want to diminish the use of your tool by incorporating it into mine. Entirely up to you though, obviously. We'd stick a credit on the (soon to be in) splash screen or we can call it separately if you'd prefer, I'm cool either way.
lemmy101 is offline   Reply With Quote
Old Dec 05, 2010, 08:57 AM   #15
alpaca
King of Ungulates
 
alpaca's Avatar
 
Join Date: Aug 2006
Posts: 2,164
Bump.

So is this tool meant to make the somehow run-length encoded DDS files readable?

It doesn't work for me, anyways, it starts, finishes but doesn't unpack anything and doesn't display an error
alpaca is offline   Reply With Quote
Old Dec 08, 2010, 02:34 PM   #16
Deep_Blue
Knight
 
Deep_Blue's Avatar
 
Join Date: Aug 2005
Posts: 750
Quote:
Originally Posted by alpaca View Post
It doesn't work for me, anyways, it starts, finishes but doesn't unpack anything and doesn't display an error
you have to unpack the fpk files (in resource folder) first using fpk unpackers in nexus script browser.
Deep_Blue is offline   Reply With Quote
Old Dec 08, 2010, 02:40 PM   #17
Deep_Blue
Knight
 
Deep_Blue's Avatar
 
Join Date: Aug 2005
Posts: 750
The question is how to use the generated png files for modding? there is no way to reverse the filename.png to filename-index.dds and filename.dds after modifying the graphics.
Deep_Blue is offline   Reply With Quote
Old Dec 08, 2010, 04:50 PM   #18
lemmy101
Emperor
 
lemmy101's Avatar
 
Join Date: Apr 2006
Posts: 1,064
Civ reads in normal DDS files. Just export using the NVidia DDS exporter plugin for Photoshop / GIMP or whatever and you're good to go.
lemmy101 is offline   Reply With Quote
Old Dec 09, 2010, 12:06 AM   #19
Deep_Blue
Knight
 
Deep_Blue's Avatar
 
Join Date: Aug 2005
Posts: 750
Quote:
Originally Posted by lemmy101 View Post
Civ reads in normal DDS files. Just export using the NVidia DDS exporter plugin for Photoshop / GIMP or whatever and you're good to go.
Nothing work for me. I modified a png file then saved as DDS then added the DDS file to my project but when I start the game old textures are loaded. I tried modifying icons like diplomacy icons, yield icons and worker action icons. it seems you need both filename.dds and filename-index.dds

If it works for you can you give me an example?
Deep_Blue is offline   Reply With Quote
Old Dec 09, 2010, 02:50 AM   #20
lemmy101
Emperor
 
lemmy101's Avatar
 
Join Date: Apr 2006
Posts: 1,064
We've added about 80 religion icons, several tech icons, unit icons, interface changes. Trust me it works.

However, mod DDS files don't get loaded on-top of core ones, so you can't replace icons like you can UI files, you can only make new ones. So to change an existing icon, you'll need to modify the XML of the appropriate UI or IconAtlas to point to a new DDS file. As such making new yield icons is impossible since they are part of the fonticons which is currently defined in non-moddable xml, so you can't redirect to a new one. I'm sure a patch will sort this out.

Though you could possibly add a new yield to the city screen etc by editing the XML / Lua to point to a new icon atlas, but you would never be able to reference that new yield in text (tooltips, top bar, etc) as other yields are since it's not part of the fonticons.

Also, what format of DDS are you saving out as? I use DXT5 and it works fine.

Last edited by lemmy101; Dec 09, 2010 at 03:02 AM.
lemmy101 is offline   Reply With Quote
Reply

Bookmarks

Go Back Civilization Fanatics' Forums > CIVILIZATION V > Civ5 - Creation & Customization > Civ5 - Utility Programs > DDS unpacker for interface textures

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Advertisement

All times are GMT -6. The time now is 10:45 AM.


Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
This site is copyright Civilization Fanatics' Center.
Support CFC: Amazon.com | Amazon UK | Amazon DE | Amazon CA | Amazon FR