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

[Request] Guild Wars 2 DAT

The Original Forum. Game archives, full of resources. How to open them? Get help here.
Loumie
beginner
Posts: 24
Joined: Thu Apr 12, 2012 8:00 am
Been thanked: 6 times

Re: [Request] Guild Wars 2 DAT

Post by Loumie »

(P.S I never had TSTRUCT_PTR_ARRAY_PTR_START so far for the stuff I did so if it's wrong that it's 8 bytes too please correct me)
Yes that's also 8 bytes. The meaning of this name is:

TSTRUCT_PTR_ARRAY_PTR => array<struct*>* , it means that you read uint32(numberOfRecords) uint32(offsetToRecords) and that those records are themselves just an offset to a struct.

And about name conflicts, either you just parse the structs with a modified script that appends '_' to variable names and replaces '.' by '_' (like me xD) or you do it manually when 010 complains. But it is still not so frequent so doing it by hand is not a big issue. But you can blame ArenaNet for naming them like this :P
Demonsangel
mega-veteran
mega-veteran
Posts: 241
Joined: Fri Aug 05, 2011 9:31 pm
Location: Antwerp
Has thanked: 13 times
Been thanked: 41 times

Re: [Request] Guild Wars 2 DAT

Post by Demonsangel »

Before I try to manually reverse the animation data, is there a struct for them?
I had a look at all the animation chunks but none of them seem to resemble the data I have at hand.

As far as I could tell from a quick glance the data starts with a pointer to the animation name with then 2 dwords where the second seems to always be 89 88 88 3C (for the few files I had a look at) and the first AB AA AA 3E with the last byte 3F in some datachunks and the first 3 CE CC 4C
Loumie
beginner
Posts: 24
Joined: Thu Apr 12, 2012 8:00 am
Been thanked: 6 times

Re: [Request] Guild Wars 2 DAT

Post by Loumie »

I don't know what files you have but from what I have, in MODL files, the ANIM chunk is exactly the struct the scripts outputs => ModelFileAnimationV24

Code: Select all

41 4E 49 4D 54 38 00 00 18 00 10 00
18 00 => V24

Code: Select all

=> Version: 24, ReferencedFunction: 0x816C00
typedef struct 
{
    TSTRUCT_ARRAY_PTR_START byte animation TSTRUCT_ARRAY_PTR_END;
} PackGrannyAnimationType<optimize=false>;

typedef struct 
{
    PackGrannyAnimationType data;
    filename fileFull;
} ModelAnimationLodV24<optimize=false>;

typedef struct 
{
    qword boneToken;
    TSTRUCT_ARRAY_PTR_START float keys TSTRUCT_ARRAY_PTR_END;
} ModelVisTrackDataV32<optimize=false>;

typedef struct 
{
    byte type;
    dword trackGroupIndex;
    dword vectorTrackIndex;
    float4 initialValue;
} ModelTrackTypeDataV24<optimize=false>;

typedef struct 
{
    dword uvAnimId;
    TSTRUCT_ARRAY_PTR_START ModelTrackTypeDataV24 uvTransformData TSTRUCT_ARRAY_PTR_END;
} ModelUVAnimationV24<optimize=false>;

typedef struct 
{
    qword bone;
    TSTRUCT_ARRAY_PTR_START ModelTrackTypeDataV24 cloudTrackData TSTRUCT_ARRAY_PTR_END;
} ModelCloudAnimV24<optimize=false>;

typedef struct 
{
    dword materialId;
    dword constToken;
    dword trackGroupIndex;
    dword vectorTrackIndex;
    float4 initialValue;
} ModelMatConstAnimV24<optimize=false>;

typedef struct 
{
    qword bone;
    TSTRUCT_ARRAY_PTR_START ModelTrackTypeDataV24 lightTrackData TSTRUCT_ARRAY_PTR_END;
} ModelLightAnimationV24<optimize=false>;

typedef struct 
{
    qword id;
    dword type;
    float time;
    qword val;
    filename strVal;
} ModelAnimPropertyDataV24<optimize=false>;

typedef struct 
{
    qword linkToken;
    dword trackGroupIndex;
    dword vectorTrackIndex;
    float4 initialValue;
} ModelTokenMapAnimV24<optimize=false>;

typedef struct 
{
    qword bone;
    TSTRUCT_ARRAY_PTR_START ModelTrackTypeDataV24 bcTrackData TSTRUCT_ARRAY_PTR_END;
} ModelBoneConstraintAnimV24<optimize=false>;

typedef struct 
{
    qword bone;
    TSTRUCT_ARRAY_PTR_START ModelTrackTypeDataV24 anchorTrackData TSTRUCT_ARRAY_PTR_END;
} ModelAnchorAnimV24<optimize=false>;

