Jump to content

Recommended Posts

Posted

Anyone able to tell me what the numbers in red mean in the missile.lua sections:

GT_t.LN_t.Malutka.PL[1].type_ammunition={4,4,11,127};

GT_t.LN_t.Malutka.PL[1].name_ammunition=_("9M14")

 

I just cannot figure out what they are, the first two dont seem to change, the last one, more often. Thought it related to weapon ID but no apparently.

___________________________________________________________________________

SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING *

Posted (edited)

.type_ammunition = {4,4,11,127}

 

represents the hierarchy of the weapon in DCS. There are 4 levels of hierarchy in the definition tree, and each level depends on the one before it.

 

All weapons begin with 4. Within weapons, missiles are 4 (so 4,4,...) . Within missiles, surface-to-surface missiles use 11, so 4,4,11. Then the 9M14 is instance #127.

 

These numbers are defined in wsTypes.lua:

 

-- **************** 1 level ***************
wsType_Weapon   = 4

-- **************** 2 level ***************
wsType_Missile    = 4

-- **************** 3 level ***************
wsType_SS_Missile = 11

--------------------------------------------------------------------------------
-- Surface-to-Surface Missiles. Ðàêåòû ïîâåðõíîñòü-ïîâåðõíîñòü
MALUTKA   = 127; -- Ðàêåòà Ìàëþòêà ÁÌÄ-1 è ÁÌÏ-1

 

As matches the name, it's a 9M14 surface-to-surface missile.

 

https://en.wikipedia.org/wiki/9M14_Malyutka

 

When adding your own weapons, if you get the first 3 digits correct for the class of weapon you're adding, it tells the engine what data to expect for the specific weapon definition table. Unless you're copying an existing weapon, you'd use WSTYPE_PLACEHOLDER as the 4th digit, which tells the loading engine to add a new entry to _G using your entry data.

 

--gos

Edited by gospadin
  • Like 1
  • Recently Browsing   0 members

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