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):
Important information: this site is currently scheduled to go offline indefinitely by end of the year.
The Witcher 3 Wild Hunt (*.cache*.bundle)
Re: The Witcher 3 Wild Hunt (*.cache*.bundle)
The .redscripts format is also different from the .w2scripts format.
edit: Someone make a repacker for .bundle files please.
edit: Someone make a repacker for .bundle files please.
-
- ultra-n00b
- Posts: 8
- Joined: Wed Apr 30, 2014 9:34 pm
- Has thanked: 2 times
Re: The Witcher 3 Wild Hunt (*.cache*.bundle)
Getting an error when I try to unpack.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):
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 ?
-
- advanced
- Posts: 62
- Joined: Thu Mar 18, 2010 7:02 am
- Has thanked: 1 time
- Been thanked: 20 times
Re: The Witcher 3 Wild Hunt (*.cache*.bundle)
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).stalja wrote:String files came with the release of the game. Anyone has any info on how to approach the new w3strings format?
full command line?designgears wrote:Getting an error when I try to unpack.
-
- ultra-n00b
- Posts: 8
- Joined: Wed Apr 30, 2014 9:34 pm
- Has thanked: 2 times
Re: The Witcher 3 Wild Hunt (*.cache*.bundle)
lua ./unpack_textures.lua texture.cache unpackhhrhhr wrote:full command line?designgears wrote:Getting an error when I try to unpack.
-
- advanced
- Posts: 62
- Joined: Thu Mar 18, 2010 7:02 am
- Has thanked: 1 time
- Been thanked: 20 times
Re: The Witcher 3 Wild Hunt (*.cache*.bundle)
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
-
- ultra-n00b
- Posts: 8
- Joined: Wed Apr 30, 2014 9:34 pm
- Has thanked: 2 times
Re: The Witcher 3 Wild Hunt (*.cache*.bundle)
Odd, I have 5.3 installed. I get the same error with your test.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
-
- advanced
- Posts: 62
- Joined: Thu Mar 18, 2010 7:02 am
- Has thanked: 1 time
- Been thanked: 20 times
Re: The Witcher 3 Wild Hunt (*.cache*.bundle)
"<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:
let's try one byte:
Code: Select all
lua -e "print(string.unpack('B', '\xFF'))
255 2
-
- ultra-n00b
- Posts: 8
- Joined: Wed Apr 30, 2014 9:34 pm
- Has thanked: 2 times
Re: The Witcher 3 Wild Hunt (*.cache*.bundle)
That works.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
I am running Fedora 64bit on virtualbox.
-
- advanced
- Posts: 62
- Joined: Thu Mar 18, 2010 7:02 am
- Has thanked: 1 time
- Been thanked: 20 times
Re: The Witcher 3 Wild Hunt (*.cache*.bundle)
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.
-
- ultra-n00b
- Posts: 8
- Joined: Wed Apr 30, 2014 9:34 pm
- Has thanked: 2 times
Re: The Witcher 3 Wild Hunt (*.cache*.bundle)
Well, it even fails on their demo page.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.
http://www.lua.org/cgi-bin/demo
Very annoying.
-
- ultra-n00b
- Posts: 8
- Joined: Wed Apr 30, 2014 9:34 pm
- Has thanked: 2 times
Re: The Witcher 3 Wild Hunt (*.cache*.bundle)
Ahh, that seems to have done the trick!hhrhhr wrote:use "<I4" instead of "<L".
> I[n]: an unsigned int with n bytes (default is native size)
Last edited by designgears on Wed May 20, 2015 3:09 am, edited 1 time in total.
-
- ultra-n00b
- Posts: 8
- Joined: Wed Apr 30, 2014 9:34 pm
- Has thanked: 2 times
Re: The Witcher 3 Wild Hunt (*.cache*.bundle)
This does work, but the files that come out aren't valid dds files.hhrhhr wrote:use "<I4" instead of "<L".
> I[n]: an unsigned int with n bytes (default is native size)
edit---
Ahh, needed to change <L below too.