typedef struct 
{
    qword bone;
    TSTRUCT_ARRAY_PTR_START ModelAnchorAnimV24 anchorAnim TSTRUCT_ARRAY_PTR_END;
} ModelStreakAnimV24<optimize=false>;

typedef struct 
{
    qword bone;
    TSTRUCT_ARRAY_PTR_START ModelTrackTypeDataV24 lightningTrackData TSTRUCT_ARRAY_PTR_END;
} ModelLightningAnimV24<optimize=false>;

typedef struct 
{
    qword bone;
    TSTRUCT_ARRAY_PTR_START ModelTrackTypeDataV24 windTrackData TSTRUCT_ARRAY_PTR_END;
} ModelWindAnimationV24<optimize=false>;

typedef struct 
{
    qword token;
    PackGrannyAnimationType data;
    TPTR_START ModelAnimationLodV24 animLod TPTR_END;
    float moveSpeed;
    TSTRUCT_ARRAY_PTR_START ModelVisTrackDataV32 visTrackData TSTRUCT_ARRAY_PTR_END;
    TSTRUCT_ARRAY_PTR_START ModelUVAnimationV24 uvAnimData TSTRUCT_ARRAY_PTR_END;
    TSTRUCT_ARRAY_PTR_START ModelCloudAnimV24 cloudAnim TSTRUCT_ARRAY_PTR_END;
    TSTRUCT_ARRAY_PTR_START ModelMatConstAnimV24 matConstAnim TSTRUCT_ARRAY_PTR_END;
    TSTRUCT_ARRAY_PTR_START word morphTrackGroups TSTRUCT_ARRAY_PTR_END;
    TSTRUCT_ARRAY_PTR_START float triggerTimes TSTRUCT_ARRAY_PTR_END;
    TSTRUCT_ARRAY_PTR_START qword triggerTokens TSTRUCT_ARRAY_PTR_END;
    TSTRUCT_ARRAY_PTR_START ModelLightAnimationV24 lightAnimData TSTRUCT_ARRAY_PTR_END;
    dword isAdditive;
    dword variantCount;
    dword variantIndices[3];
    TSTRUCT_ARRAY_PTR_START ModelAnimPropertyDataV24 properties TSTRUCT_ARRAY_PTR_END;
    float3 center;
    float radius;
    TSTRUCT_ARRAY_PTR_START ModelTokenMapAnimV24 tokenMapAnims TSTRUCT_ARRAY_PTR_END;
    TSTRUCT_ARRAY_PTR_START ModelBoneConstraintAnimV24 bcAnim TSTRUCT_ARRAY_PTR_END;
    TSTRUCT_ARRAY_PTR_START ModelStreakAnimV24 streakAnim TSTRUCT_ARRAY_PTR_END;
    TSTRUCT_ARRAY_PTR_START ModelLightningAnimV24 lightningAnim TSTRUCT_ARRAY_PTR_END;
    TSTRUCT_ARRAY_PTR_START ModelWindAnimationV24 windAnimData TSTRUCT_ARRAY_PTR_END;
} ModelAnimationDataV32<optimize=false>;

typedef struct 
{
    qword token;
    qword start;
    qword loop;
    qword end;
} ModelCompoundAnimationDataV24<optimize=false>;

typedef struct 
{
    qword name;
    float duration;
} ModelAnimationImportSequenceV24<optimize=false>;

typedef struct 
{
    filename filename;
    TSTRUCT_ARRAY_PTR_START ModelAnimationImportSequenceV24 sequences TSTRUCT_ARRAY_PTR_END;
} ModelAnimationImportDataV32<optimize=false>;

typedef struct 
{
    TSTRUCT_PTR_ARRAY_PTR_START ModelAnimationDataV32 animations TSTRUCT_PTR_ARRAY_PTR_END;
    TSTRUCT_ARRAY_PTR_START ModelCompoundAnimationDataV24 compoundAnimations TSTRUCT_ARRAY_PTR_END;
    TSTRUCT_ARRAY_PTR_START qword fallbacks TSTRUCT_ARRAY_PTR_END;
    TSTRUCT_ARRAY_PTR_START ModelAnimationImportDataV32 imports TSTRUCT_ARRAY_PTR_END;
} ModelFileAnimationBankV24<optimize=false>;

typedef struct 
{
    TPTR_START ModelFileAnimationBankV24 bank TPTR_END;
    PackGrannyAnimationType anim;
} ModelFileAnimationV24<optimize=false>;
Demonsangel
mega-veteran
mega-veteran
Posts: 241
Joined: Fri Aug 05, 2011 9:31 pm
Location: Antwerp
Has thanked: 13 times
Been thanked: 41 times

Re: [Request] Guild Wars 2 DAT

Post by Demonsangel »

I'm talking about

Code: Select all


