Template:KV TeamNum/doc: Difference between revisions
 (Changed the method of showing Examples, along with the parameters document method)  | 
				m (→Usage:  Substituted IO templates)  | 
				||
| (9 intermediate revisions by 4 users not shown) | |||
| Line 1: | Line 1: | ||
{{Doc/subpage}}  | |||
{{Main|teamnumber}}  | |||
}}  | |||
{{  | |||
<!-- Please place categories where indicated at the bottom of this page.) -->  | <!-- Please place categories where indicated at the bottom of this page.) -->  | ||
Display information for the<code>TeamNum</code>key in a a consistent and easy to use manner. This key exists for all entities inheriting the{{ent|CBaseEntity}}class, but since quite a considerable amount of entities aren't affected by it at all, or in a meaningful enough manner, the information for this key will be documented with this template.  | Display information for the <code style="color:#E5E5E5; background-color: #202020;">TeamNum</code> or <code style="color:#E5E5E5; background-color: #202020;">teamnumber</code> key in a a consistent and easy to use manner. This key exists for all entities inheriting the {{ent|CBaseEntity}} class, but since quite a considerable amount of entities aren't affected by it at all, or in a meaningful enough manner, the information for this key will be documented with this template.  | ||
==Usage==  | ==Usage==  | ||
These must be used in a specific syntax! - ALL parameters must be given a value of 1, like:{{code|1=tf2=1|style=background-color:#202020; color:#E5E5E5;}}. ''Only one'' game parameter can be used at once.  | |||
<pre>  | |||
{{KV TeamNum|tf2=1}}  | |||
</pre>  | |||
{{Note|Entities with this template should generally have the following input added below: {{tlx|I|<nowiki>SetTeam|Sets which team to be aligned with|param=int</nowiki>}}.}}  | |||
=== Parameters ===  | |||
If you leave the parameter field empty (using no arguments), the template will automatically fallback to displaying information from ALL games.  | |||
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>tf2</code> - Set template KVs specific to {{tf2}}  | |||
*<code>l4d</code> - Set template KVs specific to {{l4d}}  | |||
*<code>l4d2</code> - Set template KVs specific to {{l4d2}}  | |||
*<code>css</code> - Set template KVs specific to {{css}}  | |||
*<code>csgo</code> - Set template KVs specific to {{csgo}}  | |||
Refer to the [[#Examples|Examples]] section for samples.  | |||
==Examples==  | ==Examples==  | ||
===Show info specific to a game {{l4d}}===  | |||
This makes information specific to {{l4d}} be displayed.  | This makes information specific to {{l4d}} be displayed.  | ||
<pre>{{KV TeamNum|l4d=1}}</pre>  | <pre>{{KV TeamNum|l4d=1}}</pre>  | ||
{{KV TeamNum|l4d=1}}  | {{KV TeamNum|l4d=1}}  | ||
===Show info for its base===  | |||
Information relevant only to   | Information relevant only to base engine are displayed. ({{src13}} / {{src13mp}})  | ||
<pre>{{KV TeamNum|base=1}}</pre>  | <pre>{{KV TeamNum|base=1}}</pre>  | ||
{{KV TeamNum|base=1}}  | {{KV TeamNum|base=1}}  | ||
===Show information for '''all''' games===  | |||
Shows every game information for this key that this template can display.  | Shows every game information for this key that this template can display.  | ||
<pre>{{KV TeamNum}}</pre>will:  | <pre>{{KV TeamNum}}</pre>will:  | ||
{{KV TeamNum}}  | {{KV TeamNum}}  | ||
==See also==  | |||
==See   | |||
* {{tl|KV BaseEntity}}  | * {{tl|KV BaseEntity}}  | ||
* {{tl|I BaseEntity}}  | * {{tl|I BaseEntity}}  | ||
| Line 36: | Line 44: | ||
<includeonly>  | <includeonly>  | ||
{{sandbox other||  | {{sandbox other||  | ||
<!-- Categories below this line, please -->  | <!-- Categories below this line, please -->  | ||
[[Category:Keyvalue Templates|TeamNum]]  | [[Category:Keyvalue Templates|TeamNum]]  | ||
}}</includeonly>  | }}</includeonly>  | ||
Latest revision as of 16:59, 21 April 2025
Don't forget to purge the contents of the base page upon creating or editing this subpage.
Display information for the TeamNum or teamnumber key in a a consistent and easy to use manner. This key exists for all entities inheriting the CBaseEntity class, but since quite a considerable amount of entities aren't affected by it at all, or in a meaningful enough manner, the information for this key will be documented with this template.
Usage
These must be used in a specific syntax! - ALL parameters must be given a value of 1, like:tf2=1. Only one game parameter can be used at once.
{{KV TeamNum|tf2=1}}
{{I|SetTeam|Sets which team to be aligned with|param=int}}.Parameters
If you leave the parameter field empty (using no arguments), the template will automatically fallback to displaying information from ALL games.
All parameters for this template:
base- No game specific information are displayed, and base engine features only. (The
 / 
 iteration engine)tf2- Set template KVs specific to
l4d- Set template KVs specific to
l4d2- Set template KVs specific to
css- Set template KVs specific to
csgo- Set template KVs specific to
Refer to the Examples section for samples.
Examples
Show info specific to a game 
This makes information specific to 
 be displayed.
{{KV TeamNum|l4d=1}}
- Initial Team (TeamNum) <integer choices>
 - Which Team the entity belongs / is assigned to on spawn
 
Show info for its base
Information relevant only to base engine are displayed. (
 / 
)
{{KV TeamNum|base=1}}
- Initial Team (TeamNum) <integer choices>
 - Which Team the entity belongs / is assigned to on spawn
- 0: None
 - 1: Spectator
 
 
Show information for all games
Shows every game information for this key that this template can display.
{{KV TeamNum}}will:
- Initial Team (TeamNum, or teamnumber 
)  <integer choices> - Which Team the entity belongs / is assigned to on spawn
- 0: None
 - 1: Spectator, Spectator/Halloween Souls 

 - 2: RED 
, Survivors 
, Terrorists 
 
, Marines (Team-based game modes only) 
 - 3: BLU/Robots 
, Infected 
, Counter-Terrorists 
 
, Scientists (Team-based game modes only) 
 - 5: Halloween Bosses (only in 
) !FGD 
 
See also
{{KV BaseEntity}}{{I BaseEntity}}