Template:I BaseEntity/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(doc page)
 
(for the doc page)
Line 1: Line 1:
{{Documentation subpage}}
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.
<!-- Please place categories where indicated at the bottom of this page.) -->
Info holder for all [[inputs]] assigned through the {{ent|CBaseEntity}} class. Parameters are vital to display the appropiate info, because new games have added new features throughout the years. See [[Help:Templates]] for more info on named parameters.
{{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]].}}
{{note|Some <code>CBaseEntity</code> keyvalues are not covered here. See the talk page.}}
== Usage ==
All parameters for this template:
*<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|VScripts]])
*<code>as</code>- Include info specific to {{as}} (SetLocalOrigin and SetLocalAngles)
{{ExpandBox|nostarterlinebreak=1|
*<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>portal2</code>- Was used to show {{as}} keyalues for some reason. Using this will redirect to {{as}} keyvalues.
*<code>tf2</code> - <strike>(DEPRECATED 28/4/2021: Was only used to show<code>SetTeam</code>keyvalue's TF2 specific information. Use {{tl|I TeamNum}} instead
{{#ifexist: Template:I_TeamNum ||, when it starts to exist..}}.)</strike>
| Show Deprecated: }}


These must be used in a specific syntax; All the parameters must be given a value of 1, like for example:<code>as=1</code>for {{as}} specific info. Refer to the [[#Examples|Examples]] section.
== Covered on BaseAnimating ==
== Examples ==
*<code>Alpha</code>
=== Show info specific to a game {{as}} ===
*<code>AlternativeSorting</code>
This makes information relevant only to {{as}} be displayed.
*<code>Color</code>
<pre>{{I BaseEntity|as=1}}</pre>
*<code>SetDamageFilter</code>
{{ExpandBox|nostarterlinebreak=1|
*<code>EnableDamageForces</code>
{{I BaseEntity|as=1}}
*<code>DisableDamageForces</code>
|will:}}
*<code>DisableShadow</code>
=== Show info for its base ===
*<code>EnableShadow</code>
Information relevant only to this key at / before {{Ep2}} is displayed.
*<code>DisableDraw</code>
<pre>{{I BaseEntity|base=1}}</pre>
*<code>EnableDraw</code>
{{ExpandBox|nostarterlinebreak=1|
*<code>DisableReceivingFlashlight</code>
{{I BaseEntity|base=1}}
*<code>EnableReceivingFlashlight</code>
|will:}}
*<code>DisableDrawInFastReflection</code>
=== Show information for '''all''' games ===
*<code>EnableDrawInFastReflection</code>
Shows every game information for this key that this template can display. (Except for brush related)
 
<pre>{{I BaseEntity}}</pre>
== Covered on AI_BaseNPC ==
{{ExpandBox|nostarterlinebreak=1|
*<code>max_health</code> (m_iMaxHealth) (relevancy to edgecase entities are covered individually.)
{{I BaseEntity}}
*<code>health</code> (m_iHealth) (relevancy to edgecase entities are covered individually.)
|will:}}
*<code>target</code> (m_target) (relevancy to edgecase entities are covered individually.)
==See Also==
*<code>basevelocity</code> (m_vecBaseVelocity) (relevancy to edgecase entities are covered individually.)
* {{tl|KV BaseEntity}}
*<code>avelocity</code> (m_vecAngVelocity) (relevancy to edgecase entities are covered individually.)
* {{tl|KV BaseAnimating}}
*<code>waterlevel</code> (also used by {{ent|player}}. nothing else uses this probably?)
* {{tl|I BaseAnimating}}
 
----
== Miscellanous ==
{{I BaseEntity}}
*<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>.}})
<includeonly>{{minititle|Base}}
*<code>RemovePaint</code> (only works for paintable brush entities {{portal2}})
<!--{{otherlang2
|title=
}}-->
{{sandbox other||
<!-- Categories below this line, please -->
[[Category:Input Templates|Global]]
}}</includeonly>

Revision as of 04:02, 20 August 2021

Inputs here are technically members of theCBaseEntity 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.

Covered on BaseAnimating

  • Alpha
  • AlternativeSorting
  • Color
  • SetDamageFilter
  • EnableDamageForces
  • DisableDamageForces
  • DisableShadow
  • EnableShadow
  • DisableDraw
  • EnableDraw
  • DisableReceivingFlashlight
  • EnableReceivingFlashlight
  • DisableDrawInFastReflection
  • EnableDrawInFastReflection

Covered on AI_BaseNPC

  • max_health (m_iMaxHealth) (relevancy to edgecase entities are covered individually.)
  • health (m_iHealth) (relevancy to edgecase entities are covered individually.)
  • target (m_target) (relevancy to edgecase entities are covered individually.)
  • basevelocity (m_vecBaseVelocity) (relevancy to edgecase entities are covered individually.)
  • avelocity (m_vecAngVelocity) (relevancy to edgecase entities are covered individually.)
  • waterlevel (also used by player. nothing else uses this probably?)

Miscellanous

  • SetTeam (relevancy to edgecase entities are covered individually; to be moved to a new template with the name"Template:I TeamNum".)
  • RemovePaint (only works for paintable brush entities Portal 2)