Did you know? Xentax started the Unepic SID Channel, that brings the latest music composed for the SID chip! Support us by listening and subscribing! Over 50.000 songs already there!

The Witcher 3 Wild Hunt (*.cache*.bundle)

The Original Forum. Game archives, full of resources. How to open them? Get help here.
hhrhhr
advanced
Posts: 61
Joined: Thu Mar 18, 2010 7:02 am
Has thanked: 1 time
Been thanked: 18 times

Re: The Witcher 3 Wild Hunt (*.cache*.bundle)

Post by hhrhhr » Sat May 16, 2015 3:34 am

almost all .xbm files contain only a small preview image. the rest textures are in content?\texture.cache.
here are a couple of scripts to extract the data — https://github.com/hhrhhr/Lua-utils-for-Witcher-3 , needed Lua 5.3 and lua-zlib.

some maps from game (extracted, merged from tiles, cropped and optimized):
Image

stalja
beginner
Posts: 32
Joined: Sat Sep 12, 2009 11:33 am
Has thanked: 10 times
Been thanked: 5 times

Re: The Witcher 3 Wild Hunt (*.cache*.bundle)

Post by stalja » Mon May 18, 2015 11:57 pm

String files came with the release of the game. Anyone has any info on how to approach the new w3strings format?

dubh
n00b
Posts: 13
Joined: Mon May 23, 2011 9:34 am
Been thanked: 1 time

Re: The Witcher 3 Wild Hunt (*.cache*.bundle)

Post by dubh » Tue May 19, 2015 12:54 am

The .redscripts format is also different from the .w2scripts format.

edit: Someone make a repacker for .bundle files please.

designgears
ultra-n00b
Posts: 8
Joined: Wed Apr 30, 2014 9:34 pm
Has thanked: 2 times

Re: The Witcher 3 Wild Hunt (*.cache*.bundle)

Post by designgears » Tue May 19, 2015 8:36 pm

hhrhhr wrote:almost all .xbm files contain only a small preview image. the rest textures are in content?\texture.cache.
here are a couple of scripts to extract the data — https://github.com/hhrhhr/Lua-utils-for-Witcher-3 , needed Lua 5.3 and lua-zlib.

some maps from game (extracted, merged from tiles, cropped and optimized):
Image
Getting an error when I try to unpack.

Code: Select all

lua: ./mod_dds_header.lua:25: bad argument #2 to 'unpack' (data string too short)
stack traceback:
	[C]: in function 'string.unpack'
	./mod_dds_header.lua:25: in local 'MAKEFOURCC'
	./mod_dds_header.lua:28: in main chunk
	[C]: in function 'require'
	./unpack_textures.lua:3: in main chunk
	[C]: in ?

hhrhhr
advanced
Posts: 61
Joined: Thu Mar 18, 2010 7:02 am
Has thanked: 1 time
Been thanked: 18 times

Re: The Witcher 3 Wild Hunt (*.cache*.bundle)

Post by hhrhhr » Tue May 19, 2015 8:50 pm

stalja wrote:String files came with the release of the game. Anyone has any info on how to approach the new w3strings format?
I think that the files are very simple, but the contents is just xor-ed. look at any br.w3strings, inside there is almost clean text (UTF16 with some html tags).
designgears wrote:Getting an error when I try to unpack.
full command line?

designgears
ultra-n00b
Posts: 8
Joined: Wed Apr 30, 2014 9:34 pm
Has thanked: 2 times

Re: The Witcher 3 Wild Hunt (*.cache*.bundle)

Post by designgears » Tue May 19, 2015 8:56 pm

hhrhhr wrote:
designgears wrote:Getting an error when I try to unpack.
full command line?
lua ./unpack_textures.lua texture.cache unpack

hhrhhr
advanced
Posts: 61
Joined: Thu Mar 18, 2010 7:02 am
Has thanked: 1 time
Been thanked: 18 times

Re: The Witcher 3 Wild Hunt (*.cache*.bundle)

Post by hhrhhr » Tue May 19, 2015 9:24 pm

I think that you are using the wrong Lua. try to test:

Code: Select all

> lua -e "print(_VERSION)"
Lua 5.3
> lua -e "print(string.unpack('<L', '\xD2\x02\x96\x49'))"
1234567890      5

