Add hit points to unit yamls.

This PR:

- Introduces a new member of UnitType, hit_points, which is an abstract
representation of the durability of a unit, and loads it in from the
YAML files in the various subclasses (Ship, Ground etc).
- Adds scripts for populating/updating the unit YAML files with hit
point data from DCS. This script also gets the data for static objects,
but I'll leave the plugging in of static object data into Liberation for
another PR.
- Updates the unit YAML files by running the above scripts.

I did toy with the idea of adding this data to the unit definitions in
pydcs via an export from DCS, but it would be a more involved change,
since the current pydcs export script runs in the Hooks Lua environment
in DCS and AFAICT the hit points (via Unit.getLife()) is run in the
mission scripting environment.
This commit is contained in:
zhexu14
2024-01-04 19:49:33 +11:00
committed by GitHub
parent 5b858886c0
commit 5af4e56f30
384 changed files with 616 additions and 38 deletions

View File

@@ -2,3 +2,4 @@ class: EarlyWarningRadar
price: 30
variants:
EWR 1L13: null
hit_points: 2

View File

@@ -3,3 +3,4 @@ price: 0
spawn_weight: 1
variants:
Mortar 2B11 120mm: null
hit_points: 1

View File

@@ -12,3 +12,4 @@ price: 30
role: Self-Propelled Anti-Aircraft System
variants:
SA-19 Grison (2K22 Tunguska): {}
hit_points: 4

View File

@@ -2,3 +2,4 @@ class: EarlyWarningRadar
price: 30
variants:
EWR 55G6: null
hit_points: 2

View File

@@ -2,3 +2,4 @@ class: Launcher
price: 6
variants:
SAM SA-3 S-125 "Goa" LN: null
hit_points: 2

View File

@@ -16,3 +16,4 @@ price: 10
role: Amphibious Armoured Personnel Carrier
variants:
AAVP-7A1 'Amtrac': {}
hit_points: 4

View File

@@ -13,3 +13,4 @@ price: 8
role: Airborne Amphibious Infantry Fighting Vehicle
variants:
BMD-1: {}
hit_points: 3

View File

@@ -13,3 +13,4 @@ price: 14
role: Amphibious Infantry Fighting Vehicle
variants:
BMP-1: {}
hit_points: 5

View File

@@ -11,3 +11,4 @@ price: 16
role: Amphibious Infantry Fighting Vehicle
variants:
BMP-2: {}
hit_points: 5

View File

@@ -10,3 +10,4 @@ price: 18
role: Amphibious Infantry Fighting Vehicle
variants:
BMP-3: {}
hit_points: 5

View File

@@ -14,3 +14,4 @@ price: 6
role: Amphibious Armoured Car
variants:
BRDM-2: {}
hit_points: 3

View File

@@ -12,3 +12,4 @@ price: 8
role: Amphibious Armoured Personnel Carrier
variants:
BTR-80: {}
hit_points: 3

View File

@@ -12,3 +12,4 @@ price: 10
role: Amphibious Armoured Personnel Carrier
variants:
BTR-82A: {}
hit_points: 3

View File

@@ -12,3 +12,4 @@ price: 6
role: Airborne Amphibious Armoured Personnel Carrier
variants:
BTR-D: {}
hit_points: 4

View File

@@ -2,3 +2,4 @@ class: Logistics
price: 1
variants:
Truck Bedford: null
hit_points: 2

View File

@@ -2,3 +2,4 @@ class: Logistics
price: 1
variants:
Truck Opel Blitz: null
hit_points: 3

View File

@@ -2,3 +2,4 @@ class: Logistics
price: 1
variants:
Truck GMC "Jimmy" 6x6 Truck: null
hit_points: 3

View File

@@ -11,3 +11,4 @@ price: 10
role: Cruiser Tank
variants:
A27L Cruiser Tank MK VIII Centaur IV: {}
hit_points: 12

View File

@@ -12,3 +12,4 @@ price: 25
role: Main Battle Tank
variants:
FV4034 Challenger 2: {}
hit_points: 32

View File

@@ -9,3 +9,4 @@ price: 20
role: Main Battle Tank
variants:
Chieftain Mk.3: {}
hit_points: 20

View File

@@ -11,3 +11,4 @@ price: 16
role: Infantry Tank
variants:
A22 Infantry Tank MK IV Churchill VII: {}
hit_points: 13

View File

