Important information: this site is currently scheduled to go offline indefinitely by end of the year.

The Witcher 2

The Original Forum. Game archives, full of resources. How to open them? Get help here.
Rick
Moderator
Posts: 388
Joined: Tue Aug 09, 2005 10:10 pm
Been thanked: 84 times
Contact:

Re: The Witcher 2

Post by Rick »

I'm working on a viewer/editor for W2RC files.
https://blog.gib.me/

Don't ask me about localization tools; if you don't have the resources to develop them yourself you don't need them.
kimono
ultra-n00b
Posts: 8
Joined: Tue Jun 30, 2009 11:10 pm

Re: The Witcher 2

Post by kimono »

Your work is much appreciated Rick, thanks for all this. Psientist I had made a thread in another section about the texture format although chorrax replied saying they were infact in the dds format and need a header added, unfortunately I'm not sure of what he means. Either way thanks again for the hard work lads :)
chrrox
Moderator
Posts: 2602
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1422 times

Re: The Witcher 2

Post by chrrox »

here is a converter
use the xbm to dds converter like this
c:\quickbms\quickbms.exe -F "*.xbm" c:\xbm.bms c:\xbm_folder c:\extracted

Code: Select all

set MEMORY_FILE binary "\x44\x44\x53\x20\x7C\x00\x00\x00\x07\x10\x0A\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x05\x00\x00\x00\x44\x58\x54\x31\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x10\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"

findloc start string \x3A\x5C
print "%start%"
goto start
get null string
get name basename
string name + .dds
getdstring null 0xA
get width long
get height long
get null byte
get mips long
get null byte
get type short
savepos offset
get size asize
set size2 size
math size2 - offset

if type == 0x20
putVarChr MEMORY_FILE 0x57 0x31 byte
endif
if type == 0x30
putVarChr MEMORY_FILE 0x57 0x33 byte
endif
if type == 0x40
putVarChr MEMORY_FILE 0x57 0x35 byte
endif
putVarChr MEMORY_FILE 0xC height long
putVarChr MEMORY_FILE 0x10 width long
append
log MEMORY_FILE offset size2
append
math size2 + 0x80
log name 0 size2 MEMORY_FILE


Psientist
ultra-n00b
Posts: 7
Joined: Thu Feb 17, 2011 2:27 pm

Re: The Witcher 2

Post by Psientist »

yer a regular saint chrrox, many thanks!
incarn
ultra-n00b
Posts: 1
Joined: Fri Jan 01, 2010 2:47 am

Re: The Witcher 2

Post by incarn »

I cannot seem to find the 64 bit version of quickbms?

Neither google, nor the forums search helps me.. (I may be beyond help though)

Using the standard V of quickbms I get
"Error: the variable index is invalid, there is an error in this tool"

win 7 64 bit

EDIT: You may all stop panicing now. Calm down. I found the 64Bit version. Feel free to have a non-alcoholic beverage on me. :)
User avatar
delutto
veteran
Posts: 153
Joined: Sat Apr 16, 2011 5:20 am
Has thanked: 49 times
Been thanked: 14 times

Re: The Witcher 2

Post by delutto »

incarn wrote:I cannot seem to find the 64 bit version of quickbms?

Neither google, nor the forums search helps me.. (I may be beyond help though)

Using the standard V of quickbms I get
"Error: the variable index is invalid, there is an error in this tool"

win 7 64 bit

EDIT: You may all stop panicing now. Calm down. I found the 64Bit version. Feel free to have a non-alcoholic beverage on me. :)
Easy:
http://aluigi.org/papers.htm#quickbms
Nemmay
ultra-n00b
Posts: 5
Joined: Fri May 20, 2011 7:58 am

Re: The Witcher 2

Post by Nemmay »

Code: Select all

