arma:file_formats:oprw
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| arma:file_formats:oprw [2009/07/17 09:31] – created oprw initial page. snakeman | arma:file_formats:oprw [2024/08/01 07:59] (current) – links added. snakeman | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | Introduction | + | ====== ArmA 1 WRP File Format OPRWv17, 18, 20 ====== |
| - | For a general description of wrp files see 8WVR | + | [[https:// |
| - | Legend | + | **ArmA 1** aka Armed Assault (ArmA) |
| + | |||
| + | For a general description of wrp files see [[8wvr|8WVR]]. | ||
| + | |||
| + | |||
| + | ====== | ||
| Little endian byte order, lsb first for numeric values, text is stored in Big endian byte order. | Little endian byte order, lsb first for numeric values, text is stored in Big endian byte order. | ||
| Line 15: | Line 20: | ||
| - | XYPair | + | ====== |
| <code cpp> | <code cpp> | ||
| Line 24: | Line 29: | ||
| </ | </ | ||
| - | XYZTriplet | + | |
| + | ====== | ||
| <code cpp> | <code cpp> | ||
| Line 31: | Line 37: | ||
| | | ||
| } | } | ||
| + | Normally, this structure is normally associated with positional information. | ||
| </ | </ | ||
| - | Normally, this structure is normally associated with positional information. | ||
| - | + | ====== | |
| - | File Format | + | |
| Texture and Terrain Grid Sizes are derived from the header. | Texture and Terrain Grid Sizes are derived from the header. | ||
| Line 50: | Line 55: | ||
| | | ||
| - | | + | |
| - | // Bits 0-2 are ground (0x0), coast (0x1), beach (0x2) and sea (0x3). Bit 4 indicates road/ | + | |
| - | | + | |
| | | ||
| | | ||
| - | | + | |
| - | | + | |
| if !Elite | if !Elite | ||
| byte | byte | ||
| Line 74: | Line 78: | ||
| | | ||
| - | ushort | + | byte |
| | | ||
| - | ushort | + | byte |
| | | ||
| Line 99: | Line 103: | ||
| - | WrpHeader | + | ====== |
| <code cpp> | <code cpp> | ||
| Line 106: | Line 110: | ||
| | | ||
| | | ||
| - | | + | |
| - | | + | |
| - | | + | |
| } | } | ||
| </ | </ | ||
| - | This is a traditional wrp header endemic to most wrp formats. The CellSize was introduced during | + | This is a traditional wrp header endemic to most wrp formats. The CellSize was introduced during |
| - | GridBlock | + | |
| + | ====== | ||
| The result of decompressing any GridBlock is to produce an array the size of the Header' | The result of decompressing any GridBlock is to produce an array the size of the Header' | ||
| Line 132: | Line 137: | ||
| GridBlock is currently in the ' | GridBlock is currently in the ' | ||
| - | Texture | + | |
| + | ====== | ||
| <code cpp> | <code cpp> | ||
| Line 169: | Line 175: | ||
| The ushort Textureindices (once decomposed from a GridBlock) contain references to a ' | The ushort Textureindices (once decomposed from a GridBlock) contain references to a ' | ||
| - | ClassedModel | + | |
| + | ====== | ||
| <code cpp> | <code cpp> | ||
| - | ClassedModel | + | ClassedModel { asciiz class_name; //" |
| - | { | + | |
| - | asciiz class_name; //" | + | |
| - | asciiz model_path; //" | + | |
| - | XYZTriplet Position; | + | |
| - | ulong unknown; | + | |
| - | } | + | |
| </ | </ | ||
| This is a fairly repetitious list of often identically named class and model, used as an index from an as yet unknown grid table. | This is a fairly repetitious list of often identically named class and model, used as an index from an as yet unknown grid table. | ||
| - | RoadNet | + | ====== |
| <code cpp> | <code cpp> | ||
| - | RoadNet | + | RoadNet { ulong nRoadParts; // Zero or More... RoadPart RoadParts[nRoadParts]; |
| - | { | + | |
| - | ulong nRoadParts; // Zero or More... | + | |
| - | RoadPart RoadParts[nRoadParts]; | + | |
| - | } TextureGridSizeXY]; | + | |
| </ | </ | ||
| - | Every cell on the map has a RoadNet entry. If there are no road(s) for that cell, there are no RoadParts (nRoadParts=0) | + | Every cell on the terrain |
| RoadParts, while, ultimately being no more (or less) than just another P3D model, are contained separately to models generally, to better realize terrain streaming and for AI driving ability. | RoadParts, while, ultimately being no more (or less) than just another P3D model, are contained separately to models generally, to better realize terrain streaming and for AI driving ability. | ||
| - | RoadPart | + | ====== |
| <code cpp> | <code cpp> | ||
| - | RoadPart | + | RoadPart { ushort nRoadPositions; |
| - | { | + | |
| - | ushort nRoadPositions; | + | |
| - | XYZTriplet RoadPositions[nRoadPositions]; | + | |
| - | byte Flags[4]; | + | |
| - | asciiz Model; | + | |
| - | float matrix[12]; | + | |
| - | } | + | |
| </ | </ | ||
| - | Object Optional | + | |
| + | ====== | ||
| <code cpp> | <code cpp> | ||
| - | Object | + | Object { ulong ObjectID; ulong modelIndex; // into the [[# |
| - | { | + | |
| - | ulong ObjectID; | + | |
| - | ulong modelIndex; // into the [[# | + | |
| - | float TransformMatrix[3][4]; | + | |
| - | ulong 0x02; | + | |
| - | } | + | |
| </ | </ | ||
| * maxObjectID is somewhat irrelevant. It is indeed the id of the highest value ObjectID, but, these ' | * maxObjectID is somewhat irrelevant. It is indeed the id of the highest value ObjectID, but, these ' | ||
| - | |||
| * If SizeOfObjects above == 0 then there are no objects. | * If SizeOfObjects above == 0 then there are no objects. | ||
| Line 229: | Line 213: | ||
| - | MapInfo Optional | + | ====== |
| <code cpp> | <code cpp> | ||
| Line 241: | Line 225: | ||
| Mapinfo, when it exists, extends to end of file. The sizeof each entry, is determined by it's info type thus: | Mapinfo, when it exists, extends to end of file. The sizeof each entry, is determined by it's info type thus: | ||
| - | MapData | + | |
| + | ====== | ||
| <code cpp> | <code cpp> | ||
| Line 254: | Line 239: | ||
| </ | </ | ||
| - | MapType1 | + | |
| + | ====== | ||
| <code cpp> | <code cpp> | ||
| - | MapType1 | + | MapType1 { ulong ObjectId float x, z } |
| - | { | + | |
| - | ulong ObjectId | + | |
| - | float x, z | + | |
| - | } | + | |
| </ | </ | ||
| - | MapType2 | + | |
| + | ====== | ||
| <code cpp> | <code cpp> | ||
| - | MapType2 | + | MapType2 { ulong ObjectId float Bounds[4][2]; |
| - | { | + | |
| - | ulong ObjectId | + | |
| - | float Bounds[4][2]; | + | |
| - | } | + | |
| </ | </ | ||
| - | MapType3 | + | |
| + | ====== | ||
| <code cpp> | <code cpp> | ||
| - | MapType3 | + | MapType3 { ulong unknown[2]; float line[2][2];? |
| - | { | + | |
| - | ulong unknown[2]; | + | |
| - | float line[2][2];? | + | |
| - | } | + | |
| </ | </ | ||
| - | MapType4 | + | |
| + | ====== | ||
| <code cpp> | <code cpp> | ||
| - | MapType4 | + | MapType4 { ulong ObjectId float Bounds[4][2]; |
| - | { | + | |
| - | ulong ObjectId | + | |
| - | float Bounds[4][2]; | + | |
| - | byte Color[4] //rgba | + | |
| - | } | + | |
| </ | </ | ||
| - | MapType5 | + | |
| + | ====== | ||
| <code cpp> | <code cpp> | ||
| - | MapType5 | + | MapType5 { ulong ObjectId float line[2][2];? |
| - | { | + | |
| - | ulong ObjectId | + | |
| - | float line[2][2];? | + | |
| - | } | + | |
| </ | </ | ||
| - | Packed Data | ||
| - | All variables starting with " | + | ====== Packed Data ====== |
| + | |||
| + | All variables starting with " | ||
| + | |||
| + | |||
| + | ======= Bimpas ======= | ||
| + | |||
| + | bimpas files are associated with Xbox elite they were the precursor to ArmA's rvmat files | ||
| + | |||
| + | in both cases they define a series of textures for p3d models (and wrps) | ||
| + | |||
| + | The new, visitor 3 graphical editor tool refers to bimpas files as | ||
| + | |||
| + | * rvmat surface materials | ||
| + | * bimpas transition materials | ||
| + | |||
| + | rvmat files are a series of paas bimpas files are a series of rvmats | ||
| + | |||
| + | |||
| + | ====== Rapification ====== | ||
| + | |||
| + | Ordinarily, these files, if binarised, are rapified in the normal xbox/arma manner | ||
| + | |||
| + | some files, possibly in error, contain substituted space characters for zeroes. | ||
| + | |||
| + | this is either an encryption, or, possibly a simple error | ||
| + | |||
| + | |||
| + | ====== Example ====== | ||
| + | |||
| + | <code cpp> | ||
| + | class Pass0 | ||
| + | { | ||
| + | material = " | ||
| + | texture = " | ||
| + | tlAlpha = 1; | ||
| + | trAlpha = 1; | ||
| + | blAlpha = 1; | ||
| + | brAlpha = 1; | ||
| + | }; | ||
| + | |||
| + | class Pass0 | ||
| + | { | ||
| + | material = " | ||
| + | texture = " | ||
| + | trAlpha = 1; | ||
| + | }; | ||
| + | |||
| + | class Pass1 | ||
| + | { | ||
| + | material = " | ||
| + | texture = " | ||
| + | blAlpha = 1; | ||
| + | }; | ||
| + | |||
| + | class Pass2 | ||
| + | { | ||
| + | material = " | ||
| + | texture = " | ||
| + | brAlpha = 1; | ||
| + | }; | ||
| + | |||
| + | class Pass3 | ||
| + | { | ||
| + | material = " | ||
| + | texture = " | ||
| + | tlAlpha = 1; | ||
| + | }; | ||
| + | </ | ||
arma/file_formats/oprw.1247823099.txt.gz · Last modified: 2009/07/17 09:31 (external edit)
