Vagrant Story/WEP files

From Data Crystal
Jump to navigation Jump to search

This is a sub-page of Vagrant Story.

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.

File Format

$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      $1      0x40 => one-sided, 0x50 => double-sided
                $3      $1      unknown (probably alpha transparency)
                $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      $1      0x40 => one-sided, 0x50 => double-sided
                $3      $1      unknown (probably alpha transparency)
                $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)

Weapons and shields table

// ID  WEP name
   1   1   BattleKnife
   2   3   Scramasax
   3   4   Dirk
   4   9   ThrowingKnife
   5   5   Kudi
   6   7   Cinquedea
   7   8   Kris
   8  10   Hatchet
   9  11   Khukuri
  10   6   Baselard
  11  12   Stiletto
  12   2   Jamadhar
  13  14   Spatha
  14  16   Scimitar
  15  15   Rapier
  16  13   ShortSword
  17  22   Firangi
  18  21   Shamshir
  19  17   Falchion
  20  20   Shotel
  21  18   Khora
  22  23   Khopesh
  23  19   Wakizashi
  24  24   Romphaia
  25  28   BroadSword
  26  30   NorseSword
  27  27   Katana
  28  29   Executioner
  29  26   Claymore
  30  31   Schiavona
  31  25   BastardSword
  32  33   Nodachi
  33  32   RuneBlade
  34  34   HolyWin
  35  35   HandAxe
  36  36   BattleAxe
  37  37   Francisca
  38  38   Tabarzin
  39  39   Chamkaq
  40  40   Tabar
  41  41   Bullova
  42  42   Crescent
  43  48   GoblinClub
  44  49   SpikedClub
  45  50   BallMace
  46  43   Footman'sMace
  47  45   MorningStar
  48  47   WarHammer
  49  44   BecdeCorbin
  50  46   WarMaul
  51  55   Guisarme
  52  51   LargeCrescent
  53  52   SabreHalberd
  54  53   Balbriggan
  55  54   DoubleBlade
  56  56   Halberd
  57  57   WizardStaff
  58  58   ClergyRod
  59  59   SummonerBaton
  60  60   ShamanicStaff
  61  61   Bishop'sCrosier
  62  62   Sage'sCane
  63  63   Langdebeve
  64  64   SabreMace
  65  67   Footman'sMace
  66  65   Gloomwing
  67  66   Mjolinir
  68  70   Griever
  69  69   Destroyer
  70  68   HandofLight
  71  71   Spear
  72  72   Glaive
  73  73   Scorpion
  74  74   Corcesca
  75  75   Trident
  76  76   AwlPike
  77  77   BoarSpear
  78  78   Fauchard
  79  79   Voulge
  80  80   PoleAxe
  81  81   Bardysh
  82  82   Brandestoc
  83  83   GastraphBow
  84  84   LightCrossbow
  85  85   TargetBow
  86  86   Windlass
  87  87   Cranequin
  88  88   LugCrossbow
  89  89   SiegeBow
  90  90   Arbalest
  
// ID  WEP name
   1  96   Buckler
   2 102   Pelta
   3  99   Targe
   4 100   Quad
   5 105   Circle
   6 101   Tower
   7 106   Spiked
   8  98   Round
   9 107   Kite
  10 108   Casserole
  11 104   Heater
  12 103   Oval
  13 111   Knight
  14  97   Hoplite
  15 109   Jazeraint
  16 110   Dread