typedef struct 
{
    TSTRUCT_ARRAY_PTR_START byte animation TSTRUCT_ARRAY_PTR_END; <---------data in here
} PackGrannyAnimationType<optimize=false>;
Loumie
beginner
Posts: 24
Joined: Thu Apr 12, 2012 8:00 am
Been thanked: 6 times

Re: [Request] Guild Wars 2 DAT

Post by Loumie »

No idea but as the name suggest it may be public => http://www.radgametools.com/granny.html

Most likely ANet just throws this info to Granny API.
STIGMATED
ultra-n00b
Posts: 2
Joined: Sun Jul 15, 2012 7:05 pm

Re: [Request] Guild Wars 2 DAT

Post by STIGMATED »

Does anybody know in what file kepps IP for connection with server?
Demonsangel
mega-veteran
mega-veteran
Posts: 241
Joined: Fri Aug 05, 2011 9:31 pm
Location: Antwerp
Has thanked: 13 times
Been thanked: 41 times

Re: [Request] Guild Wars 2 DAT

Post by Demonsangel »

There are (really) minor similarities to the format they desrcibed, mostly the header
for the raw code
all pointers are absolute with the first byte of the raw data being 0
I'll apologize up front if I misused the term "pointer" since my c++ isn't great

Code: Select all

int <pointer to animation name>
float Duration;
float TimeStep;
float Oversampling;
int count?? <so far only seen 1 or 2>
int ?? <only encountered "28">
int/float Table[24]
Then with the following 010 template I was able to get some position/rotation/9x9 matrix info
but still a lot of unknowns

Code: Select all

FSeek(20);
int count;
int table[count-2];
typedef struct
{
    local int type = ReadUShort(FTell());
    if(type == 4){FSkip(4);float x;float y;float z;}
    else if (type == 5){FSkip(4);float x;float y;float z;float w;}
    else if(type == 2){FSkip(2);ushort flag;}
    else if (type== 3){FSkip(4);int count;int posMat9x9;}
    else if (type == 513){
        local quad current = FTell();
        FSkip(4);
        int count1<hidden=true>;
        int pos1<hidden=true>;
        int count2<hidden=true>;
        int pos2<hidden=true>;
        FSeek(pos1);
        float data1[count1]<bgcolor=cPurple>;
        FSeek(pos2);
        float data2[count2]<bgcolor=cAqua>;
        FSeek(current);
    }
    else if (type == 520){
        local quad current = FTell();
        FSkip(8);
        int count<hidden = true>;
        int pos<hidden = true>;
        FSeek(pos);
        float data[count/2]<bgcolor=cSilver>;
        FSeek(current);
    }
}data<optimize=false>;
typedef struct
{
    local quad current=FTell();
    int count;//?
    FSeek(ReadInt(FTell()));
    string CurveDataHeader<bgcolor=cRed>;
    
}CurveData;
typedef struct{
    local quad current;
    current = FTell();
    FSeek(ReadInt(FTell()));
    string Name<bgcolor=cYellow>;
    FSeek(current+4);

    int zero;
    
    current = FTell();
    FSeek(ReadInt(FTell()));
    CurveData Header;
    FSeek(current+4);

    current = FTell();
    FSeek(ReadInt(FTell()));
    data Data2;
    FSeek(current+4);

    int a;

    current = FTell();
    FSeek(ReadInt(FTell()));
    data Data;
    FSeek(current+4);

    int c;

    current = FTell();
    FSeek(ReadInt(FTell()));
    data Data3;
    FSeek(current+4);
    
}float8<optimize=false>;

float8 floats[table[8]];
hazballs
ultra-n00b
Posts: 4
Joined: Sat Dec 03, 2011 2:05 pm

Re: [Request] Guild Wars 2 DAT

Post by hazballs »

Hi all, quite excited to see so much work being done for GW2 - I was wondering if anybody knows how the game stores text based data. Arenanet has said there are literally thousands of dynamic events, it would be nice to find the names/objectives etc. in the game files somehow. I'd also love to be able to browse the skills, elite skills in particular, and maybe update the official wiki if their info is out of date after the coming BWE. Can this stuff be viewed using the GW2 dat browser?
Dr Ishmael
ultra-n00b
Posts: 2
Joined: Sun Jan 31, 2010 3:59 am

Re: [Request] Guild Wars 2 DAT

Post by Dr Ishmael »

Yes, the individual text strings can be viewed in the STRS files, but there is no known structure that ties them together. For example, a skill is composed of at least 2 strings: the name, the description, and then all the individual effects. There is nothing inside the dat file that says "skill 123 uses string 123456 as the name and string 123457 as the description" (unless this has indeed been found and I just missed it). This information has to be retrieved from the game server.

Another complication is that a lot of strings are encrypted, and the server has to supply the encryption key for the game to decrypt and display it. In GW1, nearly all the text for quests and NPC dialogue was encrypted, so it's a safe assumption that this applies to dynamic events in GW2.

