Join also our Discord channel! Click here.

The Witcher 2

The Original Forum. Game archives, full of resources. How to open them? Get help here.
Post Reply
User avatar
CMihai
veteran
Posts: 131
Joined: Sun Jul 05, 2009 12:58 pm
Has thanked: 13 times

The Witcher 2

Post by CMihai » Tue May 17, 2011 5:44 pm

The contents of this post was deleted because of possible forum rules violation.

User avatar
chrrox
Moderator
Posts: 2562
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1298 times

Re: The Witcher 2

Post by chrrox » Tue May 17, 2011 9:37 pm

I doubt this format will be supported they seem to have ripped off unreal engine's format without actually using the unreal engine.

voltagex
ultra-n00b
Posts: 9
Joined: Wed May 18, 2011 12:04 am

Re: The Witcher 2

Post by voltagex » Wed May 18, 2011 12:08 am

Smaller sample at http://filevo.com/dnvemmwnixa7.html

The retail/GOG/Steam releases all seem to be set up differently in the way the files are laid out in the game directory.

The folder CookedPC would point to Unreal though - but I thought this engine was custom?

Rick
Moderator
Posts: 388
Joined: Tue Aug 09, 2005 10:10 pm
Location: California
Been thanked: 84 times
Contact:

Re: The Witcher 2

Post by Rick » Wed May 18, 2011 7:15 am

chrrox wrote:I doubt this format will be supported they seem to have ripped off unreal engine's format without actually using the unreal engine.
What? their archive format looks nothing like unreal packages.
http://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.

User avatar
chrrox
Moderator
Posts: 2562
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1298 times

Re: The Witcher 2

Post by chrrox » Wed May 18, 2011 11:43 am

you got an extractor working?

destiny7
ultra-n00b
Posts: 1
Joined: Wed May 18, 2011 12:03 pm

Re: The Witcher 2

Post by destiny7 » Wed May 18, 2011 12:29 pm

The contents of this post was deleted because of possible forum rules violation.

zeeh
beginner
Posts: 30
Joined: Sun Jul 26, 2009 2:10 am
Has thanked: 1 time
Been thanked: 1 time

Re: The Witcher 2

Post by zeeh » Wed May 18, 2011 4:26 pm

en0.w2strings seems to have an encrypted/xored block.

Rick
Moderator
Posts: 388
Joined: Tue Aug 09, 2005 10:10 pm
Location: California
Been thanked: 84 times
Contact:

Re: The Witcher 2

Post by Rick » Wed May 18, 2011 9:29 pm

chrrox wrote:you got an extractor working?
Yes, I have not committed my code to my repository yet though.
http://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.

zeeh
beginner
Posts: 30
Joined: Sun Jul 26, 2009 2:10 am
Has thanked: 1 time
Been thanked: 1 time

Re: The Witcher 2

Post by zeeh » Wed May 18, 2011 9:51 pm

Rick wrote:
chrrox wrote:you got an extractor working?
Yes, I have not committed my code to my repository yet though.
Good news :) I wish it works with *.w2strings files too.

Rick
Moderator
Posts: 388
Joined: Tue Aug 09, 2005 10:10 pm
Location: California
Been thanked: 84 times
Contact:

Re: The Witcher 2

Post by Rick » Wed May 18, 2011 9:52 pm

It won't, w2strings files are another beast entirely, not an archive file.
http://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.

voltagex
ultra-n00b
Posts: 9
Joined: Wed May 18, 2011 12:04 am

Re: The Witcher 2

Post by voltagex » Thu May 19, 2011 1:37 am

Rick wrote:
chrrox wrote:you got an extractor working?
Yes, I have not committed my code to my repository yet though.

Is it GitHub or something so I can subscribe to your commits?

Rick
Moderator
Posts: 388
Joined: Tue Aug 09, 2005 10:10 pm
Location: California
Been thanked: 84 times
Contact:

Re: The Witcher 2

Post by Rick » Thu May 19, 2011 2:14 am

voltagex wrote:Is it GitHub or something so I can subscribe to your commits?
http://cia.vc/stats/project/red
http://svn.gib.me/public/red
http://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.

Rick
Moderator
Posts: 388
Joined: Tue Aug 09, 2005 10:10 pm
Location: California
Been thanked: 84 times
Contact:

Re: The Witcher 2

Post by Rick » Thu May 19, 2011 2:16 am

I'll probably commit my unpacking code soon; today I've been working on the w2scripts file (got most of it read -- need to write disassembler :)).
http://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.

User avatar
chrrox
Moderator
Posts: 2562
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1298 times

Re: The Witcher 2

Post by chrrox » Thu May 19, 2011 12:11 pm

ok here is a basic bms its not done yet.
but you re right the file format is not that bad.

Code: Select all

idstring DZIP
get unk01 long
get files long
get unk02 long
get tableoff long
goto tableoff
for i = 0 < files
get nsize short
getdstring name nsize
get unk03 long
get unk04 long
get size long
get null01 long
get offset long
get null02 long
get zsize long
get null03 long
log name offset zsize
next i
Can you help me understand this

Code: Select all

while (i < input.Length)
            {
                var op = input[i++];
                var control = (op >> 5) & 0x07;
                
                if (control == 0)
                {
                    // uncompressed blob
                    int length = 1 + (op & 0x1F);
                    Array.Copy(input, i, output, o, length);
                    i += length;
                    o += length;
                }
                else
                {
                    int length;

                    if (control == 7)
                    {
                        length = 6 + input[i++];
                    }
                    else
                    {
                        length = control - 1;
                    }
                    length += 3;

                    int offset = (op & 0x1F) << 8;
                    offset |= input[i++];

                    offset = o - 1 - offset;

                    if (offset + length > o)
                    {
                        while (length > 0)
                        {
                            output[o++] = output[offset++];
                            length--;
                        }
                    }
                    else
                    {
                        Array.Copy(output, offset, output, o, length);
                        o += length;
                    }
                }
            }

also the bit about the cd key needed for dlc packages.

Rick
Moderator
Posts: 388
Joined: Tue Aug 09, 2005 10:10 pm
Location: California
Been thanked: 84 times
Contact:

Re: The Witcher 2

Post by Rick » Thu May 19, 2011 7:18 pm

That's the compression scheme Witcher 2 uses in its archive files. As for the CDKey -- file names are obfuscated in DLC DZIPs using the CDKey.
http://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.

Post Reply