@@ -8,3 +8,4 @@ price: 4
role: Recon
variants:
Cobra: {}
hit_points: 2

View File

@@ -11,3 +11,4 @@ price: 12
role: Cruiser Tank
variants:
A27M Cruiser Tank MK VIII Cromwell IV: {}
hit_points: 12

View File

@@ -12,3 +12,4 @@ price: 8
role: Recon
variants:
Daimler Armoured Car Mk I: {}
hit_points: 4

View File

@@ -2,3 +2,4 @@ class: EarlyWarningRadar
price: 10
variants:
MCC-SR Sborka "Dog Ear" SR: null
hit_points: 3

View File

@@ -12,3 +12,4 @@ price: 18
role: Tank Destroyer
variants:
Sd.Kfz.184 Elefant: {}
hit_points: 20

View File

@@ -1,4 +1,5 @@
class: EarlyWarningRadar
price: 30
variants:
EWR AN/FPS-117 Radar (domed): null
EWR AN/FPS-117 Radar (domed): null
hit_points: 2

View File

@@ -1,4 +1,5 @@
class: EarlyWarningRadar
price: 30
variants:
EWR AN/FPS-117 Radar: null
EWR AN/FPS-117 Radar: null
hit_points: 2

View File

@@ -2,3 +2,4 @@ class: SearchLight
price: 4
variants:
SL Flakscheinwerfer 37: null
hit_points: 2

View File

@@ -2,3 +2,4 @@ class: EarlyWarningRadar
price: 25
variants:
EWR FuMG-401 Freya LZ: null
hit_points: 30

View File

@@ -2,3 +2,4 @@ class: Logistics
price: 2
variants:
Truck GAZ-3307: null
hit_points: 1

View File

@@ -2,3 +2,4 @@ class: Logistics
price: 1
variants:
Truck GAZ-3308: null
hit_points: 1

View File

@@ -2,3 +2,4 @@ class: Logistics
price: 1
variants:
Truck GAZ-66: null
hit_points: 2

View File

@@ -14,3 +14,4 @@ price: 24
role: Self-Propelled Anti-Aircraft Gun
variants:
Flakpanzer Gepard: {}
hit_points: 20

View File

@@ -8,3 +8,4 @@ price: 15
role: Multiple-Launch Rocket System
variants:
BM-21 Grad: {}
hit_points: 2

View File

@@ -2,3 +2,4 @@ class: Artillery
price: 4
variants:
Grad MRL FDDM (FC): null
hit_points: 3

View File

@@ -15,4 +15,5 @@ origin: USA
price: 12
role: Self-Propelled Anti-Aircraft Gun
variants:
Centurion C-RAM LPWS: {}
Centurion C-RAM LPWS: {}
hit_points: 3

View File

@@ -2,4 +2,5 @@ class: Artillery
price: 10
role: Multiple-Launch Rocket System
variants:
MLRS HL with B8M1 80mm: {}
MLRS HL with B8M1 80mm: {}
hit_points: 1

View File

@@ -2,4 +2,5 @@ class: APC
price: 4
role: Recon
variants:
Scout HL with DSHK 12.7mm: {}
Scout HL with DSHK 12.7mm: {}
hit_points: 1

View File

@@ -2,4 +2,5 @@ class: APC
price: 4
role: Recon
variants:
Scout HL with KORD 12.7mm: {}
Scout HL with KORD 12.7mm: {}
hit_points: 1

View File

@@ -1,4 +1,5 @@
class: AAA
price: 6
variants:
SPAAA HL with ZU-23: null
SPAAA HL with ZU-23: null
hit_points: 1

View File

@@ -11,3 +11,4 @@ price: 20
role: Shorad
variants:
HQ-7 Launcher: {}
hit_points: 2

View File

@@ -2,3 +2,4 @@ class: SearchTrackRadar
price: 24
variants:
HQ-7 Self-Propelled STR: null
hit_points: 2

View File

@@ -2,3 +2,4 @@ class: SpecializedRadar
price: 20
variants:
SAM Hawk CWAR AN/MPQ-55: null
hit_points: 2

View File

@@ -2,3 +2,4 @@ class: Launcher
price: 8
variants:
SAM Hawk LN M192: null
hit_points: 2

View File

@@ -2,3 +2,4 @@ class: CommandPost
price: 14
variants:
SAM Hawk Platoon Command Post (PCP): null
hit_points: 2

View File

