Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!

Editing Entity

From Quake Wiki

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
[[File:Entity.png|thumb|upright=1.25|Some Entities]]
+
Any object other than a solid wall brush used in maps. These include point entities such as lights, powerups, and player spawn points, as well as "brush entities", which are brushes converted to entities to serve a special purpose.
In [[Mapping|Quake map making]], an '''entity''' is any object defined in the [[Quake Map Format|.map file]] of a level, and are used to define the position and parameters of all the things that will appear in the level, such as monsters, items, doors, teleporters, lights and sounds.
 
 
 
==Overview==
 
Entities can be broadly defined as belonging to one of two different types, point entities and solid entities (also known as brush entities).
 
 
 
A '''point entity''' is an entity that can be placed at any point in the level, and its geometry (if any) is predefined in the game data. For example, a monster is a point entity. A level author might place many [[monster_ogre|ogres]] in their level, but each ogre will be the same shape and behave the same way because they are defined by the game already. The name stems from the fact that a point entity has one single coordinate (a point) determining its position.
 
 
 
A '''solid entity''', on the other hand, is made by the level author out of [[Brush|brushes]] and can take any shape the author wishes. A [[func_door|door]], for example, is something that the level author needs to be able to design themselves in order to fit into different [[level_theme|themes]], different sized holes etc.
 
 
 
The static level geometry itself is also defined as a [[worldspawn]] entity, but it is a special entity that is treated differently by the [[Map_compiling|compilers]], and depending on the [[Mapping_tools#Level_Editors|level editor]] being used, its settings might be accessed from a different place to that of other entities. The worldspawn is always the first entity defined in a .map file.
 
 
 
==Entity Settings==
 
In order to change their behaviour, appearance etc. all entities have settings that can be modfied by the level author. The following section contains general information about these settings. For specific entity setting information, see [[Entity_guide#Entities|Entities]].
 
 
 
===Key/Value Pairs===
 
A key/value pair is the name given to a single entity parameter; The key is the name of the parameter and the value is what it is set to. For example, a [[func_door]] entity has a parameter that sets how fast it moves. The key is named "speed" and it's value can be set by the user to alter the speed of the door. For the purposes of this wiki, we will use the format (key : value) as notation for key/value pairs in text passages. (speed : 100) means the speed parameter of the door is set to 100 [[unit|units]] per second.
 
 
 
Note that sometimes the naming of keys is not particularly intuitive, so some editors hide the real key name and show the user something more easily understood. The names used in the wiki are the actual key names used by Quake, and are correct.
 
 
 
====Origin and Angle====
 
Origin and angle are keys supported by every single entity with the exception of the [[worldspawn]], since it does not ever move and does not need them. Origin is used to define the position of an entity in the level, and angle is a value between 0 and 360 that sets its rotation. Both of these keys are usually hidden from direct editing by level editors; origin is almost always set only by moving the object around in the editor, and some editors (such as [[TrenchBroom]]) allow direct rotation of the entity to set the angle, wheras others (such as [[Worldcraft]]) have some kind of visual representation in their entity property editing tool as well as the ability to manually set the angle numerically.
 
 
 
Some entities may support setting angle to up or down by using the values -1 for up and -2 for down. Other entities, such is [[info_intermission]] might require a more complex angle. This can often be specified with a [[mangle]] key.
 
 
 
====Targetname, Target and Killtarget====
 
Quake features a very basic form of event scripting via triggers that can be placed in levels and used to activate other entities. For example, the [[func_button]] entity is used to make a usable button object in a level which will trigger a targeted event when pressed. This event system is not limited to the obvious trigger entities and buttons - monsters can fire events when they are killed, and items when they are picked up. In order to use this system, the keys targetname and target must be understood.
 
 
 
The '''targetname''' key is used to establish a name for an entity so that it can be linked to triggers that are targeting it. The value of targetname needn't be unique, though multiple entities using the same targetname will all be activated at once by anything that triggers them.
 
 
 
The value of '''target''' should be set to the targetname of the entity that needs to be activated. For example. a [[func_door]] with (targetname : door1) can be activated by a func_button with (target : door1).
 
 
 
'''killtarget''' is a key used in a similar way to target, but instead of activating the target, the targeted entity will be removed from the level when the killtarget event is fired.
 
 
 
In [[Vanilla Quake|vanilla Quake]], a single trigger cannot target multiple entities another at the same time. This is true even if one entity is targeted and another is killtargeted. In order to do this, multiple triggers (see [[trigger_relay]]) must be used for each different target or killtarget. Some [[mod|mods]], such as [[Quoth]] support multi-targeting, which allows multiple targets to be set for a single trigger, and also enables targets and killtargets to both be fired when the trigger is triggered.
 
 
 
===Spawnflags===
 
Spawnflags is the name given to a particular key that all entities support and is used to store multiple boolean parameters (flags) in a single key/value pair. The value of spawnflags is a number typically between 0 and 4096 (although a bit value up to 8388608 is allowed)and is calculated by adding the values given to each flag together. The value for any single flag is always a power of two. This is so that when loading a level, Quake can understand from the value of spawnflags which flags were set and which were not.
 
 
 
One of the uses of spawnflags is to tell Quake whether or not to spawn entities into the level on level load. These flags are listed below:
 
{| class="wikitable"
 
|-
 
! Flag !! Common Name
 
|-
 
| 256 || Not on Easy
 
|-
 
| 512 || Not on Normal
 
|-
 
| 1024 || Not on Hard
 
|-
 
| 2048 || Not in Deathmatch
 
|}
 
Other flags are only valid when used with certain entities, but these four are universal and work with every entity.
 
 
 
Most [[Mapping_tools#Level_Editors|level editors]] have a simple visual representation of spawnflags with checkboxes for each flag, so that the user does not need to calculate its value manually.
 
 
 
===Additional Info on General Entity Syntax===
 
(Thanks to John Wakelin who wrote much of this section)
 
 
 
The entities define the monsters, things, but also the positions in space where something must happen. So they are the Quake equivalent of both the THINGS and the LINEDEF types from DOOM.
 
 
 
The entity definitions are made up of a series of specific details that define what each is, where it starts, when it appears etc. Each specific is followed by a modifier that arguments it. All definitions have the classname specific that identifies that entity. The classname specifics relate intimately with the code lump and are the names of functions written in Quake C.
 
 
 
Note that not all entities can use all "Entity Settings". Also note that there are more Entity Settings than the ones listed here.
 
 
 
Source: http://www.gamers.org/dEngine/quake/QDP/qmapspec.html#2.3.1
 
 
 
{| class="wikitable"
 
|-
 
! Entity Settings !! Datatype Input !! Description
 
|-
 
| ! bgcolor="#eeeeee" | classname || "name" || Type of entity to be defined (mandatory)
 
|-
 
| ! bgcolor="#eeeeee" | origin|| "X Y Z" || Coordinates of where it starts in space.
 
|-
 
| ! bgcolor="#eeeeee" | angle|| "#" || Direction it faces or moves (sometimes in degrees).
 
|-
 
| ! bgcolor="#eeeeee" | angle|| "#" || Direction it faces or moves (sometimes in degrees).
 
|-
 
| ! bgcolor="#eeeeee" | light|| "#" || Used with the light classname. Default is 200.
 
|-
 
| ! bgcolor="#eeeeee" | target || "t#" || A text-string for the name of a target it will trigger.
 
|-
 
| ! bgcolor="#eeeeee" | killtarget || "t#" || A text-string for the name of a target it will kill once triggered.
 
|-
 
| ! bgcolor="#eeeeee" | spawnflags || "#" || Used to flag/describe an entity that is not default. in example, make a func_door require the Gold Key.
 
|-
 
| ! bgcolor="#eeeeee" | style || "t#" || Used to flag/describe an entity that is not default. Styles can change the behavior of some entities, in example to make a light into a blinking strobe light.
 
|-
 
| ! bgcolor="#eeeeee" | message || "t#" || Message displayed when triggered (\n for line breaks).
 
|-
 
| ! bgcolor="#eeeeee" | mangle || "t#" || Point where the intermission camera looks at.
 
|-
 
| ! bgcolor="#eeeeee" | speed|| "t#" || How fast the model/entity is moved.
 
|-
 
| ! bgcolor="#eeeeee" | wait|| "t#" || How long a pause between completion of movement / return to original position in seconds. Some entities uses this setting differently.
 
|-
 
| ! bgcolor="#eeeeee" | lip|| "t#" || The e
 
|-
 
| ! bgcolor="#eeeeee" | dmg|| "t#" ||  How much damage the model causes when it shuts on you? Only used for movable objects, that is objects that can squeeze you against walls etc.
 
|-
 
| ! bgcolor="#eeeeee" | health || "#" ||  How much damage the model/entity takes before it triggers.
 
|-
 
| ! bgcolor="#eeeeee" | delay|| "#" || Time before event is triggered.
 
|-
 
| ! bgcolor="#eeeeee" | sounds|| "#" || How much damage the model causes when it shuts on you. Each number, 0,1,2 etc, gives a different "is in pain"-sound.
 
|-
 
| ! bgcolor="#eeeeee" | wad|| "wadfile" || The wad2 graphics file used by the world for textures.
 
|-
 
| ! bgcolor="#eeeeee" | height|| "#" || How high a platform will raise.
 
|-
 
|}
 

Please note that all contributions to Quake Wiki are considered to be released under the GNU Free Documentation License 1.3 or later (see Quake Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel | Editing help (opens in new window)