Template:Varcom: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(added one last example)
(trying table formatting)
Line 1: Line 1:
'''<code>{{{1}}} {{#if:{{{p|}}}|{{{p}}}</code>({{{d}}})|</code>}}'''
{{#switch:{{{1|{{style|color:#f00|'''VARIABLE NAME MISSING!'''}}}}} | start = <!--
:{{{2}}}<noinclude>
--><table class="standard-table"><!--
-----><tr><!--
--------><th>ConVar/Command</th><!--
--------><th>Parameters</th><!--
--------><th>Descriptor</th><!--
--------><th>Effect</th><!--
-----></tr> | end = </table> | <!--
-----><tr><!--
--------><td>{{{1|{{style|color:#f00|'''NAME MISSING!'''}}</td></tr></table>}}}</td><!--
--------><td>{{{2|}}}</td><!--
--------><td>{{{3|}}}</td><!--
--------><td>{{{4|{{todo|Effect description.}}}}}</td><!--
-----></tr>}}<noinclude>
----
----
This template can be used for both console variables and console commands.
This template can be used for both console variables and console commands.


Parameters:
Parameters:
*<code>{{{1}}}</code>: Name of the variable or command.
#Name of the variable or command.
**<code>{{{p}}}</code>: Parameter(s) of the command, or for variables, the default value.
##To generate the header, put <code>start</code> in this space.
***<code>{{{d}}}</code>: Descriptor for whatever is put in <code>{{{p}}}</code>. If <code>{{{p}}}</code> is not defined, <code>{{{d}}}</code> will not show.
##To finish the table, put <code>end</code>.
*<code>{{{2}}}</code>: Description of the command or variable.
##If this is not defined, the text {{style|color:#f00|'''NAME MISSING!'''}} will appear and forcibly break the table formatting until it is fixed.
#Parameter(s) of the command, or for variables, the default value.
##Optional.
#Descriptor for whatever is put in the last space.
##Optional.
#Effect of the command or variable.
##If undefined, a TODO will take its place.


<pre>{{varcom|noclip|Makes player ignore gravity and all solidity. Useful for observing and debugging.}}</pre>
<pre>
{{varcom|noclip|Makes player ignore gravity and all solidity. Useful for observing and debugging.}}
{{varcom|start}}
<pre>{{varcom|sv_cheats|p=0|d=arbitrary number|<code>1</code> enables cheats on the server, which disables achievement progress and enables many more console commands.}}</pre>
{{varcom|noclip|||Makes player ignore gravity and all solidity. Useful for observing and debugging.}}
{{varcom|sv_cheats|p=0|d=arbitrary number|<code>1</code> enables cheats on the server, which disables achievement progress and enables many more console commands.}}
{{varcom|sv_cheats|0|arbitrary number|<code>1</code> enables cheats on the server, which disables achievement progress and enables many more console commands.}}
<pre>{{varcom|setpos|p=x y <z optional>|d=coordinates|Puts the player at the coordinate triplet entered. If <code>z</code> is not specified, the player will maintain their current z position.}}</pre>
{{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|setpos|p=x y <z optional>|d=coordinates|Puts the player at the coordinate triplet entered. If <code>z</code> is not specified, the player will maintain their current z position.}}</noinclude>
{{varcom|end}}
</pre>
{{varcom|start}}
{{varcom|noclip|||Makes player ignore gravity and all solidity. Useful for observing and debugging.}}
{{varcom|sv_cheats|0|arbitrary number|<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}}</noinclude>

Revision as of 06:35, 29 August 2018

NAME MISSING!

Todo: Effect description.

This template can be used for both console variables and console commands.

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.
  3. Descriptor for whatever is put in the last space.
    1. Optional.
  4. Effect of the command or variable.
    1. If undefined, a TODO will take its place.
{{varcom|start}}
{{varcom|noclip|||Makes player ignore gravity and all solidity. Useful for observing and debugging.}}
{{varcom|sv_cheats|0|arbitrary number|<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}}
ConVar/CommandParametersDescriptorEffect
noclipMakes player ignore gravity and all solidity. Useful for observing and debugging.
sv_cheats0arbitrary number1 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.