@@ -2,3 +2,4 @@ class: SearchRadar
price: 18
variants:
SAM Hawk SR (AN/MPQ-50): null
hit_points: 2

View File

@@ -2,3 +2,4 @@ class: TrackRadar
price: 14
variants:
SAM Hawk TR (AN/MPQ-46): null
hit_points: 2

View File

@@ -2,3 +2,4 @@ class: Logistics
price: 1
variants:
LUV Horch 901 Staff Car: null
hit_points: 3

View File

@@ -3,3 +3,4 @@ spawn_weight: 1
price: 0
variants:
MANPADS SA-18 Igla "Grouse" Ins: null
hit_points: 1

View File

@@ -3,3 +3,4 @@ price: 0
spawn_weight: 3
variants:
Insurgent AK-74: null
hit_points: 1

View File

@@ -3,3 +3,4 @@ price: 0
spawn_weight: 4
variants:
Infantry AK-74 Rus: null
hit_points: 1

View File

@@ -8,3 +8,4 @@ price: 11
role: Tank Destroyer
variants:
Jagdpanzer IV: {}
hit_points: 15

View File

@@ -10,3 +10,4 @@ price: 18
role: Tank Destroyer
variants:
Jagdpanther G1: {}
hit_points: 15

View File

@@ -2,3 +2,4 @@ class: Logistics
price: 1
variants:
Truck KAMAZ 43101: null
hit_points: 2

View File

@@ -2,3 +2,4 @@ class: AAA
price: 8
variants:
AAA SP Kdo.G.40: null
hit_points: 1

View File

@@ -2,3 +2,4 @@ class: AAA
price: 10
variants:
AAA 100mm KS-19: null
hit_points: 4

View File

@@ -2,3 +2,4 @@ class: SearchTrackRadar
price: 22
variants:
SAM SA-6 Kub "Straight Flush" STR: null
hit_points: 4

View File

@@ -2,3 +2,4 @@ class: TELAR
price: 20
variants:
SAM SA-6 Kub "Gainful" TEL: null
hit_points: 4

View File

@@ -2,3 +2,4 @@ class: Logistics
price: 1
variants:
LUV Kubelwagen 82: null
hit_points: 2

View File

@@ -9,3 +9,4 @@ price: 7
role: Amphibious Armoured Car
variants:
LAV-25: {}
hit_points: 4

View File

@@ -2,3 +2,4 @@ class: Logistics
price: 1
variants:
Truck Land Rover 101 FC: null
hit_points: 3

View File

@@ -2,3 +2,4 @@ class: Logistics
price: 1
variants:
LUV Land Rover 109: null
hit_points: 3

View File

@@ -7,3 +7,4 @@ price: 5
role: Field Howitzer
variants:
FH LeFH-18 105mm: {}
hit_points: 2

View File

@@ -15,3 +15,4 @@ price: 25
role: Main Battle Tank
variants:
"Leclerc S\xE9ries 2": {}
hit_points: 32

View File

@@ -16,4 +16,5 @@ price: 25
role: Main Battle Tank
variants:
Leopard 2: {}
Leopard 2A6M: {}
Leopard 2A6M: {}
hit_points: 32

View File

@@ -16,3 +16,4 @@ price: 22
role: Main Battle Tank
variants:
Leopard 2A5: {}
hit_points: 32

View File

@@ -16,3 +16,4 @@ price: 18
role: Main Battle Tank
variants:
Leopard 1A3: {}
hit_points: 20

View File

@@ -2,3 +2,4 @@ class: Logistics
price: 3
variants:
Truck M818 6x6: null
hit_points: 2

View File

@@ -16,3 +16,4 @@ price: 25
role: Main Battle Tank
variants:
M1A2 Abrams: {}
hit_points: 32

View File

@@ -8,3 +8,4 @@ price: 25
role: Self-Propelled Gun
variants:
M109A6 Paladin: {}
hit_points: 3

View File

@@ -15,3 +15,4 @@ price: 6
role: Armoured Personnel Carrier
variants:
M113: {}
hit_points: 3

View File

@@ -18,3 +18,4 @@ price: 12
role: Infantry Fighting Vehicle
variants:
M2A2 Bradley: {}
hit_points: 6

View File

@@ -23,3 +23,4 @@ price: 16
role: Main Battle Tank
variants:
M60A3 "Patton": {}
hit_points: 20

View File

