Results 1 to 1 of 1
  1. #1
    CriticalError
    CriticalError is offline
    Senior Member CriticalError's Avatar
    Join Date
    2011 Jun
    Posts
    204
    Thanks Thanks Given 
    21
    Thanks Thanks Received 
    44
    Thanked in
    27 Posts
    Rep Power
    0

    [Scripts]WarBane Rising of Darkness Unpacker TBL2

    Hello guys, well after a lot hours I finish download this really cool game, ok the format of files is .tbl2 like Argo,etc, ok with script of chrox for ARGO ONLINE we can unpack this files, so well here I upload some shots.

    Web: Warbane Online
    Client: Warbane Online Client Download

    Quickbms Script for Unpack TBL2

    PHP Code:
    #quickbms script
    #WarBane Rising of Darkness
    #from chrrox

    open FDDE tbl2 1
    set arcnum 0


    goto 0x10001C 1

    for 0
        get offset long 1
        get zsize long 1
        get null3 long 1
        get size long 1
        get arcnum long 1
        
    print "%arcnum%"
            
    set NAME1 string "file0"
        
    set MYEXT string arcnum
        strlen MYEXTSZ MYEXT
        
    if MYEXTSZ == 1
            string NAME1 
    += "00"
        
    endif
        if 
    MYEXTSZ == 2
            string name1 
    1
            string NAME1 
    += "0"
        
    endif
        if 
    MYEXTSZ == 3
            string name1 
    1
            string NAME1 
    += ""
        
    endif
        
    string NAME1 += MYEXT
        string NAME1 
    += .data2
        open FDSE NAME1 0


        get null1 long 1
        get null2 long 1

        get name string 1
        Padding 4 1

        get null long 1
    if zsize == size
            log name offset zsize
    else
    clog name offset zsize size
    endif
    next i 
    3D Max Importer

    PHP Code:
    if (heapSize 20000000then
        heapSize 
    200000000

    fname 
    getOpenFileName \
    caption:"Argo Online Model File" \
    types:"Argo Online Model File(*.xac)|*.xac" \
    historyCategory:"Argo Online Object Presets"
    fopen fname "rb"

    fn PrintOffset Var =
    (
        
    local Var = Var
    print (
    "This is the offset 0x" + (bit.intAsHex Var) as string)
        Var
    )
    fn PrintCount Var =
    (
        
    local Var = Var
    print (
    "This is the Count 0x" + (bit.intAsHex Var) as string)
        Var
    )

    fn Readword fstream = (
    return 
    readshort fstream #unsigned
    )

    fn ReadFixedString bstream fixedLen =
    (
        
    local str ""
        
    for 1 to fixedLen do
        (
            
    str += bit.intAsChar (ReadByte bstream #unsigned)
        
    )
        
    str
    )

    struct Mesh_Info_Struct
    (
        
    Mesh_Name,vertstart,vertend,vertcount,facecount
    )
    struct Offset_Info_Struct
    (
        
    Section_Start,Vert_Start,Face_Start,vertsize
    )
    struct weight_data
    (
        
    boneids,weights
    )
    struct weight_data2
    (
        
    weightid,wcount
    )
    total_size getFileSize fname
    print total_size
    idstring 
    readlong f
    id1 
    readbyte f#unsigned
    id2 readbyte f#unsigned
    id3 readbyte f#unsigned
    id4 readbyte f#unsigned
    Type_0_offset_array =#()
    Type_1_offset_array =#()
    Type_2_offset_array =#()
    Type_3_offset_array =#()
    Type_3_2_offset_array =#()
    Type_4_offset_array =#()
    Type_5_offset_array =#()
    Type_6_offset_array =#()
    Type_7_offset_array =#()
    Mesh_Name_array =#()
    while (ftell f) != total_size do (
    type readlong f
    size 
    readlong f
    type2 
    readlong f
    if type == do (

    append Type_0_offset_array (ftell f)

    )
    if 
    type == do (
    append Type_1_offset_array (ftell f)
    )
    if 
    type == do (
    append Type_2_offset_array (ftell f)
    )
    if 
    type == do (
    if 
    type2 == do (
    append Type_3_offset_array (ftell f)
    )
    if 
    type2 == 10000 do (
    append Type_3_offset_array (ftell f)
    )
    )
    if 
    type == do (
    append Type_4_offset_array (ftell f)
    )
    if 
    type == do (
    append Type_6_offset_array (ftell f)
    )
    if 
    type == do (
    append Type_6_offset_array (ftell f)
    )
    if 
    type == do (
    append Type_7_offset_array (ftell f)
    )
    fseek f size #seek_cur
    )
    printoffset Type_0_offset_array.count
    printoffset Type_1_offset_array
    .count
    printoffset Type_2_offset_array
    .count
    printoffset Type_3_offset_array
    .count
    printoffset Type_4_offset_array
    .count
    printoffset Type_5_offset_array
    .count
    printoffset Type_6_offset_array
    .count
    printoffset Type_7_offset_array
    .count


    BNArr 
    #()

    for 1 to Type_0_offset_array.count do (
    fseek f Type_0_offset_array[a]#seek_set
    float11 readfloat f
    float12 
    readfloat f 
    float13 
    readfloat f 
    float14 
    readfloat f * -1
    float21 
    readfloat f
    float22 
    readfloat f
    float23 
    readfloat f
    float24 
    readfloat f
    float31 
    readfloat f
    float32 
    readfloat f
    float33 
    readfloat f
    float34 
    readfloat f
    float41 
    readfloat f
    float42 
    readfloat f
    float43 
    readfloat f
    float44 
    readfloat f
    long1 
    readlong f
    long2 
    readlong f
    BoneParent 
    readlong f
    long4 
    readlong f
    BoneNameSize 
    readlong f
    BoneName 
    ReadFixedString f BoneNameSize
    tfm 
    = (quat float11 float12 float13 float14) as matrix3
    tfm
    .row4 = [float31,float32,float33]
    print (
    getNodeByName BoneName)
    if (
    getNodeByName BoneName) != undefined do (
    append BNArr (getNodeByName BoneName)
    )
    if (
    getNodeByName BoneName) == undefined do (
     if (
    BoneParent != -1) do (
    tfm tfm BNArr[(BoneParent 1)].objecttransform
     
    )

    newBone bonesys.createbone    \
                      
    tfm.row4    \
                      (
    tfm.row4 0.01 * (normalize tfm.row1)) \
                      (
    normalize tfm.row3)
                
    newBone.name BoneName
                newBone
    .width  0.01
                newBone
    .height 0.01
                newBone
    .transform tfm
                newBone
    .setBoneEnable false 0
                newBone
    .wirecolor yellow
                newbone
    .showlinks true
                newBone
    .pos.controller      TCB_position ()
                
    newBone.rotation.controller TCB_rotation ()
     if (
    BoneParent != -1then
     newBone
    .parent BNArr[(BoneParent 1)]
    append BNArr newBone
                      
    )                      

    )

    Weight_array #()
    for 1 to Type_2_offset_array.count do (
    count_array #()
    fseek f Type_2_offset_array[a]#seek_set
    fseek f -8#seek_cur
    chunksize readlong f
    fseek f Type_2_offset_array
    [a]#seek_set
    unk01 readlong f
    WeightCount 
    readlong f
    unk03 
    readlong f
    weight1start 
    = (ftell f)
    fseek f (WeightCount)#seek_cur
    weight2start = (ftell f)
    numvert = ((chunksize 12) - (WeightCount)) / 8
    for 1 to numvert do (
    weightid readlong f
    wcount 
    readlong f
    append count_array 
    (weight_data2 weightid:weightid wcount:wcount
    )
    fseek f weight1start#seek_set
    printoffset (count_array.count)
    for 
    1 to count_array.count do (
    Bone1 = -1
    Bone2 
    = -1
    Bone3 
    = -1
    Bone4 
    = -1
    weight1 
    0
    weight2 
    0
    weight3 
    0
    weight4 
    0
    if count_array[b].wcount == do (
    weight1 readfloat f
    Bone1 
    readshort f
    pad 
    readshort f
    )
    if 
    count_array[b].wcount == do (
    weight1 readfloat f
    Bone1 
    readshort f#unsigned
    pad readshort f
    weight2 
    readfloat f
    Bone2 
    readshort f#unsigned
    pad2 readshort f
    )
    if 
    count_array[b].wcount == do (
    weight1 readfloat f
    Bone1 
    readshort f#unsigned
    pad readshort f
    weight2 
    readfloat f
    Bone2 
    readshort f#unsigned
    pad2 readshort f
    weight3 
    readfloat f
    Bone3 
    readshort f#unsigned
    pad3 readshort f
    )
    if 
    count_array[b].wcount == do (
    weight1 readfloat f
    Bone1 
    readshort f#unsigned
    pad readshort f
    weight2 
    readfloat f
    Bone2 
    readshort f#unsigned
    pad2 readshort f
    weight3 
    readfloat f
    Bone3 
    readshort f#unsigned
    pad3 readshort f
    weight4 
    readfloat f
    Bone4 
    readshort f#unsigned
    pad4 readshort f
    )
    = (weight_data boneids:#() weights:#())
    maxweight 0
    if(Bone1 != -1then
        maxweight 
    maxweight weight1
    if(Bone2 != -1then
        maxweight 
    maxweight weight2
    if(Bone3 != -1then
        maxweight 
    maxweight weight3
    if(Bone4 != -1then
        maxweight 
    maxweight weight4

    if(maxweight != 0then (
            if(
    Bone1 != -1then (
                
    w1 weight1 as float
                append w
    .boneids (bone1 1)
                
    append w.weights w1
            
    )
            if(
    Bone2 != -1then (
                
    w2 weight2 as float
                append w
    .boneids (bone2 1)
                
    append w.weights w2
            
    )
            if(
    Bone3 != -1then (
                
    w3 weight3 as float
                append w
    .boneids (bone3 1)
                
    append w.weights w3
            
    )
            if(
    Bone4 != -1then (
                
    w4 weight4 as float
                append w
    .boneids (bone4 1)
                
    append w.weights w4
            
    )        
        )
    append Weight_array w
    )
    )
    for 
    1 to Type_1_offset_array.count do (
    fseek f Type_1_offset_array[a]#seek_set
    Count1 readlong f
    Count2 
    readlong f
    Count3 
    readlong f
    Count4 
    readlong f
    FaceSections 
    readlong f
    Count5 
    readlong f
    Count6 
    readlong f
    Count7 
    readlong f
    Count9 
    readlong f
    Count10 
    readlong f
    vertstart_array 
    #()
    normalstart_array #()
    wertstart_array #()
    uvstart_array #()
    Facestart_array #()
    VertIDStart_array #()

    append VertIDStart_array (ftell f)
    for 
    1 to Count3 do (
    fseek f 4#seek_cur
    )
    for 
    1 to (Count5 1) do (
    type readlong f
    size 
    readlong f
    unk01 
    readlong f
    if type == do (
    append vertstart_array (ftell f)
    for 
    1 to Count3 do (
    fseek f 0xC#seek_cur
    )
    )
    if 
    type == do (
    append normalstart_array (ftell f)
    for 
    1 to Count3 do (
    fseek f 0xC#seek_cur
    )
    )
    if 
    type == do (
    append wertstart_array (ftell f)
    for 
    1 to Count3 do (
    fseek f 0x10#seek_cur
    )
    )
    if 
    type == do (
    append uvstart_array (ftell f)
    for 
    1 to Count3 do (
    fseek f 0x8#seek_cur
    )
    )
    )
    append Facestart_array (ftell f)
    for 
    1 to FaceSections do (
    Vert_array #()
    UV_array #()
    Normal_array #()
    Face_array #()
    Used_Bone_array #()
    vertid_array #()
    weightid_array #()
    Used_Bone_Name_array #()
    fseek f Facestart_array[c]#seek_set
    facecount readlong f
    vertcount 
    readlong f
    unk02 
    readlong f
    UsedBoneID 
    readlong f
    for 1 to facecount do (
    f1 = (readlong f) + 1
    f2 
    = (readlong f) + 1
    f3 
    = (readlong f) + 1
    append Face_array 
    [f1,f2,f3]
    )
    for 
    1 to UsedBoneID do (
    boneid readlong f 1
    append Used_Bone_array boneid
    append Used_Bone_Name_array BNArr
    [boneid].name
    )
    append Facestart_array (ftell f)

    if 
    VertIDStart_array.count != do (
    fseek f VertIDStart_array[c]#seek_set
    for 1 to vertcount do (
    vertid readlong f 1
    append vertid_array vertid
    )
    append VertIDStart_array (ftell f)
    )
    if 
    vertstart_array.count != do (
    fseek f vertstart_array[c]#seek_set
    for 1 to vertcount do (
    vx readfloat f
    vy 
    readfloat f
    vz 
    readfloat f
    append Vert_array 
    [vx,vy,vz]
    )
    append vertstart_array (ftell f)
    )

    if 
    normalstart_array.count != do (
    fseek f normalstart_array[c]#seek_set
    for 1 to vertcount do (
    nx readfloat f
    ny 
    readfloat f
    nz 
    readfloat f
    append Normal_array 
    [nx,ny,nz]
    )
    append normalstart_array (ftell f)
    )

    if 
    wertstart_array.count != do (
    fseek f wertstart_array[c]#seek_set
    for 1 to vertcount do (
    wx readfloat f
    wy 
    readfloat f
    wz 
    readfloat f
    ww 
    readfloat f
    )
    append wertstart_array (ftell f)
    )

    if 
    uvstart_array.count != do (
    fseek f uvstart_array[c]#seek_set
    for 1 to vertcount do (
    tu readfloat f
    tv 
    readfloat f * -1
    append UV_array 
    [tu,tv,0]
    )
    append uvstart_array (ftell f)
    )
    if 
    UV_array.count == do (
    for 
    1 to vertcount do (
    tu 0
    tv 
    0
    append UV_array 
    [tu,tv,0]
    )    
    )
    print 
    Used_Bone_Name_array

    msh 
    mesh vertices:Vert_array faces:Face_array
    msh
    .numTVerts UV_array.count
    buildTVFaces msh
    for 1 to UV_array.count do setTVert msh j UV_array[j]
    for 
    1 to Face_array.count do setTVFace msh j Face_array[j]
    --for 
    1 to Normal_array.count do setNormal msh j Normal_array[j]
    print 
    weightid_array
    max modify mode
    select msh
    skinMod 
    skin ()
    addModifier msh skinMod

    for 1 to BNArr.count do
    (
        
    maxbone BNArr[i]
        if 
    != Used_Bone_array.count then
            skinOps
    .addBone skinMod maxbone 0
        
    else
            
    skinOps.addBone skinMod maxbone 1
    )
    modPanel.setCurrentObject skinMod

    for 1 to vertcount do
    (
        
    Weight_array[(vertid_array[i])]
        
    bi #()
        
    wv #()
        
    for 1 to w.boneids.count do
        (
            
    boneid w.boneids[j]
            
    weight w.weights[j]
            
    append bi boneid
            append wv weight
        
    )    
        
    skinOps.setVertexWeights skinMod i bi wv
    )


    max create mode


    )
    printoffset (ftell f)
    printoffset Facestart_array[Facestart_array.count]
    )


    fclose f 





  2. The Following User Says Thank You to CriticalError For This Useful Post:


Similar Threads

  1. [Release] FistsOfFu tws unpacker
    By Dwar in forum Game Files
    Replies: 4
    Last Post: 2012-06-13, 10:07 AM
  2. [Info] War of Dragons: Age of Dragons TBL2 Unpack Script
    By h4x0r in forum Game Files
    Replies: 2
    Last Post: 2012-02-14, 09:13 PM
  3. [Info] ARGO Online TBL2 Unpack Script
    By h4x0r in forum Game Files
    Replies: 0
    Last Post: 2012-02-09, 03:04 PM
  4. [Hack] PB scripts
    By termiks in forum Point Blank
    Replies: 4
    Last Post: 2011-07-31, 07:24 AM
  5. Unpacker / De-compiler
    By dubblekiller in forum Research Requests
    Replies: 1
    Last Post: 2011-03-02, 01:03 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •