User Tools

Site Tools


arma:file_formats:pew

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
arma:file_formats:pew [2009-05-25 04:28]
snakeman created pew initial page.
arma:file_formats:pew [2011-11-28 12:16] (current)
snakeman updated page a bit.
Line 1: Line 1:
-Introduction+====== PEW File Format ======
  
-Pew are Visitor'​s project files. Visitor is BI's tool for creating Islands.+====== Introduction ======
  
-Visitor is a Gui tool interface ​that interacts with Bulldozer, an inbuilt '​world'​ viewer inside any Armed Assault engine.+PEW are Visitor'​s project files. Visitor is BIS tool for creating terrains. 
 + 
 +Visitor is a GUI tool that interacts with Bulldozer, an inbuilt '​world'​ viewer inside any Armed Assault engine.
  
 The contents of the project file, pew, are not directly related to the ultimate output, a wrp file. However, that data, of course, contains all similar elements, such as road networks, elevations, cell matrices, models and textures. The contents of the project file, pew, are not directly related to the ultimate output, a wrp file. However, that data, of course, contains all similar elements, such as road networks, elevations, cell matrices, models and textures.
Line 10: Line 12:
  
 While there have been several pew versions, the one's listed here are While there have been several pew versions, the one's listed here are
- +<​code>​ 
-  * POSEW59 and +*POSEW59 and 
-  * POSEW60 ​+*POSEW60 
 +</​code>​
  
 there are only a few subtle differences to their makeup. there are only a few subtle differences to their makeup.
  
  
 +====== Legend ======
  
-Legend+see Generic FileFormat Data Types
  
-[[http://​en.wikipedia.org/​wiki/​Endianness#​Little-endian|Little endian]] byte order, lsb first for numeric values, text is stored in Big endian byte order. 
-<​code>​ 
-Type Description 
-byte 8 bit (1 byte) 
-short 16 bit signed short (2 bytes) 
-int 32 bit signed integer (4 bytes) 
-float 32 bit signed single precision floating point value (4 bytes) 
-double 64 bit signed single precision floating point value (8 bytes) 
-asciiz Null terminated (0x00) variable length ascii string 
-ascii fixed length ascii string(UTF-8) 
-</​code>​ 
  
-XYPair+====== File Format ======
  
 +This file format is principally used with Armed Assault v1.09 and later plus the ArmA Tools Suite Final release (v1.14).
 <code cpp> <code cpp>
-XYPair +  POSEW59 
-+  ​POSEW60 
- ulong ​x,y; // normally associated with cell sizes +  ​
-}+    ​PoseHeader ​              ​Header;​ 
 +    ​ulong                    ​nOFPTextures ​          // none in Arma; 
 +    OFPTexture ​              ​OFPTextures[[nOFPTextures]];​ 
 +    ulong                    nObjectTemplates;​ 
 +    ObjectTemplate ​          ​ObjectTemplates[[nObjectTemplates]];​ 
 +    shortBool ​               NoOfpTerrains;​ 
 +    if  (!NoOfpTerrains) 
 +    { 
 +    ulong                    nOFPTerrains; ​        //  none in Arma; 
 +    OFPTerrain ​              ​OFPTerrains[[nOFPTerrains]];​ 
 +    } 
 +    shortBool ​               NoOFPForests; ​        // ​ none in Arma; 
 +    if  (!NoOFPForests) 
 +    { 
 +    ulong                    nOFPForests; ​          
 +    OFPForest ​               OFPForests[[nOFPForests]];​ 
 +    } 
 +    RoadNets ​                ​RoadNets[[...]];​ 
 +    Elevation ​               Elevation[[...]];​ 
 +    ulong                    NoOfObjects;​ 
 +    Object ​                  ​Objects[[NoOfObjects]];​ 
 +  
 +    ulong                    NoOfLayers;​ 
 +    String ​                  ​LayerName; ​          //&​quot;​Base&​quot;​ 
 +    Layer                    Layers[[NoOfLayers]] ; 
 +  
 +    if (POSEW60) 
 +    { 
 +     ​ulong ​                  ​Unknown;​ 
 +    } 
 +    else // pose59 
 +    { 
 +      ulong                  nNamedZones;​ 
 +      NamedZone ​             NamedZones[[nNamedZones]];​ 
 +    } 
 +  
 +    ulong                    nRoadBlocks;​ 
 +    RoadBlock ​               RoadBlocks[[nRoadBlocks]];​ 
 +  
 +    if (POSEW60) 
 +    { 
 +      ulong                  nNamedZones;​ 
 +      NamedZone ​             NamedZones[[nNamedZones]];​ 
 +    } 
 +    else // pose59 
 +    { 
 +     ​ulong ​                  ​Unknown;​ 
 +    } 
 +    ulong                    nKeyPoints;​ 
 +    KeyPoint ​                ​KeyPoints[[nKeyPoints]]; ​    
 +    ulong                    NoOfBackgrounds;​ 
 +    Background ​              ​Backgrounds[[NoOfBackgrounds]] ;// not checked for 59 
 +    ulong                    TotalSizeOfSelections;​ // from here, to end of file 
 +    ulong                    nSelections;​ 
 +    Selection ​               Selections[[nSelections]];​ 
 +  }
 </​code>​ </​code>​
  
  
-RGBAColor+====== PoseHeader ======
  
 <code cpp> <code cpp>
-RGBAColor + ​Header 
-+ { 
- byte r,g,b,a; // // 0xFF:​FF:​FF:​FF means '​default'​ +  ​char ​    ​Signature[[7]]       // &​quot;​POSEW59&​quot;​ or &​quot;​POSEW60&​quot;​ note: NOT null terminated 
-}+  
 +  ulong    Length; ​             ​// of PEW file; 
 +  ulong    UnknownLong; ​        // typically 0 
 +  String ​  ​IslandDataPath; ​     //&​quot;​SomePboPrefix\SomeIsland\data\0&​quot;​ 
 +                                // Folderlocation of the rvmat material list 
 +  String ​  ​IslandObjectPath; ​   //&​quot;&​quot;​ 
 +  float  ​  ​GridSize; ​           //50.0 
 +  float  ​  ​SegmentSize; ​        //​400.0 (==SegmentSize - SegmentOverlap) 
 +  String ​  ​IslandClassname; ​    //&​quot;&​quot;​ 
 + };
 </​code>​ </​code>​
  
-  * RGBA colors correspond to Microsoft'​s D3DCOLORVALUE 
-  * They normally come in pairs innside the pew structures ​ 
  
- +====== OFPTexture ======
-String+
  
 <code cpp> <code cpp>
-String + ​OFPTexture 
-+ { 
- ulong  ​Length+  ulong     TextureID;​ 
- Asciiz Characters;// null terminated regardless+  String ​   TextureFileName;​ //​ &​quot;​snih3.paa&​quot
 +  ​String ​   TextureName; // &​quot;​snih3&​quot;​ 
 +  String ​   RvmatName;​ //​ &​quot;​snih3.rvmat&​quot;​ 
 +  byte      UnknownBytes[[14]];​ //​ (typically 0) 
 +  RGBAColor Colour; 
 + }
 </​code>​ </​code>​
  
-Length always =strlen(Characters)+1;​ 
  
-This is a pre-calculated convenience to reduce load times (and skip over the variable length block). +====== ObjectTemplate ======
- +
-File Format +
- +
-          * This file format is principally used with Armed Assault v1.09 and later plus the ArmA Tools Suite Final release (v1.14). ​+
  
 <code cpp> <code cpp>
-POSEW59 +  ObjectTemplate 
-POSEW60 +  
-+      ​String ​      ​ModelFilename;​ //&​quot;​SomePrefixRoot\data\jablon.p3d\0&​quot;​ 
- PoseHeader ​              ​Header+      String ​      ​ModelName; ​    //&​quot;​jablon&​quot
- ulong ​                   ​nTextures (typically ​0); +      ulong        ​ObjectType; ​   // 0..5 
- Textures ​                ​Textures[nTextures]; +                                  // 0 Undefined - This type should never be encountered. 
- ulong ​                   ​nObjectTypes+                                  // 1 Natural 
- ObjectType ​              ​ObjectTypes[nObjectTypes]+                                  // 2 Artificial 
- RoadNets ​                ​RoadNets[...]; +                                  // 3 Road (RoadFlag will be true) 
- Terrain ​                 Terrain[...]+                                  // 4 Forest 
- ulong                    NoOfObjects+                                  // 5 Road2 (RoadFlag will be false) 
- Object ​                  ​Objects[NoOfObjects]; +      RGBAColor ​   OutlineColour;  
- ulong                    NoOfLayers+      ​RGBAColor ​   ObjectColour; ​  
- Layer                    Layers[[NoOfLayers] ; +      double  ​  ​GeometryBounds[[2]];         // 50.0 
- ulong                    RoadNetIndices[TerrainGridSizeXY]; +      ulong    ​ModelID
- if (POSEW60+      ​XYZTriplet ​  ​GeometryAutocenterPos
-+      ​double  ​  ​ResolutionBounds[[2]];         // 50.
- ulong ​                  ​NoOfBackgrounds+      XYZTriplet ​  ​ResolutionAutoCenterPos
- Background ​             Backgrounds[NoOfBackgrounds] ​;// probably +      ​shortBool  ​  ​Generally0x01  ​ 
-+      ​shortBool  ​  ​RandomScaleFlag;​ 
- else // pose59 +      double  ​  ​RandomScaleMinMax[[2]];        // 50.0 
- +      ​shortBool  ​  ​RandomRotateFlag
- ulong ​                 Count; +      ​double  ​  ​RandomRotateMinMax[[2]];       // 20.0 
- UnknownStruct2 ​        ​UnknownStructs[Count]; +      ​shortBool  ​  ​RandomOrientationFlag; ​     
- }+      double  ​  ​RanmdomOrientationMinMax[[2]]; // 180.0 
 +      ​shortBool  ​  ​RoadFlag;​ 
 +      ​if (RoadFlag)  
 +      
 +            ​TransformMatrix RoadNamedSelections; // (LB, PB, LE, PE) 
 +            ​TransformMatrix XRoadNamedSelections; // (LD, LH, PD, PH) 
 +      }; 
 +      ​ulong ​           nNamedVectors; ​              // Usually 0 (zero) 
 +      ​NamedVector ​ NamedVectors[nNamedVectors]; 
 +      ​ulong ​       MarkerType;​  ​               // Rectangular = 0, Elliptical = 1  
 +  ​} 
 +</​code>​
  
- ulong ​                   nBlocks; 
- RoadBlock ​               RoadBlocks[nBlocks];​ 
- 
- if (POSEW60) 
- { 
- ulong ​                 Count; 
- UnknownStruct2 ​        ​UnknownStructs[Count];​ 
- } 
- else // pose59 
- { 
- ulong ​                  ​NoOfBackgrounds;​ 
- Background ​             Backgrounds[NoOfBackgrounds] ;// probably 
- } 
- ulong ​                   Count; 
- Locale ​                  ​Locales[Count]; ​         
- ulong ​                   Always0; 
- ulong ​                   Always4; 
- ulong ​                   Always0; 
-} 
-</​code>​ 
  
 +====== NamedVector ======
  