designgears
ultra-n00b
Posts: 8
Joined: Wed Apr 30, 2014 9:34 pm
Has thanked: 2 times

Re: The Witcher 3 Wild Hunt (*.cache*.bundle)

Post by designgears » Tue May 19, 2015 9:33 pm

hhrhhr wrote:I think that you are using the wrong Lua. try to test:

Code: Select all

> lua -e "print(_VERSION)"
Lua 5.3
> lua -e "print(string.unpack('<L', '\xD2\x02\x96\x49'))"
1234567890      5
Odd, I have 5.3 installed. I get the same error with your test.

hhrhhr
advanced
Posts: 61
Joined: Thu Mar 18, 2010 7:02 am
Has thanked: 1 time
Been thanked: 18 times

Re: The Witcher 3 Wild Hunt (*.cache*.bundle)

Post by hhrhhr » Tue May 19, 2015 10:08 pm

"<L " means "native sized little endian unsigned long". maybe you are using a big endian or/and 16-bit platform?

let's try one byte:

Code: Select all

lua -e "print(string.unpack('B', '\xFF'))
255     2

designgears
ultra-n00b
Posts: 8
Joined: Wed Apr 30, 2014 9:34 pm
Has thanked: 2 times

Re: The Witcher 3 Wild Hunt (*.cache*.bundle)

Post by designgears » Tue May 19, 2015 10:48 pm

hhrhhr wrote:"<L " means "native sized little endian unsigned long". maybe you are using a big endian or/and 16-bit platform?

let's try one byte:

Code: Select all

lua -e "print(string.unpack('B', '\xFF'))
255     2
That works.

I am running Fedora 64bit on virtualbox.

hhrhhr
advanced
Posts: 61
Joined: Thu Mar 18, 2010 7:02 am
Has thanked: 1 time
Been thanked: 18 times

Re: The Witcher 3 Wild Hunt (*.cache*.bundle)

Post by hhrhhr » Tue May 19, 2015 11:01 pm

I can only advise to try all conversion options from here (http://www.lua.org/manual/5.3/manual.html#6.4.2) with string "DXT1", for example, find inoperative and inform maintainer of lua package.

designgears
ultra-n00b
Posts: 8
Joined: Wed Apr 30, 2014 9:34 pm
Has thanked: 2 times

Re: The Witcher 3 Wild Hunt (*.cache*.bundle)

Post by designgears » Wed May 20, 2015 1:38 am

hhrhhr wrote:I can only advise to try all conversion options from here (http://www.lua.org/manual/5.3/manual.html#6.4.2) with string "DXT1", for example, find inoperative and inform maintainer of lua package.
Well, it even fails on their demo page.

http://www.lua.org/cgi-bin/demo

Very annoying.

hhrhhr
advanced
Posts: 61
Joined: Thu Mar 18, 2010 7:02 am
Has thanked: 1 time
Been thanked: 18 times

Re: The Witcher 3 Wild Hunt (*.cache*.bundle)

Post by hhrhhr » Wed May 20, 2015 2:04 am

use "<I4" instead of "<L".

> I[n]: an unsigned int with n bytes (default is native size)

designgears
ultra-n00b
Posts: 8
Joined: Wed Apr 30, 2014 9:34 pm
Has thanked: 2 times

Re: The Witcher 3 Wild Hunt (*.cache*.bundle)

Post by designgears » Wed May 20, 2015 2:10 am

hhrhhr wrote:use "<I4" instead of "<L".

> I[n]: an unsigned int with n bytes (default is native size)
Ahh, that seems to have done the trick!
Last edited by designgears on Wed May 20, 2015 3:09 am, edited 1 time in total.

designgears
ultra-n00b
Posts: 8
Joined: Wed Apr 30, 2014 9:34 pm
Has thanked: 2 times

Re: The Witcher 3 Wild Hunt (*.cache*.bundle)

Post by designgears » Wed May 20, 2015 3:08 am

hhrhhr wrote:use "<I4" instead of "<L".

> I[n]: an unsigned int with n bytes (default is native size)
This does work, but the files that come out aren't valid dds files.

edit---

Ahh, needed to change <L below too.

Post Reply