modParams: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
mNo edit summary
(11 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Command|=
{{Command|Comments=
____________________________________________________________________________________________
____________________________________________________________________________________________
|arma3 |= Game
 
|1.62|= Game Version
|arma3 |Game name=
|arg= |= Multiplayer Arguments  
 
|eff= |= Multiplayer Effects
|1.62|Game Version=
 
|arg= |Multiplayer Arguments=
 
|eff= |Multiplayer Effects=
 
|gr1= Mods and Addons |GROUP1=
____________________________________________________________________________________________
____________________________________________________________________________________________
| Returns list of mod parameters according to given options, values are in same order as the given options. Available options:  
 
* <tt>"name"</tt>: [[String]] - name to be shown (Arma 3 instead of A3, etc.)
| Returns list of mod parameters according to given options, values are in same order as the given options. Available options are:
* <tt>"picture"</tt>: [[String]] - picture shown in Mod Launcher
{{{!}} style{{=}}"border-spacing: 1.5em 0"
* <tt>"logo"</tt>: [[String]] logo to be shown in Main Menu
{{!}} <tt>"name"</tt> {{!}}{{!}} [[String]] {{!}}{{!}} name to be shown (Arma 3 instead of A3, etc.)
* <tt>"logoOver"</tt>: [[String]] - logo to be shown in Main Menu when mouse is over
{{!}}-
* <tt>"logoSmall"</tt>: [[String]] - small version of logo, prepared for drawing small icons
{{!}} <tt>"picture"</tt> {{!}}{{!}} [[String]] {{!}}{{!}} picture shown in Mod Launcher
* <tt>"tooltip"</tt>: [[String]] - tooltip to be shown on mouse over  
{{!}}-
* <tt>"tooltipOwned"</tt>: [[String]] - tooltip to be shown on mouse over the icon when DLC is owned by player
{{!}} <tt>"logo"</tt> {{!}}{{!}} [[String]] {{!}}{{!}} logo to be shown in Main Menu
* <tt>"action"</tt>: [[String]] - url to be triggered when mod button is clicked
{{!}}-
* <tt>"actionName"</tt>: [[String]] - what to put on Action Button
{{!}} <tt>"logoOver"</tt> {{!}}{{!}} [[String]] {{!}}{{!}} logo to be shown in Main Menu when mouse is over
* <tt>"overview"</tt>: [[String]] - overview text visible in expansion menu
{{!}}-
* <tt>"hidePicture"</tt>: [[Boolean]] - do not show mod picture icon in the main menu mod list
{{!}} <tt>"logoSmall"</tt> {{!}}{{!}} [[String]] {{!}}{{!}} small version of logo, prepared for drawing small icons
* <tt>"hideName"</tt>: [[Boolean]] - do not show mod name in the main menu mod list
{{!}}-
* <tt>"defaultMod"</tt>: [[Boolean]] - default mods cannot be moved or disabled by Mod Launcher
{{!}} <tt>"tooltip"</tt> {{!}}{{!}} [[String]] {{!}}{{!}} tooltip to be shown on mouse over  
* <tt>"serverOnly"</tt>: [[Boolean]] - mod doesn't have to be installed on client in order to play on server with this mod running
{{!}}-
* <tt>"active"</tt>: [[Boolean]] - active mod (activated through command line or stored in profile by mod launcher)  
{{!}} <tt>"tooltipOwned"</tt> {{!}}{{!}} [[String]] {{!}}{{!}} tooltip to be shown on mouse over the icon when DLC is owned by player
'''NOTE''' that <tt>"active"</tt> does not actually tell you if a mod ( is running / pretends to be running )
{{!}}-
|= Description
{{!}} <tt>"action"</tt> {{!}}{{!}} [[String]] {{!}}{{!}} url to be triggered when mod button is clicked
{{!}}-
{{!}} <tt>"actionName"</tt> {{!}}{{!}} [[String]] {{!}}{{!}} what to put on Action Button
{{!}}-
{{!}} <tt>"overview"</tt> {{!}}{{!}} [[String]] {{!}}{{!}} overview text visible in expansion menu
{{!}}-
{{!}} <tt>"hidePicture"</tt> {{!}}{{!}} [[Boolean]] {{!}}{{!}} do not show mod picture icon in the main menu mod list
{{!}}-
{{!}} <tt>"hideName"</tt> {{!}}{{!}} [[Boolean]] {{!}}{{!}} do not show mod name in the main menu mod list
{{!}}-
{{!}} <tt>"defaultMod"</tt> {{!}}{{!}} [[Boolean]] {{!}}{{!}} default mods cannot be moved or disabled by Mod Launcher
{{!}}-
{{!}} <tt>"serverOnly"</tt> {{!}}{{!}} [[Boolean]] {{!}}{{!}} mod doesn't have to be installed on client in order to play on server with this mod running
{{!}}-
{{!}} <tt>"active"</tt> {{!}}{{!}} [[Boolean]] {{!}}{{!}} active mod (activated through command line or stored in profile by mod launcher)
{{!}}}
{{Informative | Please note that <tt>"active"</tt> does not actually tell you if a mod is running / pretends to be running.}} |DESCRIPTION=
____________________________________________________________________________________________
____________________________________________________________________________________________
| [[modParams]] [modClass, options] |= Syntax
 
|p1= [modClass, options]: [[Array]]|=
| [[modParams]] [modClass, options] |SYNTAX=
|p2= modClass: [[String]] - class name of the mod |= Parameter 1
 
|p3= options: [[Array]] - see description |= Parameter 2
|p1= [modClass, options]: [[Array]]|PARAMETER1=
| [[Array]] - retrieved requested data on success or empty array [] |= Return Value
 
|x1= <code>_data = [[modParams]] ["Kart", ["name", "logo", "picture"]];</code> |= Example 1
|p2= modClass: [[String]] - class name of the mod |PARAMETER2=
| [[configSourceModList]], [[configSourceMod]] |= See Also
 
|p3= options: [[Array]] - see description |PARAMETER3=
 
| [[Array]] - retrieved requested data on success or empty array [] |RETURNVALUE=
____________________________________________________________________________________________
 
|x1= <code>_data = [[modParams]] ["Kart", ["name", "logo", "picture"]];</code> |EXAMPLE1=
 
| [[configSourceModList]], [[configSourceMod]] |SEEALSO=
}}
}}


