modParams: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " <dd class="notedate">" to " <dt><dt> <dd class="notedate">") |
Lou Montana (talk | contribs) m (Text replacement - " <!-- [A-Z]+ Notes? Section -->" to "") |
||
Line 61: | Line 61: | ||
<dl class='command_description'> | <dl class='command_description'> | ||
<dt><dt> | <dt><dt> | ||
<dd class="notedate">Posted on April 24, 2017 - 21:25 (UTC)</dd> | <dd class="notedate">Posted on April 24, 2017 - 21:25 (UTC)</dd> | ||
Line 70: | Line 69: | ||
</dd> | </dd> | ||
</dl> | </dl> | ||
Revision as of 00:59, 6 April 2021
Description
- Description:
- Description needed
- Groups:
- Mods and Addons
Syntax
- Syntax:
- Syntax needed
- Parameters:
- [modClass, options]: Array
- modClass: String - class name of the mod
- options: Array - see description
- Return Value:
- Return value needed
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.
- Posted on February 26, 2021 - 16:42 (UTC)
- heyoxe
-
For each value, it will first read the value from the mod.cpp file, if the value is not in it (or the files does not exist), it will try to read it from the CfgMods entry as long as it has the EXACT same name. If you try to get "name" and the command cannot find it in either of those locations, it will return the same value as the modClass input.
In practice, this means that content from user mods will always be read from mod.cpp and never from the CfgMods.