getAssetDLCInfo: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Alt syntax and examples)
mNo edit summary
 
(30 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| arma3dev |Game name=
|game1= arma3
|version1= 2.00
|gr1= DLC


|1.99 |Game version=
|descr=Returns DLC information about given object or model.
____________________________________________________________________________________________


|Returns DLC information about given object or model|DESCRIPTION=
|s1= [[getAssetDLCInfo]] asset
____________________________________________________________________________________________


|s1= [[getAssetDLCInfo]] asset |SYNTAX=
|p1= asset: [[Object]] or [[String]] - object reference or path to the model


|p1= asset: [[String]] or [[Object]] |PARAMETER1=
|r1= [[Array]] - array in format: [isDlc, isOwned, isInstalled, isAvailable, appID, DLCName], where:
* isDlc: [[Boolean]] - the asset belongs to a DLC
* isOwned: [[Boolean]]
* isInstalled: [[Boolean]]
* isAvailable: [[Boolean]]
* appID: [[String]] - actual steam item ID or "0" for none or "-1" for unknown
* DLCName: [[String]] - actual DLC name or ""


|r1= [[Array]] |RETURNVALUE=
|s2= [[getAssetDLCInfo]] [class, config]


____________________________________________________________________________________________
|p21= class: [[String]] - class name of the asset


|s2= [[getAssetDLCInfo]] [class, (config)] |SYNTAX2=
|p22= config: [[Config]] - (Optional, default <sqf inline>configFile >> "CfgVehicles"</sqf>) config in which to search


| p21= [class, (config)]: [[Array]] |PARAMETER21=
|r2= [[Array]] in format [isDlc, isOwned, isInstalled, isAvailable, appID, DLCName], where:
* isDlc: [[Boolean]] - the asset belongs to a DLC
* isOwned: [[Boolean]]
* isInstalled: [[Boolean]]
* isAvailable: [[Boolean]]
* appID: [[String]] - actual steam item ID or "0" for none or "-1" for unknown
* DLCName: [[String]] - actual DLC name or ""


|r2= [[Array]] |RETURNVALUE2=
|x1= <sqf>getAssetDLCInfo player;</sqf>
____________________________________________________________________________________________


|x1= <code>[[getAssetDLCInfo]] [[player]]</code>|EXAMPLE1=
|x2= <sqf>getAssetDLCInfo "a3\Weapons_F_Enoch\Rifles\MSBS\MSBS65_F";</sqf>


|x2= <code>[[getAssetDLCInfo]] "a3\Weapons_F_Enoch\Rifles\MSBS\MSBS65_F"</code>|EXAMPLE2=
|x3= <sqf>getAssetDLCInfo ["C_Van_01_transport_F"];</sqf>


|x3= <code>[[getAssetDLCInfo]] ["C_Van_01_transport_F"]</code>|EXAMPLE3=
|x4= <sqf>getAssetDLCInfo ["arifle_AK12_F", configFile >> "CfgWeapons"];</sqf>
 
|x4= <code>[[getAssetDLCInfo]] ["arifle_AK12_F", [[configFile]] >> "CfgWeapons"]</code>|EXAMPLE4=
____________________________________________________________________________________________
 
| [[getObjectDLC]] |SEEALSO=


|seealso= [[getDLCs]] [[getObjectDLC]] [[getPersonUsedDLCs]] [[getMissionDLCs]] [[getDLCAssetsUsageByName]] [[getDLCAssetsUsage]]
}}
}}
<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 Arma 3|{{uc:{{PAGENAME}}}}]]

Latest revision as of 22:04, 28 September 2023

Hover & click on the images for description

Description

Description:
Returns DLC information about given object or model.
Groups:
DLC

Syntax

Syntax:
getAssetDLCInfo asset
Parameters:
asset: Object or String - object reference or path to the model
Return Value:
Array - array in format: [isDlc, isOwned, isInstalled, isAvailable, appID, DLCName], where:
  • isDlc: Boolean - the asset belongs to a DLC
  • isOwned: Boolean
  • isInstalled: Boolean
  • isAvailable: Boolean
  • appID: String - actual steam item ID or "0" for none or "-1" for unknown
  • DLCName: String - actual DLC name or ""

Alternative Syntax

Syntax:
getAssetDLCInfo [class, config]
Parameters:
class: String - class name of the asset
config: Config - (Optional, default configFile >> "CfgVehicles") config in which to search
Return Value:
Array in format [isDlc, isOwned, isInstalled, isAvailable, appID, DLCName], where:
  • isDlc: Boolean - the asset belongs to a DLC
  • isOwned: Boolean
  • isInstalled: Boolean
  • isAvailable: Boolean
  • appID: String - actual steam item ID or "0" for none or "-1" for unknown
  • DLCName: String - actual DLC name or ""

Examples

Example 1:
getAssetDLCInfo player;
Example 2:
getAssetDLCInfo "a3\Weapons_F_Enoch\Rifles\MSBS\MSBS65_F";
Example 3:
getAssetDLCInfo ["C_Van_01_transport_F"];
Example 4:
getAssetDLCInfo ["arifle_AK12_F", configFile >> "CfgWeapons"];

Additional Information

See also:
getDLCs getObjectDLC getPersonUsedDLCs getMissionDLCs getDLCAssetsUsageByName getDLCAssetsUsage

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