-PoseHeader 
 <code cpp> <code cpp>
-Header +  NamedVector 
-+  
- char     ​Signature[7]"​POSEW59"​ or "​POSEW60"​ note: NOT null terminated +     String ​    Name      ​//&​quot;​pohrada&​quot
- +     LongBool ​  ​Unknown
- ulong ​   UnknownLong0;​ +     ​ulong      ​nTriplets; // always 2 
- ulong ​   UnknownLong1;  ​// typically 0 +     XYZTriplet StartEndPos[[nTriplets]]; 
- ulong ​   IslandDataPathLen+  }
- String ​  ​IslandDataPath[IslandDataPathLen];//"​SomePboPrefix\SomeIsland\data\0"​ +
- ulong ​   ​IslandObjectPathLen;​ +
- String ​  ​IslandObjectPath[IslandObjectPathLen];//""​ +
- float  ​  ​GridSize; ​     //50.0 +
- float  ​  ​SellSize; //400.0 (SegmentSize - SegmentOverlap) +
- ulong    IslandClassnameLen;​ +
- String ​  ​IslandClassname[IslandClassnameLen];//""​ +
-};+
 </​code>​ </​code>​
  
-ObjectType+ 
 +====== OFPTerrain ======
  
 <code cpp> <code cpp>
-ObjectType + ​OFPTerrain 
-+ { 
- String ​ModelFilename//"​SomePrefixRoot\data\jablon.p3d\0"​ +  String ​ ​TerrainName
- String ModelName//"​jablon"​ +  ​byte ​   UnknownBytes[[11]]
- ulong ​ObjectType// 0..5 +  ulong   nSurfaces
- RGBAColor OutlineColour+  ​OFPSurface OFPSurfaces[[nSurfaces]]
- RGBAColor ObjectColour;​ + } 
- VariousInfo:​ +</code>
- double UnknDouble01;​ // 50.0 +
- double UnknDouble02;​ /50.0+
  
- ulong ObjectTypeID;​ 
- float UnknFloat[3];​ 
  
- double UnknDouble11;​ // 50.0 +====== OFPSurface ======
- double UnknDouble12;​ // 50.0+
  
- char UnknChar02[14];​ +<code cpp> 
- short ScaleFlag; // Random Scale Flag + OFPSurface 
- double Scale0; // 50.0 + { 
- double Scale1// 50.0 +  ​String SurfaceName
- +  float  ​Surfacefloat[[4]]; 
- short RotateFlag; // Random Rotate Flag +  ​byte ​  ​UnknownBytes[[16]]; 
- double Rotate0; // 20.0 + }
- double Rotate1; // 20.0 +
- +
- short OrientationFlag;//​ Random Orientation Flag +
- double Orientation0;​ // 180.0 +
- double Orientation1;​ // 180.0 +
- +
- short RoadFlag; switch (RoadFlag) +
-+
- case 0x0001: +
-+
- float UnknFloat[12]; +
- char UnknChar[48]; // (typically 0) +
- }; +
- }; +
- ulong MarkerType; // See MarkerTypeEnum +
- LongBool LongBool; // 0 or 1 +
-}+
 </​code>​ </​code>​
  
-NB: While the '​VariousInfo'​ byte array is decernable at this time it essentially defines various floats, integers, transforms etc. that denote the '​default'​ and/or '​seed'​ values for a given ObjectType. ​ 
  
-ObjectTypeID is also present at offset 16 in the VariousInfo'​s +====== OFPForest ======
- +
-ArtificialSubObject+
  
 <code cpp> <code cpp>
-ArtificialSubObject + ​OFPForest 
-+ { 
- String ​    Name      //"​pohrada"​ +  String ​   ​ForestName;​ 
- LongBool ​  ​LongBool+  RGBAColor OutlineColour;​ 
- ulong ​     ​Always02+  RGBAColor ObjectColour;​ 
- XYZTriplet StartEndPos[2]+  ulong     ​SquareFillModelID
-}+  ​ulong  ​   SquareModelID
 +  ulong     TriangleModelID
 +  ​ulong  ​   Unknown1; // (typically 0) 
 +  ulong  ​   Unknown2;​ //​ (typically 0) 
 + }
 </​code>​ </​code>​
  
-RoadNet+ 
 +====== ​RoadNet ​======
  
 <code cpp> <code cpp>
-RoadNet +    ​shortBool NoRoads; 
-+    if  (!NoRoads) 
- shortBool Always1; +    
- shortBool Always1; +      ulong    nTypes; 
- shortBool NoRoads; +      RoadType RoadTypes[[nTypes]]; 
- if (!NoRoads) +      ulong    nXRoads; 
-+      XRoad    XRoads[[nXRoads]]; 
- ulong    nTypes; +    }
- RoadType RoadTypes[nTypes];​ +
- ulong    nXRoads; +
- XRoad    XRoads[nXRoads];​ +
- +
-}+
 </​code>​ </​code>​
  
  
-RoadType+====== ​RoadType ​======
  
 <code cpp> <code cpp>
