Generic Keyvalues, Inputs and Outputs/Inputs: Difference between revisions
(Eh since I already made an edit to the VDC, here's SetTeam 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) |
(SetTeam input; properly uses ParserFunctions, customizable with 'setteam_dont_put_nofgd', documentation edited, and some other stuff I probably missed) |
||
Line 2: | Line 2: | ||
__NOTOC__ | __NOTOC__ | ||
This template is our holder for all [[inputs]] assigned through {{ent|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. | This template is our holder for all [[inputs]] assigned through {{ent|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. | ||
'''No parameters:''' display inputs for ALL games. | |||
<pre>{{I BaseEntity}}</pre> | <pre>{{I BaseEntity}}</pre> | ||
''' | '''Base:''' display inputs that have only existed since whatever game added the class (most have existed since HL2, the first Source game). | ||
<pre>{{I BaseEntity|base=1}}</pre> | <pre>{{I BaseEntity|base=1}}</pre> | ||
''' | '''Game as a parameter:''' display the inputs that <code>base</code> displays, AND inputs 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. <code>l4d2</code> will not automatically include <code>l4d</code> inputs as well). | ||
<pre>{{I BaseEntity|l4d2=1}}</pre> | <pre>{{I BaseEntity|l4d2=1}}</pre> | ||
All parameters for this template: | All parameters for this template: | ||
*<code>base</code> | *<code>base</code> - (Use if the entity was available before L4D2.) | ||
*<code>l4d2</code> | *<code>l4d2</code> | ||
*<code>portal2</code> | *<code>portal2</code> | ||
*<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>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> | *<code>tf2</code> - Alter<code>SetTeam</code>input to show TF2 specific information. Use<code>tf2=setteam_dont_put_nofgd</code>to remove the {{Not in FGD}} tag. | ||
{{note|If you want to edit something on this template, please make sure you edit it in both places. ''Per-game'' inputs are duplicated, for complex technical reasons.}} | {{note|If you want to edit something on this template, please make sure you edit it in both places. ''Per-game'' inputs are duplicated, for complex technical reasons.}} | ||
For full documentation on this family of templates, see [[FGD Template Prototype]]. Still confused on something? '''Ask for help''' before editing this template. | For full documentation on this family of templates, see [[FGD Template Prototype]]. Still confused on something? '''Ask for help''' before editing this template. | ||
Line 20: | Line 20: | ||
[[Category:Input Templates|Global]] | [[Category:Input Templates|Global]] | ||
---- | ---- | ||
{{I BaseEntity}} | {{I BaseEntity|tf2=setteam_dont_put_nofgd}} | ||
</noinclude><!-- | </noinclude><!-- | ||
--><includeonly>{{minititle|Base}} | --><includeonly>{{minititle|Base}} | ||
Line 50: | Line 50: | ||
{{IO|SetLocalOrigin|param=coordinates|since={{as}}|nofgd=1|Send this entity to a spot in the map. If the entity is parented to something, it will be offset from the parent by this amount.}} | {{IO|SetLocalOrigin|param=coordinates|since={{as}}|nofgd=1|Send this entity to a spot in the map. If the entity is parented to something, it will be offset from the parent by this amount.}} | ||
{{IO|SetLocalAngles|param=angles|since={{as}}|nofgd=1|Set this entity's angles.}}<!-- | {{IO|SetLocalAngles|param=angles|since={{as}}|nofgd=1|Set this entity's angles.}}<!-- | ||
-->}}}}}}<!-- | -->}}}}}} | ||
<!-- | |||
--> {{# | ++ SetTeam (along with 'TeamNum' in CS:GO) related things go here ++ | ||
--> | |||
<!-- IF: TF2 == 'setteam_dont_put_nofgd' -->{{#switch: {{{tf2|}}} | setteam_dont_put_nofgd = | |||
{{IO|SetTeam|Reassign the team of this entity as the team using this number. | |||
:*0: None | |||
:*1: Spectator | |||
:*2: Red {{tf2}} | |||
:*3: Blue {{tf2}} | |||
|param=choices }} | |||
| <!-- ELSE IF: TF2 == 1 --> 1 = | |||
{{IO|SetTeam|Reassign the team of this entity as the team using this number. | {{IO|SetTeam|Reassign the team of this entity as the team using this number. | ||
:*0: None | :*0: None | ||
:*1: Spectator | :*1: Spectator | ||
:*2: Red {{tf2}} | :*2: Red {{tf2}} | ||
:*3: Blue {{tf2}} | :*3: Blue {{tf2}} | ||
|param=choices|nofgd=1 }} | |||
--> | | }} <!-- IF: CSS, ELSE IF: L4D, ELSE IF: L4D2 --> {{#if:{{{css|}}}||{{#if:{{{l4d|}}}||{{#if:{{{l4d2|}}}| | ||
{{IO|SetTeam|Doesn't do anything in {{l4ds}}. | {{IO|SetTeam|Doesn't do anything in {{l4ds}}. | ||
:{{todo|Does this work in {{css}}?}} | :{{todo|Does this work in {{css}}?}} | ||
Line 68: | Line 77: | ||
:*3: Infected {{l4ds}} Terrorist {{css}} | :*3: Infected {{l4ds}} Terrorist {{css}} | ||
--> | --> | ||
|deprecated=1|nofgd=1 }} | |||
| }}}}}} <!-- IF: CSGO --> {{#if:{{{csgo|}}}| | |||
{{IO|SetTeam|Only<code>TeamNum</code>works in {{csgo}}.|deprecated=1}} | {{IO|SetTeam|Only<code>TeamNum</code>works in {{csgo}}.|deprecated=1}} | ||
{{IO|TeamNum|Reassign the team of this entity as the team using this number. | {{IO|TeamNum|Reassign the team of this entity as the team using this number. | ||
Line 76: | Line 84: | ||
:*1: Spectator | :*1: Spectator | ||
:*2: Terrorists {{csgo}} | :*2: Terrorists {{csgo}} | ||
:*3: Counter-Terrorists {{csgo}} | :*3: Counter-Terrorists {{csgo}} | ||
|param=choices|only={{csgo}}|nofgd=1 }} | |||
| }}</includeonly> |
Revision as of 04:21, 11 April 2021
This template is our holder for all inputs 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. No parameters: display inputs for ALL games.
{{I BaseEntity}}
Base: display inputs that have only existed since whatever game added the class (most have existed since HL2, the first Source game).
{{I BaseEntity|base=1}}
Game as a parameter: display the inputs that base
displays, AND inputs 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
inputs as well).
{{I BaseEntity|l4d2=1}}
All parameters for this template:
base
- (Use if the entity was available before L4D2.)l4d2
portal2
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
- AlterSetTeam
input to show TF2 specific information. Usetf2=setteam_dont_put_nofgd
to remove the !FGD tag.

For full documentation on this family of templates, see FGD Template Prototype. Still confused on something? Ask for help before editing this template.

CBaseEntity
inputs are not covered here. See the talk page.