Page 1 of 1

Runes of Magic DDS format?

Posted: Sat Jan 04, 2020 1:34 pm
by LightXPS
I've got some progress on Runes of Magic thanks to DKDave on the Discord, but it brought up a new problem:

When I try to open a texture file (they are saved in .dds format), GIMP throws me a double error that reads: "Invalid DDS file." as well as "Invalid DDS Header!" This happens with ANY texture file, so I've got no idea where I could find the cause for this problem... Can I?

The texture files are packed in a 7z file that can be found here. (It is a rather big file as I need certain textures for both genders on humans and elves...)

Any help is greatly appreciated!

Re: Runes of Magic DDS format?

Posted: Mon Jan 06, 2020 1:50 pm
by Apollo
It's pretty clear they have intentionally scrambled the files to prevent you having access.
The first layer is zlib compression but what the 2nd layer is supposed to be would need more figuring out whether its another compression layer or cipher.
Can't help further, maybe someone else has the time/expertise/interest to try various means to reverse engineer them.

Re: Runes of Magic DDS format?

Posted: Mon Jan 06, 2020 9:02 pm
by Acewell
they are lzma compressed, here is bms script to decompress to viewable dds files. :D

edit
*updated script to support zlib compressed files also*
RunesOfMagic_dds.zip

Re: Runes of Magic DDS format?

Posted: Thu Jan 30, 2020 9:13 am
by LightXPS
Acewell wrote: Mon Jan 06, 2020 9:02 pm they are lzma compressed, here is bms script to decompress to viewable dds files. :D

Code: Select all

# script for QuickBMS http://aluigi.altervista.org/quickbms.htm

comtype lzma_dynamic
get NAME basename
get EXT extension
string NAME + _decmp.
string NAME + EXT
goto 0x46
get SIZE long
get ZSIZE long
savepos OFFSET
clog NAME OFFSET ZSIZE SIZE
I keep running into a memory allocation problem or I get this error:

Code: Select all

12 clog NAME OFFSET ZSIZE SIZE
I think I found the problem:
Some of the texture files I extracted exceed the size of 1MB - and that script can't handle this size (it doesn't matter if I use the regular or the 4gb_files executable)... Skip them or fix the script?
Take for example the file hm_male_foot_02_leather100-001.dds and try decompressing it.

Re: Runes of Magic DDS format?

Posted: Thu Jan 30, 2020 3:19 pm
by Acewell
that file is zlib compressed instead of lzma, and it is headerless rgba32 when decompressed,
i will try to modify the script later to accomodate these best i can. :]
i might just put this into a Noesis python script later for fun. :D

edit: script updated in previous post