-RoadType +  ​RoadType 
-+  
- String ​      ​FamilyName; ​       // "cesta","silnice",etc +    String ​      ​FamilyName; ​       // &quot;cesta&quot;,&quot;silnice&quot;,etc 
- RGBA         ​KeyPartsColour; ​    +    RGBA         ​KeyPartsColour; ​    
- RGBA         ​NormalPartsColour;​  +    RGBA         ​NormalPartsColour;​  
- shortBool ​   FilledLine; ​       // 0 or 1 +    shortBool ​   FilledLine; ​       // 0 or 1 
- double ​      ​MaxAngle; ​         // 25.0 degrees  +    double ​      ​MaxAngle; ​         // 25.0 degrees  
- double ​      ​MaxBankAngle; ​     // 5.0 degrees +    double ​      ​MaxBankAngle; ​     // 5.0 degrees 
- ulong ​       nStraights;​ +    ulong        nStraights;​ 
- RoadList ​    ​Straights[nStraights];​ +    RoadList ​    ​Straights[[nStraights]]; 
- ulong ​       nCurves; +    ulong        nCurves; 
- RoadList ​    ​Curves[nCurves];​ +    RoadList ​    ​Curves[[nCurves]]; 
- ulong ​       nSpecials;​ +    ulong        nSpecials;​ 
- RoadList ​    ​Specials[nSpecials];​ +    RoadList ​    ​Specials[[nSpecials]]; 
- ulong ​       nTerminators;​ +    ulong        nTerminators;​ 
- RoadList ​    ​Terminators[nTerminators];​ +    RoadList ​    ​Terminators[[nTerminators]]; 
-}+    } 
 +  ​}
 </​code>​ </​code>​
  
  
-RoadList+====== ​RoadList ​======
  
 <code cpp> <code cpp>
-RoadList ​     +  ​RoadList ​     
-+  
- String ​     ModelName; ​     // "cesta25" +       ​String ​     ModelName; ​     // &quot;cesta25&quot; 
- ulong ​      ​ObjectID; ​      // in the model list +       ​ulong       ​ObjectID; ​      // in the model list 
- ushort ​     MeterType; ​     // 0,1,2,3 not present for Terminators +       ​ushort ​     MeterType; ​     // 0,1,2,3 not present for Terminators 
- shortBool ​  ​CanChangeAngle;​ // not present for Terminators or Curves +       ​shortBool ​  ​CanChangeAngle;​ // not present for Terminators or Curves 
-} +  }
-</​code>​+
  
 MeterType MeterType
- +:Type Straights Curves 
-Type Straights Curves\\ +:             ​25   ​meters 
-0 6 25 meters\\ +:    ​12         ​50 
-1 12 50\\ +:    ​25         ​75 
-2 25 75\\ +:              ​100 
-3 100+</​code>​
  
 Broadly speaking, there are a few basic road types Broadly speaking, there are a few basic road types
  
-  ​* asfalt bitumen. +<​code>​ 
-  * silnice Paved +*asfalt ​  ​bitumen. 
-  * cesta dirt +*silnice ​ Paved 
 +*cesta ​   dirt 
 +</​code>​
  
 Each RoadType describes the general characteristics of a Dirt Road as opposed to (say) an Asphalt one. Each RoadType describes the general characteristics of a Dirt Road as opposed to (say) an Asphalt one.
  
-Each of these RoadTypes (such as asphalt) can have multiple curved, straight, special, and termination p3d models associated with them+Each of these RoadTypes ​ (such as asphalt) can have multiple curved, straight, special, and termination p3d models associated with them.
- +
-Generally speaking, there are +
- +
-  * 3 '​straight'​ models, approximately 6,12, and 25 meters long respectively. +
-  * 4 '​curved'​ models, 25,50,75 and 100 meters long. +
-  * 1 '​terminaton type+
  
 +Generally speaking, there are 
 +<​code>​
 +*3 '​straight'​ models, approximately 6,12, and 25 meters long respectively.
 +*4 '​curved'​ models, 25,50,75 and 100 meters long.
 +*1 '​terminaton type.
 +</​code>​
 The termination type is a road like any other but tends to be a fixed 6 meter fade out of the general road texture. The termination type is a road like any other but tends to be a fixed 6 meter fade out of the general road texture.
  
-XRoad+ 
 +====== ​XRoad ======
  
 <code cpp> <code cpp>
-XRoad + XRoad 
-+ { 
- String ​   Name;​  ​     //​kr_asfaltka_asfaltka_t. +  String ​   Name;​  ​     //​kr_asfaltka_asfaltka_t. 
- ushort ​   ​Type              ​//1 or 3 +  ushort ​   ​Shape; ​           ​//1 or 3 
- RGBA      color;​  ​     //FF FF FF FF  +  RGBA      color;​  ​     //FF FF FF FF  
- shortBool CanChangeBankAngle;​ +  shortBool CanChangeBankAngle;​ 
- ulong ​    ​ObjectID;​ +  ulong     ​ObjectID;​ 
- String ​   Intersections[4];​ //"asfaltka","silnice","cesta",​Type=3 ​"silnice" ​else ""​ +  String ​   Intersections[[4]]; //&quot;asfaltka&quot;,&quot;silnice&quot;,&quot;cesta&quot;,​Type=3 ​&quot;silnice&​quot; ​else &​quot;&​quot;​ 
-}+ }
 </​code>​ </​code>​
  
 Although CrossRoads could, conceivably,​ have any number of intersections,​ only two types are handled. Although CrossRoads could, conceivably,​ have any number of intersections,​ only two types are handled.
  
-  ​* Type 1: A T_Junction (3 intersections) +<​code>​ 
-  * Type 3: A Genuine crossroad (4 way intersection) ​+*Type 1: A T_Junction (3 intersections) 
 +*Type 3: A Genuine crossroad (4 way intersection) 
 +</​code>​
  
 For T_Junctions,​ there is, obviously, no 4th intersection and this is null filled. For T_Junctions,​ there is, obviously, no 4th intersection and this is null filled.
