Arma 3 Scripting

Command in Mods and Addons

modParams

Also available as Markdown and JSON, or read the original wiki page.

Description

Returns list of mod parameters according to given options, values are in same order as the given options.

Syntax

modParams [modClass, options]

Parameters:

Returns: Array - retrieved requested data on success or empty array []

Examples

Example 1

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

See also

configSourceModList · configSourceMod

Community notes

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.

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.

mikero

Later versions of PboProject and its friends with arma as the intended engine, will never allow a cfgmods to appear in a pbo. Instead, it will scribble it out to a mod.cpp in the mods\ folder that this pbo was intended for.