{"name":"Wrp File Format - 1WVR","title":"Wrp File Format - 1WVR","type":"topic","url":"https://community.bistudio.com/wiki/Wrp_File_Format_-_1WVR","revid":373426,"updated":"2025-05-08T11:27:12Z","aliases":[],"markdown":"> **Disclaimer: This page describes internal undocumented structures of Bohemia Interactive software.**\n>\n> This page contains unofficial information.\n>\n> Some usage of this information may constitute a violation of the rights of Bohemia Interactive and is in no way endorsed or recommended by Bohemia Interactive.\n> Bohemia Interactive is not willing to tolerate use of such tools if it contravenes any general licenses granted to end users of this community wiki or BI products.\n\n### General\n\nWVR type 1 was released as a cwc demo island\n\nFor a general description WVR-WRP file construct, see Wrp File Format - 4WVR\n\nSee Island File Formats for further info.\n\n#### Conventions\n\nsee Generic FileFormat Data Types\n\n### Structure\n\n```\nWVR1\n{\n  WVR1Header  Header;\n  Texture     Textures[...];\n  Model       Models[...];\n  Net         Nets[...];\n}\n```\n\n#### WVR1Header\n\n```\nWVR1Header // same as WVR4 except for the signature of course\n{\nchar Signature[4]; //\"1WVR\"\nulong Xsize;       //(=128) cell dimension (wvr4 is 256)\nulong Ysize;       //(=128) cell dimension\n}\n```\n\n#### Texture\n\n```\nTexture\n{\n  ushort Elevations  [Ysize][Xsize]; // in centimetres. see 4WVR documentation\n  ushort TextureIndex[Ysize][Xsize]; //Each 'index' refers to a filename below. Range 0..255 4WVR is 1..511\n  Asciiz TextureFilenames[256][32];  //\"LandText\\\\mo.pac\\0LandText.pi.pac..........\"\n}\n```\n\nUnlike 4WVR the table is limited to 256 (not 512) entries.\nUnlike 4WVR the names can be\n\n- replicated\n- scattered anywhere\n\nUnlike 4WVR there is no dummy, 0 index. the first entry is used. There are 'holes' in the table (eg no strings) where that paa file was removed\n\n##### Elevations\n\nElevations are expressed as an integral of the gridsize.\n\nSince the gridsize for Operation Flashpoint is a fixed 50 meters, to convert the value into meters:\n\n```\nRealHeight = Elevations[x][y] * 0.05;\n```\n\nsee Wrp File Format - 4WVR\n\n##### TextureIndex\n\nEach cell on the map references an texture file (pac/paa) and an elevation for that text at that cell position.\nSince there could be myriads of 'sea' texture (eg), rather than have each cell list it is texture, it references a texture list via an index. In this way, THE texture which is common to many cells (at sometimes differing elevations) is only stored once.\n\nA max of 256 texture files can be listed. Each is held as an asciiz string inside a fixed 32 byte record. Eg max length of filename is 31 characters.\n\n#### Model\n\n```\nModel// 64 byte structure\n{\n XYZTriplet XYZTriplet;       // in gridsize scale. eg *50.0 meters\n float      heading;          // in Cartesian degrees NOT polar radians\n char       P3dModelName[48]; // \"Data3d\\Smrk.p3d (WVR4 is 76)\n}\n```\n\n- Unlike wvr4, wvr1 has no object id\n- Unlike wvr4, only the xyz position, and an orientation is supplied. In wvr4, these were replaced by the standard Microsoft 12 float array\n- The XYZ triplet is specified in gridsize. to get real meters, multiply by 50.\n  - The Y component (the height) is a relative measurement. eg an offset from the calculated position of the model on the land surface.\n  - in all other formats this value is absolute asl. not, relative.\n- Cartesian rotation is clockwise. Polar rottion is counter clock. Therefore, Polar (wrp) degrees = -Cartesian degrees.\n\n#### Net\n\n```\nNet//64 byte structure\n{\n NetHeader NetHeader;\n Subnet    SubNets[...];\n}\n```\n\n##### NetHeader\n\n```\nNetHeader\n{\n Asciiz     NetName[24]; //\"LandText\\Silnice.pac\" null termed\n ulong      Always;     //0x00cd9100 or 0x00d4c600\n ulong      Always;     //0x00bfd400\n ulong      Always;     //0x00000047\n ulong      Always;     //0x00000000\n ulong      Always;     //0x0069fbb0;\n ulong      Type;       //0,1 or 2\n XYZTriplet XYZTriplet; //[0.152,0.15,0.1] typical\n float      Scale;      //3.5, 4.5 or 5.5\n}\n```\n\nThe last NetHeader (eg, last net) contains the NetName \"EndOfNets\". There are NO subnets.\n\nEndof Nets also marks end of file.\n\n##### Subnet\n\n```\nSubNet\n{\n float      X,Y;           //* gridsize of 50\n if (X || Y)\n {\n   XYZTriplet Triplet;     //very similar content to header triplet\n   float      Stepping;\n   ulong      Always;      //0x0046931A\n   ulong      Always;      //0x00980778 or 0x733760\n }\n}\n```\n\nA block of subnets continue for each Netheader until X==Y==0\n\n- Stepping appears to incrementally increase around 5.0 to each subsequent subnet\n\n### FilePaths\n\nDespite the impression given (lack of a leading \\) All filenames (pac/paa and p3d files) are HARD WIRED to the (virtual) pboRoot\\ directory.\n\nFrom the very beginning of ofp, this lack of relative addressing has persisted to be the total pain that it is: Making the transfer of models into other addons a frustrating nightmare.","sections":[{"heading":null,"level":1,"markdown":"> **Disclaimer: This page describes internal undocumented structures of Bohemia Interactive software.**\n>\n> This page contains unofficial information.\n>\n> Some usage of this information may constitute a violation of the rights of Bohemia Interactive and is in no way endorsed or recommended by Bohemia Interactive.\n> Bohemia Interactive is not willing to tolerate use of such tools if it contravenes any general licenses granted to end users of this community wiki or BI products."},{"heading":"General","level":3,"markdown":"WVR type 1 was released as a cwc demo island\n\nFor a general description WVR-WRP file construct, see Wrp File Format - 4WVR\n\nSee Island File Formats for further info."},{"heading":"Conventions","level":4,"markdown":"see Generic FileFormat Data Types"},{"heading":"Structure","level":3,"markdown":"```\nWVR1\n{\n  WVR1Header  Header;\n  Texture     Textures[...];\n  Model       Models[...];\n  Net         Nets[...];\n}\n```"},{"heading":"WVR1Header","level":4,"markdown":"```\nWVR1Header // same as WVR4 except for the signature of course\n{\nchar Signature[4]; //\"1WVR\"\nulong Xsize;       //(=128) cell dimension (wvr4 is 256)\nulong Ysize;       //(=128) cell dimension\n}\n```"},{"heading":"Texture","level":4,"markdown":"```\nTexture\n{\n  ushort Elevations  [Ysize][Xsize]; // in centimetres. see 4WVR documentation\n  ushort TextureIndex[Ysize][Xsize]; //Each 'index' refers to a filename below. Range 0..255 4WVR is 1..511\n  Asciiz TextureFilenames[256][32];  //\"LandText\\\\mo.pac\\0LandText.pi.pac..........\"\n}\n```\n\nUnlike 4WVR the table is limited to 256 (not 512) entries.\nUnlike 4WVR the names can be\n\n- replicated\n- scattered anywhere\n\nUnlike 4WVR there is no dummy, 0 index. the first entry is used. There are 'holes' in the table (eg no strings) where that paa file was removed"},{"heading":"Elevations","level":5,"markdown":"Elevations are expressed as an integral of the gridsize.\n\nSince the gridsize for Operation Flashpoint is a fixed 50 meters, to convert the value into meters:\n\n```\nRealHeight = Elevations[x][y] * 0.05;\n```\n\nsee Wrp File Format - 4WVR"},{"heading":"TextureIndex","level":5,"markdown":"Each cell on the map references an texture file (pac/paa) and an elevation for that text at that cell position.\nSince there could be myriads of 'sea' texture (eg), rather than have each cell list it is texture, it references a texture list via an index. In this way, THE texture which is common to many cells (at sometimes differing elevations) is only stored once.\n\nA max of 256 texture files can be listed. Each is held as an asciiz string inside a fixed 32 byte record. Eg max length of filename is 31 characters."},{"heading":"Model","level":4,"markdown":"```\nModel// 64 byte structure\n{\n XYZTriplet XYZTriplet;       // in gridsize scale. eg *50.0 meters\n float      heading;          // in Cartesian degrees NOT polar radians\n char       P3dModelName[48]; // \"Data3d\\Smrk.p3d (WVR4 is 76)\n}\n```\n\n- Unlike wvr4, wvr1 has no object id\n- Unlike wvr4, only the xyz position, and an orientation is supplied. In wvr4, these were replaced by the standard Microsoft 12 float array\n- The XYZ triplet is specified in gridsize. to get real meters, multiply by 50.\n  - The Y component (the height) is a relative measurement. eg an offset from the calculated position of the model on the land surface.\n  - in all other formats this value is absolute asl. not, relative.\n- Cartesian rotation is clockwise. Polar rottion is counter clock. Therefore, Polar (wrp) degrees = -Cartesian degrees."},{"heading":"Net","level":4,"markdown":"```\nNet//64 byte structure\n{\n NetHeader NetHeader;\n Subnet    SubNets[...];\n}\n```"},{"heading":"NetHeader","level":5,"markdown":"```\nNetHeader\n{\n Asciiz     NetName[24]; //\"LandText\\Silnice.pac\" null termed\n ulong      Always;     //0x00cd9100 or 0x00d4c600\n ulong      Always;     //0x00bfd400\n ulong      Always;     //0x00000047\n ulong      Always;     //0x00000000\n ulong      Always;     //0x0069fbb0;\n ulong      Type;       //0,1 or 2\n XYZTriplet XYZTriplet; //[0.152,0.15,0.1] typical\n float      Scale;      //3.5, 4.5 or 5.5\n}\n```\n\nThe last NetHeader (eg, last net) contains the NetName \"EndOfNets\". There are NO subnets.\n\nEndof Nets also marks end of file."},{"heading":"Subnet","level":5,"markdown":"```\nSubNet\n{\n float      X,Y;           //* gridsize of 50\n if (X || Y)\n {\n   XYZTriplet Triplet;     //very similar content to header triplet\n   float      Stepping;\n   ulong      Always;      //0x0046931A\n   ulong      Always;      //0x00980778 or 0x733760\n }\n}\n```\n\nA block of subnets continue for each Netheader until X==Y==0\n\n- Stepping appears to incrementally increase around 5.0 to each subsequent subnet"},{"heading":"FilePaths","level":3,"markdown":"Despite the impression given (lack of a leading \\) All filenames (pac/paa and p3d files) are HARD WIRED to the (virtual) pboRoot\\ directory.\n\nFrom the very beginning of ofp, this lack of relative addressing has persisted to be the total pain that it is: Making the transfer of models into other addons a frustrating nightmare."}],"categories":["Operation Flashpoint: Modelling","Real Virtuality File Formats"],"groups":["Tools and File Formats"]}