Line 305: Line 324:
 Without taking too literal an interpretation,​ there are some major types of road. Without taking too literal an interpretation,​ there are some major types of road.
  
-  ​* asfaltka:​bitumen (sealed) +<​code>​ 
-  * silnice: Paved +*asfaltka:​bitumen (sealed) 
-  * cesta: Dirt +*silnice: Paved 
 +*cesta: ​  ​Dirt 
 +</​code>​
  
 Thus the names of each intersection reflect the road type of that intersection,​ sometimes resulting in (up to) four identical names. Thus the names of each intersection reflect the road type of that intersection,​ sometimes resulting in (up to) four identical names.
  
-The overall name of the crossroad itself, tries to reflect the nature of it's makeup thus kr_asfaltka_asfaltka_t:​ an bitumen T_Junction kr_silince_x_cesta:​ a crossroad of paved and dirt roads.+The overall name of the crossroad itself, tries to reflect the nature of it's makeup thus
  
-Terrain+kr_asfaltka_asfaltka_t:​ an bitumen T_Junction
  
-<code cpp> +kr_silince_x_cesta:​ a crossroad of paved and dirt roads.
-Terrain +
-+
- XYPair ​  ​TerrainGridSize;​ // 256 x 256 eg +
- float ​   TerrainGridHeights[TerrainGridSize];​ +
- float ​   BlueEdgeTerrainHeights[NoOfBlueFloats] ​ ; //Always zero values // NoOfBlueFloats = (TerrainGrid_Y * TerrainGrid_X)/​16;​ +
- ulong ​   Always0; +
-+
-</​code>​+
  
-Object 
  
-<code cpp> +====== Elevation ======
-Object +
-+
- ShortBool IsPresent;​ +
- if (IsPresent) +
-+
- ShortBool Always0; +
- ulong InstanceId;​ +
- float TransformColumn[3][4];​ // described here to solidly illustrate to reader +
- // this is a standard DirectX Transform matrix +
- // but in COLUMN format;+
  
- double ObjectRelativeSize;​ // decimal percentage +<code cpp> 
- String InstanceName; // "​minimalStrelPos"​ + Elevation 
- float RelativeSurfaceElevation+ { 
- RGBA OutlineColour+    XYPair ​  ​GridSize; // 256 x 256 eg 
- RGBA ObjectColour+    float    ​Heights[[GridSize]]
- ulong ObjectID+    ​float ​   BlueEdgeTerrainHeights[[NoOfBlueFloats]]  ​//Always zero values ​ 
- }+    // NoOfBlueFloats = (GridSize_Y * GridSize_X)/​16
-};+    ulong    ​Always0
 + }
 </​code>​ </​code>​
  
-Layer+ 
 +====== Object ======
  
 <code cpp> <code cpp>
-Layer +  Object 
-+  
- String ​         Name1           //"​Base"​ +      ​ShortBool IsPresent;​ 
- ulong ​          SizeType        ​//0 +      if (IsPresent) 
- String ​         Name2           //"​Base"​ +      { 
- ushort ​         DefaultIndicator; // 1 +        ShortBool Moveable             // always 0 
- ulong ​          NoOfTerrainMaterials+        ulong     InstanceId;​ 
- TerrainMaterial TerrainMaterials[NoOfTerrainMaterials]+        float     ​TransformColumn[[3]][[4]]; // described here to solidly illustrate to reader 
-}+                                         // this is a standard DirectX Transform matrix 
 +                                         // but in COLUMN format; 
 +        double ​   ObjectRelativeSize   // decimal percentage 
 +        ​String ​   InstanceName         // &​quot;​minimalStrelPos&​quot;​ 
 +        float     ​RelativeSurfaceElevation;​ 
 +        RGBA      OutlineColour;​  
 +        RGBA      ObjectColour;  ​ 
 +        ulong     ObjectTemplateID
 +      }
 +  };
 </​code>​ </​code>​
  
  
-TerrainMaterial+====== Layer ======
  
 <code cpp> <code cpp>
-TerrainMaterial +    Layer 
-+    { 
- ulong ​ BitFlags; ​        ​// 1 = label, 0x40 = rvmatfile,,,,​ +        ulong           ​SizeType; ​        //​0..2 //see below 
- String MaterialName;​ // "---sea---","Layers\P_000-000_L00.rvmat" +        String ​         Name;             //&​quot;​Base&​quot;​ 
- ulong ​ TypeID; ​      // 0,1,2 +        shortBool ​      ​DefaultIndicator;​ // 0 ... 1 
-}+        if (DefaultIndicator == 0) 
 +        { 
 +            ulong  SurfaceTable[[TableSize.x*y]];​ 
 +            ulong  TextureTable[[TableSize.x*y]];​ 
 +            byte   ​UnknownTable[[(TableSize.x*y/​4)]];​ 
 +            ushort UnknownShort;​ 
 +        }; 
 +        if (DefaultIndicator == 1) 
 +        { 
 +            ulong           ​NoOfTerrainMaterials;​ 
 +            ​TerrainMaterial[[NoOfTerrainMaterials]] 
 +            
 +                ulong  BitFlags; ​    ​// 1 = label, 0x40 = rvmatfile,,,,​ 
 +                String MaterialName;​ // &quot;---sea---&quot;,&quot;Layers\P_000-000_L00.rvmat&quot; 
 +                ulong  TypeID; ​      // 0..3 
 +            }
 +            ulong RvmatTable[[TableSize.x*y]];​ 
 +        }; 
 +    }; 
 + 
 +TableSize = Terrain.GridSize>>​ SizeType;
 </​code>​ </​code>​
  
-Background 
  
