====== Design map file ====== The L3DT //design map file// (DMF) stores a number of design parameters for the heightfield, including altitude, erosion strength, sea-flooding flags, and so-forth. The data is preceded by a 11-byte((Yeah, I know this should be DWORD aligned. Next time I revise the spec, I'll be sure to remember that.)) header containing the following information: ^ Field name ^ Contents ^ Length^ Offset ^ Purpose ^ | ASCII marker | "L3DT" | 4 | 0 | Tells L3DT and humans that this is an L3DT file. Note string is not null terminated. | | Binary marker | USHORT | 2 | 4 | Tells L3DT what type of map file this is. Must be 200 for DMF. | | Map width | USHORT | 2 | 6 | East-west extent of the map (number of pixels). | | Map height | USHORT | 2 | 8 | North-south extent of the map (number of pixels). | | Wrap flag | BYTE | 1 | 10 | See [[l3dt:formats:specs:hff#wrap_flag|wrap flag comments for HFF]] | The map data itself has 10 bytes per pixel, which are explained below. The pixels are ordered in rows going west-to-east, with south-to-north row-order. ^ Byte pos ^ Data type ^ Description ^ | 0-1 | short int | Altitude, in metres. | | 2 | byte | Peak roughness. | | 3 | byte | Fractal roughness. | | 4 | byte | Cliffs/terraces strength. | | 5 | byte | Erosion strength. | | 6 | byte | Auto-lake strength. | | 7 | byte | Climate ID number. | | 8 | byte | Special type ID. | | 9 | byte | Special type parameter. | These values are used in the [[l3dt:algorithms:hf:design_inflate|design/inflate]] heightfield algorithm. As of L3DT v2.4a build 15, the loading and saving of the DMF format is handled by the 'L3DTio_DMF.dll' plugin, the source code of which is (at the time of writing) available in the [[zeolite:downloads|L3DT Plugin API]]. This may be very useful for those interested in importing/exporting/modifying design maps.