Jump to content

Make cargo (sling load) work again.. I challenge you :)


Recommended Posts

Posted (edited)

I like to have cargo function again like it did in november 2014. We are almost a year further and it still does not work properly. I do not know if it is overComplex or just ignored, but. Fortunately DCS is mainly .lua so it's open and readable. If you are smarter then I (and you are) please help and read on.

 

The problem

Cargo seems to work for the most part. Only damaged cargo still "can cargo" and cargo cannot be deleted. Let's only focus on deleting cargo.

The wild assumption?

Could it be that cargo can't be deleted because there is an array in the "static" object, which makes deleting an illegal action?

 

Hunting a bug?

I started to open files in DCS to see where, what is and how it may work. I do not know how those .lua files intertwine and I am stuck on the part below. It is a part of file: ..\DCS beta\Scripts\Database\db_units_ground.lua. Row 44-78.

 

--------------------------------------------------------------------------------

local function cargo( name, displayName, shape, rate, mass,attribute, minMass, maxMass)

local res = {};

 

res.Name = name;

res.DisplayName = displayName;

res.ShapeName = shape;

res.Rate = rate;

res.mass = mass;

res.mapclasskey = "P0091000352";

res.attribute =attribute

res.minMass = minMass

res.maxMass = maxMass

res.couldCargo = true

res.category = 'Cargo'

 

 

table.insert(db.Units.Cargos.Cargo, res);

end

 

db.Units.Fortifications = {};

db.Units.Fortifications.Fortification = {};

db.Units.Fortifications.DefaultCategories = { gnd_cat("{7F1597F0-88EB-41cb-A04E-E9A4D5EF7466}", "Buildings") }

db.Units.Fortifications.Tasks = { task(_("Nothing"), "15") }

 

db.Units.GroundObjects = {};

db.Units.GroundObjects.DefaultCategories = { gnd_cat("{AB46BAAE-F87E-40f9-A4F6-9F045251E14D}", "Ground Object") }

db.Units.GroundObjects.GroundObject = {};

 

db.Units.Warehouses = {}

db.Units.Warehouses.Warehouse = {}

 

db.Units.Cargos = {}

db.Units.Cargos.Cargo = {}

 

cargo( "Cargo1", _("Cargo1"), "ab-212_cargo", 100, 1000, {"Cargos"}, 100, 10000 );

--------------------------------------------------------------------------------

 

The question

What is [attribute] in function cargo and how does it relate to [{"Cargos"}] in table cargo?

 

 

 

Thx,

.

Edited by piXel496
.........lost focus
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...