Unhandled Exception: System.FormatException: bad entry table hash (wrong cdkey f
or DLC archives?)
   at Gibbed.RED.FileFormats.PackageFile.Deserialize(Stream input, Nullable`1 de
cryptKey) in C:\Users\Cody\Desktop\redNew\trunk\Gibbed.RED.FileFormats\PackageFi
le.cs:line 148
   at Gibbed.RED.FileFormats.PackageFile.DeserializeWithCDKey(Stream input, Stri
ng cdkey) in C:\Users\Cody\Desktop\redNew\trunk\Gibbed.RED.FileFormats\PackageFi
le.cs:line 87
   at Gibbed.RED.Unpack.Program.Main(String[] args) in C:\Users\Cody\Desktop\red
When using a legit cdkey, it doesn't work with extracting the .dlc. I'm a 100% sure that the key was right, can you give an example of the command line stuff with the cdkey so I know I did it right? Thanks.
redavatar
ultra-n00b
Posts: 3
Joined: Sat May 21, 2011 9:12 am

Re: The Witcher 2

Post by redavatar »

chrrox wrote:here is a converter
use the xbm to dds converter like this
c:\quickbms\quickbms.exe -F "*.xbm" c:\xbm.bms c:\xbm_folder c:\extracted
Hey, thanks a lot for that! But is there a way to do the opposite? Otherwise there's little use since we can't convert our DDS files back to XBM for the game to use them.
hhrhhr
advanced
Posts: 62
Joined: Thu Mar 18, 2010 7:02 am
Has thanked: 1 time
Been thanked: 20 times

Re: The Witcher 2

Post by hhrhhr »

chrrox wrote:here is a converter...
this is not a valid script, he's wrong on some textures (\environment_levels\detailmaps\* for example), and another is wrong with the size.
there is corrected script (make nomips DDS textures):

Code: Select all

set MEMORY_FILE binary "\x44\x44\x53\x20\x7C\x00\x00\x00\x07\x10\x0A\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x05\x00\x00\x00\x44\x58\x54\x31\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x10\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"

findloc c_type string "TCM_"
goto c_type
getct c_type string 0x8C

#TCM_None - ???
#TCM_DXTNoAlpha,TCM_Normals - DXT1
#TCM_DXTAlpha, TCM_NormalsHigh - DXT5
if c_type == "TCM_DXTAlpha"
	putvarchr MEMORY_FILE 0x57 0x35 byte #DXT5
endif
if c_type == "TCM_NormalsHigh"
	putvarchr MEMORY_FILE 0x57 0x35 byte #DXT5
endif

findloc start string \x3a\x5c
goto start
get null string
get name basename
string name + .dds
getdstring null 0x06
get mips long
get width long
get height long
get MaxSize long
get size long
savepos offset

putVarChr MEMORY_FILE 0xC height long
putVarChr MEMORY_FILE 0x10 width long
append
log MEMORY_FILE offset size
append

math size + 0x80
log name 0 size MEMORY_FILE
Psientist
ultra-n00b
Posts: 7
Joined: Thu Feb 17, 2011 2:27 pm

Re: The Witcher 2

Post by Psientist »

The old script ended up turning some images like this: Image

I'll try your script hhrhhr, many thanks!
oveja
beginner
Posts: 23
Joined: Wed Feb 23, 2011 9:35 pm
Has thanked: 3 times

Re: The Witcher 2

Post by oveja »

How do *.w2strings the decryption?
The file header("CR2Ws") is different.
chrrox
Moderator
Posts: 2602
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1422 times

Re: The Witcher 2

Post by chrrox »

I dint really test it much lol.
people just kept bugging me alot for one.
it was a few character textures that had errors all it took was changing txt 1 to 5.
guilhermetutilo
ultra-n00b
Posts: 5
Joined: Sat May 21, 2011 1:05 pm

Re: The Witcher 2

Post by guilhermetutilo »

Someone managed to extract the texts of the game? I'm trying to translate into Portuguese
hhrhhr
advanced
Posts: 62
Joined: Thu Mar 18, 2010 7:02 am
Has thanked: 1 time
Been thanked: 20 times

Re: The Witcher 2

Post by hhrhhr »

tools for xbm->tga and tga->xbm converting: witcher2_texture_converter.zip (thx chrrox for initial edition :)

usage: put quickbms.exe with unpacked files.

xbm2dds.cmd path_to_xbm
it make backup of original .xbm and produce 2 files:
filename_DXT(1,5).bin - some binary info need for export
filename_DXT(1,5).tga - your texture

when texture edited you can use next script: dds2xbm.cmd path_to_tga, it make new .xbm.
don't convert .tga files without _DXT1 or _DXT5 suffix.

example:
Image..Image

p.s.
nvcompress.exe and nvdecompress.exe take from GPU Accelerated Texture Compression x64 by NVidia, maybe they are not working on 32-bit system.
guilhermetutilo
ultra-n00b
Posts: 5
Joined: Sat May 21, 2011 1:05 pm

Re: The Witcher 2

Post by guilhermetutilo »

hhrhhr wrote:tools for xbm->tga and tga->xbm converting: witcher2_texture_converter.zip (thx chrrox for initial edition :)

usage: put quickbms.exe with unpacked files.

xbm2dds.cmd path_to_xbm
it make backup of original .xbm and produce 2 files:
filename_DXT(1,5).bin - some binary info need for export
filename_DXT(1,5).tga - your texture

when texture edited you can use next script: dds2xbm.cmd path_to_tga, it make new .xbm.
don't convert .tga files without _DXT1 or _DXT5 suffix.

example:
Image..Image

p.s.
nvcompress.exe and nvdecompress.exe take from GPU Accelerated Texture Compression x64 by NVidia, maybe they are not working on 32-bit system.

You hava a pack/unpack dzip files?? Because i want to translate to brazilian portugese
Post Reply