@@ -9,3 +9,4 @@ price: 2
role: Recon
variants:
M1043 HMMWV (M2 HMG): {}
hit_points: 2

View File

@@ -9,3 +9,4 @@ price: 8
role: Armoured Car
variants:
M1045 HMMWV (BGM-71 TOW): {}
hit_points: 2

View File

@@ -10,3 +10,4 @@ price: 20
role: Self-Propelled Surface-to-Air Missile Launcher
variants:
M1097 Heavy HMMWV Avenger: {}
hit_points: 2

View File

@@ -14,3 +14,4 @@ role: Tank Destroyer
variants:
3in SPM M10 Achilles Mk II: {}
M10 3-inch Gun Motor Carriage: {}
hit_points: 10

View File

@@ -8,3 +8,4 @@ price: 10
role: Armoured Personnel Carrier
variants:
M1126 Stryker ICV (M2 HMG): {}
hit_points: 4

View File

@@ -10,3 +10,4 @@ price: 14
role: Armoured Car
variants:
M1128 Stryker Mobile Gun System: {}
hit_points: 4

View File

@@ -8,3 +8,4 @@ price: 12
role: Armoured Car
variants:
M1134 Stryker ATGM (BGM-71 TOW): {}
hit_points: 4

View File

@@ -9,3 +9,4 @@ price: 10
role: Self-Propelled Gun
variants:
M12 Gun Motor Carriage: {}
hit_points: 15

View File

@@ -12,3 +12,4 @@ price: 7
role: Anti-Aircraft Gun
variants:
M1 37mm Gun: {}
hit_points: 2

View File

@@ -7,3 +7,4 @@ price: 10
role: Field Howitzer
variants:
FH M2A1 105mm: {}
hit_points: 2

View File

@@ -8,3 +8,4 @@ price: 4
role: Armoured Personnel Carrier
variants:
M2A1 Half-Track: {}
hit_points: 7

View File

@@ -11,3 +11,4 @@ price: 2
role: Tracked Cargo Transporter
variants:
M30 Cargo Carrier: {}
hit_points: 15

View File

@@ -13,3 +13,4 @@ price: 4
role: Anti-Aircraft Gun
variants:
M45 Quadmount: {}
hit_points: 1

View File

@@ -10,3 +10,4 @@ price: 16
role: Self-Propelled Surface-to-Air Missile Launcher
variants:
M48 Chaparral: {}
hit_points: 2

View File

@@ -11,3 +11,4 @@ role: Medium Tank
variants:
M4A4 Sherman Firefly: {}
Sherman Firefly VC: {}
hit_points: 15

View File

@@ -13,3 +13,4 @@ role: Medium Tank
variants:
M4A2(75) Sherman: {}
Sherman III: {}
hit_points: 15

View File

@@ -8,3 +8,4 @@ price: 2
role: Tracked Cargo Transporter
variants:
M4 High-Speed Tractor: {}
hit_points: 4

View File

@@ -15,3 +15,4 @@ price: 18
role: Self-Propelled Anti-Aircraft System
variants:
M6 Linebacker: {}
hit_points: 6

View File

@@ -10,3 +10,4 @@ price: 8
role: Light Armoured Car
variants:
M8 Greyhound Light Armored Car: {}
hit_points: 4

View File

@@ -13,3 +13,4 @@ price: 10
role: Infantry Fighting Vehicle
variants:
FV510 Warrior: {}
hit_points: 5

View File

@@ -12,3 +12,4 @@ price: 55
role: Multiple-Launch Rocket System
variants:
M270 Multiple Launch Rocket System: {}
hit_points: 3

View File

@@ -14,3 +14,4 @@ price: 4
role: Armoured Personnel Carrier
variants:
MT-LB: {}
hit_points: 3

View File

@@ -21,3 +21,4 @@ price: 10
role: Infantry Fighting Vehicle
variants:
Marder 1A3: {}
hit_points: 5

View File

@@ -2,3 +2,4 @@ class: Logistics
price: 10
variants:
PU Maschinensatz_33: null
hit_points: 2

View File

@@ -12,3 +12,4 @@ price: 25
role: Main Battle Tank
variants:
Merkava Mk IV: {}
hit_points: 20

View File

@@ -7,3 +7,4 @@ manufacturer: Kongsberg Defence & Aerospace, Raytheon
origin: Norway, USA
variants:
SAM NASAMS C2: null
hit_points: 2

Some files were not shown because too many files have changed in this diff Show More