Generic Keyvalues, Inputs and Outputs/Keyvalues: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (rudimentary info for css and csgo)
(Eh since I already made an edit to the VDC, here's TeamNum with more proper info for l4ds + csgo, and edited how the template displays in this page. Can't make the TF2 specific info display auto by default, sry. Check out version history to see more)
Line 14: Line 14:
*<code>l4d2</code>
*<code>l4d2</code>
*<code>csgo</code>
*<code>csgo</code>
*<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.)</strike> (24/3/2021 brought back for the<code>teamnum</code> key)
*<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.) (24/3/2021 brought back for the<code>teamnum</code> key)</strike>
*<code>brush</code> (This adds things common for all brush entities, visible or not. For visible ones, use [[:Template:KV visiblebrush]] in conjunction.)
*<code>brush</code> (This adds things common for all brush entities, visible or not. For visible ones, use [[:Template:KV visiblebrush]] in conjunction.)
*<code>tf2</code> Modifies the<code>TeamNum</code> keyvalue to show tf2 related info.
*<code>tf2</code> Modifies the<code>TeamNum</code> keyvalue to show tf2 related info.
Line 22: Line 22:
----
----
[[Category:Keyvalue Templates|Global]]
[[Category:Keyvalue Templates|Global]]
{{KV BaseEntity}}
</noinclude><!--
</noinclude><!--
-->{{#if:{{{brush|}}}|{{minititle|Brush}}
--><includeonly>{{#if:{{{brush|}}}|{{minititle|Brush}}
{{KV|Minimum Bounding Box Size|intn=mins|vector|Starting at the brush's origin, draw a bounding box this large. All coords but Y will treat the origin as a midpoint. Can be used to overwrite the collision shape of a brush. Requires<code>maxs</code> if used so the other side of the box isn't empty.|nofgd=1}}
{{KV|Minimum Bounding Box Size|intn=mins|vector|Starting at the brush's origin, draw a bounding box this large. All coords but Y will treat the origin as a midpoint. Can be used to overwrite the collision shape of a brush. Requires<code>maxs</code> if used so the other side of the box isn't empty.|nofgd=1}}
{{KV|Maximum Bounding Box Size|intn=maxs|vector|Starting at the brush's origin, draw a bounding box this large. All coords but Y will treat the origin as a midpoint. Can be used to overwrite the collision shape of a brush. Requires<code>mins</code> if used so the other side of the box isn't empty.|nofgd=1}}
{{KV|Maximum Bounding Box Size|intn=maxs|vector|Starting at the brush's origin, draw a bounding box this large. All coords but Y will treat the origin as a midpoint. Can be used to overwrite the collision shape of a brush. Requires<code>mins</code> if used so the other side of the box isn't empty.|nofgd=1}}
Line 63: Line 64:
{{KV|[[Lag Compensation]]|intn=LagCompensate|boolean|Set to '''Yes''' to lag compensate this entity. Should be used very sparingly!|nofgd=1|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}}}}}}<!--
{{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}}}}}}<!--
-->| }}{{KV|Team|choices|intn=TeamNum|Which Team the entity belongs / is assigned to
-->| }}<!--
TeamNum related things go here
--> {{#if:{{{tf2|}}}|
{{KV|Team|choices|intn=TeamNum|Which Team the entity belongs / is assigned to.
:*0: None
:*0: None
:*1: Spectator<!--
:*1: Spectator
--> {{#if:{{{tf2|}}}|
:*2: Red {{tf2}}
:*2: Red {{tf2}}
:*3: Blue {{tf2}} <!--
:*3: Blue {{tf2}} <!--
-->| }}<!--
-->|nofgd=1 }}<!--
--> {{#if:{{{l4d|}}}||{{#if:{{{l4d2|}}}
-->| }} {{#if:{{{css|}}}||{{#if:{{{l4d|}}}||{{#if:{{{l4d2|}}}|
:*2: Survivor {{l4d}} {{l4d2}}
{{KV|Team|choices|intn=TeamNum|Which Team the entity belongs / is assigned to. Doesn't work in {{l4d}} {{l4d2}}. {{todo|Verify if it works in css.}}
:*3: Infected {{l4d}} {{l4d2}} <!--
:*0: None
-->| }}}}<!--
:*1: Spectator
--> {{#if:{{{css|}}}||{{#if:{{{csgo|}}}
:*2: Survivors {{l4ds}}, Counter-Terrorist {{css}}
{{todo|Verify these for each game}}
:*3: Infected {{l4ds}} Terrorist {{css}}<!--
:*2: Counter-Terrorist {{css}} {{csgo}}
-->|nofgd=1 }}<!--
:*3: Terrorist {{css}} {{csgo}} <!--
-->| }}}}}} {{#if:{{{csgo|}}}|
-->| }}}}
{{KV|Team|choices|intn=teamnumber|Which Team the entity belongs / is assigned to.
|nofgd=1}}
:*0: None
:*1: Spectator
:*2: Terrorists {{csgo}}
:*3: Counter-Terrorists {{csgo}}<!--
-->|only={{csgo}}|nofgd=1 }} <!--
-->| }}</includeonly>

Revision as of 04:19, 31 March 2021

English (en)中文 (zh)Translate (Translate)

This template is our holder for all keyvalues that are assigned through CBaseEntity. The template has a very specific syntax that you must follow to apply properly, because new games have added new features throughout the years. See Help:Templates for more info on named parameters.

{{KV BaseEntity}}

No parameters: display keyvalues for ALL games.

{{KV BaseEntity|base=1}}

Base: display keyvalues that have only existed since whatever game added the class (most have existed since HL2, the first Source game).

{{KV BaseEntity|l4d2=1}}

Game as a parameter: display the keyvalues that base displays, AND keyvalues that were added to the class, by the specified game. You can specify as many games as needed. You must specify ALL the games you want to include (e.g. l4d2 will not automatically include l4d keyvalues as well). This is because there are situations like in Portal 2, where the output OnKilled is not available through CBaseEntity, despite being a far descendant of the L4D branch which added it.

All parameters for this template:

  • base (Use if the entity was available before L4D2.)
  • l4d (DEPRECATED 9/21/18: Found out these keyvalues only work with renderable things. They have been migrated to visiblebrush and BaseAnimating KV templates. This is completely removed from the template and won't affect anything.)
  • l4d2
  • csgo
  • 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.) (24/3/2021 brought back for theteamnum key)
  • brush (This adds things common for all brush entities, visible or not. For visible ones, use Template:KV visiblebrush in conjunction.)
  • tf2 Modifies theTeamNum keyvalue to show tf2 related info.
Note.pngNote:If you want to edit something on this template, please make sure you edit it in both places. Per-game keyvalues are duplicated, for technical reasons.

See FGD Template Prototype.

Note.pngNote:Some CBaseEntity keyvalues are not covered here. See the talk page.