Difference between revisions of "Template:Command"

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Add more auto categorisation (OFP adds OFP:R cat too))
m
 
(25 intermediate revisions by 2 users not shown)
Line 7: Line 7:
 
- "Introduced with Arma 3 Development Branch" if game1 = arma3dev
 
- "Introduced with Arma 3 Development Branch" if game1 = arma3dev
  
-->{{#ifeq: {{uc:{{FULLPAGENAME}}}} | TEMPLATE:COMMAND | | [[Category:{{Name|{{{game1|{{{game|{{{1}}}}}}}}}}}: New Scripting Commands List]]<!--
+
-->{{#ifeq: {{uc:{{FULLPAGENAME}}}} | TEMPLATE:COMMAND | | {{#ifeq: {{Name|{{{game1|{{{game|{{{1}}}}}}}}}}} | {{Name|arma3dev}} | [[Category:Introduced with {{arma3}} Development Branch]] }}<!--
-->{{#ifeq: {{Name|{{{game1|{{{game|{{{1}}}}}}}}}}} | {{Name|arma3dev}} | [[Category:Introduced with {{arma3}} Development Branch]] }}<!--
 
  
 
Excludes VBS commands from main command category
 
Excludes VBS commands from main command category
 
-->{{#ifeq: {{{game1|{{{game|{{{1}}}}}}}}} | vbs1 | | [[Category:Scripting Commands]] [[Category:Scripting Commands {{Name|{{{game1|{{{game|{{{1}}}}}}}}}}}]] }}
 
-->{{#ifeq: {{{game1|{{{game|{{{1}}}}}}}}} | vbs1 | | [[Category:Scripting Commands]] [[Category:Scripting Commands {{Name|{{{game1|{{{game|{{{1}}}}}}}}}}}]] }}
{{#ifeq: {{Name|{{{game1|{{{game|{{{1}}}}}}}}}}} | {{Name|ofp}} | [[Category:Scripting Commands {{ofpr}}]] }}<!-- Add OFP:R cat to all OFP commands -->
+
{{#ifeq: {{Name|{{{game1|{{{game|{{{1}}}}}}}}}}} | {{Name|ofp}} | [[Category:Scripting Commands {{ofpr}}]] }}<!-- Add OFP:R cat to all OFP commands
{{#if: {{{game2|}}} | [[Category:Scripting Commands {{Name|{{{game2|}}}}}]] }}
+
-->{{#if: {{{game2|}}} | [[Category:Scripting Commands {{Name|{{{game2|}}}}}]] }}<!--
{{#if: {{{game3|}}} | [[Category:Scripting Commands {{Name|{{{game3|}}}}}]] }}
+
-->{{#if: {{{game3|}}} | [[Category:Scripting Commands {{Name|{{{game3|}}}}}]] }}<!--
{{#if: {{{game4|}}} | [[Category:Scripting Commands {{Name|{{{game4|}}}}}]] }}
+
-->{{#if: {{{game4|}}} | [[Category:Scripting Commands {{Name|{{{game4|}}}}}]] }}<!--
{{#if: {{{game5|}}} | [[Category:Scripting Commands {{Name|{{{game5|}}}}}]] }}
+
-->{{#if: {{{game5|}}} | [[Category:Scripting Commands {{Name|{{{game5|}}}}}]] }}<!--
 +
 
 +
-->[[Category:{{Name|{{{game1|{{{game|{{{1}}}}}}}}}}}: New Scripting Commands List]]<!--
 +
 
 +
-->{{#if: {{{gr1|}}} | [[Category:Command Group: {{Trim|{{{gr1}}}}}]] }}<!--
 +
-->{{#if: {{{gr2|}}} | [[Category:Command Group: {{Trim|{{{gr2}}}}}]] }}<!--
 +
-->{{#if: {{{gr3|}}} | [[Category:Command Group: {{Trim|{{{gr3}}}}}]] }}<!--
 +
-->{{#if: {{{gr4|}}} | [[Category:Command Group: {{Trim|{{{gr4}}}}}]] }}<!--
 +
-->{{#if: {{{gr5|}}} | [[Category:Command Group: {{Trim|{{{gr5}}}}}]] }}<!--
 +
-->{{#ifeq: {{{game1|{{{game|{{{1}}}}}}}}} | vbs1 | | {{#if: {{{gr1|}}}{{{gr2|}}}{{{gr3|}}}{{{gr4|}}}{{{gr5|}}} | | [[Category:Command Group: Uncategorised]] }} }}<!--
 +
-->
 
}}<!--
 
}}<!--
 
^ closing ifeq TEMPLATE:COMMAND
 
^ closing ifeq TEMPLATE:COMMAND
Line 27: Line 36:
  
 
-->{{GVI|{{{game1|{{{game|{{{1}}}}}}}}} | {{{version1|{{{version|{{{2|}}}}}}}}} | {{#ifeq: {{uc:{{FULLPAGENAME}}}} | TEMPLATE:COMMAND | | categorize}} }}<!--
 
-->{{GVI|{{{game1|{{{game|{{{1}}}}}}}}} | {{{version1|{{{version|{{{2|}}}}}}}}} | {{#ifeq: {{uc:{{FULLPAGENAME}}}} | TEMPLATE:COMMAND | | categorize}} }}<!--
 +
-->{{#ifeq: {{Name|{{{game1|{{{game|{{{1}}}}}}}}}}} | {{Name|arma3dev}} | {{Color|red|⚠ }}[[Arma 3 Steam Branches#Arma 3|{{Color|red|DEV BRANCH}}]]{{Color|red| ONLY ⚠}}}}<!--
 
-->{{#if:{{{game2|}}} | {{GVI|{{{game2}}} | {{{version2|}}} | {{#ifeq: {{uc:{{FULLPAGENAME}}}} | TEMPLATE:COMMAND | | categorize}} }} }}<!--
 
-->{{#if:{{{game2|}}} | {{GVI|{{{game2}}} | {{{version2|}}} | {{#ifeq: {{uc:{{FULLPAGENAME}}}} | TEMPLATE:COMMAND | | categorize}} }} }}<!--
 
-->{{#if:{{{game3|}}} | {{GVI|{{{game3}}} | {{{version3|}}} | {{#ifeq: {{uc:{{FULLPAGENAME}}}} | TEMPLATE:COMMAND | | categorize}} }} }}<!--
 
-->{{#if:{{{game3|}}} | {{GVI|{{{game3}}} | {{{version3|}}} | {{#ifeq: {{uc:{{FULLPAGENAME}}}} | TEMPLATE:COMMAND | | categorize}} }} }}<!--
Line 39: Line 49:
 
-->{{#if:{{{arg|{{{eff|}}}}}}|</span>|}}<!--
 
-->{{#if:{{{arg|{{{eff|}}}}}}|</span>|}}<!--
  
-->{{#if:{{{exec|}}}|<span style="margin-left: 1em">{{ServerExec | cmd | exec | server | {{#ifeq: {{uc:{{FULLPAGENAME}}}} | TEMPLATE:COMMAND | | categorize}}}}</span>|}}<!-- Exec Param with left spacing from arguments/effects
+
-->{{#if:{{{serverExec|}}}|<span style="margin-left: 1em">{{ServerExec | cmd | {{#ifeq: {{uc:{{FULLPAGENAME}}}} | TEMPLATE:COMMAND | | categorize}}}}</span>|}}<!-- ServerExec Param with left spacing from arguments/effects
  
 
--></div><!--
 
--></div><!--
Line 54: Line 64:
 
<dl>
 
<dl>
 
<dt>Description:</dt>
 
<dt>Description:</dt>
<dd>{{{descr|{{{3|}}}}}}</dd>
+
<dd>
 +
{{{descr|{{{3|}}}}}}
 +
</dd>
 
</dl><!--
 
</dl><!--
  
 
-->{{#if:{{{mp|}}}|
 
-->{{#if:{{{mp|}}}|
 
<dt>Multiplayer:</dt>
 
<dt>Multiplayer:</dt>
<dd>{{{mp}}}</dd>|}}<!--
+
<dd>
 +
{{{mp}}}
 +
</dd>|}}<!--
  
 
-->{{#if:{{{pr|}}}|
 
-->{{#if:{{{pr|}}}|
 
<dt>Problem(s):</dt>
 
<dt>Problem(s):</dt>
<dd>{{{pr}}}</dd>|}}<!--
+
<dd>
 +
{{{pr}}}
 +
</dd>|}}<!--
  
 
--><h3>Syntax</h3>
 
--><h3>Syntax</h3>
Line 168: Line 184:
 
|],[|][}}
 
|],[|][}}
 
|{{See also needed}}}}</dd>
 
|{{See also needed}}}}</dd>
 +
<dt>Groups:</dt>
 +
<dd class="seealso"><!--
 +
-->{{#if: {{{gr1|}}} | [[:Category:Command Group: {{Trim|{{{gr1}}}}}|{{Trim|{{{gr1}}}}}]] }}<!--
 +
-->{{#if: {{{gr2|}}} | [[:Category:Command Group: {{Trim|{{{gr2}}}}}|{{Trim|{{{gr2}}}}}]] }}<!--
 +
-->{{#if: {{{gr3|}}} | [[:Category:Command Group: {{Trim|{{{gr3}}}}}|{{Trim|{{{gr3}}}}}]] }}<!--
 +
-->{{#if: {{{gr4|}}} | [[:Category:Command Group: {{Trim|{{{gr4}}}}}|{{Trim|{{{gr4}}}}}]] }}<!--
 +
-->{{#if: {{{gr5|}}} | [[:Category:Command Group: {{Trim|{{{gr5}}}}}|{{Trim|{{{gr5}}}}}]] }}<!--
 +
-->{{#ifeq: {{{game1|{{{game|{{{1}}}}}}}}} | vbs1 | | {{#if: {{{gr1|}}}{{{gr2|}}}{{{gr3|}}}{{{gr4|}}}{{{gr5|}}} | | [[:Category:Command Group: Uncategorised|Uncategorised]] }} }}
 +
</dd>
 
</dl>
 
</dl>
  
Line 174: Line 199:
 
{{Messagebox
 
{{Messagebox
 
| '''Only post proven facts here.'''<!--
 
| '''Only post proven facts here.'''<!--
--> Report bugs on [http://feedback.arma3.com/ the feedback tracker].<!--
+
--> Report bugs on the [http://feedback.arma3.com/ Feedback Tracker] and discuss on the [https://discord.gg/arma Arma Discord] or on the [https://forums.bohemia.net/ Forums].
--> Use the [[{{NAMESPACE}} talk:{{PAGENAME}}|Talk page]] or the [https://forums.bohemia.net/ Forums] for discussions.
 
 
<div class{{=}}"plainlinks" style{{=}}"margin-top: -0.25em">
 
<div class{{=}}"plainlinks" style{{=}}"margin-top: -0.25em">
[{{canonicalurl:{{FULLPAGENAMEE}}|action=edit&section{{=}}new&preload{{=}}Template:Add_new_note&preloadtitle{{=}}&summary{{=}}Added+new+note&nosummary{{=}}true}} Add New Note] {{!}} [[How To#Add a new note|How To]]
+
[{{canonicalurl:{{FULLPAGENAMEE}}|action=edit&section{{=}}new&preload{{=}}Template:Add_new_note&preloadtitle{{=}}&summary{{=}}Added+new+note&nosummary{{=}}true}} '''+ Add Note'''] <span style{{=}}"font-size: .9em">([[How To#Add a new note|Help]])</span>
 
</div>
 
</div>
 
| i
 
| i
Line 198: Line 222:
  
 
-->[[:Category:Scripting Commands|Scripting Commands]] template, used by [[Special:WhatLinksHere/Template:Command|these pages]].
 
-->[[:Category:Scripting Commands|Scripting Commands]] template, used by [[Special:WhatLinksHere/Template:Command|these pages]].
{{Warning | Do '''NOT''' edit this template before <u>heavy</u> testing, as it is widely used!}}
+
{{Warning | Do '''NOT''' edit this template before '''heavy''' testing, as it is widely used!}}
  
 
== Usage ==
 
== Usage ==
Line 206: Line 230:
 
* arg: (Optional, default empty) argument locality definition - same as [[Template:EffArg|EffArg]] template input format. e.g local, loc or global, glob
 
* arg: (Optional, default empty) argument locality definition - same as [[Template:EffArg|EffArg]] template input format. e.g local, loc or global, glob
 
* eff: (Optional, default empty) effects locality definition - same as [[Template:EffArg|EffArg]] template input format. e.g local, loc or global, glob
 
* eff: (Optional, default empty) effects locality definition - same as [[Template:EffArg|EffArg]] template input format. e.g local, loc or global, glob
* exec: (Optional, default empty) if provided, will display the {{ServerExec}} icon informing the command must be run on the server
+
* serverExec: (Optional, default empty) if provided, will display the {{ServerExec}} icon informing the command must be run on the server
 
* descr: (can be unnamed parameter '''3''') the command description
 
* descr: (can be unnamed parameter '''3''') the command description
 +
* gr1..gr5: (Optional, default empty) [https://community.bistudio.com/wiki?title=Category:Scripting_Commands_by_Functionality&redirect=no Command groups]. '''Case sensitive'''.
 
* s1: (Optional, default <tt>{{<nowiki/>PAGENAMEE}}</tt>) (can be unnamed parameter '''4''') command syntax with named parameters. e.g {{Inline code|unit1 '''setDammage''' 1}}
 
* s1: (Optional, default <tt>{{<nowiki/>PAGENAMEE}}</tt>) (can be unnamed parameter '''4''') command syntax with named parameters. e.g {{Inline code|unit1 '''setDammage''' 1}}
 
* p1..20: (Optional, default empty) command parameters with description
 
* p1..20: (Optional, default empty) command parameters with description
Line 251: Line 276:
 
|eff= EFFECTS_LOCALITY
 
|eff= EFFECTS_LOCALITY
  
|exec= MP_EXECUTION
+
|serverExec= MP_EXECUTION
  
 
<!-- Description and syntaxes -->
 
<!-- Description and syntaxes -->
Line 485: Line 510:
 
|game4= arma3
 
|game4= arma3
 
|game5= tkoh
 
|game5= tkoh
|version1= 5.50
+
|version1= 1.46
|version2= 4.50
+
|version2= 1.05
|version3= 3.50
+
|version3= 1.12
|version4= 2.50
+
|version4= 1.96
|version5= 1.50
+
|version5= 1.10
  
 
|arg= local
 
|arg= local
 
|eff= global
 
|eff= global
  
|exec= server
+
|serverExec= server
 +
 
 +
<!-- Groups -->
 +
 
 +
|gr1= GROUP1
 +
|gr2= GROUP2
 +
|gr3= GROUP3
 +
|gr4= GROUP4
 +
|gr5= GROUP5
  
 
<!-- Description and syntaxes -->
 
<!-- Description and syntaxes -->
Line 548: Line 581:
 
|r1= RETURN_VALUE
 
|r1= RETURN_VALUE
  
|x1= <code>this '''command''' that</code>
+
|x1= <code>this '''command''' that;</code>
  
 
|seealso=
 
|seealso=
Line 567: Line 600:
 
|game4= arma3
 
|game4= arma3
 
|game5= tkoh
 
|game5= tkoh
|version1= 5.50
+
|version1= 1.46
|version2= 4.50
+
|version2= 1.05
|version3= 3.50
+
|version3= 1.12
|version4= 2.50
+
|version4= 1.96
|version5= 1.50
+
|version5= 1.10
  
 
|arg= local
 
|arg= local
 
|eff= global
 
|eff= global
  
|exec= server
+
|serverExec= server
 +
 
 +
<!-- Groups -->
 +
 
 +
|gr1= GROUP1
 +
|gr2= GROUP2
 +
|gr3= GROUP3
 +
|gr4= GROUP4
 +
|gr5= GROUP5
  
 
<!-- Description and syntaxes -->
 
<!-- Description and syntaxes -->
Line 630: Line 671:
 
|r1= RETURN_VALUE
 
|r1= RETURN_VALUE
  
|x1= <code>this '''command''' that</code>
+
|x1= <code>this '''command''' that;</code>
  
 
|seealso=
 
|seealso=

Latest revision as of 10:23, 3 October 2020

Scripting Commands template, used by these pages.

Do NOT edit this template before heavy testing, as it is widely used!

Usage

{{Command|...parameters...}}

  • game1: (can be game or unnamed parameter 1) short game name - same as Name template input format. e.g ofp, tkoh, arma3, etc.
  • version1: (Optional, default empty (unknown)) (can be version or unnamed parameter 2) number in Template:GVI template format: <Major>.<Minor>. e.g 1.46, 1.75, 1.86 etc.
  • arg: (Optional, default empty) argument locality definition - same as EffArg template input format. e.g local, loc or global, glob
  • eff: (Optional, default empty) effects locality definition - same as EffArg template input format. e.g local, loc or global, glob
  • serverExec: (Optional, default empty) if provided, will display the Server execution icon informing the command must be run on the server
  • descr: (can be unnamed parameter 3) the command description
  • gr1..gr5: (Optional, default empty) Command groups. Case sensitive.
  • s1: (Optional, default {{PAGENAMEE}}) (can be unnamed parameter 4) command syntax with named parameters. e.g unit1 setDammage 1
  • p1..20: (Optional, default empty) command parameters with description
  • r1: (Optional, default Nothing) (can be unnamed parameter 5) syntax's return value
  • x1..10: (Optional, default {{Example needed}}) command examples (to be put between <code></code> tags where needed)
  • seealso: (Optional, default {{See also needed}}) (can be unnamed param 6) list of related links in wiki format, separated by comma or space. e.g [[setDir]] [[setPos]]
  • Secondary parameters:
    • mp: (Optional, default empty) if provided, will show a Multiplayer note under the description
    • pr: (Optional, default empty) if provided, will show a Problems note under the description
    • game2..5: (Optional, default empty) same as game1
    • version2..5: (Optional, default empty) same as version1, for the corresponding game#
    • s2..6: (Optional, default empty) Alternative syntaxes 1 to 5 (see s1)
    • p21..120: (Optional, default empty) Alternative syntaxes parameters (20 each: p21..40, p41..60, p61..80, p81..100, p101..120)
    • r2..r6: (Optional, default empty) Alternative syntaxes' return value (see r1)

Automatic categories

Full template

Show text


Example

Code Result
{{Command

<!-- Games and versions -->

|game1= ofp
|game2= arma1
|game3= arma2
|game4= arma3
|game5= tkoh
|version1= 1.46
|version2= 1.05
|version3= 1.12
|version4= 1.96
|version5= 1.10

|arg= local
|eff= global

|serverExec= server

<!-- Groups -->

|gr1= GROUP1
|gr2= GROUP2
|gr3= GROUP3
|gr4= GROUP4
|gr5= GROUP5

<!-- Description and syntaxes -->

|descr= DESCRIPTION

|mp= MP BEHAVIOUR

|pr= POSSIBLE PROBLEMS

|s1= 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

|p13= PARAMETER13

|p14= PARAMETER14

|p15= PARAMETER15

|p16= PARAMETER16

|p17= PARAMETER17

|p18= PARAMETER18

|p19= PARAMETER19

|p20= PARAMETER20

|r1= RETURN_VALUE

|x1= <code>this '''command''' that;</code>

|seealso=
[[Template:{{PAGENAME}}|seeAlso 1]]
[[Template:{{PAGENAME}}|seeAlso 2]]
[[Template:{{PAGENAME}}|seeAlso 3]]
[[Template:{{PAGENAME}}|seeAlso 4]]
}}
Introduced with Operation Flashpoint version 1.461.46Introduced with Armed Assault version 1.051.05Introduced with Arma 2 version 1.121.12Introduced with Arma 3 version 1.961.96Introduced with Take On Helicopters version 1.101.10Arguments of this scripting command have to be local to the client the command is executed onEffects of this scripting command are broadcasted over the network and happen on every computer in the networkThis scripting command must be executed on the server to work properly in multiplayer
Hover & click on the images for descriptions

Description

Description:
DESCRIPTION
Multiplayer:
MP BEHAVIOUR
Problem(s):
POSSIBLE PROBLEMS

Syntax

Syntax:
SYNTAX
Parameters:
PARAMETER1
PARAMETER2
PARAMETER3
PARAMETER4
PARAMETER5
PARAMETER6
PARAMETER7
PARAMETER8
PARAMETER9
PARAMETER10
PARAMETER11
PARAMETER12
PARAMETER13
PARAMETER14
PARAMETER15
PARAMETER16
PARAMETER17
PARAMETER18
PARAMETER19
PARAMETER20
Return Value:
RETURN_VALUE

Examples

Example 1:
this command that;

Additional Information

See also:
seeAlso 1 seeAlso 2 seeAlso 3 seeAlso 4
Groups:
GROUP1GROUP2GROUP3GROUP4GROUP5

Notes

i
Only post proven facts here. Report bugs on the Feedback Tracker and discuss on the Arma Discord or on the Forums.