-<code cpp> +====== ​RoadBlock ​======
-Background // this structure has not been seen +
-+
- String BackgroundFilename;​ +
- String BackgroundName;​ +
- float ​ OffsetX; +
- float ​ OffsetY; +
- float ​ SizeX; +
- float ​ SizeY; +
- ulong ​ Transparency;​ +
- ulong ​ Visible; +
-+
-</​code>​ +
- +
-RoadBlock+
  
 <code cpp> <code cpp>
-RoadBlock + RoadBlock 
-+ { 
- ShortBool IsPresent;  +  ShortBool IsPresent;  
- if IsPresent +  if IsPresent 
-+  
- ShortBool Always1;  +  ShortBool Always1;  
- ulong     ​Unknown[12];​  +  ulong     ​Unknown[[12]];  
-           ​/* typical data +            /* typical data 
-           ​* *00 00 00 00 00 00 00 F0 2C 46 00 98 23 46 C6 6F  +            **00 00 00 00 00  
-           * *C6 42 0E 01 00 00 01 00 00 F0 2C 46 00 98 23 46  +00 00 F0 2C  
-           * *C6 6F C6 42 0E 01 00 00 4B 00 00 00 00 00 00 00  +46 00 98 23  
-           ​* / +46 C6 6F C6  
- ushort ​   Type;             // 0,1,2,3 +42 0E 01 00  
- String ​   RoadFamilyName; ​  //"hlavni silnice" +00 01 00 00  
- String ​   RoadModelName; ​   //"kr_silnice_cesta_t" +F0 2C 46 00  
- RGBA      color; ​            +98  
- ShortBool Always1;  +23 46 C6 6F  
- ulong     ​Count;​  +C6 42 0E 01  
- FamilyList FamilyLists[Count];​ +00 00 4B 00  
- ulong     ​Unknown[27];​ +00 00 00 00  
-           ​/* typical data +00 00  
-           ​* *FA D4 30 BF 94 58 08 3D 00 00 C8 C0 00 00 60 C0  +            */ 
-           ​* *00 00 00 00 00 00 48 C1 00 00 60 40 00 00 00 00  +  ushort ​   Type;             // 0,1,2,3 
-           ​* *00 00 48 C1 00 00 60 C0 00 00 00 00 00 00 00 00  +  String ​   RoadFamilyName; ​  //&quot;hlavni silnice&quot; 
-           ​* *00 00 60 40 00 00 00 00 00 00 00 00 00 00 C8 C0  +  String ​   RoadModelName; ​   //&quot;kr_silnice_cesta_t&quot; 
-           ​* *00 00 00 00 00 00 30 C0 00 00 C8 C0 00 00 00 00  +  RGBA      color; ​            
-           ​* *00 00 1C C1 04 01 00 00 00 00 00 00 00 00 00 00  +  ShortBool Always1;  
-           ​* *09 00 00 00 0B 80 00 00 04 00 00 00  +  ulong     ​Count;​  
-           ​* / +  FamilyList FamilyLists[[Count]]; 
- ulong     ​Count; ​    +  ulong     ​Unknown[[27]]; 
- ModelList ModelLists[Count];​ +            /* typical data 
-+            **FA D4 30 BF 94 58 08 3D 00 00 C8 C0 00 00 60 C0  
-}+            **00 00 00 00 00 00 48 C1 00 00 60 40 00 00 00 00  
 +            **00 00 48 C1 00 00 60 C0 00 00 00 00 00 00 00 00  
 +            **00 00 60 40 00 00 00 00 00 00 00 00 00 00 C8 C0  
 +            **00 00 00 00 00 00 30 C0 00 00 C8 C0 00 00 00 00  
 +            **00 00 1C C1 04 01 00 00 00 00 00 00 00 00 00 00  
 +            **09 00 00 00 0B 80 00 00 04 00 00 00  
 +            */ 
 +  ulong     ​Count; ​    
 +  ModelList ModelLists[[Count]]; 
 +  
 + } 
 +Type 
 +*0 Road Ending with FamilyName and it's ModelName_konec 
 +*1 TJunction ModelName Only 
 +*2 Road similar to type 0 
 +*3 Xroad with ModelName Only
 </​code>​ </​code>​
- 
-Type 
- 
-  * 0 Road Ending with FamilyName and it's ModelName_konec 
-  * 1 TJunction ModelName Only 
-  * 2 Road similar to type 0 
-  * 3 Xroad with ModelName Only  
  
  
-FamilyList+====== ​FamilyList ​======
  
 <code cpp> <code cpp>
-FamilyList + FamilyList 
-+ { 
- ulong ​ Unknown[4];//​ Typically 00 00 C8 C0 00 00 C8 C0 00 00 00 00 0E 01 00 00 +   ​ulong  Unknown[[4]];// Typically 00 00 C8 C0 00 00 C8 C0 00 00 00 00 0E 01 00 00 
- String Name;     // ​"silnice hlavni silnic\0" +   ​String Name;     // ​&quot;silnice hlavni silnic\0&quot; 
-}+ }
 </​code>​ </​code>​
  
 This struct is principally used for Xroads and Tjunctions. It typically lists the order of all RoadFamilyName'​s required This struct is principally used for Xroads and Tjunctions. It typically lists the order of all RoadFamilyName'​s required
  
-ModelList+ 
 +====== ​ModelList ​======
  
 <code cpp> <code cpp>
