DCS func getResourceMap

From DCS World Wiki - Hoggitworld.com
Revision as of 18:29, 16 August 2023 by Grimes (talk | contribs) (Created page with "{{Template:dcs_funcs |fName= getResourceMap |vNum= 2.8.8 |par1= Airbase |par2= |par3= |par4= |desc= Returns the wsType of every object that exis...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Scripting Root

Envrioment: Mission Scripting
Function: getResourceMap Added with: 2.8.8
Member Of: Airbase
Syntax: table Airbase.getResourceMap(Class self )
Description: Returns the wsType of every object that exists in DCS. A wsType is a table consisting of 4 entries indexed numerically. It can be used to broadly categorize object types. The table can be broken down as: {mainCategory, subCat1, subCat2, index}

A vague breakdown of the wsTypes:

  1 : Aircraft
     1: Airplanes
         1: Fighters
         2: Fast Bombers
         3: Interceptors
         4: Bombers
         5: Misc support
         6: Attack 
     2: Helicopters
  2 : Vehicles
  3 : Ships
  4 : Weapons


For example all 3 A-10 aircraft in game will have a wsType of {1, 1, 6, n} where n is whichever index the unit happens to be in.

There are several items that have a wsType of {0, 0, 0, 0}. Typically these include shells, static objects, and turrets.


Return Value: table
Return Example:
Examples:
Related Functions: Warehouse Functions: addItem, getItemCount, setItem, removeItem, addLiquid, getLiquidAmount, setLiquidAmount, removeLiquid, getOwner, getInventory
Notes: