|
|
(13 intermediate revisions by 5 users not shown) |
Line 1: |
Line 1: |
| | {{Doc/subpage}} |
| | Info holder of all relevant [[keyvalues]] inheriting the {{ent|mode=link|CBaseEntity}} [[File:Cpp.png|link=Wikipedia:C++|alt=C++]] class. Template parameters are vital in displaying the appropiate info, because new games have added new features throughout the years. See [[Help:Templates]] for more info on named parameters. |
| | |
| | Not all {{ent|mode=link|CBaseEntity}} keyvalues are not covered here. But you can see them all at the [[/Uncovered_Keyvalues|Uncovered Keyvalues]] page. |
| | |
| | {{note|After you edit this template, please make sure you also edit the targetted entity's page. ''Per-game'' keyvalues may be duplicated, for technical reasons. See also [[FGD Template Prototype]].}} |
| | |
| | == Usage == |
| | These must be used in a specific syntax! - ALL parameters must be given a value of 1, like:<code>l4d2=1</code>. ''Only one'' game parameter can be used at once. |
| | <pre> |
| | {{KV BaseEntity|l4d2=1}} |
| | </pre> |
| | |
| | === Parameters === |
| | If you leave the parameter field empty (using no arguments), the template will automatically fallback to displaying keyvalues from the current default game. |
| | |
| | All parameters for this template: |
| | *<code>base</code>- No game specific information are displayed, and base engine features only. (The {{src13}} / {{src13mp}} iteration engine) |
| | *<code>l4d2</code>- Set template KVs specific to {{l4d2}} ([[VScript|VScripts]]) |
| | *<code>csgo</code>- [CURRENT DEFAULT] Set template KVs specific to {{csgo}} (VScripts + Auto-aim targets) |
| | *<code>brush</code>- Additionaly includes info specific to all sorts of brushes. For extra keys applicable ''only'' to visible brushes, use [[:Template:KV visiblebrush]] in conjunction. Can be used along a game parameter. |
| | {{ExpandBox| |
| | *<code>css</code>- <strike>(DEPRECATED 10/1/18: Previously used for a notice that was ''thought'' to apply to all entities in CS:S. The purpose of this now exists in [[Template:PreservedEnt]]. This is completely removed from the template and won't affect anything.) (DEPRECATED 24/3/2021 was brought back for info specific to the<code>teamnum</code>key. Use {{tl|KV TeamNum}} instead.)</strike> |
| | *<code>l4d</code>- <strike>(DEPRECATED 9/21/18: Found out these keyvalues only work with renderable things (cpu / gpu level). They have been migrated to visiblebrush and BaseAnimating KV templates. This is completely removed from the template and won't affect anything.)</strike> |
| | *<code>tf2</code>- <strike>(DEPRECATED 20/4/2021: Was only used to show<code>TeamNum</code>keyvalue's TF2 specific information. Use {{tl|KV TeamNum}} instead.)</strike> |
| | | Show Deprecated: }} |
| | |
| | Refer to the [[#Examples|Examples]] section for samples. |
| | |
| | == Examples == |
| | === Show info specific to a game {{l4d2}} === |
| | This makes information relevant only to {{l4d2}} be displayed. |
| | <pre>{{KV BaseEntity|l4d2=1}}</pre> |
| | {{ExpandBox|{{KV BaseEntity|l4d2=1}}|will:}} |
| | === Show info specific to base engine === |
| | Information relevant only to base engine are displayed. ({{src13}} / {{src13mp}}) |
| | <pre>{{KV BaseEntity|base=1}}</pre> |
| | {{ExpandBox|{{KV BaseEntity|base=1}}|will:}} |
| | === Show extra info related to brushes === |
| | Extra brush related keyvalues are displayed with this. |
| | <pre>{{KV BaseEntity|brush=1}}</pre> |
| | {{ExpandBox|{{KV BaseEntity|brush=1}}|will:}} |
| | === Using template defaults === |
| | Without using any arguments, the template fallbacks to a default, which is the latest Source game. |
| | <pre>{{KV BaseEntity}}</pre> |
| | {{ExpandBox|{{KV BaseEntity}}|will:}} |
| | |
| | ==See also== |
| | * {{tl|KV BaseAnimating}} |
| | * {{tl|I BaseEntity}} |
| | * {{tl|I BaseAnimating}} |
| | ---- |
| <includeonly> | | <includeonly> |
| <!-- | | <!--{{otherlang2 |
| ++ BRUSH ++
| | |title= |
| -->
| | }}--> |
| <!-- IF: BRUSH -->
| | {{sandbox other|| |
| {{#if:{{{brush|}}}|{{minititle|Brush}}
| | <!-- Categories below this line, please --> |
| {{KV|Minimum Bounding Box Size|intn=mins|vector|Starting at the brush's origin, draw a bounding box this large. Requires<code>maxs</code> if used so the other side of the box isn't empty.|nofgd=1}}
| | [[Category:Keyvalue Templates|Global]] |
| {{KV|Maximum Bounding Box Size|intn=maxs|vector|Starting at the brush's origin, draw a bounding box this large. Requires<code>mins</code> if used so the other side of the box isn't empty.|nofgd=1}}
| | }}</includeonly> |
| {{note|To translate a brush's size in Hammer to these keys, first divide the size value in Hammer by 2. Then, apply the resulting number to one of the 2 keys, then have the numbers inverted for the other key (Multiplied / Divided by -1).}}
| |
| {{note|If collisions is already set, it must be set back to Bounding Box (solid 2).}}
| |
| {{confirm|Do all coordinates treat the origin as a "midpoint", and does it matter?}} | |
| {{KV|Collisions|intn=solid|choices|Method of collision for this entity.|nofgd=1}}
| |
| :*0: None
| |
| :*1: BSP ([[QPhysics]])
| |
| :*2: [[Bounding box|Bounding Box]]
| |
| :*3: [[Bounding box|Oriented Bounding Box]]
| |
| :*4: [[Bounding box|Oriented Bounding Box]], constrained to [[QAngle|Yaw]] only
| |
| :*5: Custom/Test
| |
| :*6: [[VPhysics]]
| |
| {{KV|Model Index|intn=modelindex|short|Changes the entity's model to a precached model on the map.|nofgd=1}}}}
| |
| <!--
| |
| ++ Base ++
| |
| --> | |
| {{minititle|Base}} | |
| {{KV|[[Classname]]|intn=classname|string|The classname defines the type of entity. Classnames can be changed using {{ent|AddOutput}}, which will influence how the engine deals with the entity in certain circumstances.}}
| |
| {{KV|[[targetname|Name]]|intn=targetname|string|The name that other entities refer to this entity by.}}
| |
| {{KV|Global Entity Name|intn=globalname|string|Name by which this entity is linked to another entity in a different map. When the player transitions to a new map, entities in the new map with globalnames matching entities in the previous map will have the previous map's state copied over their state.}}
| |
| {{KV|[[Parent]]|intn=parentname|targetname|Specifies a movement parent. An entity will maintain its initial offset from its parent. An attachment point can be added to the end of the name, separated by a comma. ''Every'' entity can be parented, even point entities. Entities which are parented will be forced to transition to the next map, such as from a {{ent|trigger_transition}}. Some entities which aren't intended to be parented may not function correctly. {{ent|phys_constraint}} can be used as a workaround to parenting.}}
| |
| {{KV|[[Origin]] (X Y Z)|intn=origin|coordinates|The position of this entity's center in the world. Rotating entities typically rotate around their origin.}}
| |
| {{KV|[[Pitch Yaw Roll]] (X Y Z)|intn=angles|angle|This entity's orientation in the world. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, roll is the rotation around the X axis.{{note|This works on brush entities, although Hammer doesn't show the new angles.}}}}
| |
| {{KV|[[Flag|Flags]]|intn=spawnflags|integer|Toggles features of an entity, its specific number is determined by the combination of flags added.}}
| |
| {{KV|[[ResponseContext|Response Contexts]]|intn=ResponseContext|string|Pre-defined response system contexts for this entity. Format is <code>key:value,key:value,...</code>. Contexts may be [[filter_activator_context|filtered]].}}
| |
| {{KV|[[Effect flags|Effects]]|intn=effects|int|Combination of effect flags to use.|nofgd=1}}
| |
| <!-- I'm not sure what the use cases of these 2 are, so ill hide them for now. Not too much of a harm to show "hammerid" for the plugin / sourcepawn peeps | |
| {{KV|Local Time|intn=ltime|float|The local time of the entity, independent of the global clock. Used mainly for physics calculations.|nofgd=1}}
| |
| {{KV|Next Think|intn=nextthink|float|Amount of time before the entity [[Thinking|thinks]] again.|nofgd=1}}
| |
| --> | |
| {{KV|Hammer ID|intn=hammerid|int|The entity's [[Hammer]] ID. Mainly used by plugins and debugging commands, such as '''<code>ent_keyvalue</code>'''. Can be manually assigned with the "hammerid" or "id" keyvalue. Entities spawned at run-time are not assigned any Hammer ID.|nofgd=1}}
| |
| <!--
| |
| ++ Game Specifics ++
| |
| -->
| |
| <!-- IF NOT: BASE, L4D2 AND CSGO -->
| |
| {{#if:{{{base|}}}||{{#if:{{{l4d2|}}}|
| |
| {{KV|Disable for Xbox 360|intn=disableX360|bool|If this entity should automatically be given the 'Disable' input on the Xbox 360 version of Source.|nofgd=1|since=L4D2}}
| |
| {{KV|Entity Scripts|intn=vscripts|scriptlist|Space delimited list of [[VScript]] files (without file extension) that are executed after all entities have spawned. The scripts are all executed in the same script scope, later ones overwriting any identical variables and functions.|since=L4D2}}
| |
| {{KV|Script think function|intn=thinkfunction|string|Name of a function in this entity's script which will be called automatically every 100 milliseconds (ten times a second) for the duration of the script. It can be used to create timers or to simulate autonomous behavior. The return value (if present) will set the time until the next call. Try to avoid [[expensive]] operations in this function, as it may cause performance problems.|since=L4D2}}
| |
| {{KV|[[Lag Compensation]]|intn=LagCompensate|boolean|Set to '''Yes''' to lag compensate this entity. Should be used very sparingly!|nofgd=1|since=L4D2}}
| |
| | <!-- ELSE IF: CSGO -->{{#if:{{{csgo|}}}|
| |
| {{KV|Is Automatic-Aim Target|intn=is_autoaim_target|bool|If set to 1, this entity will slow down aiming movement for consoles and joystick controllers when the entity is under the crosshairs.|nofgd=1|since=CSGO}}
| |
| |<!-- ELSE: -->
| |
| {{KV|Disable for Xbox 360|intn=disableX360|bool|If this entity should automatically be given the 'Disable' input on the Xbox 360 version of Source.|nofgd=1|since=L4D2}}
| |
| {{KV|Entity Scripts|intn=vscripts|scriptlist|Space delimited list of [[VScript]] files (without file extension) that are executed after all entities have spawned. The scripts are all executed in the same script scope, later ones overwriting any identical variables and functions.|since=L4D2}}
| |
| {{KV|Script think function|intn=thinkfunction|string|Name of a function in this entity's script which will be called automatically every 100 milliseconds (ten times a second) for the duration of the script. It can be used to create timers or to simulate autonomous behavior. The return value (if present) will set the time until the next call. Try to avoid [[expensive]] operations in this function, as it may cause performance problems.|since=L4D2}}
| |
| {{KV|[[Lag Compensation]]|intn=LagCompensate|boolean|Set to '''Yes''' to lag compensate this entity. Should be used very sparingly!|nofgd=1|since=L4D2}}
| |
| {{KV|Is Automatic-Aim Target|intn=is_autoaim_target|bool|If set to 1, this entity will slow down aiming movement for consoles and joystick controllers when the entity is under the crosshairs.|nofgd=1|since=CSGO}}
| |
| }}}}}}</includeonly>
| |
| <noinclude>
| |
| {{documentation}}
| |
| <!-- Add categories to the /doc subpage, not here -->
| |
| </noinclude>
| |
Info holder of all relevant keyvalues inheriting the CBaseEntity
class. Template parameters are vital in displaying the appropiate info, because new games have added new features throughout the years. See Help:Templates for more info on named parameters.
Not all CBaseEntity keyvalues are not covered here. But you can see them all at the Uncovered Keyvalues page.
Note:After you edit this template, please make sure you also edit the targetted entity's page. Per-game keyvalues may be duplicated, for technical reasons. See also FGD Template Prototype.
Usage
These must be used in a specific syntax! - ALL parameters must be given a value of 1, like:l4d2=1
. Only one game parameter can be used at once.
{{KV BaseEntity|l4d2=1}}
Parameters
If you leave the parameter field empty (using no arguments), the template will automatically fallback to displaying keyvalues from the current default game.
All parameters for this template:
base
- No game specific information are displayed, and base engine features only. (The
/
iteration engine)
l4d2
- Set template KVs specific to
(VScripts)
csgo
- [CURRENT DEFAULT] Set template KVs specific to
(VScripts + Auto-aim targets)
brush
- Additionaly includes info specific to all sorts of brushes. For extra keys applicable only to visible brushes, use Template:KV visiblebrush in conjunction. Can be used along a game parameter.
Show Deprecated:
css
- (DEPRECATED 10/1/18: Previously used for a notice that was thought to apply to all entities in CS:S. The purpose of this now exists in Template:PreservedEnt. This is completely removed from the template and won't affect anything.) (DEPRECATED 24/3/2021 was brought back for info specific to theteamnum
key. Use {{KV TeamNum}}
instead.)
l4d
- (DEPRECATED 9/21/18: Found out these keyvalues only work with renderable things (cpu / gpu level). They have been migrated to visiblebrush and BaseAnimating KV templates. This is completely removed from the template and won't affect anything.)
tf2
- (DEPRECATED 20/4/2021: Was only used to showTeamNum
keyvalue's TF2 specific information. Use {{KV TeamNum}}
instead.)
Refer to the Examples section for samples.
Examples
Show info specific to a game 
This makes information relevant only to
be displayed.
{{KV BaseEntity|l4d2=1}}
Show info specific to base engine
Information relevant only to base engine are displayed. (
/
)
{{KV BaseEntity|base=1}}
Extra brush related keyvalues are displayed with this.
{{KV BaseEntity|brush=1}}
Using template defaults
Without using any arguments, the template fallbacks to a default, which is the latest Source game.
{{KV BaseEntity}}
See also
{{KV BaseAnimating}}
{{I BaseEntity}}
{{I BaseAnimating}}