Vagrant Story:WEP data: Difference between revisions

From Data Crystal
Jump to navigation Jump to search
No edit summary
(Changed redirect target from Vagrant Story:WEP files to Vagrant Story/WEP files)
Tag: Redirect target changed
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
WEP data
#redirect [[Vagrant Story/WEP files]]
 
These files are used to store 3d models for all the weapon files. All values are in hex. Almost exactly the same as the SHP file data but the features which are not required for weapons have been removed.
 
$0      $4      signiture "H01"
$4      $1      number of joints in the skeleton
$5      $1      number of groups
$5      $1      number of groups
$6      $2      number of triangles in the first polygon group
$8      $2      number of quads in the second polygon group
$A      $2      number of nemain polygons (which are further grouped into triangles and quads)
$C      $4      pointer to texture - $10
$10    $30    unknown (always zero)
$40    $4      relative pointer to texture section - $10
$44    $4      relative pointer to groups section
$48    $4      relative pointer to vertex section
$4C    $4      relative pointer to polygon section
 
+      joint section
        for number of joints in skeleton
                JOINT_DATA
                $0    $4      size of bone
                $4    $1      parent joint ID
                $0    $1      unknown
                $0    $4      mountable joint ID
                $0    $9      unknown
 
+      group section
        for number of groups
                GROUP_DATA
                $0    $2      joint group is asigned to
                $2    $2      last vertex in this group
                (the next vertex will become the first vertex for the next group)
 
+      vertex section
        (note that the number of vertices must be obtained by parsing the group section)
        for number of vertices
                VERTEX_DATA
                $0      $2      x co-ordinate
                $2      $2      y co-ordinate
                $4      $2      z co-ordinate
                $6      $2      zero padding to 8 byte alignment
 
+      polygon section
        for number of triangles in first polygon group
                TRIANGLE_DATA
                Triangle vertices are arranged in anti-clockwise order
                $0      $1      polygon type ID ($24 = triangle $2C = quad)
                $1      $1      size in bytes of the polygon data
                $2      $2      unknown (probably alpha transparency or double sided polygons)
                $4      $2      vertex 1 index*4
                $6      $2      vertex 2 index*4
                $8      $2      vertex 3 index*4
                $A      $1      u 1 co-ordinate
                $B      $1      v 1 co-ordinate
                $C      $1      u 2 co-ordinate
                $D      $1      v 2 co-ordinate
                $E      $1      u 3 co-ordinate
                $F      $1      v 3 co-ordinate
        for number of quads in second polygon group
                QUAD_DATA
                Quad vertices are arranged in standard TMD order
                $0      $1      polygon type ID ($24 = triangle $2C = quad)
                $1      $1      size in bytes of the polygon data
                $2      $2      unknown (probably transparency or double sided polygons)
                $4      $2      vertex 1 index*4
                $6      $2      vertex 2 index*4
                $8      $2      vertex 3 index*4
                $A      $2      vertex 4 index*4
                $C      $1      u 1 co-ordinate
                $D      $1      v 1 co-ordinate
                $E      $1      u 2 co-ordinate
                $F      $1      v 2 co-ordinate
                $10    $1      u 3 co-ordinate
                $11    $1      v 3 co-ordinate
                $12    $1      u 4 co-ordinate
                $13    $1      v 4 co-ordinate
        for number of polygons
                $0      $10 or $14      POLYGON_DATA or QUAD_DATA as above
 
+      texture map section
        There is no pointer to the texture map section you must walk the file by going to the
        magic effects section and reading the size of that section. then add 8 (number of bytes in
        the magic section header
        $0      $4      size of texture map in bytes
        $4      $1      unknown
        $5      $1      half the width in pixels
        $6      $1      half the height in pixels
        $7      $1      number of colours per pallet
        for 5 of pallets
                for number of colours per pallet
                        $0      $2      colour data
                                        most significant bit is alhpa used to set transparency
                                        next comes 5 bits each for blue, green and red
        for height in pixels
                for width in pixels
                        $0      $1      CLUT colour reference
        $0      $?      unknown texture footer (may or may not be present)
[[Category:Vagrant_Story]]

Latest revision as of 22:32, 1 February 2024