MODSon[line.com] Wiki - Beta 1.0
Call of Duty: Map File Format
From MODSonline Wiki
Contents |
[edit] Introduction
The .map file format as used by id Software is made of vertice, plane and polyhedron. It has different definition from game to game that are using a similar approach, but the fondamental basic of it stay the same for the geometry.
[edit] Explanation
[edit] Brush
A Brush is made of planes and vertice. Its definition is contained within a few lines. Each lines goes as follow:
- three (3) set of vertice == the face;
- a texture name and its relative position on the face.
vertice_A vertice_B vertice_C texture texture_def
In the detail each and every vertice are in fact three coordonate in a XYZ, 3D view. They are floats and reads as follow:
( x y z )
Then comes the texture and its definition (here again float numbers); Not Documented yet
[edit] Example
[edit] Brush
Example of a cube in the CoD4 map file format:
{
"classname" "worldspawn"
// brush 0
{
( 184 144 128 ) ( -128 144 128 ) ( -128 -216 128 ) common/caulk 0 0 0 0.25 0.25 0 0 0 0
( -96 -216 192 ) ( -96 144 192 ) ( 216 144 192 ) common/caulk 0 0 0 0.25 0.25 0 0 0 0
( -128 -192 8 ) ( 184 -192 8 ) ( 184 -192 0 ) common/caulk 0 0 0 0.25 0.25 0 0 0 0
( -64 -216 -8 ) ( -64 144 -8 ) ( -64 144 -16 ) common/caulk 0 0 0 0.25 0.25 0 0 0 0
( 184 -128 -8 ) ( -128 -128 -8 ) ( -128 -128 -16 ) common/caulk 0 0 0 0.25 0.25 0 0 0 0
( -128 144 8 ) ( -128 -216 8 ) ( -128 -216 0 ) common/caulk 0 0 0 0.25 0.25 0 0 0 0
}
}

