RV – Template

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Fix category)
(Add Icon template usage, numbers formatting)
Line 15: Line 15:


-->{{#if:{{{arg|}}}{{{eff|}}} | <span style="margin-left: 1em"><!-- space between game versions and arguments/effects
-->{{#if:{{{arg|}}}{{{eff|}}} | <span style="margin-left: 1em"><!-- space between game versions and arguments/effects
-->{{#if:{{{arg|}}} | {{EffArg|{{#ifeq:{{lc:{{{type}}}}}|command|cmd|fnc}}|arg|{{{arg}}}}} }}<!--
-->{{#if:{{{arg|}}} | {{Icon|{{{arg}}}argument|32}} }}<!--
-->{{#if:{{{eff|}}} | {{EffArg|{{#ifeq:{{lc:{{{type}}}}}|command|cmd|fnc}}|eff|{{{eff}}}}} }}<!--
-->{{#if:{{{eff|}}} | {{Icon|{{{eff}}}effect|32}} }}<!--
--></span>}}<!--
--></span>}}<!--


-->{{#if:{{{serverExec|}}} | <span style="margin-left: 1em">{{ServerExec | {{#ifeq:{{lc:{{{type}}}}}|command|cmd|fnc}}}}</span>}}<!-- ServerExec Param with left spacing from arguments/effects
-->{{#if:{{{serverExec|}}} | <span style="margin-left: 1em">{{Icon|serverExec}}</span>}}<!-- ServerExec Param with left spacing from arguments/effects


-->
-->
Line 346: Line 346:
-->{{TOC|side|1.1|2}}
-->{{TOC|side|1.1|2}}
[[Real Virtuality]] [[:Category:Scripting Commands|Commands]]/[[:Category:Functions|Functions]] documentation template, used by [[Special:WhatLinksHere/Template:{{PAGENAMEE}}|these pages]].
[[Real Virtuality]] [[:Category:Scripting Commands|Commands]]/[[:Category:Functions|Functions]] documentation template, used by [[Special:WhatLinksHere/Template:{{PAGENAMEE}}|these pages]].
{{Warning | Do '''NOT''' edit this template before '''heavy''' testing, as '''it is widely used (on ''at least'' {{#expr: {{#replace:{{PAGESINCATEGORY:Scripting Commands|pages}}|,|}} + {{#replace:{{PAGESINCATEGORY:Functions|pages}}|,|}} }} pages) !''' (including [[:Category:Scripting Commands|{{PAGESINCATEGORY:Scripting Commands|pages}} commands]] and [[:Category:Functions|{{PAGESINCATEGORY:Functions|pages}} functions]]).}}
{{Warning | Do '''NOT''' edit this template before '''heavy''' testing, as '''it is widely used!'''  (on ''at least'' {{formatnum:{{#expr: {{formatnum:{{PAGESINCATEGORY:Scripting Commands|pages}}|R}} + {{formatnum:{{PAGESINCATEGORY:Functions|pages}}|R}} }} }} pages, including [[:Category:Scripting Commands|{{PAGESINCATEGORY:Scripting Commands|pages}} commands]] and [[:Category:Functions|{{PAGESINCATEGORY:Functions|pages}} functions]])}}


== Usage ==
== Usage ==
Line 352: Line 352:
* '''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 <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>)
** 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:'''
** game1: (can be unnamed parameter '''1''') short game name - same as [[Template:Name|Name]] template input format. e.g ofp, tkoh, arma3, etc.
** game1: (can be unnamed parameter '''1''') short game name - same as [[Template:Name|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.
** version1: (Optional, default empty - unknown; can be unnamed parameter '''2''') number in [[Template:GVI|GVI]] template format: '''<Major>.<Minor>'''. e.g 1.46, 1.75, 1.86 etc.
** 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) '''local''' or '''global''' - if provided, will display the {{Icon|localArgument|32}} or {{Icon|globalArgument|32}} icon depending on arguments' locality
** 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) '''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 {{ServerExec}} 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: (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'''.
** 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
** r1: (Optional, default [[Nothing]]) (can be unnamed parameter '''5''') syntax's return value
** r1: (Optional, default [[Nothing]]); can be unnamed parameter '''5''') syntax's return value
** x1..10: (Optional, default {{Template|Example needed}}) command examples (to be put between <nowiki><code></code></nowiki> tags where needed)
** x1..10: (Optional, default {{Template|Example needed}}) command examples (to be put between <nowiki><code></code></nowiki> tags where needed)
** seealso: (Optional, default <tt>[[:Category:See also needed|See also needed]]</tt>) (can be unnamed param '''6''') list of related links in wiki format, separated by comma or space. e.g <nowiki>[[setDir]] [[setPos]]</nowiki>
** seealso: (Optional, default <tt>[[:Category:See also needed|See also needed]]</tt>; can be unnamed param '''6''') list of related links in wiki format, separated by comma or space. e.g <nowiki>[[setDir]] [[setPos]]</nowiki>
* '''secondary parameters:'''
* '''secondary parameters:'''
** 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

Revision as of 23:23, 25 January 2021

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))
    • sortKey: (Optional, default commandName or functionName without BIS/BIN_fnc_ prefix) use to force category's sort key
  • primary parameters:
    • game1: (can be 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 unnamed parameter 2) 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: (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

Command Function

Examples

Code Result
{{RV}} -no type provided-
{{RV|type=abc}} -wrong type provided-
{{RV|type=command}}
Hover & click on the images for descriptions

Description

Description:
Template:Stub

Syntax

Syntax:
RV

Examples

Examples:
Template:Example needed

Additional Information

See also:
See also needed
Groups:
Uncategorised

Notes

i
Only post proven facts here. Report bugs on the Feedback Tracker and discuss on the Arma Discord or on the Forums.
{{RV|type=function}}
Hover & click on the images for descriptions

Description

Description:
Template:Stub
Execution:
call

Syntax

Syntax:
RV

Examples

Examples:
Template:Example needed

Additional Information

See also:
See also needed
Groups:
Uncategorised

Notes

i
Only post proven facts here. Report bugs on the Feedback Tracker and discuss on the Arma Discord or on the Forums.
{{RV|type=command |game1= ofp |game2= arma1 |game3= arma2 |game4= tkoh |game5= arma3 |version1= 1.00 |version2= 1.00 |version3= 1.00 |version4= 1.00 |version5= 0.50 |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. |s1= object '''setDir''' heading |p1= object: [[Object]] |p2= heading: [[Number]] |r1= [[Nothing]] |x1 = <code>unit1 [[setDir]] 45; {{codecomment|// will set unit1 to face North-East}}</code> |x2 = <code>unit1 [[setDir]] -675; {{codecomment|// will also set unit1 to face North-East ({{=}} 45-360-360)}}</code> |x3 = <code>unit1 [[setDir]] 30; unit1 [[setFormDir]] 30;{{codecomment|// needed for AI to keep the given direction}}</code> |seealso= [[getDir]], [[direction]], [[setFormDir]], [[setVectorDir]], [[setVectorDirAndUp]] |mp= See notes below for more details on [[setDir]] behaviour. }}
Hover & click on the images for descriptions

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.

Syntax

Syntax:
object setDir heading
Parameters:
object: Object
heading: Number
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:
getDirdirectionsetFormDirsetVectorDirsetVectorDirAndUp
Groups:
Object Manipulation

Notes

i
Only post proven facts here. Report bugs on the Feedback Tracker and discuss on the Arma Discord or on the Forums.
{{RV|type=function |game1= arma2 |version1= 1.00 |game2= TKOH |version2= 1.00 |game3= arma3 |version3= 0.50 |eff= local |gr1 = Diagnostic |descr= Shows Function Library viewer, which contains list of all available functions, both official and unofficial. <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= <code>[] [[call]] [[BIS_fnc_help]];</code> |seealso= [[Arma 2: Functions Library]], [[Arma 3: Functions Library]], [[Take On Helicopters: Function Library]] }}
Hover & click on the images for descriptions

Description

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

Syntax

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

Examples

Example 1:
[] call BIS_fnc_help;

Additional Information

See also:
Arma 2 Functions LibraryArma 3 Functions LibraryTake On Helicopters Function Library
Groups:
Diagnostic

Notes

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

Command Template

{{RV|type=command

|game1=
|game2=
|game3=
|game4=
|game5=

|version1=
|version2=
|version3=
|version4=
|version5=

|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=
|game2=
|game3=
|game4=
|game5=

|version1=
|version2=
|version3=
|version4=
|version5=

|arg=
|eff=
|serverExec=

|gr1=
|gr2=
|gr3=
|gr4=
|gr5=

|descr=
|exec=

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