Template:I BaseEntity/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(for the doc page)
m (clean up, replaced: See Also → See also, {{Documentation subpage → {{Doc/subpage)
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Inputs here are technically members of the{{ent|CBaseEntity}} [[File:Cpp.png|link=Wikipedia:C++|alt=C++]] class, but are currently thought to be not relevant enough (far too less use cases, not actually of any meaningful use) to be shown, for now.
{{Doc/subpage}}
<!-- Please place categories where indicated at the bottom of this page.) -->
Info holder of all relevant [[inputs]] 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.


== Covered on BaseAnimating ==
Not all{{ent|mode=link|CBaseEntity}}inputs are not covered here. But you can see them all at the [[:Template:I BaseEntity/doc/Uncovered_Keyvalues|Uncovered Keyvalues]] page.
*<code>Alpha</code>
*<code>AlternativeSorting</code>
*<code>Color</code>
*<code>SetDamageFilter</code>
*<code>EnableDamageForces</code>
*<code>DisableDamageForces</code>
*<code>DisableShadow</code>
*<code>EnableShadow</code>
*<code>DisableDraw</code>
*<code>EnableDraw</code>
*<code>DisableReceivingFlashlight</code>
*<code>EnableReceivingFlashlight</code>
*<code>DisableDrawInFastReflection</code>
*<code>EnableDrawInFastReflection</code>


== Covered on AI_BaseNPC ==
{{note|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. Also see [[FGD Template Prototype]].}}
*<code>max_health</code> (m_iMaxHealth) (relevancy to edgecase entities are covered individually.)
*<code>health</code> (m_iHealth) (relevancy to edgecase entities are covered individually.)
*<code>target</code> (m_target) (relevancy to edgecase entities are covered individually.)
*<code>basevelocity</code> (m_vecBaseVelocity) (relevancy to edgecase entities are covered individually.)
*<code>avelocity</code> (m_vecAngVelocity) (relevancy to edgecase entities are covered individually.)
*<code>waterlevel</code> (also used by {{ent|player}}. nothing else uses this probably?)


== Miscellanous ==
== Usage ==
*<code>SetTeam</code> (relevancy to edgecase entities are covered individually; {{#ifexist: Template:I_TeamNum|use {{:Template:I_TeamNum}}.|to be moved to a new template with the name<code>"Template:I TeamNum"</code>.}})
These must be used in a specific syntax! - ALL parameters must be given a value of 1, like:<code>as=1</code>. ''Only one'' game parameter can be used at once.
*<code>RemovePaint</code> (only works for paintable brush entities {{portal2}})
<pre>
{{I BaseEntity|as=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>noscroll</code>- Turned on by default. Causes the box to scroll if set to 0.
*<code>base</code>- Shows only information relevant to when it was initially added for the first time
*<code>l4d2</code>- Include info specific to {{l4d2}} ([[VScript]]s)
*<code>as</code>- [CURRENT DEFAULT] Include info specific to {{as}} (SetLocalOrigin and SetLocalAngles)
{{ExpandBox|
*<code>portal2</code>- Was used to show {{as}} keyalues for some reason. Using this will redirect to {{as}} keyvalues.
*<code>prel4d</code> - (DEPRECATED 9/28/18: This parameter existed to hide DispatchEffect for games (ones before l4d) that did not have it. There's many cases of similar inputs and keyvalues that aren't in absolutely everything, and making similar parameters for all of those simply isn't worth the trouble, especially considering having to comb through every existing use of those templates. Parameter is totally removed from code and affects nothing.)
*<code>tf2</code> - <strike>(DEPRECATED 28/4/2021: Was only used to show<code>SetTeam</code>keyvalue's TF2-specific information. Use {{tl|I TFTeam}} 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>{{I BaseEntity|l4d2=1}}</pre>
{{ExpandBox|
{{I BaseEntity|l4d2=1}}
|will:}}
=== Show info for its base ===
Information relevant only to base engine are displayed. ({{src13}} / {{src13mp}})
<pre>{{I BaseEntity|base=1}}</pre>
{{ExpandBox|
{{I BaseEntity|base=1}}
|will:}}
=== Show information for '''all''' games ===
Shows every game information for this key that this template can display.
<pre>{{I BaseEntity}}</pre>
{{ExpandBox|
{{I BaseEntity}}
|will:}}
==See also==
*{{tl|KV BaseEntity}}
*{{tl|KV BaseAnimating}}
*{{tl|I BaseAnimating}}
*{{tl|O BaseEntity}}
*{{tl|O BaseAnimating}}
----
<includeonly>
<!--{{otherlang2
|title=
}}-->
{{sandbox other||
<!-- Categories below this line, please -->
[[Category:Input Templates|Global]]
}}</includeonly>

Latest revision as of 02:23, 12 January 2024

Edit-copy.png
This is a documentation subpage for Template:I BaseEntity.
Don't forget to purge the contents of the base page upon creating or editing this subpage.

Info holder of all relevant inputs inheriting theCBaseEntity 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 allCBaseEntityinputs are not covered here. But you can see them all at the Uncovered Keyvalues page.

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. Also see FGD Template Prototype.

Usage

These must be used in a specific syntax! - ALL parameters must be given a value of 1, like:as=1. Only one game parameter can be used at once.

{{I BaseEntity|as=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:

  • noscroll- Turned on by default. Causes the box to scroll if set to 0.
  • base- Shows only information relevant to when it was initially added for the first time
  • l4d2- Include info specific to Left 4 Dead 2 (VScripts)
  • as- [CURRENT DEFAULT] Include info specific to Alien Swarm (SetLocalOrigin and SetLocalAngles)
Show Deprecated:  
  • portal2- Was used to show Alien Swarm keyalues for some reason. Using this will redirect to Alien Swarm keyvalues.
  • prel4d - (DEPRECATED 9/28/18: This parameter existed to hide DispatchEffect for games (ones before l4d) that did not have it. There's many cases of similar inputs and keyvalues that aren't in absolutely everything, and making similar parameters for all of those simply isn't worth the trouble, especially considering having to comb through every existing use of those templates. Parameter is totally removed from code and affects nothing.)
  • tf2 - (DEPRECATED 28/4/2021: Was only used to showSetTeamkeyvalue's TF2-specific information. Use {{I TFTeam}} instead.)

Refer to the Examples section for samples.

Examples

Show info specific to a game Left 4 Dead 2

This makes information relevant only to Left 4 Dead 2 be displayed.

{{I BaseEntity|l4d2=1}}
will: 

Show info for its base

Information relevant only to base engine are displayed. (Source 2013 / Source 2013 Multiplayer)

{{I BaseEntity|base=1}}
will: 

Show information for all games

Shows every game information for this key that this template can display.

{{I BaseEntity}}
will: 

See also

  • {{KV BaseEntity}}
  • {{KV BaseAnimating}}
  • {{I BaseAnimating}}
  • {{O BaseEntity}}
  • {{O BaseAnimating}}