DCS enum weapon

From DCS World Wiki - Hoggitworld.com
Revision as of 00:46, 4 January 2023 by Loophole 62ndFF (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Scripting Root

Enumerator: Weapon Added with: 1.2.0
Description: The Weapon enumerator contains tables used to identify the capabilities and types of a particular weapon. Additionally the Weapon.flag table is large table that defines every category of weapon.

Weapon.flag information is available in its own article.

Uses: The Weapon.flag enumerators are commonly used to define the weapons the AI are allowed to use for a given task. Alternatively information like category or guidance type can be used as generalized criteria for assorted scripts. For example instead of making a table of every single laser guided missile you can simply check its guidance type.
Format: Tables are formatted as.

Weapon.Category = {
  SHELL,
  MISSILE,
  ROCKET,
  BOMB,
  TORPEDO
}

Guidance type is available for all missiles and some bombs

Weapon.GuidanceType = {
  INS,
  IR,
  RADAR_ACTIVE,
  RADAR_SEMI_ACTIVE,
  RADAR_PASSIVE,
  TV,
  LASER,
  TELE
}

Weapon.MissileCategory = {
  AAM,
  SAM,
  BM,
  ANTI_SHIP,
  CRUISE,
  OTHER
}

<code>

Weapon.WarheadType = {
  AP,
  HE,
  SHAPED_EXPLOSIVE
}

constants: Weapon.Category
0 = SHELL
1 = MISSILE
2 = ROCKET
3 = BOMB
tbd = TORPEDO

Guidance Types

1 = INS
2 = IR
3 = RADAR_ACTIVE
4 = RADAR_SEMI_ACTIVE
5 = RADAR_PASSIVE
6 = TV
7 = LASER
8 = TELE        

Missile Types

1 = AAM 
2 = SAM
3 = BM
4 = ANTI_SHIP
5 = CRUISE
6 = OTHER        

Warhead Types

0 = AP
1 = HE
2 = SHAPED_CHARGE
notes: