Difference between revisions of "Template:Command"

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Add mp & pr param into examples)
m (Fix alignment issue with a hardcoded value)
Line 14: Line 14:
 
-->{{#if:{{{game5|}}}|{{GVI|{{{game5}}}|{{{version5|}}}|categorize}}|}}<!--
 
-->{{#if:{{{game5|}}}|{{GVI|{{{game5}}}|{{{version5|}}}|categorize}}|}}<!--
  
-->{{#if:{{{arg|{{{eff|}}}}}}|<span style="margin-left: 1em">|}}<!-- space between game versions and arguments/effects
+
-->{{#if:{{{arg|{{{eff|}}}}}}|<span style="margin: 0 0 10px 1em">|}}<!-- space between game versions and arguments/effects
  
 
-->{{#if:{{{arg|}}}|{{EffArg|cmd|arg|{{{arg}}}|categorize}}|}}<!--
 
-->{{#if:{{{arg|}}}|{{EffArg|cmd|arg|{{{arg}}}|categorize}}|}}<!--
Line 21: Line 21:
 
-->{{#if:{{{arg|{{{eff|}}}}}}|</span>|}}<!--
 
-->{{#if:{{{arg|{{{eff|}}}}}}|</span>|}}<!--
  
-->{{#if:{{{exec|}}}|<span style="margin-left: 1em">{{ServerExec|cmd|exec|server|categorize}}</span>|}}<!-- Exec Param with left spacing from arguments/effects
+
-->{{#if:{{{exec|}}}|<span style="margin: 0 0 10px 1em">{{ServerExec|cmd|exec|server|categorize}}</span>|}}<!-- Exec Param with left spacing from arguments/effects
  
 
   ↓ People are not ready for you yet, my dear…!
 
   ↓ People are not ready for you yet, my dear…!

Revision as of 21:55, 6 January 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
  • exec: (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
  • 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

{{Command

<!-- Games and versions -->

|game1= GAME1
|version1= VERSION1

|game2= GAME2
|version2= VERSION2
|game3= GAME3
|version3= VERSION3
|game4= GAME4
|version4= VERSION4
|game5= GAME5
|version5= VERSION5

|arg= ARGUMENTS_LOCALITY
|eff= EFFECTS_LOCALITY

|exec= MP_EXECUTION

<!-- 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

<!-- Syntax 2 (Alternative) -->

|s2= SYNTAX2

|p21= SYNTAX2_PARAMETER1
|p22= SYNTAX2_PARAMETER2
|p23= SYNTAX2_PARAMETER3
|p24= SYNTAX2_PARAMETER4
|p25= SYNTAX2_PARAMETER5
|p26= SYNTAX2_PARAMETER6
|p27= SYNTAX2_PARAMETER7
|p28= SYNTAX2_PARAMETER8
|p29= SYNTAX2_PARAMETER9
|p30= SYNTAX2_PARAMETER10
|p31= SYNTAX2_PARAMETER11
|p32= SYNTAX2_PARAMETER12
|p33= SYNTAX2_PARAMETER13
|p34= SYNTAX2_PARAMETER14
|p35= SYNTAX2_PARAMETER15
|p36= SYNTAX2_PARAMETER16
|p37= SYNTAX2_PARAMETER17
|p38= SYNTAX2_PARAMETER18
|p39= SYNTAX2_PARAMETER19
|p40= SYNTAX2_PARAMETER20

|r2= SYNTAX2_RETURNVALUE

<!-- Syntax 3 (Alternative) -->

|s3= SYNTAX3

|p41= SYNTAX3_PARAMETER1
|p42= SYNTAX3_PARAMETER2
|p43= SYNTAX3_PARAMETER3
|p44= SYNTAX3_PARAMETER4
|p45= SYNTAX3_PARAMETER5
|p46= SYNTAX3_PARAMETER6
|p47= SYNTAX3_PARAMETER7
|p48= SYNTAX3_PARAMETER8
|p49= SYNTAX3_PARAMETER9
|p50= SYNTAX3_PARAMETER10
|p51= SYNTAX3_PARAMETER11
|p52= SYNTAX3_PARAMETER12
|p53= SYNTAX3_PARAMETER13
|p54= SYNTAX3_PARAMETER14
|p55= SYNTAX3_PARAMETER15
|p56= SYNTAX3_PARAMETER16
|p57= SYNTAX3_PARAMETER17
|p58= SYNTAX3_PARAMETER18
|p59= SYNTAX3_PARAMETER19
|p60= SYNTAX3_PARAMETER20

|r3= SYNTAX3_RETURNVALUE

<!-- Syntax 4 (Alternative) -->

|s4= SYNTAX4

|p61= SYNTAX4_PARAMETER1
|p62= SYNTAX4_PARAMETER2
|p63= SYNTAX4_PARAMETER3
|p64= SYNTAX4_PARAMETER4
|p65= SYNTAX4_PARAMETER5
|p66= SYNTAX4_PARAMETER6
|p67= SYNTAX4_PARAMETER7
|p68= SYNTAX4_PARAMETER8
|p69= SYNTAX4_PARAMETER9
|p70= SYNTAX4_PARAMETER10
|p71= SYNTAX4_PARAMETER11
|p72= SYNTAX4_PARAMETER12
|p73= SYNTAX4_PARAMETER13
|p74= SYNTAX4_PARAMETER14
|p75= SYNTAX4_PARAMETER15
|p76= SYNTAX4_PARAMETER16
|p77= SYNTAX4_PARAMETER17
|p78= SYNTAX4_PARAMETER18
|p79= SYNTAX4_PARAMETER19
|p80= SYNTAX4_PARAMETER20

|r4= SYNTAX4_RETURNVALUE

<!-- Syntax 5 (Alternative) -->

|s5= SYNTAX5

|p81= SYNTAX5_PARAMETER1
|p82= SYNTAX5_PARAMETER2
|p83= SYNTAX5_PARAMETER3
|p84= SYNTAX5_PARAMETER4
|p85= SYNTAX5_PARAMETER5
|p86= SYNTAX5_PARAMETER6
|p87= SYNTAX5_PARAMETER7
|p88= SYNTAX5_PARAMETER8
|p89= SYNTAX5_PARAMETER9
|p90= SYNTAX5_PARAMETER10
|p91= SYNTAX5_PARAMETER11
|p92= SYNTAX5_PARAMETER12
|p93= SYNTAX5_PARAMETER13
|p94= SYNTAX5_PARAMETER14
|p95= SYNTAX5_PARAMETER15
|p96= SYNTAX5_PARAMETER16
|p97= SYNTAX5_PARAMETER17
|p98= SYNTAX5_PARAMETER18
|p99= SYNTAX5_PARAMETER19
|p100= SYNTAX5_PARAMETER20

|r5= SYNTAX5_RETURNVALUE

<!-- Syntax 6 (Alternative) -->

|s6= SYNTAX6

|p101= SYNTAX6_PARAMETER1
|p102= SYNTAX6_PARAMETER2
|p103= SYNTAX6_PARAMETER3
|p104= SYNTAX6_PARAMETER4
|p105= SYNTAX6_PARAMETER5
|p106= SYNTAX6_PARAMETER6
|p107= SYNTAX6_PARAMETER7
|p108= SYNTAX6_PARAMETER8
|p109= SYNTAX6_PARAMETER9
|p110= SYNTAX6_PARAMETER10
|p111= SYNTAX6_PARAMETER11
|p112= SYNTAX6_PARAMETER12
|p113= SYNTAX6_PARAMETER13
|p114= SYNTAX6_PARAMETER14
|p115= SYNTAX6_PARAMETER15
|p116= SYNTAX6_PARAMETER16
|p117= SYNTAX6_PARAMETER17
|p118= SYNTAX6_PARAMETER18
|p119= SYNTAX6_PARAMETER19
|p120= SYNTAX6_PARAMETER20

|r6= SYNTAX6_RETURNVALUE

<!-- Examples -->

|x1= EXAMPLE1

|x2= EXAMPLE2

|x3= EXAMPLE3

|x4= EXAMPLE4

|x5= EXAMPLE5

|x6= EXAMPLE6

|x7= EXAMPLE7

|x8= EXAMPLE8

|x9= EXAMPLE9

|x10= EXAMPLE10

|seealso= SEE_ALSO
}}

<h3 style="display:none">Bottom Section</h3>
<!-- Appropriate categories go here e.g. [[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]] -->

Example

Code Result
{{Command

<!-- Games and versions -->

|game1= ofp
|game2= arma1
|game3= arma2
|game4= arma3
|game5= tkoh
|version1= 5.50
|version2= 4.50
|version3= 3.50
|version4= 2.50
|version5= 1.50

|arg= local
|eff= global

|exec= server

<!-- 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 5.505.50Introduced with Armed Assault version 4.504.50Introduced with Arma 2 version 3.503.50Introduced with Arma 3 version 2.502.50Introduced with Take On Helicopters version 1.501.50Arguments 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

Notes

i
Only post proven facts here. Report bugs on the feedback tracker. Use the Talk page or the Forums for discussions.