-ModelList + ModelList 
-+ { 
- ulong ​     Count; ​          //15 eg +  ulong      Count; ​          //15 eg 
- BlockModel BlockModel[Count];​ +  BlockModel BlockModel[[Count]]; 
- String ​    ​FamilyName; ​     //"silnice hlavni silnic\0" +  String ​    ​FamilyName; ​     //&quot;silnice hlavni silnic\0&quot; 
- ulong ​     Unknown[4]; ​     //Typically 00 00 C8 C0 00 00 C8 C0 00 00 00 00 0E 01 00 00 +  ulong      Unknown[[4]];      //Typically 00 00 C8 C0 00 00 C8 C0 00 00 00 00 0E 01 00 00 
- RGBA       ​color[2]; ​         +  RGBA       color[[2]];          
- ShortBool ​ Always01; ​       //01 +  ShortBool ​ Always01; ​       //01 
- ulong ​     buf2[4]; ​        // Typically 00 00 00 00 00 00 39 40 00 00 00 00 00 00 24 40 +  ulong      buf2[[4]];         // Typically 00 00 00 00 00 00 39 40 00 00 00 00 00 00 24 40 
-}+ }
 </​code>​ </​code>​
  
  
-BlockModel+====== ​BlockModel ​======
  
 <code cpp> <code cpp>
-BlockModel  +    ​BlockModel  
-+    
- ulong ​   ​unknown[6]+        ulong  ​  ModelFlag  // 0x000001 ... 0x00010001 
-          /* typical data +        ​XYZTriplet Position; ​     ​// Model coordinates 
-          * *01 00 01 00 00 86 2D 46  +        ​float  ​  ​ModelDirection;​ 
-          * *00 98 23 46 65 6C C5 42  +        ​ulong  ​  ​ObjectID;​ 
-          * *0E 01 00 00 4D 00 00 00  +        ushort ​    ​Type;               //​0,​1,​2,​3 
-          * / +        String ​    ​ModelName; ​         //&quot;silnice10 100\0&quot; 
- ushort ​  ​Type;               //​0,​1,​2,​3 +        ulong      unknown[[25]]; 
- String ​  ​ModelName; ​         //"silnice10 100\0" +           ​/*typical data 
- ulong ​   unknown[25];​ +           ​**00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
-          /*typical data +           ​**C4 76 C2 3F 0E EB 8A C1 00 00 00 00 BE 00 00 00  
-          * *00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  +           ​**CC ED 26 BE CA 0F 12 40 56 30 28 3F 00 00 00 00  
-          * *C4 76 C2 3F 0E EB 8A C1 00 00 00 00 BE 00 00 00  +           ​**18 CA 04 C1 48 8B 3D C0 00 00 00 00 2D 3D 91 C1  
-          * *CC ED 26 BE CA 0F 12 40 56 30 28 3F 00 00 00 00  +           ​**06 01 C0 40 00 00 00 00 EE 98 84 C1 99 99 91 C0  
-          * *18 CA 04 C1 48 8B 3D C0 00 00 00 00 2D 3D 91 C1  +           ​**00 00 00 00 64 4A 5F 35 99 99 91 40 00 00 00 00  
-          * *06 01 C0 40 00 00 00 00 EE 98 84 C1 99 99 91 C0  +           ​**64 4A 5F B5 01 00  
-          * *00 00 00 00 64 4A 5F 35 99 99 91 40 00 00 00 00  +           ​*/ 
-          * *64 4A 5F B5 01 00  +        ShortBool ​ ok; // 0 or 1 
-          * / + }
- ShortBool ok; // 0 or 1 +
-}+
 </​code>​ </​code>​
  
  
-UnknownStruct2+====== NamedZone ======
  
 <code cpp> <code cpp>
-UnknownStruct2 + ​NamedZone 
-+ { 
- ShortBool IsPresent;​ +  ShortBool IsPresent;​ 
- if IsPresent +  if IsPresent 
-+  
- ShortBool Always0; +   ​ShortBool ​Movable; ​       // Always0; 
- BisString Name1; ​         //"Les_new" +   ​BisString Name1; ​         //&quot;Les_new&quot; 
- ulong     Colour[3]+   ​ulong     AreaColor,​OutlineColor
- ulong     nFloats+   ​ulong     DisplayStyle
- float ​    ​Floats[nFloats]; +   ulong     ​nPoints; 
-            /* Typical Data +   ​PointsRectangle 
-            * *00 00 61 45 00 78 1B 46 00 20 64 45 00 20 19 46  +   {  
-            * *00 20 64 45 00 78 1B 46 00 40 67 45 00 58 18 46  +       float TopLeft.xy;​ 
-            * *00 40 67 45 00 78 1B 46 00 60 6A 45 00 58 18 46  +       float BottomRight.xy;​ 
-            * *00 60 6A 45 00 78 1B 46 00 80 6D 45 00 90 17 46  +   }[[nPoints/4]]; 
-            * *00 80 6D 45 00 B0 1A 46 00 A0 70 45 00 C8 16 46  +             ​/* Typical Data 
-            * *00 A0 70 45 00 E8 19 46 00 C0 73 45 00 00 16 46  +             ​**00 00 61 45 00 78 1B 46 00 20 64 45 00 20 19 46  
-            * / +             ​**00 20 64 45 00 78 1B 46 00 40 67 45 00 58 18 46  
- ulong     ​ID; ​            // 0,​1,​2,​3,​4.... +             ​**00 40 67 45 00 78 1B 46 00 60 6A 45 00 58 18 46  
- if POSEW60 +             ​**00 60 6A 45 00 78 1B 46 00 80 6D 45 00 90 17 46  
- +             ​**00 80 6D 45 00 B0 1A 46 00 A0 70 45 00 C8 16 46  
- LongBool  ​Always1+             ​**00 A0 70 45 00 E8 19 46 00 C0 73 45 00 00 16 46  
- +             ​*/ 
- else +   ​ulong     ​ID; ​            // 0,​1,​2,​3,​4.... 
- +   ​if POSEW60 
- BisString Name2; ​         //Les_new Name2==Name1 +   ​
- +    LongBool  ​Visible// always 
-+   ​
-};+   ​else 
 +   ​
 +    BisString Name2; ​         //Les_new Name2==Name1 
 +   ​
 +  
 + };
 </​code>​ </​code>​
  
  
