getLoadedModsInfo: Difference between revisions

From Bohemia Interactive Community
m (Text replacement - "\[\[Category:[ _]?Scripting[ _]Commands[ _]Arma[ _]3(\|.*)]]" to "{{GameCategory|arma3|Scripting Commands}}")
(Update example result)
 
(22 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| arma3 |Game name=
|game1= arma3
|version1= 2.00


| 2.00 |Game version=
|gr1= Mods and Addons


|gr1= Mods and Addons |GROUP1=
|descr= Returns information about all loaded modifications.
____________________________________________________________________________________________


| Returns information about all loaded modifications.
{{Feature|informative|The first 7 values are equal to what is printed in [[Crash Files|RPT]] on game startup in the {{hl|c= ======== mods =======}} category.}}


{{Informative|The first 7 are equal to whats printed to RPT at game startup in the <tt><nowiki>======== mods =======</nowiki></tt> category.}} |DESCRIPTION=
|s1= [[getLoadedModsInfo]]
____________________________________________________________________________________________


| [[getLoadedModsInfo]] |SYNTAX=
|r1= [[Array]] of [[Array]]s in format [modName, modDir, isDefault, isOfficial, origin, hash, hashShort, itemID]:
* modName: [[String]] - user-friendly mod name
* modDir: [[String]] - mod directory name
* isDefault: [[Boolean]] - [[true]] for base DLC, [[false]] for optional
* isOfficial: [[Boolean]] - [[true]] for official content, [[false]] for user-generated content
* origin: [[String]] - either "GAME DIR" or "NOT FOUND" (for the base game or on error)
* hash: [[String]]
* hashShort: [[String]]
* itemID: [[String]] - either DLC appId or Steam Workshop itemID, "0" for the base game


| [[Array]] of [[Array]]s in format [modname, modDir, isDefault, isOfficial, origin, hash, hashShort, itemID (Either DLC appid, or steam workshop itemid)] |RETURNVALUE=
|x1= <sqf>
____________________________________________________________________________________________
private _loadedMods = getLoadedModsInfo;
 
/*
|x1= <code>_loadedMods = [[getLoadedModsInfo]];
{{codecomment|/<nowiki>*
[
[
["dummy","dummy",false,false,"NOT FOUND","","","0"],
["Community Base Addons v3.18.1","@cba_a3",false,false,"GAME DIR","b256a972cc3a9bde93988e243ad5db85887dece0","7de4bd5c","450814997"],
["CUP Units DEV Version r710 (r710-r710 UNITSSVN) (12|Jun|2020)","@[DEV] CUP Units",false,false,"GAME DIR","f3fb8a4c62443ac799c7c0e00f645b1f32cf1376","c96577b4",0],
["Arma 3 Art of War","aow",true,true,"GAME DIR","c6afb04056f1cea283c60e13b6d5ac8049140341","2ed2ccad","1325500"],
["CUP Weapons DEV Version r1486 (r1481-r1486 WEAPONSSVN) (12|Jun|2020)","@[DEV] CUP Weapons",false,false,"GAME DIR","6dbd7c052ce2ae68803e10f6a3653d0b046881d8","bb1c4965",0],
["Arma 3 Contact (Platform)","enoch",true,true,"GAME DIR","72172fe806a8cd128d5dd5f224dbf754b69af881","32ed0446","1021790"],
["Community Base Addons v3.15.1","@CBA_A3",false,false,"GAME DIR","33eef5c0ed583d1222319460b184090513193287","131bbb64",0],
["Arma 3 Tanks","tank",true,true,"GAME DIR","35ef3b19b5ebd31d7da21565717f6d5c768edd59","9c4a0882","798390"],
["Arma 3 Contact (Platform)","enoch",true,true,"GAME DIR","4298e892077aec33be6b68730a974400a3c3a636","43e900ae","1021790"],
["Arma 3 Tac-Ops","tacops",true,true,"GAME DIR","e03d923a8391d527d34c3a2d311e6f2554df18c8","e6729774","744950"],
["Arma 3 Tanks","tank",true,true,"GAME DIR","c47d45d7ce1261e0a0d1c4ed9517611eae6ebf9f","1aec74ec","798390"],
["Arma 3 Laws of War","orange",true,true,"GAME DIR","71940c7021e27b4ae72cd6a527ff56784725850a","d27bf111","571710"],
["Arma 3 Tac-Ops","tacops",true,true,"GAME DIR","808cc67221feadc288c856395cac28b908966eee","441362c6","744950"],
["Arma 3 Malden","argo",true,true,"GAME DIR","230aad2992427ef22b803e177bdedda7b3f1727d","2e502f53","639600"],
["Arma 3 Laws of War","orange",true,true,"GAME DIR","aa86785568206ae1e7becaa09eb673ee645d971f","4729aa84","571710"],
["Arma 3 Jets","jets",true,true,"GAME DIR","d58526aaa24a73aa53d11b82f00cf49dc3ef3216","d39b144d","601670"],
["Arma 3 Malden","argo",true,true,"GAME DIR","db6d4d06a3ad28207da665e8c34bbd8adf191019","61001811","639600"],
["Arma 3 Apex","expansion",true,true,"GAME DIR","dded307173ad9bb62fe09a5084bb7d70c81639d3","57f2ccad","395180"],
["Arma 3 Jets","jets",true,true,"GAME DIR","8e8e1f9275e37cc90c0f2a8a6901dd2a3e81a29a","fc8366ee","601670"],
["Arma 3 Marksmen","mark",true,true,"GAME DIR","eb956eb99f1a33cef4f825f8d52bc9ca9ef3d4cd","d605b72","332350"],
["Arma 3 Apex","expansion",true,true,"GAME DIR","48f32952612dbb6ca972790c17c9920797073233","fc4aed7f","395180"],
["Arma 3 Helicopters","heli",true,true,"GAME DIR","0e14ac1e91df7c56725b1dc9a939c50c5d93fd4c","a6e7077f","304380"],
["Arma 3 Marksmen","mark",true,true,"GAME DIR","85c7f2284f8b0271bfafecd96c49230ce0515861","534e5baa","332350"],
["Arma 3 Karts","kart",true,true,"GAME DIR","f9bac1340520fc3a25c3c4c7b6c48efdba32d535","9b1d75e8","288520"],
["Arma 3 Helicopters","heli",true,true,"GAME DIR","dae29688657dbc9057f9eb83179a3ad21d3a689d","e7165098","304380"],
["Arma 3 Zeus","curator",true,true,"GAME DIR","5cfb449d86e7b7e8529909ec1c0656d70e2cfda0","4ccdcca0","275700"],
["Arma 3 Karts","kart",true,true,"GAME DIR","eae9e0b218e7a8e8e906477ee1a5e8e3d5298f18","8240ae3f","288520"],
["Arma 3","A3",true,true,"GAME DIR","","","0"]]
["Arma 3 Zeus","curator",true,true,"GAME DIR","2310c5c95a558253c7286d93f5a2a810fbf9b620","8af0db5d","275700"],
["Arma 3","A3",true,true,"NOT FOUND","","","0"]
]
]
*</nowiki>/}}</code> |Example1=
*/
____________________________________________________________________________________________
</sqf>
 
|x2= <sqf>
private _modInfo = getLoadedModsInfo select 0;
_modInfo params ["_modname", "_modDir", "_isDefault", "_isOfficial", "_origin", "_hash", "_hashShort", "_itemID"];
</sqf>


| [[allAddonsInfo]] |SEEALSO=
|seealso= [[allAddonsInfo]]
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
{{GameCategory|arma3|Scripting Commands}}
<!-- CONTINUE Notes -->
<!-- DISCONTINUE Notes -->

Latest revision as of 13:27, 23 April 2025

Hover & click on the images for description

Description

Description:
Returns information about all loaded modifications.
The first 7 values are equal to what is printed in RPT on game startup in the ======== mods ======= category.
Groups:
Mods and Addons

Syntax

Syntax:
getLoadedModsInfo
Return Value:
Array of Arrays in format [modName, modDir, isDefault, isOfficial, origin, hash, hashShort, itemID]:
  • modName: String - user-friendly mod name
  • modDir: String - mod directory name
  • isDefault: Boolean - true for base DLC, false for optional
  • isOfficial: Boolean - true for official content, false for user-generated content
  • origin: String - either "GAME DIR" or "NOT FOUND" (for the base game or on error)
  • hash: String
  • hashShort: String
  • itemID: String - either DLC appId or Steam Workshop itemID, "0" for the base game

Examples

Example 1:
private _loadedMods = getLoadedModsInfo; /* [ ["Community Base Addons v3.18.1","@cba_a3",false,false,"GAME DIR","b256a972cc3a9bde93988e243ad5db85887dece0","7de4bd5c","450814997"], ["Arma 3 Art of War","aow",true,true,"GAME DIR","c6afb04056f1cea283c60e13b6d5ac8049140341","2ed2ccad","1325500"], ["Arma 3 Contact (Platform)","enoch",true,true,"GAME DIR","72172fe806a8cd128d5dd5f224dbf754b69af881","32ed0446","1021790"], ["Arma 3 Tanks","tank",true,true,"GAME DIR","35ef3b19b5ebd31d7da21565717f6d5c768edd59","9c4a0882","798390"], ["Arma 3 Tac-Ops","tacops",true,true,"GAME DIR","e03d923a8391d527d34c3a2d311e6f2554df18c8","e6729774","744950"], ["Arma 3 Laws of War","orange",true,true,"GAME DIR","71940c7021e27b4ae72cd6a527ff56784725850a","d27bf111","571710"], ["Arma 3 Malden","argo",true,true,"GAME DIR","230aad2992427ef22b803e177bdedda7b3f1727d","2e502f53","639600"], ["Arma 3 Jets","jets",true,true,"GAME DIR","d58526aaa24a73aa53d11b82f00cf49dc3ef3216","d39b144d","601670"], ["Arma 3 Apex","expansion",true,true,"GAME DIR","dded307173ad9bb62fe09a5084bb7d70c81639d3","57f2ccad","395180"], ["Arma 3 Marksmen","mark",true,true,"GAME DIR","eb956eb99f1a33cef4f825f8d52bc9ca9ef3d4cd","d605b72","332350"], ["Arma 3 Helicopters","heli",true,true,"GAME DIR","0e14ac1e91df7c56725b1dc9a939c50c5d93fd4c","a6e7077f","304380"], ["Arma 3 Karts","kart",true,true,"GAME DIR","f9bac1340520fc3a25c3c4c7b6c48efdba32d535","9b1d75e8","288520"], ["Arma 3 Zeus","curator",true,true,"GAME DIR","5cfb449d86e7b7e8529909ec1c0656d70e2cfda0","4ccdcca0","275700"], ["Arma 3","A3",true,true,"GAME DIR","","","0"]] ] */
Example 2:
private _modInfo = getLoadedModsInfo select 0; _modInfo params ["_modname", "_modDir", "_isDefault", "_isOfficial", "_origin", "_hash", "_hashShort", "_itemID"];

Additional Information

See also:
allAddonsInfo

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