getLoadedModsInfo: Difference between revisions

From Bohemia Interactive Community
m (2.00 update)
(Update example result)
 
(24 intermediate revisions by 3 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>*
[
[
["CUP Units DEV Version r710 (r710-r710 UNITSSVN) (12|Jun|2020)","@[DEV] CUP Units",false,false,"GAME DIR","f3fb8a4c62443ac799c7c0e00f645b1f32cf1376","c96577b4","F:\Steam\SteamApps\common\Arma 3\!Workshop\@[DEV] CUP Units",0],
["Community Base Addons v3.18.1","@cba_a3",false,false,"GAME DIR","b256a972cc3a9bde93988e243ad5db85887dece0","7de4bd5c","450814997"],
["CUP Weapons DEV Version r1486 (r1481-r1486 WEAPONSSVN) (12|Jun|2020)","@[DEV] CUP Weapons",false,false,"GAME DIR","6dbd7c052ce2ae68803e10f6a3653d0b046881d8","bb1c4965","F:\Steam\SteamApps\common\Arma 3\!Workshop\@[DEV] CUP Weapons",0],
["Arma 3 Art of War","aow",true,true,"GAME DIR","c6afb04056f1cea283c60e13b6d5ac8049140341","2ed2ccad","1325500"],
["Community Base Addons v3.15.1","@CBA_A3",false,false,"GAME DIR","33eef5c0ed583d1222319460b184090513193287","131bbb64","F:\Steam\SteamApps\common\Arma 3\!Workshop\@CBA_A3",0],
["Arma 3 Contact (Platform)","enoch",true,true,"GAME DIR","72172fe806a8cd128d5dd5f224dbf754b69af881","32ed0446","1021790"],
["Arma 3 Contact (Platform)","enoch",true,true,"GAME DIR","a4ee0aa9675b9578de2c2742dfa75f14b463b311","2c003588","F:\Steam\SteamApps\common\Arma 3\enoch",1.02179e+006],
["Arma 3 Tanks","tank",true,true,"GAME DIR","35ef3b19b5ebd31d7da21565717f6d5c768edd59","9c4a0882","798390"],
["Arma 3 Tanks","tank",true,true,"GAME DIR","f20f91e6d4de2f912c9aef10440b9f7cdd9186ba","ee2006c9","F:\Steam\SteamApps\common\Arma 3\tank",798390],
["Arma 3 Tac-Ops","tacops",true,true,"GAME DIR","e03d923a8391d527d34c3a2d311e6f2554df18c8","e6729774","744950"],
["Arma 3 Tac-Ops","tacops",true,true,"GAME DIR","e173f6dac22cbfba9a80f06ab6274f283a79ccf1","99fbe961","F:\Steam\SteamApps\common\Arma 3\tacops",744950],
["Arma 3 Laws of War","orange",true,true,"GAME DIR","71940c7021e27b4ae72cd6a527ff56784725850a","d27bf111","571710"],
["Arma 3 Laws of War","orange",true,true,"GAME DIR","483d1b17bba31a73aca3382baca90726e5fb3b27","85779468","F:\Steam\SteamApps\common\Arma 3\orange",571710],
["Arma 3 Malden","argo",true,true,"GAME DIR","230aad2992427ef22b803e177bdedda7b3f1727d","2e502f53","639600"],
["Arma 3 Malden","argo",true,true,"GAME DIR","f70c5909dd0cf7f85041d1a6f8117fcddbefbeb4","119b97f7","F:\Steam\SteamApps\common\Arma 3\argo",639600],
["Arma 3 Jets","jets",true,true,"GAME DIR","d58526aaa24a73aa53d11b82f00cf49dc3ef3216","d39b144d","601670"],
["Arma 3 Jets","jets",true,true,"GAME DIR","02935f9fd087965351eaf1af421fee2349cb46b7","a7400e7","F:\Steam\SteamApps\common\Arma 3\jets",601670],
["Arma 3 Apex","expansion",true,true,"GAME DIR","dded307173ad9bb62fe09a5084bb7d70c81639d3","57f2ccad","395180"],
["Arma 3 Apex","expansion",true,true,"GAME DIR","ae333819e353cbcf64d25c1a18b182e1c48de485","dd4515be","F:\Steam\SteamApps\common\Arma 3\expansion",395180],
["Arma 3 Marksmen","mark",true,true,"GAME DIR","eb956eb99f1a33cef4f825f8d52bc9ca9ef3d4cd","d605b72","332350"],
["Arma 3 Marksmen","mark",true,true,"GAME DIR","31fcc6f8175f2f8ca204c30f0d70656f23349084","afb3a14a","F:\Steam\SteamApps\common\Arma 3\mark",332350],
["Arma 3 Helicopters","heli",true,true,"GAME DIR","0e14ac1e91df7c56725b1dc9a939c50c5d93fd4c","a6e7077f","304380"],
["Arma 3 Helicopters","heli",true,true,"GAME DIR","ed81c94ee14b0d6bcc0c09947bec1d80ac81285a","fbdee859","F:\Steam\SteamApps\common\Arma 3\heli",304380],
["Arma 3 Karts","kart",true,true,"GAME DIR","f9bac1340520fc3a25c3c4c7b6c48efdba32d535","9b1d75e8","288520"],
["Arma 3 Karts","kart",true,true,"GAME DIR","57fdc8d27afb5ec5890666c22efaa27555c6a60c","be245321","F:\Steam\SteamApps\common\Arma 3\kart",288520],
["Arma 3 Zeus","curator",true,true,"GAME DIR","5cfb449d86e7b7e8529909ec1c0656d70e2cfda0","4ccdcca0","275700"],
["Arma 3 Zeus","curator",true,true,"GAME DIR","65c7e2c50ad25b4d727780b435533113ad1e9cf3","bb8e34f1","F:\Steam\SteamApps\common\Arma 3\curator",275700],
["Arma 3","A3",true,true,"GAME DIR","","","0"]]
["Arma 3","A3",true,true,"GAME DIR","","","F:\Steam\SteamApps\common\Arma 3\A3",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}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
<!-- 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