Difference between revisions of "Template:Command"

From Bohemia Interactive Community
Jump to navigation Jump to search
(Updated for speed and efficiency + improved documentation >> This is a pivotal template! If this edit has broken anything revert immediately!! << + holding breath ...)
(Reverting due to effs and args being messed up >.< - will fix asap)
Line 1: Line 1:
<includeonly>__NOTOC__ __NOEDITSECTION__ <div class="command_description"><!--
+
<includeonly>__NOTOC__ __NOEDITSECTION__
-->[[Image:{{{1}}}_{{{2}}}.gif|Introduced in {{{{{1}}} }} version {{{2}}}]]<!--
+
<div class="command_description">[[Image:{{{1}}}_{{{2}}}.gif|Introduced in {{{{{1}}}}} version {{{2}}}]]{{if defined call|{{{arg|}}}|Command-image|arguments_{{{arg}}}}}{{if defined call|{{{eff|}}}|Command-image|effects_{{{eff}}}}}
-->{{#if:{{{arg|}}}|{{Command-image|arguments_{{{arg}}} }}|}}<!--
+
<span style="color:#999; font-size:0.7em; margin-top:0">Click on the images for descriptions</span>
-->{{#if:{{{eff|}}}|{{Command-image|effects_{{{eff}}} }}|}}<!--
 
  
If image links are incorrect, page should feature in [[:Category:Pages with broken file links]]
+
=== Introduced in ===
 
 
-->{{#switch:no|{{#if:{{{1|}}}|{{{2|no}}}|no}}|{{{arg|no}}}|{{{eff|no}}}=|#default=
 
<p><span style="color:#999;font-size:0.7em;margin-top:0">Click on the images for descriptions</span></p>}}<!-- if((1 && 2) || arg || eff) { showThis(); } -->
 
 
 
<h3>Introduced in</h3>
 
 
<dl>
 
<dl>
<dt>Game:</dt>
+
<dt>Game:<dd>{{{{{1}}}}}
<dd>{{{{{1}}} }}</dd>
+
<dt>Version:<dd>{{{2|1.00}}}
<dt>Version:</dt>
 
<dd>{{{2|1.00}}}</dd>
 
 
</dl>
 
</dl>
  
<h3>Description</h3>
+
=== Description ===
 
<dl>
 
<dl>
<dt>Description:</dt>
+
<dt>Description:<dd>{{{3|}}}
<dd>{{{3|}}}</dd>
+
</dl>{{if defined call|{{{4|}}}|echo|
</dl><!--
 
  
-->{{#if:{{{4|}}}|<h3>Syntax</h3>
+
<h3>Syntax</h3>
 
<dl>
 
<dl>
<dt>Syntax:</dt>
+
<dt>Syntax:
<dd>{{{4}}}</dd>|}}<!--
+
<dd>{{{4}}}
 +
}}
 +
{{if defined call|{{{p1|}}}|Command-param|{{{p1}}}|<dt>Parameters:}}{{if defined call|{{{p2|}}}|Command-param|{{{p2}}}}}{{if defined call|{{{p3|}}}|Command-param|{{{p3}}}}}{{if defined call|{{{p4|}}}|Command-param|{{{p4}}}}}{{if defined call|{{{p5|}}}|Command-param|{{{p5}}}}}{{if defined call|{{{p6|}}}|Command-param|{{{p6}}}}}{{if defined call|{{{p7|}}}|Command-param|{{{p7}}}}}{{if defined call|{{{p8|}}}|Command-param|{{{p8}}}}}{{if defined call|{{{p9|}}}|Command-param|{{{p9}}}}}{{if defined call|{{{p10|}}}|Command-param|{{{p10}}}}}{{if defined call|{{{p11|}}}|Command-param|{{{p11}}}}}{{if defined call|{{{p12|}}}|Command-param|{{{p12}}}}}{{if defined call|{{{4|}}}|echo|
 +
<dt>Return Value:
 +
<dd>{{{5|None.}}}
 +
</dl>}}{{if defined call|{{{s2|}}}|echo|
  
-->{{#if:{{{p1|}}}|
+
<h3> Alternative Syntax </h3>
{{Command-param|{{{p1}}}|<dt>Parameters:</dt>}}
 
{{#if:{{{p2|}}}|{{Command-param|{{{p2}}}</dd>}}
 
{{#if:{{{p3|}}}|{{Command-param|{{{p3}}}</dd>}}
 
{{#if:{{{p4|}}}|{{Command-param|{{{p4}}}</dd>}}
 
{{#if:{{{p5|}}}|{{Command-param|{{{p5}}}</dd>}}
 
{{#if:{{{p6|}}}|{{Command-param|{{{p6}}}</dd>}}
 
{{#if:{{{p7|}}}|{{Command-param|{{{p7}}}</dd>}}
 
{{#if:{{{p8|}}}|{{Command-param|{{{p8}}}</dd>}}
 
{{#if:{{{p9|}}}|{{Command-param|{{{p9}}}</dd>}}
 
{{#if:{{{p10|}}}|{{Command-param|{{{p10}}}</dd>}}
 
{{#if:{{{p11|}}}|{{Command-param|{{{p11}}}</dd>}}
 
{{#if:{{{p12|}}}|{{Command-param|{{{p12}}}</dd>}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}<!--
 
 
 
-->{{#if:{{{4|}}}|
 
<dt>Return Value:</dt>
 
<dd>{{{5|None.}}}</dd>
 
</dl>|}}<!--
 
 
 
-->{{#if:{{{s2|}}}|
 
<h3>Alternative Syntax</h3>
 
 
<dl>
 
<dl>
<dt>Syntax:</dt>
+
<dt>Syntax:
<dd>{{{s2}}}</dd>|}}<!--
+
<dd>{{{s2}}}
 +
}}
 +
{{if defined call|{{{p21|}}}|Command-param|{{{p21}}}|<dt>Parameters:}}{{if defined call|{{{p22|}}}|Command-param|{{{p22}}}}}{{if defined call|{{{p23|}}}|Command-param|{{{p23}}}}}{{if defined call|{{{p24|}}}|Command-param|{{{p24}}}}}{{if defined call|{{{p25|}}}|Command-param|{{{p25}}}}}{{if defined call|{{{p26|}}}|Command-param|{{{p26}}}}}{{if defined call|{{{p27|}}}|Command-param|{{{p27}}}}}{{if defined call|{{{p28|}}}|Command-param|{{{p28}}}}}{{if defined call|{{{p29|}}}|Command-param|{{{p29}}}}}{{if defined call|{{{p30|}}}|Command-param|{{{p30}}}}}{{if defined call|{{{p31|}}}|Command-param|{{{p31}}}}}{{if defined call|{{{p32|}}}|Command-param|{{{p32}}}}}{{if defined call|{{{s2|}}}|echo|
 +
<dt>Return Value:
 +
<dd>{{{r2|None.}}}
 +
</dl>}}{{if defined call|{{{4|}}}|echo|
  
-->{{#if:{{{p21|}}}|
 
{{Command-param|{{{p21}}}|<dt>Parameters:</dt>}}
 
{{#if:{{{p22|}}}|{{Command-param|{{{p22}}}</dd>}}
 
{{#if:{{{p23|}}}|{{Command-param|{{{p23}}}</dd>}}
 
{{#if:{{{p24|}}}|{{Command-param|{{{p24}}}</dd>}}
 
{{#if:{{{p25|}}}|{{Command-param|{{{p25}}}</dd>}}
 
{{#if:{{{p26|}}}|{{Command-param|{{{p26}}}</dd>}}
 
{{#if:{{{p27|}}}|{{Command-param|{{{p27}}}</dd>}}
 
{{#if:{{{p28|}}}|{{Command-param|{{{p28}}}</dd>}}
 
{{#if:{{{p29|}}}|{{Command-param|{{{p29}}}</dd>}}
 
{{#if:{{{p30|}}}|{{Command-param|{{{p30}}}</dd>}}
 
{{#if:{{{p31|}}}|{{Command-param|{{{p31}}}</dd>}}
 
{{#if:{{{p32|}}}|{{Command-param|{{{p32}}}</dd>}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}<!--
 
 
-->{{#if:{{{s2|}}}|
 
<dt>Return Value:</dt>
 
<dd>{{{r2|None.}}}</dd>
 
</dl>|}}<!--
 
 
-->{{#if:{{{4|}}}|
 
 
<h3>Examples</h3>
 
<h3>Examples</h3>
<dl>|}}<!--
+
<dl>}}{{if defined call|{{{x1|}}}|Command-example|{{{x1}}}|<dt>Example 1:}}{{if defined call|{{{x2|}}}|Command-example|{{{x2}}}|<dt>Example 2:}}{{if defined call|{{{x3|}}}|Command-example|{{{x3}}}|<dt>Example 3:}}{{if defined call|{{{x4|}}}|Command-example|{{{x4}}}|<dt>Example 4:}}{{if defined call|{{{4|}}}|echo|</dl>
  
-->{{#if:{{{x1|}}}|
 
{{Command-example|{{{x1}}}</dd>|<dt>Example 1:</dt>}}
 
{{#if:{{{x2|}}}|{{Command-example|{{{x2}}}</dd>|<dt>Example 2:</dt>}}
 
{{#if:{{{x3|}}}|{{Command-example|{{{x3}}}</dd>|<dt>Example 3:</dt>}}
 
{{#if:{{{x4|}}}|{{Command-example|{{{x4}}}</dd>|<dt>Example 4:</dt>}}|}}|}}|}}|}}<!--
 
 
-->{{#if:{{{4|}}}|</dl>
 
 
<h3>Additional Information</h3>
 
<h3>Additional Information</h3>
 
<dl>
 
<dl>
<dt>Multiplayer:</dt>
+
<dt>Multiplayer:
<dd>{{{mp|-}}}</dd>|}}<!--
+
<dd>{{{mp|-}}}
 
+
}}{{if defined call|{{{pr|}}}|echo|<dt>Problems:<dd>{{{pr}}}}}
-->{{#if:{{{pr|}}}|
+
{{if defined call|{{{6|}}}|echo|<dt>See also:<dd>'''{{{6}}}'''}}{{if defined call|{{{4|}}}|echo|
<dt>Problems:</dt>
+
</dl>
<dd>{{{pr}}}</dd>|}}
+
}}
<dt>See also:</dt>
+
=== Notes ===
<dd style="font-weight:bold;">{{{6}}}</dd><!--
 
 
 
-->{{#if:{{{4|}}}|</dl>|}}
 
 
 
<h3>Notes</h3>
 
 
<h3 style="display:none">Notes</h3>
 
<h3 style="display:none">Notes</h3>
 
<dl class="command_description">
 
<dl class="command_description">
<!-- START Note Section -->
+
<!-- Note Section BEGIN -->
  
<!-- END Note Section -->
+
<!-- Note Section END -->
 
</dl>
 
</dl>
<!--
+
 
[{{SERVER}}/wiki?title={{PAGENAMEE}}&action=edit&section=1 + Add Note]
+
<!--[{{SERVER}}/wiki?title={{PAGENAMEE}}&action=edit&section=1 + Add Note]-->
-->
+
 
 
<center>''Only post proven facts here. Use the [[{{NAMESPACE}} talk: {{PAGENAME}}|talk page]] or the [http://forums.bistudio.com/forumdisplay.php?f=4 forums] for discussions.''</center>
 
<center>''Only post proven facts here. Use the [[{{NAMESPACE}} talk: {{PAGENAME}}|talk page]] or the [http://forums.bistudio.com/forumdisplay.php?f=4 forums] for discussions.''</center>
</div></includeonly><noinclude>__TOC__ __NOEDITSECTION__
+
</div></includeonly><noinclude>
 
== Syntax ==
 
== Syntax ==
  
Line 115: Line 64:
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
| GAME |= Game
+
| GAME |=
  
|GAMEVERSION|= Game Version (number surrounded by NO SPACES)
+
|GAMEVERSION|=
  
|arg= MPARGUMENTS |= Multiplayer Arguments
+
|arg= MPARGUMENTS |=
  
|eff= MPEFFECTS |= Multiplayer Effects
+
|eff= MPEFFECTS |=
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
| DESCRIPTION |= Description
+
| DESCRIPTION |=
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
| SYNTAX |= Syntax
+
| SYNTAX |=
  
|p1= PARAMETER1 |= Parameter 1
+
|p1= PARAMETER1 |=
  
|p2= PARAMETER2 |= Parameter 2
+
|p2= PARAMETER2 |=
  
|p3= PARAMETER3 |= Parameter 3
+
|p3= PARAMETER3 |=
  
|p4= PARAMETER4 |= Parameter 4
+
|p4= PARAMETER4 |=
  
|p5= PARAMETER5 |= Parameter 5
+
|p5= PARAMETER5 |=
  
|p6= PARAMETER6 |= Parameter 6
+
|p6= PARAMETER6 |=
  
|p7= PARAMETER7 |= Parameter 7
+
|p7= PARAMETER7 |=
  
|p8= PARAMETER8 |= Parameter 8
+
|p8= PARAMETER8 |=
  
|p9= PARAMETER9 |= Parameter 9
+
|p9= PARAMETER9 |=
  
|p10= PARAMETER10 |= Parameter 10
+
|p10= PARAMETER10 |=
  
|p11= PARAMETER11 |= Parameter 11
+
|p11= PARAMETER11 |=
  
|p12= PARAMETER12 |= Parameter 12
+
|p12= PARAMETER12 |=
  
| RETURNVALUE |= Return Value
+
| RETURNVALUE |=
  
  
<!-- START alternative syntax (optional) -->
+
START alternative syntax (optional)
  
|s2= ALT_SYNTAX |= Alternative Syntax
+
|s2= ALT_SYNTAX |=  
  
|p21= ALT_PARAMETER1 |= Alternative Parameter 1
+
|p21= ALT_PARAMETER1 |=  
  
|p22= ALT_PARAMETER2 |= Alternative Parameter 2
+
|p22= ALT_PARAMETER2 |=
  
|p23= ALT_PARAMETER3 |= Alternative Parameter 3
+
|p23= ALT_PARAMETER3 |=  
  
|p24= ALT_PARAMETER4 |= Alternative Parameter 4
+
|p24= ALT_PARAMETER4 |=  
  
|p25= ALT_PARAMETER5 |= Alternative Parameter 5
+
|p25= ALT_PARAMETER5 |=
  
|p26= ALT_PARAMETER6 |= Alternative Parameter 6
+
|p26= ALT_PARAMETER6 |=
  
|p27= ALT_PARAMETER7 |= Alternative Parameter 7
+
|p27= ALT_PARAMETER7 |=
  
|p28= ALT_PARAMETER8 |= Alternative Parameter 8
+
|p28= ALT_PARAMETER8 |=
  
|p29= ALT_PARAMETER9 |= Alternative Parameter 9
+
|p29= ALT_PARAMETER9 |=
  
|p30= ALT_PARAMETER10 |= Alternative Parameter 10
+
|p30= ALT_PARAMETER10 |=
  
|p31= ALT_PARAMETER11 |= Alternative Parameter 11
+
|p31= ALT_PARAMETER11 |=
  
|p32= ALT_PARAMETER12 |= Alternative Parameter 12
+
|p32= ALT_PARAMETER12 |=
  
|r2= ALT_RETURNVALUE |= Alternative Return Value
+
|r2= ALT_RETURNVALUE |=
  
<!-- END alternative syntax (optional) -->
+
END alternative syntax (optional)
  
  
|mp= MPBEHAVIOUR |= Multiplayer Behaviour
+
|mp= MPBEHAVIOUR |=
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
|x1= EXAMPLE1 |= Example 1
+
|x1= EXAMPLE1 |=
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
|x2= EXAMPLE2 |= Example 2
+
|x2= EXAMPLE2 |=
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
|x3= EXAMPLE3 |= Example 3
+
|x3= EXAMPLE3 |=
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
|x4= EXAMPLE4 |= Example 4
+
|x4= EXAMPLE4 |=
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
| SEEALSO |= See Also
+
| SEEALSO |=
  
 
}}
 
}}
Line 210: Line 159:
 
<h3 style="display:none">Notes</h3>
 
<h3 style="display:none">Notes</h3>
 
<dl class="command_description">
 
<dl class="command_description">
<!-- START Note Section -->
+
<!-- Note Section BEGIN -->
  
<!-- END Note Section -->
+
<!-- Note Section END -->
 
</dl>
 
</dl>
  
Line 219: Line 168:
 
== Parameters ==
 
== Parameters ==
  
'''All of the following parameters should be <span style="color:red;">replaced</span> by reasonable text!'''
+
'''All of the following parameters should be replaced by reasonable text!'''
  
* The parameter ''GAME'' should contain the short name of the game when the command was introduced, being one of "''ofp''", "''ofpr''", "''arma''", "''arma2''" or "''arma3''".
+
The paramter GAME should contain the short name of the game when the command was introduced, being one of "ofp", "ofpr" or "arma".
  
* The parameter ''GAMEVERSION'' is obvious: It contains the version number when this command was included. '''This is the only parameter where you <span style="color:red;">must not</span> have spaces before or after the parameter!!!'''
+
The parameter GAMEVERSION is obvious: It contains the version number when this command was included. '''This is the only parameter where you ''must not'' have spaces before or after the parameter!!!''' If the game version is a round number, include two zeros after the comma (ie, 1.00, 2.00). If not, write the version number with all required numbers after the comma (ie, 1.5, 1.34 ...)
  
:: If the game version is a round number, include two zeros after the comma (ie, <tt>1.00, 2.00</tt>). If not, write the version number with all required numbers after the comma (ie, <tt>1.5, 1.34</tt> ...)
+
The parameter MPARGUMENTS is optional. If you don't include it, delete the whole line. It contains either "local" or "global" and describes whether this command needs the arguments to be local to the client it is executed on or if they can be global.
  
* The parameter ''MPARGUMENTS'' is optional. If you don't include it, delete the whole line. It contains either "local" or "global" and describes whether this command needs the arguments to be local to the client it is executed on or if they can be global.
+
The parameter MPEFFECTS is optional. If you don't include it, delete the whole line. It contains either "local" or "global" and describes whether the effects of the command are transfered through the net.
  
* The parameter ''MPEFFECTS'' is optional. If you don't include it, delete the whole line. It contains either "local" or "global" and describes whether the effects of the command are transferred through the net.
+
The parameter DESCRIPTION should contain a brief but detailed description of the command.
  
* The parameter ''DESCRIPTION'' should contain a brief but detailed description of the command.
+
The parameter SYNTAX should show the syntax for the command. There are several possibilities of format:
 
+
<pre>'''commandName'''
* The parameter ''SYNTAX'' should show the syntax for the command. There are several possibilities of format:
 
<pre style="margin-left:2em;">'''commandName'''
 
  
 
preargument '''commandName'''
 
preargument '''commandName'''
Line 245: Line 192:
  
 
preargument '''commandName''' [postarg1, postarg2]</pre>
 
preargument '''commandName''' [postarg1, postarg2]</pre>
:: etc. You get the drill.
+
etc. You get the drill.
 
 
* ''PARAMETER1'' to ''PARAMETER5'' are all optional and should contain descriptions of the parameters. If there are no parameters, delete all lines. If there are two parameters, mention only <tt>|p1= PARAM |</tt> and <tt>|p2= PARAM |</tt> and delete <tt>|p3=, |p4= and |p5=</tt>.
 
  
:: The format should be one of the following two:
+
PARAMETER1 to PARAMETER5 are all optional and should contain descriptions of the parameters. If there are no parameters, delete all lines. If there are two parameters, mention only |p1= PARAM | and |p2= PARAM | and delete |p3=, |p4= and |p5=. The format should be one of the following two:
<pre style="margin-left:4em;">parameter: [[Type]]
+
<pre>parameter: [[Type]]
  
 
parameter: [[Type]] - Description</pre>
 
parameter: [[Type]] - Description</pre>
  
* The parameter ''RETURNVALUE'' should contain a description of the return value. Again, there are two possible formats:
+
The parameter RETURNVALUE should contain a description of the return value. Again, there are two possible formats:
<pre style="margin-left:2em;">[[Type]]
+
<pre>[[Type]]
  
 
[[Type]] - Description</pre>
 
[[Type]] - Description</pre>
  
* All parameters starting with ''ALT_'' belong to the "alternative syntax" section and can be '''left out''' in commands with only one syntax. They are of the same format as the parameters without ''ALT_''.
+
All parameters starting with ALT_ belong to the "alternative syntax" section and can be '''left away''' in commands with only one syntax. They are of the same format as the parameters without ALT_.
  
* The parameter ''MPBEHAVIOUR'' should contain a description of the command's behaviour in multiplayer. If you have no description, delete the line.
+
The parameter MPBEHAVIOUR should contain a description of the command's behaviour in multiplayer. If you have no description, delete the line.
  
* The parameters ''EXAMPLE1'' to ''EXAMPLE4'' are again all optional. If you don't include one of them, delete the line. They should contain examples for the command (contained by <tt><nowiki><code></nowiki></tt> tags) including descriptions of the examples.
+
The parameters EXAMPLE1 to EXAMPLE3 are again all optional. If you don't include one of them, delete the line. They should contain examples for the command (using <nowiki><pre> or <code></nowiki> ?) including descriptions of the examples.
  
* The parameter ''SEEALSO'' should contain a comma-separated list of links related to this command. Example for [[doFire]] might be:
+
The parameter SEEALSO should contain a comma-separated list of links related to this command. Example for [[doFire]] would be:
<pre style="margin-left:2em;">[[commandFire]], [[fire]]</pre>
+
<pre>[[commandFire]], [[fire]]</pre>
  
 
== Example ==
 
== Example ==
  
<pre style="white-space:pre-wrap;">{{Command|=
+
''Should be replaced by a valid example later . . .''
 +
 
 +
<pre>{{Command|=
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
| arma2 |= Game
+
|1.00|=
 
 
|1.00|= Game Version (number surrounded by NO SPACES)
 
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
| Adds an event handler to a given unit. For more information about event handlers and their types check the scripting topic Event Handlers in this reference. You may add as many event handlers of any type as you like to every unit, if you add an event handler of type "killed" and there already exists one, the old one doesn't get overwritten. Use removeEventHandler to delete event handlers. |= Description
+
| Adds an event handler to a given unit. For more information about event handlers and their  
 +
types check the scripting topic Event Handlers in this reference. You may add as many event  
 +
handlers of any type as you like to every unit, if you add an event handler of type "killed"  
 +
and there already exists one, the old one doesn't get overwritten. Use removeEventHandler to  
 +
delete event handlers. |=
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
| object '''addEventHandler''' [type, code] |= Syntax
+
| object '''addEventHandler''' [type, code] |=
  
|p1= object: [[Object]] |= Parameter 1
+
|p1= object: [[Object]] |=
  
|p2= type: [[String]] - Explanation |= Parameter 2
+
|p2= type: [[String]] - Explanation |=
  
|p3= code: [[String]] - Explanation |= Parameter 3
+
|p3= code: [[String]] - Explanation |=
  
| [[Integer]] - The index of the currently added event handler is returned. Indices start at 0 for each unit and increment with each added event handler. |= Return Value
+
| [[Integer]] - The index of the currently added event handler is returned. Indices start at  
 +
0 for each unit and increment with each added event handler. |=
  
| Behaviour unknown. |= Multiplayer Behaviour
+
| Behaviour unknown. |=
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
|x1= Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.  
+
|x1= Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor  
 +
invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam  
 +
et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est  
 +
Lorem ipsum dolor sit amet.  
  
<code>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</code>
+
<code>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor  
 +
invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</code>
  
At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. |= Example 1
+
At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea  
 +
takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur  
 +
sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam  
 +
erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita  
 +
kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. |=
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
|x2= Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. |= Example 2
+
|x2= Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor  
 +
invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam  
 +
et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est  
 +
Lorem ipsum dolor sit amet. |=
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
| [[someCommand]], [[getOutaHere]] |= See Also
+
| [[removeEventHandler]] |=
  
 
}}
 
}}
Line 317: Line 278:
 
<h3 style="display:none">Bottom Section</h3></pre>
 
<h3 style="display:none">Bottom Section</h3></pre>
  
[[:Category:Templates|{{PAGENAME}}]]
+
[[Category:Templates|{{PAGENAME}}]]
 
</noinclude>
 
</noinclude>

Revision as of 17:12, 20 April 2014

Syntax

You can insert a command using the following syntax:

{{Command|=
____________________________________________________________________________________________

| GAME |=

|GAMEVERSION|=

|arg= MPARGUMENTS |=

|eff= MPEFFECTS |=
____________________________________________________________________________________________

| DESCRIPTION |=
____________________________________________________________________________________________

| SYNTAX |=

|p1= PARAMETER1 |=

|p2= PARAMETER2 |=

|p3= PARAMETER3 |=

|p4= PARAMETER4 |=

|p5= PARAMETER5 |=

|p6= PARAMETER6 |=

|p7= PARAMETER7 |=

|p8= PARAMETER8 |=

|p9= PARAMETER9 |=

|p10= PARAMETER10 |=

|p11= PARAMETER11 |=

|p12= PARAMETER12 |=

| RETURNVALUE |=


START alternative syntax (optional)

|s2= ALT_SYNTAX |= 

|p21= ALT_PARAMETER1 |= 

|p22= ALT_PARAMETER2 |=

|p23= ALT_PARAMETER3 |= 

|p24= ALT_PARAMETER4 |= 

|p25= ALT_PARAMETER5 |=

|p26= ALT_PARAMETER6 |=

|p27= ALT_PARAMETER7 |=

|p28= ALT_PARAMETER8 |=

|p29= ALT_PARAMETER9 |=

|p30= ALT_PARAMETER10 |=

|p31= ALT_PARAMETER11 |=

|p32= ALT_PARAMETER12 |=

|r2= ALT_RETURNVALUE |=

END alternative syntax (optional)


|mp= MPBEHAVIOUR |=
____________________________________________________________________________________________

|x1= EXAMPLE1 |=
____________________________________________________________________________________________

|x2= EXAMPLE2 |=
____________________________________________________________________________________________

|x3= EXAMPLE3 |=
____________________________________________________________________________________________

|x4= EXAMPLE4 |=
____________________________________________________________________________________________

| SEEALSO |=

}}

<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->

<!-- Note Section END -->
</dl>

<h3 style="display:none">Bottom Section</h3>

Parameters

All of the following parameters should be replaced by reasonable text!

The paramter GAME should contain the short name of the game when the command was introduced, being one of "ofp", "ofpr" or "arma".

The parameter GAMEVERSION is obvious: It contains the version number when this command was included. This is the only parameter where you must not have spaces before or after the parameter!!! If the game version is a round number, include two zeros after the comma (ie, 1.00, 2.00). If not, write the version number with all required numbers after the comma (ie, 1.5, 1.34 ...)

The parameter MPARGUMENTS is optional. If you don't include it, delete the whole line. It contains either "local" or "global" and describes whether this command needs the arguments to be local to the client it is executed on or if they can be global.

The parameter MPEFFECTS is optional. If you don't include it, delete the whole line. It contains either "local" or "global" and describes whether the effects of the command are transfered through the net.

The parameter DESCRIPTION should contain a brief but detailed description of the command.

The parameter SYNTAX should show the syntax for the command. There are several possibilities of format:

'''commandName'''

preargument '''commandName'''

'''commandName''' postargument

preargument '''commandName''' postargument

[prearg1, prearg2] '''commandName''' postargument

preargument '''commandName''' [postarg1, postarg2]

etc. You get the drill.

PARAMETER1 to PARAMETER5 are all optional and should contain descriptions of the parameters. If there are no parameters, delete all lines. If there are two parameters, mention only |p1= PARAM | and |p2= PARAM | and delete |p3=, |p4= and |p5=. The format should be one of the following two:

parameter: [[Type]]

parameter: [[Type]] - Description

The parameter RETURNVALUE should contain a description of the return value. Again, there are two possible formats:

[[Type]]

[[Type]] - Description

All parameters starting with ALT_ belong to the "alternative syntax" section and can be left away in commands with only one syntax. They are of the same format as the parameters without ALT_.

The parameter MPBEHAVIOUR should contain a description of the command's behaviour in multiplayer. If you have no description, delete the line.

The parameters EXAMPLE1 to EXAMPLE3 are again all optional. If you don't include one of them, delete the line. They should contain examples for the command (using <pre> or <code> ?) including descriptions of the examples.

The parameter SEEALSO should contain a comma-separated list of links related to this command. Example for doFire would be:

[[commandFire]], [[fire]]

Example

Should be replaced by a valid example later . . .

{{Command|=
____________________________________________________________________________________________

|1.00|=
____________________________________________________________________________________________

| Adds an event handler to a given unit. For more information about event handlers and their 
types check the scripting topic Event Handlers in this reference. You may add as many event 
handlers of any type as you like to every unit, if you add an event handler of type "killed" 
and there already exists one, the old one doesn't get overwritten. Use removeEventHandler to 
delete event handlers. |=
____________________________________________________________________________________________

| object '''addEventHandler''' [type, code] |=

|p1= object: [[Object]] |=

|p2= type: [[String]] - Explanation |=

|p3= code: [[String]] - Explanation |=

| [[Integer]] - The index of the currently added event handler is returned. Indices start at 
0 for each unit and increment with each added event handler. |=

| Behaviour unknown. |=
____________________________________________________________________________________________

|x1= Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor 
invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam 
et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est 
Lorem ipsum dolor sit amet. 

<code>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor 
invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</code>

At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea 
takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur 
sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam 
erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita 
kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. |=
____________________________________________________________________________________________

|x2= Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor 
invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam 
et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est 
Lorem ipsum dolor sit amet. |=
____________________________________________________________________________________________

| [[removeEventHandler]] |=

}}

<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->

<!-- Note Section END -->
</dl>

<h3 style="display:none">Bottom Section</h3>