Template:Varcom: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
(updated to {{Autolang}})
Line 1: Line 1:
<includeonly><onlyinclude>{{#switch:{{{1|{{style|color:#f00|'''{{#switch:{{{suf|}}}|#default=VARIABLE NAME MISSING!|:zh-cn=变量名称丢失!}}'''}}}}} | start = <!--
<includeonly><onlyinclude>{{#switch:{{{1|{{style|color:#f00|'''{{Autolang|VARIABLE NAME MISSING!|zh=变量名称丢失!}}'''}}}}} | start = <!--
--><table class="wikitable"><!--
--><table class="wikitable"><!--
-----><tr><!--
-----><tr><!--
--------><th style="background-color:#222;">{{#switch:{{{suf|}}}|#default=ConVar/Command|:zh-cn=控制台变量/命令}}</th><!--
--------><th style="background-color:#222;">{{Autolang|ConVar/Command|zh=控制台变量/命令}}</th><!--
--------><th style="background-color:#222;">{{#switch:{{{suf|}}}|#default=Parameters or default value|:zh-cn=参数或默认值}}</th><!--
--------><th style="background-color:#222;">{{Autolang|Parameters or default value|zh=参数或默认值}}</th><!--
--------><th style="background-color:#222;">{{#switch:{{{suf|}}}|#default=Descriptor|:zh-cn=描述符}}</th><!--
--------><th style="background-color:#222;">{{Autolang|Descriptor|zh=描述符}}</th><!--
--------><th style="background-color:#222;">{{#switch:{{{suf|}}}|#default=Effect|:zh-cn=效果}}</th><!--
--------><th style="background-color:#222;">{{Autolang|Effect|zh=效果}}</th><!--
-----></tr> | end = </table> | <!--
-----></tr> | end = </table> | <!--
-----><tr><!--
-----><tr><!--
--------><td><code>{{{1|</code>{{style|color:#f00|'''NAME MISSING!'''}}</td></tr></table><code>}}}</code></td><!--
--------><td><code>{{{1|</code>{{style|color:#f00|'''NAME MISSING!'''}}</td></tr></table><code>}}}</code></td><!--
--------><td><code>{{#ifeq:{{{2|}}}|null|</code>''[{{#switch:{{{suf|}}}|#default=blank by default|:zh-cn=默认为空}}]''<code>|{{{2|}}}}}</code></td><!--
--------><td><code>{{#ifeq:{{{2|}}}|null|</code>''[{{Autolang|blank by default|zh=默认为空}}]''<code>|{{{2|}}}}}</code></td><!--
--------><td><strong>{{#ifeq:{{{3|}}}|01|0 disables, 1 enables|<!--
--------><td><strong>{{#ifeq:{{{3|}}}|01|0 disables, 1 enables|<!--
-------------------->{{#ifeq:{{{3|}}}|dist|[[Hammer units|{{#switch:{{{suf|}}}|#default=Hammer units|:zh-cn=Hammer 单位}}]]|<!--
-------------------->{{#ifeq:{{{3|}}}|dist|[[Hammer units|{{Autolang|Hammer units|zh=Hammer 单位}}]]|<!--
-------------------->{{{3|}}}}}}}</strong></td><!--
-------------------->{{{3|}}}}}}}</strong></td><!--
--------><td>{{{4|{{#switch:{{{suf|}}}|#default={{todo|Effect description.}}|:zh-cn={{todo:zh-cn|效果描述。}}}}}}}</td><!--
--------><td>{{{4|{{Autolang|{{todo|Effect description.}}|zh={{todo:zh-cn|效果描述。}}}}}}}</td><!--
-----></tr>}}</includeonly></onlyinclude>
-----></tr>}}</includeonly></onlyinclude>
{{documentation}}
{{documentation}}

Revision as of 02:57, 6 August 2023

English (en)Deutsch (de)Esperanto (eo)Español (es)Français (fr)Suomi (fi)Hrvatski (hr)Magyar (hu)Italiano (it)日本語 (ja)한국어 (ko)Nederlands (nl)Polski (pl)Português (pt)Português do Brasil (pt-br)Русский (ru)Slovenčina (sk)Svenska (sv)Türkçe (tr)Українська (uk)Tiếng Việt (vi)中文 (zh)中文(臺灣) (zh-tw)
Curly brackets white.pngTemplate Documentation [view] [edit]
Icon-translate.png Available doc translations
View
Page history

This template can be used for both console variables (var) and console commands (com).

Parameters

  1. Name of the variable or command.
    1. To generate the header, put start in this space.
    2. To finish the table, put end.
    3. If this is not defined, the text NAME MISSING! will appear and forcibly break the table formatting until it is fixed.
  2. Parameter(s) of the command, or for variables, the default value.
    1. Optional.
    2. Put null to display the text [blank by default].
  3. Descriptor for whatever is put in the last space.
    1. Optional.
    2. Put 01 to quickly indicate boolean convars.
    3. Similarly, use dist for Hammer units.
  4. Effect of the command or variable.
    1. If undefined, a TODO will take its place.

Examples

{{varcom|start}} {{varcom|noclip|||Makes player ignore gravity and all solidity. Useful for observing and debugging.}} {{varcom|sv_cheats|0|01|<code>1</code> enables cheats on the server, which disables achievement progress and enables many more console commands.}} {{varcom|setpos|x y <z optional>|coordinates|Puts the player at the coordinate triplet entered. If <code>z</code> is not specified, the player will maintain their current z position.}} {{varcom|end}}
Red x.png
This template (and its redirect) is Wikipedia icon Deprecated. Its use is not recommended and its functionality may be compromised.
You can help our editors by replacing or deleting this template on the Pages that use this template. Once no more pages use this template, it should be Marked for deletion.

Additional notes:
Use #switch parser function instead. Example
{{#switch: {{language}}
| #default = English
| ja = 日本語
| zh-tw = 中文(台灣)
‎}}
Red x.png
This template (and its redirect) is Wikipedia icon Deprecated. Its use is not recommended and its functionality may be compromised.
You can help our editors by replacing or deleting this template on the Pages that use this template. Once no more pages use this template, it should be Marked for deletion.

Additional notes:
Use #switch parser function instead. Example
{{#switch: {{language}}
| #default = English
| ja = 日本語
| zh-tw = 中文(台灣)
‎}}
Red x.png
This template (and its redirect) is Wikipedia icon Deprecated. Its use is not recommended and its functionality may be compromised.
You can help our editors by replacing or deleting this template on the Pages that use this template. Once no more pages use this template, it should be Marked for deletion.

Additional notes:
Use #switch parser function instead. Example
{{#switch: {{language}}
| #default = English
| ja = 日本語
| zh-tw = 中文(台灣)
‎}}
Red x.png
This template (and its redirect) is Wikipedia icon Deprecated. Its use is not recommended and its functionality may be compromised.
You can help our editors by replacing or deleting this template on the Pages that use this template. Once no more pages use this template, it should be Marked for deletion.

Additional notes:
Use #switch parser function instead. Example
{{#switch: {{language}}
| #default = English
| ja = 日本語
| zh-tw = 中文(台灣)
‎}}
noclipMakes player ignore gravity and all solidity. Useful for observing and debugging.
sv_cheats00 disables, 1 enables1 enables cheats on the server, which disables achievement progress and enables many more console commands.
setposx y <z optional>coordinatesPuts the player at the coordinate triplet entered. If z is not specified, the player will maintain their current z position.