RV/doc – Template

From Bohemia Interactive Community
Jump to navigation Jump to search
(Unnamed parameters removal)
m (Some wiki formatting)
 
(7 intermediate revisions by the same user not shown)
Line 7: Line 7:
* '''meta information:'''
* '''meta information:'''
** type: (named argument, case-insensitive) "command" or "function"
** type: (named argument, case-insensitive) "command" or "function"
** displayTitle: (Optional, default <tt>{{<nowiki/>PAGENAMEE}}</tt> - encoded page name, i.e with underscores) use to force page's displayTitle (e.g <tt>diag_log (Arma 2)</tt>)
** displayTitle: (Optional, default {{hl|{{<nowiki/>PAGENAMEE}}}} - encoded page name, i.e with underscores) use to force page's displayTitle (e.g {{hl|diag_log (Arma 2)}}) - automatically deals with {{hl|diag_}} and {{hl|buldozer_}} pages already
** sortKey: (Optional, default commandName or functionName without BIS/BIN_fnc_ prefix) use to force category's sort key
** sortKey: (Optional, default commandName or functionName without BIS/BIN_fnc_ prefix) use to force category's sort key
* '''primary parameters:'''
* '''primary parameters:'''
Line 15: Line 15:
** eff: (Optional, default empty) '''local''' or '''global''' - if provided, will display the {{Icon|localEffect|32}} or {{Icon|globalEffect|32}} icon depending on effect's locality
** eff: (Optional, default empty) '''local''' or '''global''' - if provided, will display the {{Icon|localEffect|32}} or {{Icon|globalEffect|32}} icon depending on effect's locality
** serverExec: (Optional, default empty) if provided, will display the {{Icon|serverExec|32}} icon informing the command must be run on the server
** serverExec: (Optional, default empty) if provided, will display the {{Icon|serverExec|32}} icon informing the command must be run on the server
** descr: (Optional, default <tt>[[:Category:Description needed|Description needed]]</tt>) the command description
** descr: (Optional, default {{hl|[[:Category:Maintenance/RV/Description needed|Description needed]]}}) the command description
** exec: (Optional, Function only, default <tt>call</tt>) use <tt>spawn</tt> for functions to be spawned
** exec: (Optional, Function only, default {{hl|call}}) use {{hl|spawn}} for functions to be spawned
** gr1..gr5: (Optional, default <tt>[[:Category:Command Group: Uncategorised|Command Group: Uncategorised]]</tt>) [[:Category:Scripting Commands by Functionality|Command groups]]. '''Case sensitive'''
** gr1..gr5: (Optional, default {{hl|[[:Category:Command Group: Uncategorised|Command Group: Uncategorised]]}}) [[:Category:Scripting Commands by Functionality|Command groups]]. '''Case sensitive'''
** s1: (Optional, default <tt>{{<nowiki/>PAGENAMEE}}</tt>) command syntax with named parameters, without <tt>&lt;code&gt;</tt> tags nor ending <tt>;</tt> semicolon. e.g {{ic|unit1 '''setDammage''' 1}}
** s1: (Optional, default {{hl|[[:Category:Maintenance/RV/Syntax needed|Syntax needed]]}}) command syntax with named parameters, without {{hl|&lt;sqf&gt;}} tags nor ending {{hl|;}} semicolon. e.g {{hl|unit1 '''setDammage''' 1}}
** p1..20: (Optional, default empty) command parameters with description
** p1..p20: (Optional, default empty) command parameters with description
** r1: (default <tt>[[:Category:Return value needed|Return value needed]]</tt>)) syntax's return value
** r1: (default {{hl|[[:Category:Maintenance/RV/Return value needed|Return value needed]]}}) syntax's return value
** x1..10: (default <tt>[[:Category:Example needed|Example needed]]</tt>) command examples (to be put between <nowiki><code></code></nowiki> tags where needed)
** x1..x10: (default {{hl|[[:Category:Maintenance/RV/Example needed|Example needed]]}}) command examples (to be put between <nowiki><sqf></sqf></nowiki> tags where needed)
** seealso: (default <tt>[[:Category:See also needed|See also needed]]</tt>) list of related links in wiki format, separated by comma or space. e.g <nowiki>[[setDir]] [[setPos]]</nowiki>
** seealso: (default {{hl|[[:Category:Maintenance/RV/See also needed|See also needed]]}}) list of related links in wiki format, separated by comma or space. e.g <nowiki>[[setDir]] [[setPos]]</nowiki>
* '''secondary parameters:'''
* '''secondary parameters:'''
** branch: (Optional, default empty) takes free string such as <tt>development</tt> (<tt>dev</tt>), <tt>diagnostic</tt> (<tt>diag</tt>) or <tt>profiling</tt> (<tt>prof</tt>). If provided, will mark the page as Development, Diagnostic or Profiling branch only
** branch: (Optional, default empty) takes free string such as {{hl|development}} ({{hl|dev}}), {{hl|diagnostic}} ({{hl|diag}}) or {{hl|profiling}} ({{hl|prof}}). If provided, will mark the page as Development, Diagnostic or Profiling branch only
** alias: (Optional, default empty) if provided, will show Alias link(s) under the description
** alias: (Optional, default empty) if provided, will show Alias link(s) under the description
** mp: (Optional, default empty) if provided, will show a Multiplayer note under the description
** mp: (Optional, default empty) if provided, will show a Multiplayer note under the description
Line 30: Line 30:
** game2..7: (Optional, default empty) same as ''game1''
** game2..7: (Optional, default empty) same as ''game1''
** version2..7: (Optional, default empty) same as ''version1'', for the corresponding ''game#''
** version2..7: (Optional, default empty) same as ''version1'', for the corresponding ''game#''
** s2..6: (Optional, default empty) Alternative syntaxes 1 to 5 (see ''s1'')
** s2..s6: (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)
** s2since..s6since: (Optional, default empty) game version that introduced the syntax; format {{hl|gameId gameVersion}}, e.g {{hl|arma3 1.50}}
** p21..p120: (Optional, default empty) Alternative syntaxes' parameters ('''20''' each: p21..40, p41..60, p61..80, p81..100, p101..120)
** p21since..p120since: (Optional, default empty) game version that introduced the parameter; format {{hl|gameId gameVersion}}, e.g {{hl|arma3 1.50}}
** r2..r6: (Optional, default empty) Alternative syntaxes' return value (see ''r1'')
** r2..r6: (Optional, default empty) Alternative syntaxes' return value (see ''r1'')


== Automatic categories ==
== Automatic categories ==
'''[[:Category:Maintenance/RV|Maintenance/RV]]'''&nbsp;:
{{Columns|2|
{{Columns|2|
* [[:Category:Maintenance/RV/Game1 needed|Maintenance/RV/Game1 needed]]
* [[:Category:Maintenance/RV/Game1 needed|Maintenance/RV/Game1 needed]]
Line 50: Line 54:
|- style="vertical-align: top"
|- style="vertical-align: top"
|
|
* <tt>[[:Category:Scripting Commands]]</tt>
* {{hl|[[:Category:Scripting Commands]]}}
* <tt>Category:''game#'': Scripting Commands</tt> (e.g [[:Category:{{arma2}}: Scripting Commands|Category:'''{{arma2}}''': Scripting Commands]])
* {{hl|Category:''game#'': Scripting Commands}} (e.g [[:Category:{{arma2}}: Scripting Commands|Category:'''{{arma2}}''': Scripting Commands]])
* <tt>Category:''game1'': Introduced in v''version'''1'''''</tt> (e.g [[:Category:Introduced with {{arma3}} version 1.00|Category:'''{{arma3}}''': Introduced in v'''1.00''']])
* {{hl|Category:''game1'': Introduced in v''version'''1'''''}} (e.g [[:Category:Introduced with {{arma3}} version 1.00|Category:'''{{arma3}}''': Introduced in v'''1.00''']])
* <tt>''game'''1''''': New Scripting Commands</tt> category (e.g [[:Category:{{arma2}}: New Scripting Commands|Category:'''{{arma2}}''': New Scripting Commands]])
* {{hl|''game'''1''''': New Scripting Commands}} category (e.g [[:Category:{{arma2}}: New Scripting Commands|Category:'''{{arma2}}''': New Scripting Commands]])
<!-- * <tt>[[:Category:Introduced with Arma 3 Development Branch]]</tt> if ''game1'' is <tt>arma3dev</tt> not yet -->
* branches:
** {{hl|[[:Category:Arma 3: Scripting Commands: Development Branch]]}} if ''branch'' is dev
** {{hl|[[:Category:Arma 3: Scripting Commands: Diagnostic Branch]]}} if ''branch'' is diag
** {{hl|[[:Category:Arma 3: Scripting Commands: Profiling Branch]]}} if ''branch'' is prof
* effect locality:
** {{hl|[[:Category:Scripting Commands: Local Effect]]}} if ''eff'' is local
** {{hl|[[:Category:Scripting Commands: Global Effect]]}} if ''eff'' is global
* {{hl|[[:Category:Scripting Commands: Server Execution]]}} if ''serverExec'' is defined
|
|
* <tt>[[:Category:Functions]]</tt>
* {{hl|[[:Category:Functions]]}}
* <tt>Category:''game#'': Functions</tt> (e.g [[:Category:{{arma2}}: Functions|Category:'''{{arma2}}''': Functions]])
* {{hl|Category:''game#'': Functions}} (e.g [[:Category:{{arma2}}: Functions|Category:'''{{arma2}}''': Functions]])
* <tt>Category:''game'''1''''': Introduced in v''version'''1'''''</tt> (e.g [[:Category:Introduced with {{arma3}} version 1.00|Category:'''{{arma3}}''': Introduced in v'''1.00''']])
* {{hl|Category:''game'''1''''': Introduced in v''version'''1'''''}} (e.g [[:Category:Introduced with {{arma3}} version 1.00|Category:'''{{arma3}}''': Introduced in v'''1.00''']])
* <tt>''game'''1''''': New Functions</tt> category (e.g [[:Category: {{arma2}}: New Functions|Category: '''{{arma2}}''': New Functions]])
* {{hl|''game'''1''''': New Functions}} category (e.g [[:Category: {{arma2}}: New Functions|Category: '''{{arma2}}''': New Functions]])
<!--* <tt>[[:Category:Introduced with Arma 3 Development Branch]]</tt> if ''game1'' is <tt>arma3dev</tt> not yet, and most probably won't -->
* branches:
** {{hl|[[:Category:Arma 3: Functions: Development Branch]]}} if ''branch'' is dev
** {{hl|[[:Category:Arma 3: Functions: Diagnostic Branch]]}} if ''branch'' is diag
** {{hl|[[:Category:Arma 3: Functions: Profiling Branch]]}} if ''branch'' is prof
* effect locality:
** {{hl|[[:Category:Functions: Local Effect]]}} if ''eff'' is local
** {{hl|[[:Category:Functions: Global Effect]]}} if ''eff'' is global
* {{hl|[[:Category:Functions: Server Execution]]}} if ''serverExec'' is defined
|}
|}


Line 111: Line 129:
Negative angles represent a counter-clockwise angle.
Negative angles represent a counter-clockwise angle.


|alias= someCommand
|alias= [[someCommand]]


|pr= Command will not work with roman numbers e.g. VI.
|pr= Command will not work with roman numbers e.g. VI.
Line 117: Line 135:
|mp= See notes below for more details on [[setDir]] behaviour.
|mp= See notes below for more details on [[setDir]] behaviour.


|s1= object '''setDir''' heading
|s1= object [[setDir]] heading


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


|p2= heading: [[Number]] (Optional, default {{ic|0}}) - Direction
|p2= heading: [[Number]] (Optional, default {{hl|0}}) - direction
|p2since= arma2 1.00


|r1= [[Nothing]]
|r1= [[Nothing]]


|x1 = <code>unit1 [[setDir]] 45; {{cc|will set unit1 to face North-East}}</code>
|x1 = <sqf>unit1 setDir 45; // will set unit1 to face North-East</sqf>


|x2 = <code>unit1 [[setDir]] -675; {{cc|will also set unit1 to face North-East ({{=}} 45-360-360)}}</code>
|x2 = <sqf>unit1 setDir -675; // will also set unit1 to face North-East (= 45-360-360)</sqf>


|x3 = <code>unit1 [[setDir]] 30;
|x3 = <sqf>
unit1 [[setFormDir]] 30; {{cc|needed for AI to keep the given direction}}</code>
unit1 setDir 30;
unit1 setFormDir 30; // needed for AI to keep the given direction
</sqf>


|seealso= [[getDir]], [[direction]], [[setFormDir]], [[setVectorDir]], [[setVectorDirAndUp]]
|seealso= [[getDir]] [[direction]] [[setFormDir]] [[setVectorDir]] [[setVectorDirAndUp]]
}}</nowiki></pre>
}}</nowiki></pre>
| {{RV|type=command
| {{RV|type=command
Line 170: Line 191:
Negative angles represent a counter-clockwise angle.
Negative angles represent a counter-clockwise angle.


|alias= someCommand
|alias= '''someCommand'''


|pr= Command will not work with roman numbers e.g. VI.
|pr= Command will not work with roman numbers e.g. VI.


|mp= See notes below for more details on [[setDir]] behaviour.
|mp= See notes below for more details on '''setDir''' behaviour.


|s1= object '''setDir''' heading
|s1= object '''setDir''' heading
Line 180: Line 201:
|p1= object: [[Object]]
|p1= object: [[Object]]


|p2= heading: [[Number]] (Optional, default {{ic|0}}) - Direction
|p2= heading: [[Number]] (Optional, default {{hl|0}}) - direction
|p2since= arma2 1.00


|r1= [[Nothing]]
|r1= [[Nothing]]


|x1 = <code>unit1 [[setDir]] 45; {{cc|will set unit1 to face North-East}}</code>
|x1 = <sqf>unit1 setDir 45; // will set unit1 to face North-East</sqf>


|x2 = <code>unit1 [[setDir]] -675; {{cc|will also set unit1 to face North-East ({{=}} 45-360-360)}}</code>
|x2 = <sqf>unit1 setDir -675; // will also set unit1 to face North-East (= 45-360-360)</sqf>


|x3 = <code>unit1 [[setDir]] 30;
|x3 = <sqf>
unit1 [[setFormDir]] 30; {{cc|needed for AI to keep the given direction}}</code>
unit1 setDir 30;
unit1 setFormDir 30; // needed for AI to keep the given direction
</sqf>


|seealso= [[getDir]], [[direction]], [[setFormDir]], [[setVectorDir]], [[setVectorDirAndUp]]
|seealso= [[getDir]] [[direction]] [[setFormDir]] [[setVectorDir]] [[setVectorDirAndUp]]
}}<br><br><br>
}}<br><br><br>
|-
|-
Line 199: Line 223:
|version1= 1.00
|version1= 1.00


|game2= TKOH
|game2= tkoh
|version2= 1.00
|version2= 1.00


Line 226: Line 250:
|r1= [[Nothing]]
|r1= [[Nothing]]


|x1= <code>[] [[call]] [[BIS_fnc_help]];</code>
|x1= <sqf>[] call BIS_fnc_help;</sqf>


|seealso= [[Arma 2: Functions Library]]
|seealso= [[Arma 2: Functions Library]]
Line 237: Line 261:
|version1= 1.00
|version1= 1.00


|game2= TKOH
|game2= tkoh
|version2= 1.00
|version2= 1.00


Line 264: Line 288:
|r1= [[Nothing]]
|r1= [[Nothing]]


|x1= <code>[] [[call]] [[BIS_fnc_help]];</code>
|x1= <sqf>[] call BIS_fnc_help;</sqf>


|seealso= [[Arma 2: Functions Library]] [[Arma 3: Functions Library]] [[Take On Helicopters: Functions Library]]
|seealso= [[Arma 2: Functions Library]] [[Arma 3: Functions Library]] [[Take On Helicopters: Functions Library]]

Latest revision as of 17:06, 27 July 2022

Real Virtuality Commands/Functions documentation template, used by these pages.

Do NOT edit this template before heavy testing, as it is widely used! (on at least 4,746 pages, including 2,669 commands and 2,077 functions)

Usage

{{RV|type=|other parameters, see below}}

  • meta information:
    • type: (named argument, case-insensitive) "command" or "function"
    • displayTitle: (Optional, default {{PAGENAMEE}} - encoded page name, i.e with underscores) use to force page's displayTitle (e.g diag_log (Arma 2)) - automatically deals with diag_ and buldozer_ pages already
    • sortKey: (Optional, default commandName or functionName without BIS/BIN_fnc_ prefix) use to force category's sort key
  • primary parameters:
    • game1: short game name - same as Name template input format. Can be: ofp, ofpe, arma1, arma2, arma2oa, tkoh, arma3
    • version1: (Optional, default empty - unknown) number in GVI template format: <Major>.<Minor>. e.g 1.46, 1.75, 1.86 etc.
    • arg: (Optional, default empty) local or global - if provided, will display the LALocal or GAGlobal icon depending on arguments' locality
    • eff: (Optional, default empty) local or global - if provided, will display the LELocal or GEGlobal icon depending on effect's locality
    • serverExec: (Optional, default empty) if provided, will display the SEServer icon informing the command must be run on the server
    • descr: (Optional, default Description needed) the command description
    • exec: (Optional, Function only, default call) use spawn for functions to be spawned
    • gr1..gr5: (Optional, default Command Group: Uncategorised) Command groups. Case sensitive
    • s1: (Optional, default Syntax needed) command syntax with named parameters, without <sqf> tags nor ending
semicolon. e.g unit1 setDammage 1
    • p1..p20: (Optional, default empty) command parameters with description
    • r1: (default Return value needed) syntax's return value
    • x1..x10: (default Example needed) command examples (to be put between <sqf></sqf> tags where needed)
    • seealso: (default See also needed) list of related links in wiki format, separated by comma or space. e.g [[setDir]] [[setPos]]
  • secondary parameters:
    • branch: (Optional, default empty) takes free string such as development (dev), diagnostic (diag) or profiling (prof). If provided, will mark the page as Development, Diagnostic or Profiling branch only
    • alias: (Optional, default empty) if provided, will show Alias link(s) under the description
    • 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..7: (Optional, default empty) same as game1
    • version2..7: (Optional, default empty) same as version1, for the corresponding game#
    • s2..s6: (Optional, default empty) Alternative syntaxes 1 to 5 (see s1)
    • s2since..s6since: (Optional, default empty) game version that introduced the syntax; format gameId gameVersion, e.g arma3 1.50
    • p21..p120: (Optional, default empty) Alternative syntaxes' parameters (20 each: p21..40, p41..60, p61..80, p81..100, p101..120)
    • p21since..p120since: (Optional, default empty) game version that introduced the parameter; format gameId gameVersion, e.g arma3 1.50
    • r2..r6: (Optional, default empty) Alternative syntaxes' return value (see r1)

Automatic categories

Maintenance/RV :

Command Function

Examples

Code Result
{{RV}} -no type provided-


{{RV|type=abc}} -wrong type ("abc") provided-


{{RV|type=command

|game1= ofp
|version1= 1.00

|game2= ofpe
|version2= 1.00

|game3= arma1
|version3= 1.00

|game4= arma2
|version4= 1.00

|game5= arma2oa
|version5= 1.50

|game6= tkoh
|version6= 1.00

|game7= arma3
|version7= 0.50

|branch= development diagnostic profiling

|arg= local

|eff= global

|gr1= Object Manipulation

|descr= Sets object heading.
Angles are measured in degrees clockwise from north,
and regular range goes from 0 to 360 (0° {{=}} N, 90° {{=}} E, 180° {{=}} S, 270° {{=}} W).
Negative angles represent a counter-clockwise angle.

|alias= [[someCommand]]

|pr= Command will not work with roman numbers e.g. VI.

|mp= See notes below for more details on [[setDir]] behaviour.

|s1= object [[setDir]] heading

|p1= object: [[Object]]

|p2= heading: [[Number]] (Optional, default {{hl|0}}) - direction
|p2since= arma2 1.00

|r1= [[Nothing]]

|x1 = <sqf>unit1 setDir 45; // will set unit1 to face North-East</sqf>

|x2 = <sqf>unit1 setDir -675; // will also set unit1 to face North-East (= 45-360-360)</sqf>

|x3 = <sqf>
unit1 setDir 30;
unit1 setFormDir 30; // needed for AI to keep the given direction
</sqf>

|seealso= [[getDir]] [[direction]] [[setFormDir]] [[setVectorDir]] [[setVectorDirAndUp]]
}}
Hover & click on the images for description
Only available in Development/Diagnostic/Profiling branch(es) until its release with Arma 3 patch v1.00.

Description

Description:
Sets object heading. Angles are measured in degrees clockwise from north, and regular range goes from 0 to 360 (0° = N, 90° = E, 180° = S, 270° = W). Negative angles represent a counter-clockwise angle.
Multiplayer:
See notes below for more details on setDir behaviour.
Problems:
Command will not work with roman numbers e.g. VI.
Alias:
someCommand
Groups:
Object Manipulation

Syntax

Syntax:
object setDir heading
Parameters:
object: Object
since Logo A2.png1.00
heading: Number (Optional, default 0) - direction
Return Value:
Nothing

Examples

Example 1:
unit1 setDir 45; // will set unit1 to face North-East
Example 2:
unit1 setDir -675; // will also set unit1 to face North-East (= 45-360-360)
Example 3:
unit1 setDir 30; unit1 setFormDir 30; // needed for AI to keep the given direction

Additional Information

See also:
getDir direction setFormDir setVectorDir setVectorDirAndUp

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note



{{RV|type=function

|game1= arma2
|version1= 1.00

|game2= tkoh
|version2= 1.00

|game3= arma3
|version3= 0.50

|arg= local

|eff= local

|gr1= Diagnostic

|descr= Shows Function Library viewer, which contains list of all available functions, both official and unofficial.

|alias= someFunction

<gallery>
Image:Fnc_help.jpg|Arma 2
File:Take On Helicopters Functions Viewer.jpg|Take On Helicopters
</gallery>

|s1= [parentDisplay] [[call]] [[BIS_fnc_help]]

|p1= parentDisplay: [[Display]] - (Optional, default [[displayNull]])

|r1= [[Nothing]]

|x1= <sqf>[] call BIS_fnc_help;</sqf>

|seealso= [[Arma 2: Functions Library]]
[[Arma 3: Functions Library]]
[[Take On Helicopters: Functions Library]]
}}
Hover & click on the images for description

Description

Description:
Shows Function Library viewer, which contains list of all available functions, both official and unofficial.
Execution:
call
Alias:
someFunction
Groups:
Diagnostic

Syntax

Syntax:
[parentDisplay] call BIS_fnc_help
Parameters:
parentDisplay: Display - (Optional, default displayNull)
Return Value:
Nothing

Examples

Example 1:

Additional Information

See also:
Arma 2: Functions Library Arma 3: Functions Library Take On Helicopters: Functions Library

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Command Template

{{RV|type=command

|game1=

|version1=

|game2=

|version2=

|game3=

|version3=

|game4=

|version4=

|game5=

|version5=

|game6=

|version6=

|game7=

|version7=

|arg=

|eff=

|serverExec=

|gr1=

|gr2=

|gr3=

|gr4=

|gr5=

|descr=

|mp=

|pr=

|s1=

|p1=

|p2=

|p3=

|p4=

|p5=

|p6=

|p7=

|p8=

|p9=

|p10=

|p11=

|p12=

|p13=

|p14=

|p15=

|p16=

|p17=

|p18=

|p19=

|p20=

|r1=

|x1=

|seealso=
}}

Function Template

{{RV|type=function

|game1=

|version1=

|game2=

|version2=

|game3=

|version3=

|game4=

|version4=

|game5=

|version5=

|game6=

|version6=

|game7=

|version7=

|arg=

|eff=

|serverExec=

|gr1=

|gr2=

|gr3=

|gr4=

|gr5=

|descr=

|mp=

|pr=

|s1=

|p1=

|p2=

|p3=

|p4=

|p5=

|p6=

|p7=

|p8=

|p9=

|p10=

|p11=

|p12=

|p13=

|p14=

|p15=

|p16=

|p17=

|p18=

|p19=

|p20=

|r1=

|x1=

|seealso=
}}