Page 7 of 12

Re: The Witcher 2

Posted: Fri May 27, 2011 10:02 am
by Modman69
Is there a way to view the .usm movies or extract/convert them to something viewable?

Re: The Witcher 2

Posted: Fri May 27, 2011 1:24 pm
by oveja
Modman69 wrote:Is there a way to view the .usm movies or extract/convert them to something viewable?
nothing.
*.usm file is Scaleform Video file.
only *.avi convert *.usm.
don't convert *.usm to *.avi.

Re: The Witcher 2

Posted: Fri May 27, 2011 11:32 pm
by Arxel
Just to be sure - in items/ we have some .xml files.. Do You guys have all items names in english or maybe in your foreign language? I'm not sure if all inside .xml names are in english and the translation is somewhere in .w2strings or maybe I did something wrong while installing game ;)

Re: The Witcher 2

Posted: Sat May 28, 2011 12:25 am
by inforsir
anyone know how to open .w2comm files because i want to a take a peek into the quest files.to change the quest exp/orens rewarded from the said quest

Re: The Witcher 2

Posted: Sat May 28, 2011 12:26 am
by chalon
Arxel wrote:Just to be sure - in items/ we have some .xml files.. Do You guys have all items names in english or maybe in your foreign language? I'm not sure if all inside .xml names are in english and the translation is somewhere in .w2strings or maybe I did something wrong while installing game ;)
The item names in the xml files are basically in english, but they are not the item names displayed. It uses the name in the xml file as a key in the .w2strings file to get the actual localized name that it displays.

I'm trying to figure out the w2strings format. I've got it to read all the key strings in the first part of the file, which was pretty easy, but the second part of the file is compressed, encoded, or encrypted somehow.

The basics of the format I've figured out is the file starts out with a magic number first four bytes (c9 00 00 00).

Then there are 4 bytes, followed by 1 byte of the key string size, followed by the key string itself. This repeats until you get through all the key strings, except for one key in the middle that seems to be slightly malformed.

The most significant bit of the string size tells you whether the key string is UTF-8 or UTF-16. Set to 1 means UTF-8, set to 0 means UTF-16. Then the rest of the bits tell you the actual size of the string.

I haven't really figured out what the 4 bytes before the string size byte mean, though. If I load it up as a little endian int32, the two most significant bytes are almost always 0x7933, then the next two bytes vary quite a bit.

Anyway, just writing a real simple program that grabs the 4 bytes as an int32, reads the string, and outputs both, I get a lot of output like this:

Code: Select all

0x79336953: templars camp
0x79338317: temple
0x7933842e: temple cemetery
0x7933a633: tentadrake armor
0x79336b6c: tentadrake armor enhancement
0x79336ab5: tentadrake eyes

Re: The Witcher 2

Posted: Sat May 28, 2011 12:50 am
by Arxel
Good work! I only want stuff names etc. ;)

oh, .w2comm would also be great..!

Re: The Witcher 2

Posted: Sat May 28, 2011 2:07 am
by odrin
but the downside is, those xml files will be referring to complete w2 files, not the individual names from inside.

am i wrong in assuming this?

Re: The Witcher 2

Posted: Sat May 28, 2011 2:15 am
by chalon
The w2strings file, when decoded, is going to be a lot of key,value pairs that are essentially along the lines of:
Key=tentadrake armor,Value=Kayran Armor

The XML files refer to those Keys. So if you want the correct item names you just have to match the key with the actual values.

The localization process would probably involve just localizing all those values and then encoding the new w2strings file.

But the w2strings file has to be figured out first. Right now I have the "keys", but none of the "values."

Re: The Witcher 2

Posted: Sat May 28, 2011 2:35 am
by odrin
alright, thanks.

Re: The Witcher 2

Posted: Sat May 28, 2011 6:33 am
by inforsir
anybody have any info on how to change the sell amount on a item? so u can sell it for a lot. or change how much orens is drop off a body?

Re: The Witcher 2

Posted: Sat May 28, 2011 8:56 am
by Rick

Re: The Witcher 2

Posted: Sat May 28, 2011 9:11 am
by odrin
hi, i compiled that with microsoft network 4. what does it do? i try inputting w2 files but it just shuts down.

Re: The Witcher 2

Posted: Sat May 28, 2011 10:14 am
by chalon
Thanks a lot. I was basically getting nowhere trying to look at it in IDA, now I can get all this localization stuff in my item DB!

Re: The Witcher 2

Posted: Sat May 28, 2011 5:48 pm
by Modman69
oveja,

Thanks for the info.

Re: The Witcher 2

Posted: Sat May 28, 2011 6:01 pm
by Arxel
Quick question - Does anyone know where to look for a script that disable HUD?
When we save the game, images are without hud.. In preview version [H] key allow to switch on/off hud in-game..

I don't have any files from preview version so can't look for some files that references to controls.. :(