-Locale+====== KeyPoint ======
  
 <code cpp> <code cpp>
-Locale + ​KeyPoint 
-+ { 
- LongBool ​ Always1;  +  LongBool ​ Always1;  
- String ​   ClassName; ​ //"Noe_Lany" +  String ​   ClassName; ​ //&quot;Noe_Lany&quot; 
- RGBA      ​Colour[3]+  RGBA      ​AreaColor,​OutlineColor
- ShortBool ​ShortInd;  +  ​ulong ​    ​DisplayStyle;​ 
- float ​    ​Offset[2]; ​ // map relative +  ​ShortBool ​Visible;  
- float ​    ​Size[2]; ​   // 250 x 250.0 eg +  float     ​Offset[[2]];  // map relative 
- ulong ​    ​ID; ​        // 0,​1,​2,​3,​4,​5,​6.... +  float     Size[[2]];    // 250 x 250.0 eg (widht and height) 
- BisString TownName; ​  //"Lipany""Hill" +  ulong     ​ID; ​        // 0,​1,​2,​3,​4,​5,​6.... 
- BisString LocaleType; //"NameCity" ​NameCityCapital,​ NameVillage,​ NameLocal, ​egetationBroadLeaf,​Hill,​Marine,​ViewPoint +  BisString TownName; ​  //&quot;Lipany&quot;&quot;Hill&quot; 
- BisString ​NoName    ​// always null +  BisString LocaleType; //&quot;NameCity&​quot; ​NameCityCapital,​ NameVillage,​ NameLocal, ​VegetationBroadLeaf,​Hill,​Marine,​ViewPoint 
-}+  BisString ​ClassText // &​quot;​canOcclude=1;​ BumbleButt='​FlowControl2&​quot;;​ ++=)#​4555Semi&​quot;​ 
 + }
 </​code>​ </​code>​
  
 Each of these locales have a LocaleType. Some of which are: Each of these locales have a LocaleType. Some of which are:
  
-  ​* NameCity +*NameCity
-  * NameCityCapital +
-  * NameVillage +
-  * VegetationBroadLeaf (Forest) ​+
  
 +*NameCityCapital
 +
 +*NameVillage
 +
 +*VegetationBroadLeaf (Forest)
  
 There is always a classname associated with this locale, There is always a classname associated with this locale,
  
-  ​* Forest_Owls +*Forest_Owls 
-  * Abel_LaTrinite ​+ 
 +*Abel_LaTrinite
  
 and in most cases a text name and in most cases a text name
Line 563: Line 597:
 "La Refuge Des Chassuers"​ "La Refuge Des Chassuers"​
  
-(Type Viewpoints and Marine eg) do not have names associated with them. There is no "place" ​in the sea.+(Type Viewpoints and Marine eg) do not have names associated with them. There is no &quot;place&​quot; ​in the sea.
  
-Enums 
  
-ObjectClassEnum+====== Background ======
  
 <code cpp> <code cpp>
-enum ObjectClassEnum +  Background // this structure has not been seen 
-+  
- Natural = 1, +       String BackgroundFilename;//&​quot;​sat_lco.bmp&​quot;​ 
- Artificial = 2, +       String BackgroundName;​ //&​quot;​overlay1&​quot;​ 
- ArtificialAndDefinedInRoad = 5, +       ​float ​ OffsetXY[[2]];​ 
- Road = 3 +       ​float ​ SizeXY[[2]]; 
-}+       ulong  Transparency;​ 
 +       shortBool Visible; // or ulong? 
 +  }
 </​code>​ </​code>​
  
-MarkerTypeEnum+ 
 +====== Selection ======
  
 <code cpp> <code cpp>
-enum MarkerTypeEnum + ​Selection 
-+ { 
- Rectangular = 0, +  ​ushort ​      ​strlen;​ 
- Elliptical ​1+  char[[]] ​      ​SelectionName[[strlen]]; ​ // NOT null terminated 
 +  ulong        nSubSelections;​ 
 +  SubSelection SubSelections[[nSubSelections]] 
 + } 
 +</​code>​ 
 + 
 +====== SubSelection ====== 
 + 
 +<code cpp> 
 + ​SubSelection 
 + { 
 +  ulong ObjectId; 
 +  byte  Type; 
 +  byte  Unknown[[7]];​
 } }
 </​code>​ </​code>​
 +
 +
 +====== Enums ======
 +
 +====== ObjectClassEnum ======
 +
 +<code cpp>
 +  enum ObjectClassEnum
 +  {
 +     ​Natural = 1,
 +     ​Artificial = 2,
 +     Road = 3,
 +     ​Forest = 4,
 +     ​ArtificialAndDefinedInRoad = 5  ​
 +  }
 +</​code>​
 +
 +
 +====== MarkerTypeEnum ======
 +
 +<code cpp>
 +  enum MarkerTypeEnum
 +  {
 +     ​Rectangular = 0,
 +     ​Elliptical = 1
 +  }
 +</​code>​
 +
 +As of v60 a rarely used sub structure with ObjTemplates.
arma/file_formats/pew.1243225704.txt.gz · Last modified: 2009-05-25 04:28 by snakeman