I am writing a program to generate quake 3 map files, and I was wondering if there is a document somewhere that details the map file format and how to define brushes, entities, and movers, etc.
Thanks!
Map file format specs
Re: Map file format specs
Some info here: viewtopic.php?f=10&t=44396&p=842664
Re: Map file format specs
Sweet. Looks like we are after the same info haha.
Alright, brushes make sense to me, but what about entities and movers?
I realize that I could define some unique parameters for those things in ZeroRadiant, save as a map, and attempt to reverse engineer, but I figured it would be more productive to find a specs document. (similar to The Unofficial Doom Specs) Does one exist?
Alright, brushes make sense to me, but what about entities and movers?
I realize that I could define some unique parameters for those things in ZeroRadiant, save as a map, and attempt to reverse engineer, but I figured it would be more productive to find a specs document. (similar to The Unofficial Doom Specs) Does one exist?
Re: Map file format specs
Not as far as I'm aware.
The map file format isn't really hard to understand though. All you have to know is that it basically is a collection of entity definitions:
What you should know first is that all regular brushes (those that aren't part of doors, movers, platforms, rotators, triggers, etc) are part of the worldspawn entity. Usually people make the distinction between brushes and entities that contain brushes. Technically however, each brush is part of an entity. Either worldspawn or some other entity.
The worldspawn entity is always defined as entity 0. After the worldspawn entity, all other entities in the map are defined in similar fashion.
You'll notice that every entity contains a number of key/value pairs. In the worldspawn example above there's the "classname" key with the "worldspawn" value and the "music" key with the "music/sonic1.wav" value. These are the same key/value pairs that are defined in the entity window in Gtk- or ZeroRadiant itself. After the key/value pairs all brushes that are part of that entity are defined. There are a large number of non-brush entities available in the game, such as target_speaker or ammo_shells. These of course won't have any brushes defined. Other entities with brushes can be defined as follows:
That's a func_train entity with a target and targetname key and two brushes that define the shape of the train. A brush could also be a patchDef, which is usually referred to as a curved surface:
I don't really know exactly how a patchDef works, so maybe someone else fill that gap in. I think the way a brush is defined is kind of explained in the other thread?
Oh, and lines beginning with // are comment lines. So all the "//entity 0" or "//brush 0" lines are just there for improved readability of the map file.
The map file format isn't really hard to understand though. All you have to know is that it basically is a collection of entity definitions:
Code: Select all
//entity 0
{
...
}
//entity 1
{
...
}
What you should know first is that all regular brushes (those that aren't part of doors, movers, platforms, rotators, triggers, etc) are part of the worldspawn entity. Usually people make the distinction between brushes and entities that contain brushes. Technically however, each brush is part of an entity. Either worldspawn or some other entity.
The worldspawn entity is always defined as entity 0. After the worldspawn entity, all other entities in the map are defined in similar fashion.
Code: Select all
// entity 0
{
"classname" "worldspawn"
"music" "music/sonic1.wav"
}
Code: Select all
// entity 10
{
"classname" "func_train"
"target" "c1"
"targetname" "train"
// brush 0
{
( 184 -40 64 ) ( 184 -72 64 ) ( 184 -72 56 ) gothic_floor/metalbridge06b 80 0 0 0.500000 0.500000 0 0 0
( 232 -40 64 ) ( 184 -40 64 ) ( 184 -40 56 ) gothic_floor/metalbridge06b 16 0 0 0.500000 0.500000 0 0 0
( 232 -72 64 ) ( 232 -40 64 ) ( 232 -40 56 ) gothic_floor/metalbridge06b 80 0 0 0.500000 0.500000 0 0 0
( 184 -80 64 ) ( 232 -80 64 ) ( 232 -80 56 ) gothic_floor/metalbridge06b 16 0 0 0.500000 0.500000 0 0 0
( 184 -72 64 ) ( 184 -40 64 ) ( 232 -40 64 ) gothic_floor/metalbridge06b 16 -80 0 0.500000 0.500000 0 0 0
( 232 -40 48 ) ( 184 -40 48 ) ( 184 -72 48 ) gothic_floor/metalbridge06b 16 -80 0 0.500000 0.500000 0 0 0
}
// brush 1
{
( 200 -48 64 ) ( 200 -64 64 ) ( 200 -64 48 ) common/origin 16 0 0 0.500000 0.500000 0 14 0
( 216 -48 64 ) ( 200 -48 64 ) ( 200 -48 48 ) common/origin 16 0 0 0.500000 0.500000 0 14 0
( 216 -64 64 ) ( 216 -48 64 ) ( 216 -48 48 ) common/origin 16 0 0 0.500000 0.500000 0 14 0
( 200 -64 64 ) ( 216 -64 64 ) ( 216 -64 48 ) common/origin 16 0 0 0.500000 0.500000 0 14 0
( 200 -64 64 ) ( 200 -48 64 ) ( 216 -48 64 ) common/origin 16 -16 0 0.500000 0.500000 0 14 0
( 216 -48 48 ) ( 200 -48 48 ) ( 200 -64 48 ) common/origin 16 -16 0 0.500000 0.500000 0 14 0
}
}
Code: Select all
// brush 82
{
patchDef2
{
gothic_ceiling/ceilingtechplain
( 5 3 0 0 0 )
(
( ( 956 -1576 456 0 0 ) ( 956 -2036 456 0 3.593750 ) ( 956 -2496 456 0 7.187500 ) )
( ( 956 -1576 564 0.843750 0 ) ( 956 -2036 564 0.843750 3.593750 ) ( 956 -2496 564 0.843750 7.187500 ) )
( ( 1088 -1576 564 1.875000 0 ) ( 1088 -2036 564 1.875000 3.593750 ) ( 1088 -2496 564 1.875000 7.187500 ) )
( ( 1220 -1576 564 2.906250 0 ) ( 1220 -2036 564 2.906250 3.593750 ) ( 1220 -2496 564 2.906250 7.187500 ) )
( ( 1220 -1576 456 3.750000 0 ) ( 1220 -2036 456 3.750000 3.593750 ) ( 1220 -2496 456 3.750000 7.187500 ) )
)
}
}
Oh, and lines beginning with // are comment lines. So all the "//entity 0" or "//brush 0" lines are just there for improved readability of the map file.