Miz warehouses structure

From DCS World Wiki - Hoggitworld.com

Intro

The warehouses file is a lua table present within a .miz file that is accessible to the scripting engine. Unfortunately at the time of writing DCS 2.8 there still is no trigger or scripting access to modify the contents of warehouses since their introduction with DCS 1.2.2 in 2012.

Notes

Data and Samples

The data structure for each of the following is the same, however there are two main categories that represent airbases placed on the map and static objects, FARPs, and ships that are warehouses.

   airports = {
      [airbaseId] = warehouseTable,
   },
   warehouses = {
      [unitId] = warehouseTable,
   },

warehouseTable samples

            ["gasoline"] = 
            {
                ["InitFuel"] = 100,
            }, -- end of ["gasoline"]
            ["unlimitedMunitions"] = true,
            ["methanol_mixture"] = 
            {
                ["InitFuel"] = 100,
            }, -- end of ["methanol_mixture"]
            ["OperatingLevel_Air"] = 10,
            ["diesel"] = 
            {
                ["InitFuel"] = 100,
            }, -- end of ["diesel"]
            ["speed"] = 16.666666,
            ["size"] = 100,
            ["periodicity"] = 30,
            ["suppliers"] = 
            {
                [1] = 
                {
                    ["Id"] = 23,
                    ["type"] = "airports",
                }, -- end of [1]
            }, -- end of ["suppliers"]
            ["coalition"] = "blue",
            ["jet_fuel"] = 
            {
                ["InitFuel"] = 100,
            }, -- end of ["jet_fuel"]
            ["OperatingLevel_Eqp"] = 10,
            ["unlimitedFuel"] = true,
            ["aircrafts"] = 
            {
            }, -- end of ["aircrafts"]
            ["weapons"] = 
            {
            }, -- end of ["weapons"]
            ["OperatingLevel_Fuel"] = 10,
            ["unlimitedAircrafts"] = true,

Aircraft Sample

The aircrafts table contains two tables with keys helicopters and planes with each type indexed within.

Aircraft are indexed by the unit typename. It is unknown if the wsType value plays a role in whether or not the warehouse would function correctly.

            ["aircrafts"] = 
            {
                ["helicopters"] = 
                {
                    ["AH-64D_BLK_II"] = 
                    {
                        ["wsType"] = 
                        {
                            [1] = 1,
                            [2] = 2,
                            [3] = 6,
                            [4] = 300,
                            [5] = "Attack helicopters",
                            [6] = "All",
                            [7] = "NonAndLightArmoredUnits",
                            [8] = "NonArmoredUnits",
                            [9] = "Air",
                            [10] = "Helicopters",
                        }, -- end of ["wsType"]
                        ["initialAmount"] = 100,
                    }, -- end of ["AH-64D_BLK_II"]
               },
               ["planes"] = {

               },
          },


Weapons Sample

Weapons are indexed numerically. The "type" is gathered from the wsType parameters. It is possible for these to change from patch to patch. As a result the warehouse system can break and mix up values.

            ["weapons"] = 
            {
                [1] = 
                {
                    ["wsType"] = 
                    {
                        [1] = 1,
                        [2] = 3,
                        [3] = 43,
                        [4] = 10,
                    }, -- end of ["wsType"]
                    ["initialAmount"] = 100,
                }, -- end of [1]