<dl class='command_description'>
<dl class='command_description'>
<!-- BEGIN Note Section -->
<!-- BEGIN Note Section -->
<!-- For example:
 
<dd class='notedate'>Posted on Month Day, Year - Time (UTC)</dd>
<dd class="notedate">Posted on April 24, 2017 - 21:25 (UTC)</dd>
<dt class='note'>'''[[User:User Name|User Name]]'''</dt>
<dt class="note">[[User:Killzone Kid|Killzone Kid]]</dt>
<dd class='note'>This is an example note. It is true and verifiable, and contains a little code snippet.
<dd class="note">This command used to spam .[[rpt]] when queried mod didn't exist, making it little awkward to use for testing if mod is active. For example:
<code>[[if]] ([[_this]] == anExample) [[then]] { [[hint]] Leave it here for others to read; };</code></dd>
<code>_superDuperModEnabled = [[modParams]] ["super_duper", ["active"]] [[param]] [0, [[false]]];</code>
-->
Since v1.69 the command would fail silently if mod didn't exist, but would still log .rpt error if the mod name passed to the command was empty or there was an error processing one of the passed options.
</dd>
 
<!-- END Note Section -->
<!-- END Note Section -->
</dl>
</dl>


<h3 style='display:none'>Bottom Section</h3>
<h3 style='display:none'>Bottom Section</h3>
<!-- Appropriate categories go here -->


[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
<!-- CONTINUE Notes -->
<dl class="command_description">
<dd class="notedate">Posted on April 24, 2017 - 21:25 (UTC)</dd>
<dt class="note">[[User:Killzone Kid|Killzone Kid]]</dt>
<dd class="note">This command used to spam .[[rpt]] when queried mod didn't exist, making it little awkward to use for testing if mod is active. For example:
<code>_superDuperModEnabled = [[modParams]] ["super_duper", ["active"]] param [0, false];</code>
Since v1.69 the command would fail silently if mod doesn't exist.
</dd>
</dl>
<!-- DISCONTINUE Notes -->

Revision as of 01:39, 20 September 2020

Hover & click on the images for description

Description

Description:
Returns list of mod parameters according to given options, values are in same order as the given options. Available options are:
"name" String name to be shown (Arma 3 instead of A3, etc.)
"picture" String picture shown in Mod Launcher
"logo" String logo to be shown in Main Menu
"logoOver" String logo to be shown in Main Menu when mouse is over
"logoSmall" String small version of logo, prepared for drawing small icons
"tooltip" String tooltip to be shown on mouse over
"tooltipOwned" String tooltip to be shown on mouse over the icon when DLC is owned by player
"action" String url to be triggered when mod button is clicked
"actionName" String what to put on Action Button
"overview" String overview text visible in expansion menu
"hidePicture" Boolean do not show mod picture icon in the main menu mod list
"hideName" Boolean do not show mod name in the main menu mod list
"defaultMod" Boolean default mods cannot be moved or disabled by Mod Launcher
"serverOnly" Boolean mod doesn't have to be installed on client in order to play on server with this mod running
"active" Boolean active mod (activated through command line or stored in profile by mod launcher)
Please note that "active" does not actually tell you if a mod is running / pretends to be running.
Groups:
Mods and Addons

Syntax

Syntax:
modParams [modClass, options]
Parameters:
[modClass, options]: Array
modClass: String - class name of the mod
options: Array - see description
Return Value:
Array - retrieved requested data on success or empty array []

Examples

Example 1:
_data = modParams ["Kart", ["name", "logo", "picture"]];

Additional Information

See also:
configSourceModListconfigSourceMod

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
Posted on April 24, 2017 - 21:25 (UTC)
Killzone Kid
This command used to spam .rpt when queried mod didn't exist, making it little awkward to use for testing if mod is active. For example: _superDuperModEnabled = modParams ["super_duper", ["active"]] param [0, false]; Since v1.69 the command would fail silently if mod didn't exist, but would still log .rpt error if the mod name passed to the command was empty or there was an error processing one of the passed options.

Bottom Section