RV – Template
Lou Montana (talk | contribs) m (Fix categorisation) |
Lou Montana (talk | contribs) m (Add performance fix attempt (avoiding too many "#ifeq:{{lc:{{{type}}}}}|command") + A2OA category fix) |
||
| Line 44: | Line 44: | ||
<dl> | <dl> | ||
<dt>Description:</dt> | <dt>Description:</dt> | ||
<dd>{{#if:{{{descr|}}}|{{{descr}}}|{{Wiki|stub}}''[[:Category:Maintenance/RV/Description needed|Description needed]]''}}</dd> | <dd>{{#if:{{{descr|}}} | {{{descr}}} | {{Wiki|stub}}''[[:Category:Maintenance/RV/Description needed|Description needed]]''}}</dd> | ||
{{#ifeq:{{lc:{{{type}}}}}|command|| | {{#ifeq:{{lc:{{{type}}}}}|command|| | ||
<dt>Execution:</dt> | <dt>Execution:</dt> | ||
| Line 66: | Line 66: | ||
--><dt id="Groups">Groups:</dt> | --><dt id="Groups">Groups:</dt> | ||
<dd class="groups"><!-- | <dd class="groups"><!-- | ||
-->{{#if: {{{gr1|}}}{{{gr2|}}}{{{gr3|}}}{{{gr4|}}}{{{gr5|}}} | | -->{{#if: {{{gr1|}}}{{{gr2|}}}{{{gr3|}}}{{{gr4|}}}{{{gr5|}}} | ||
| {{#ifeq:{{lc:{{{type}}}}}|command | |||
| {{#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}}}}}]] }} | |||
| {{#if: {{{gr1|}}} | [[:Category:Function Group: {{Trim|{{{gr1}}}}}|{{Trim|{{{gr1}}}}}]] | |||
}}{{#if: {{{gr2|}}} | [[:Category:Function Group: {{Trim|{{{gr2}}}}}|{{Trim|{{{gr2}}}}}]] | |||
}}{{#if: {{{gr3|}}} | [[:Category:Function Group: {{Trim|{{{gr3}}}}}|{{Trim|{{{gr3}}}}}]] | |||
}}{{#if: {{{gr4|}}} | [[:Category:Function Group: {{Trim|{{{gr4}}}}}|{{Trim|{{{gr4}}}}}]] | |||
}}{{#if: {{{gr5|}}} | [[:Category:Function Group: {{Trim|{{{gr5}}}}}|{{Trim|{{{gr5}}}}}]] }} | |||
}} | |||
| [[:Category:{{#ifeq:{{lc:{{{type}}}}}|command|Command|Function}} Group: Uncategorised|Uncategorised]] | |||
}} | }} | ||
</dd><!-- | </dd><!-- | ||
| Line 80: | Line 88: | ||
<dl> | <dl> | ||
<dt id="Syntax 1">Syntax:</dt> | <dt id="Syntax 1">Syntax:</dt> | ||
<dd>{{#if:{{{s1|}}}|{{{s1}}} | <dd>{{#if:{{{s1|}}}|{{{s1}}} | ''[[:Category:Maintenance/RV/Syntax needed|Syntax needed]]''}}</dd><!-- | ||
}}</dd><!-- | |||
-->{{#if:{{{p1|}}}| | -->{{#if:{{{p1|}}}| | ||
| Line 109: | Line 115: | ||
--><dt id="Return Value 1">Return Value:</dt> | --><dt id="Return Value 1">Return Value:</dt> | ||
<dd>{{#if:{{{r1|}}} | <dd>{{#if:{{{r1|}}} | {{{r1}}} | ''[[:Category:Maintenance/RV/Return value needed|Return value needed]]''}}</dd> | ||
}}</dd> | |||
</dl><!-- | </dl><!-- | ||
| Line 306: | Line 309: | ||
<dt id="See Also">See also:</dt> | <dt id="See Also">See also:</dt> | ||
<dd class="seealso"><!-- | <dd class="seealso"><!-- | ||
-->{{#if: {{{seealso|}}} | -->{{#if: {{{seealso|}}} | {{#replace:{{#replace:{{{seealso}}}|], [|][}}|],[|][}} | ''[[:Category:Maintenance/RV/See also needed|See also needed]]''}}</dd> | ||
| ''[[:Category:Maintenance/RV/See also needed|See also needed]]'' | |||
}}</dd> | |||
</dl> | </dl> | ||
| Line 327: | Line 325: | ||
CATEGORIES | CATEGORIES | ||
--><!-- | |||
Performance fix attempt | |||
-->{{TemplateCase | | | -->{{TemplateCase | | | ||
[[Category:{{# | {{#ifeq:{{lc:{{{type}}}}}|command | ||
| [[Category:Scripting Commands]]<!-- | |||
-->{{#if:{{{game2|}}} | {{GameCategory|{{{game2}}}|Scripting Commands}} | |||
}}{{#if:{{{game3|}}} | {{GameCategory|{{{game3}}}|Scripting Commands}} | |||
}}{{#if:{{{game4|}}} | {{GameCategory|{{{game4}}}|Scripting Commands}} | |||
}}{{#if:{{{game5|}}} | {{GameCategory|{{{game5}}}|Scripting Commands}} | |||
}}{{#if:{{{game6|}}} | {{GameCategory|{{{game6}}}|Scripting Commands}} | |||
}}{{#if:{{{game7|}}} | {{GameCategory|{{{game7}}}|Scripting Commands}}}} | |||
| [[Category:Functions]]<!-- | |||
-->{{#if:{{{game2|}}} | {{GameCategory|{{{game2}}}|Functions}} | |||
}}{{#if:{{{game3|}}} | {{GameCategory|{{{game3}}}|Functions}} | |||
}}{{#if:{{{game4|}}} | {{GameCategory|{{{game4}}}|Functions}} | |||
}}{{#if:{{{game5|}}} | {{GameCategory|{{{game5}}}|Functions}} | |||
}}{{#if:{{{game6|}}} | {{GameCategory|{{{game6}}}|Functions}} | |||
}}{{#if:{{{game7|}}} | {{GameCategory|{{{game7}}}|Functions}}}} | |||
}} | |||
<nowiki>{{#if:{{{game1|}}} | {{GameCategory|{{{game1}}} | Introduced in v{{{version1|?}}}}}}}</nowiki> | <nowiki>{{#if:{{{game1|}}} | {{GameCategory|{{{game1}}} | Introduced in v{{{version1|?}}}}}}}</nowiki> | ||
| Line 335: | Line 352: | ||
-->{{#if:{{{game1|}}} | | -->{{#if:{{{game1|}}} | | ||
[[Category:Introduced with {{Name|{{{game1}}}}} version {{Trim|{{{version1|?}}}}}]]<!-- | [[Category:Introduced with {{Name|{{{game1}}}}} version {{Trim|{{{version1|?}}}}}]]<!-- | ||
-->{{GameCategory|{{{game1}}} | New {{#ifeq:{{lc:{{{type}}}}}|command|Scripting Commands|Functions}}}} | -->{{GameCategory | {{{game1}}} | New {{#ifeq:{{lc:{{{type}}}}}|command|Scripting Commands|Functions}} | ||
}}{{GameCategory | {{{game1}}} | {{#ifeq:{{lc:{{{type}}}}}|command|Scripting Commands|Functions}}}} | |||
}}{{#if:{{{branch|}}} | | |||
{{#if:{{#pos:{{lc:{{{game1}}}{{{game2|}}}{{{game3|}}}{{{game4|}}}{{{game5|}}}{{{game6|}}}{{{game7|}}}}}|arma3}} | | |||
{{#if:{{#pos:{{lc:{{{branch}}}}}|dev}} | {{GameCategory| {{arma3}} | {{#ifeq:{{lc:{{{type}}}}}|command|Scripting Commands|Functions}}: Development Branch }} }}<!-- | |||
-->{{#if:{{#pos:{{lc:{{{branch}}}}}|diag}} | {{GameCategory| {{arma3}} | {{#ifeq:{{lc:{{{type}}}}}|command|Scripting Commands|Functions}}: Diagnostic Branch }} }}<!-- | |||
-->{{#if:{{#pos:{{lc:{{{branch}}}}}|prof}} | {{GameCategory| {{arma3}} | {{#ifeq:{{lc:{{{type}}}}}|command|Scripting Commands|Functions}}: Profiling Branch }} }} | |||
}} | }} | ||
}}<!-- | }}<!-- | ||
-->{{#if:{{{ | Performance fix attempt | ||
-->{{#ifeq:{{lc:{{{type}}}}}|command | |||
| {{#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}}}}}]] | |||
}}{{#if: {{{gr1|}}}{{{gr2|}}}{{{gr3|}}}{{{gr4|}}}{{{gr5|}}} | | [[Category:Command Group: Uncategorised]]}} | |||
| {{#if: {{{gr1|}}} | [[Category:Function Group: {{Trim|{{{gr1}}}}}]] | |||
}}{{#if: {{{gr2|}}} | [[Category:Function Group: {{Trim|{{{gr2}}}}}]] | |||
}}{{#if: {{{gr3|}}} | [[Category:Function Group: {{Trim|{{{gr3}}}}}]] | |||
}}{{#if: {{{gr4|}}} | [[Category:Function Group: {{Trim|{{{gr4}}}}}]] | |||
}}{{#if: {{{gr5|}}} | [[Category:Function Group: {{Trim|{{{gr5}}}}}]] | |||
}}{{#if: {{{gr1|}}}{{{gr2|}}}{{{gr3|}}}{{{gr4|}}}{{{gr5|}}} | | [[Category:Function Group: Uncategorised]]}} | |||
}}<!-- | |||
A2OA exception until all pages are properly filled | A2OA exception until all pages are properly filled | ||
| Line 358: | Line 383: | ||
-->{{#if: | -->{{#if: | ||
{{#pos: | {{#pos:{{{game1|}}}{{{game2|}}}{{{game3|}}}{{{game4|}}}{{{game5|}}}{{{game6|}}}{{{game7|}}}|arma2}} | ||
| {{GameCategory|arma2oa| {{#ifeq:{{lc:{{{type}}}}}|command|Scripting Commands|Functions}} }} | | {{GameCategory|arma2oa| {{#ifeq:{{lc:{{{type}}}}}|command|Scripting Commands|Functions}} }} | ||
}}<!-- | }}<!-- | ||
Maintenance/RV categories | |||
-->{{#ifeq:KILROY|{{{1|KILROY}}} | | [[Category:Maintenance/RV/Nameless parameter usage]]}} | -->{{#ifeq:KILROY|{{{1|KILROY}}} | | [[Category:Maintenance/RV/Nameless parameter usage]] | ||
}}{{#if:{{{game1|}}} | | [[Category:Maintenance/RV/Game1 needed]] | |||
}}{{#if:{{{version1|}}} | | [[Category:Maintenance/RV/Version1 needed]] | |||
}}{{#if:{{{descr|}}} | | [[Category:Maintenance/RV/Description needed]] | |||
}}{{#if:{{{s1|}}} | | [[Category:Maintenance/RV/Syntax needed]] | |||
}}{{#if:{{{r1|}}} | | [[Category:Maintenance/RV/Return value needed]] | |||
}}{{#if:{{{x1|}}}{{{x2|}}}{{{x3|}}}{{{x4|}}}{{{x5|}}}{{{x6|}}}{{{x7|}}}{{{x8|}}}{{{x9|}}}{{{x10|}}} | | [[Category:Maintenance/RV/Example needed]] | |||
}}{{#if:{{{seealso|}}} | | [[Category:Maintenance/RV/See also needed]] | |||
}}<!-- | |||
closing Categories TemplateCase | |||
-->}} | -->}} | ||
|= -no type provided- | |= -no type provided- | ||
|#default = -wrong type ("{{{type}}}") provided-}}</includeonly><noinclude>{{RV/doc}}</noinclude> | |#default = -wrong type ("{{{type}}}") provided-}}</includeonly><noinclude>{{RV/doc}}</noinclude> | ||
Revision as of 13:12, 16 June 2021
Real Virtuality Commands/Functions documentation template, used by these pages.
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
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]]
}}
|
Description
Syntax
Examples
Additional Information
Notes
|
{{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]]
}}
|
Description
Syntax
Examples
Additional Information
Notes
|
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=
}}