Oh, and as for skill info on the wiki, don't worry about it - I've already got a framework of spreadsheets and other stuff in place to capture all the data and easily post it to the wiki.
Rhoot
beginner
Posts: 26
Joined: Fri May 04, 2012 11:01 pm
Has thanked: 2 times
Been thanked: 17 times

Re: [Request] Guild Wars 2 DAT

Post by Rhoot »

Dr Ishmael wrote:Yes, the individual text strings can be viewed in the STRS files, but there is no known structure that ties them together.
There is, but it's only know by a few select people.
Dr Ishmael wrote:There is nothing inside the dat file that says "skill 123 uses string 123456 as the name and string 123457 as the description" (unless this has indeed been found and I just missed it).
Yup, there is. But again it's only known by a few select people (3 that I know of [including me], 2 that I'm unsure of). It's the same data gw2db is using. The first person to stumble upon it didn't want it made public, so that's why it isn't. It's also partly why I'm not working on the browser any more, since everything is already discovered (that and the architecture is quite crap).

I *might* write a separate model viewer at some point, that uses the correct shaders, but definitely no promises.
Dr Ishmael wrote:Oh, and as for skill info on the wiki, don't worry about it - I've already got a framework of spreadsheets and other stuff in place to capture all the data and easily post it to the wiki.
Which means I don't have to bother with skill info on the wiki, good to know! ;)
ral
beginner
Posts: 24
Joined: Mon Apr 23, 2012 5:26 pm
Has thanked: 9 times
Been thanked: 5 times

Re: [Request] Guild Wars 2 DAT

Post by ral »

Rhoot wrote:
Dr Ishmael wrote:There is nothing inside the dat file that says "skill 123 uses string 123456 as the name and string 123457 as the description" (unless this has indeed been found and I just missed it).
Yup, there is. But again it's only known by a few select people (3 that I know of [including me], 2 that I'm unsure of). It's the same data gw2db is using. The first person to stumble upon it didn't want it made public, so that's why it isn't. It's also partly why I'm not working on the browser any more, since everything is already discovered (that and the architecture is quite crap).
Interesting. I didn't find the data for that yet but I also didn't really try to find it :/ But now you made me curious so I'll try to find it (I hope it's not too hidden or in a file where I don't have the structure of).

With my Tool I only have XML output of mapc (except 3 chunks), txtm, ARMF, PIMG, strs and DEPS files at the moment.
I also have other output but that's not really done and was just as a test (like for PIMG files).
Gordon21
ultra-n00b
Posts: 8
Joined: Sat May 05, 2012 8:18 pm
Has thanked: 2 times

Re: [Request] Guild Wars 2 DAT

Post by Gordon21 »

First post right here, but i'm following for a while now. Good joob everyone.
Rhoot wrote:
Dr Ishmael wrote:Yes, the individual text strings can be viewed in the STRS files, but there is no known structure that ties them together.
There is, but it's only know by a few select people.
You mean txtm? Or something else?
Rhoot wrote:
Dr Ishmael wrote:There is nothing inside the dat file that says "skill 123 uses string 123456 as the name and string 123457 as the description" (unless this has indeed been found and I just missed it).
Yup, there is. But again it's only known by a few select people (3 that I know of [including me], 2 that I'm unsure of). It's the same data gw2db is using. The first person to stumble upon it didn't want it made public, so that's why it isn't.
Could you give us a clue?
Rhoot
beginner
Posts: 26
Joined: Fri May 04, 2012 11:01 pm
Has thanked: 2 times
Been thanked: 17 times

Re: [Request] Guild Wars 2 DAT

Post by Rhoot »

Gordon21 wrote:You mean txtm? Or something else?
Nope. The txtm just contains a list of strs files in order, for each language. It also contains the amount of strings that are available in each strs file (which is 1024, but if it changes, the txtm file will contain the change). The first file listed in the txtm file contains strings 0-1023, the second contains 1024-2047, etc.
Gordon21 wrote:Could you give us a clue?
Nope sorry. Unless the original finder pops in to drop the bomb, or someone entirely unrelated, it won't appear here.
Gordon21
ultra-n00b
Posts: 8
Joined: Sat May 05, 2012 8:18 pm
Has thanked: 2 times

Re: [Request] Guild Wars 2 DAT

Post by Gordon21 »

Ok np but is it in the DAT?

Also, did anyone worked on networking? Listening to chats, txtp, achievements tracking...
Rhoot
beginner
Posts: 26
Joined: Fri May 04, 2012 11:01 pm
Has thanked: 2 times
Been thanked: 17 times

Re: [Request] Guild Wars 2 DAT

Post by Rhoot »

Gordon21 wrote:Ok np but is it in the DAT?
Yes.
Post Reply