MiG-31BM by szcz mod support (#496)

* Add files via upload

* Add files via upload

* Update start_generator.py

* Update faction.py

* Update QNewGameWizard.py

* Update QGeneratorSettings.py

* Add files via upload

* Add files via upload

* Add files via upload

* Add files via upload

* Update MiG-31BM.lua

* Added SEAD Escort to MiG-31BM.yaml

* mig31bm.py fixed weapon injection

* Update mig31bm.py

formatted black

* Update faction.py

reformatted black

* Update start_generator.py

reformatted black

* Update __init__.py

* Update QGeneratorSettings.py

reformatted black

* added support for MiG-31BM mod

* Commit changes which can't seem to be discarded...

* Remove (presumably) accidentally copied file

* Remove unused imports

---------

Co-authored-by: Raffson <Raffson@users.noreply.github.com>
This commit is contained in:
szcz13 2025-04-05 22:19:22 +02:00 committed by GitHub
parent 1520c8c3a3
commit ffaf905bf6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 375 additions and 0 deletions

View File

@ -55,6 +55,7 @@
* **[Modding]** Support for CurrentHill's USA Asset Pack (v1.1.5)
* **[Modding]** Update CJS Super Hornet to 2.4.2
* **[Modding]** Support for Cowboy's E-7A Wedgetail mod (Supports EW Script Offensive Jamming)
* **[Modding]** Support for szcz's MiG-31BM (v2.0)
* **[Plugins]** Added initial AI support for EW Script 2.0
## Fixes

View File

@ -862,6 +862,9 @@ class Faction:
# CLP E7a Wedgetail Mod
if not mod_settings.e7a_wedgetail:
self.remove_aircraft("CLP_E7a")
# MiG-31BM
if not mod_settings.mig31bm_foxhound:
self.remove_aircraft("MiG-31BM")
def remove_aircraft(self, name: str) -> None:
for aircraft_set in [self.aircraft, self.awacs, self.tankers]:

View File

@ -107,6 +107,7 @@ class ModSettings:
russianmilitaryassetspack: bool = False
usamilitaryassetspack: bool = False
ukrainemilitaryassetspack: bool = False
mig31bm_foxhound: bool = False
class GameGenerator:

View File

@ -0,0 +1 @@
from .mig31bm import *

View File

@ -0,0 +1,151 @@
from typing import Set
from dcs import task
from dcs.planes import PlaneType
from dcs.weapons_data import Weapons
from game.modsupport import planemod
from pydcs_extensions.weapon_injector import inject_weapons
class WeaponsMiG31BM:
Vympel_R_33__AA_9_Amos_ = {
"clsid": "{R-33}",
"name": "Vympel R-33 (AA-9 Amos)",
"weight": 490,
}
Vympel_R_37M__AA_13_Axehead_ = {
"clsid": "{R-37M}",
"name": "Vympel R-37M (AA-13 Axehead)",
"weight": 600,
}
Vympel_R_37__AA_13_Axehead_ = {
"clsid": "{R-37}",
"name": "Vympel R-37 (AA-13 Axehead)",
"weight": 600,
}
inject_weapons(WeaponsMiG31BM)
@planemod
class MiG_31BM(PlaneType):
id = "MiG-31BM"
flyable = True
height = 5.15
width = 13.64
length = 22.69
fuel_max = 17730
max_speed = 3120.012
chaff = 120
flare = 100
charge_total = 220
chaff_charge_size = 1
flare_charge_size = 1
category = "Interceptor" # {78EFB7A2-FD52-4b57-A6A6-3BF0E1D6555F}
livery_name = "MIG-31BM" # from type
class Pylon1:
R_73__AA_11_Archer____Infra_Red = (1, Weapons.R_73__AA_11_Archer____Infra_Red)
R_77__AA_12_Adder____Active_Rdr = (1, Weapons.R_77__AA_12_Adder____Active_Rdr)
class Pylon2:
R_73__AA_11_Archer____Infra_Red = (2, Weapons.R_73__AA_11_Archer____Infra_Red)
R_77__AA_12_Adder____Active_Rdr = (2, Weapons.R_77__AA_12_Adder____Active_Rdr)
Vympel_R_37M__AA_13_Axehead_ = (2, WeaponsMiG31BM.Vympel_R_37M__AA_13_Axehead_)
Vympel_R_37__AA_13_Axehead_ = (2, WeaponsMiG31BM.Vympel_R_37__AA_13_Axehead_)
Vympel_R_33__AA_9_Amos_ = (2, WeaponsMiG31BM.Vympel_R_33__AA_9_Amos_)
R_40RD__AA_6_Acrid____Semi_Act_Rdr = (
2,
Weapons.R_40RD__AA_6_Acrid____Semi_Act_Rdr,
)
R_40TD__AA_6_Acrid____Infra_Red = (2, Weapons.R_40TD__AA_6_Acrid____Infra_Red)
APU_60_2M_with_2_x_R_60M__AA_8_Aphid_B____IR_AAM__ = (
2,
Weapons.APU_60_2M_with_2_x_R_60M__AA_8_Aphid_B____IR_AAM__,
)
R_27ET__AA_10_Alamo_D____IR_Extended_Range = (
2,
Weapons.R_27ET__AA_10_Alamo_D____IR_Extended_Range,
)
R_27ER__AA_10_Alamo_C____Semi_Act_Extended_Range = (
2,
Weapons.R_27ER__AA_10_Alamo_C____Semi_Act_Extended_Range,
)
Fuel_tank_3000L = (2, Weapons.Fuel_tank_3000L)
Fuel_tank_2000L = (2, Weapons.Fuel_tank_2000L)
Kh_31P__AS_17_Krypton____600kg__ARM__IN__Pas_Rdr = (
2,
Weapons.Kh_31P__AS_17_Krypton____600kg__ARM__IN__Pas_Rdr,
)
class Pylon3:
Vympel_R_37M__AA_13_Axehead_ = (3, WeaponsMiG31BM.Vympel_R_37M__AA_13_Axehead_)
Vympel_R_37__AA_13_Axehead_ = (3, WeaponsMiG31BM.Vympel_R_37__AA_13_Axehead_)
Vympel_R_33__AA_9_Amos_ = (3, WeaponsMiG31BM.Vympel_R_33__AA_9_Amos_)
class Pylon4:
Vympel_R_37M__AA_13_Axehead_ = (4, WeaponsMiG31BM.Vympel_R_37M__AA_13_Axehead_)
Vympel_R_37__AA_13_Axehead_ = (4, WeaponsMiG31BM.Vympel_R_37__AA_13_Axehead_)
Vympel_R_33__AA_9_Amos_ = (4, WeaponsMiG31BM.Vympel_R_33__AA_9_Amos_)
class Pylon5:
Vympel_R_37M__AA_13_Axehead_ = (5, WeaponsMiG31BM.Vympel_R_37M__AA_13_Axehead_)
Vympel_R_37__AA_13_Axehead_ = (5, WeaponsMiG31BM.Vympel_R_37__AA_13_Axehead_)
Vympel_R_33__AA_9_Amos_ = (5, WeaponsMiG31BM.Vympel_R_33__AA_9_Amos_)
class Pylon6:
Vympel_R_37M__AA_13_Axehead_ = (6, WeaponsMiG31BM.Vympel_R_37M__AA_13_Axehead_)
Vympel_R_37__AA_13_Axehead_ = (6, WeaponsMiG31BM.Vympel_R_37__AA_13_Axehead_)
Vympel_R_33__AA_9_Amos_ = (6, WeaponsMiG31BM.Vympel_R_33__AA_9_Amos_)
class Pylon7:
R_73__AA_11_Archer____Infra_Red = (7, Weapons.R_73__AA_11_Archer____Infra_Red)
R_77__AA_12_Adder____Active_Rdr = (7, Weapons.R_77__AA_12_Adder____Active_Rdr)
Vympel_R_37M__AA_13_Axehead_ = (7, WeaponsMiG31BM.Vympel_R_37M__AA_13_Axehead_)
Vympel_R_37__AA_13_Axehead_ = (7, WeaponsMiG31BM.Vympel_R_37__AA_13_Axehead_)
Vympel_R_33__AA_9_Amos_ = (7, WeaponsMiG31BM.Vympel_R_33__AA_9_Amos_)
R_40RD__AA_6_Acrid____Semi_Act_Rdr = (
7,
Weapons.R_40RD__AA_6_Acrid____Semi_Act_Rdr,
)
R_40TD__AA_6_Acrid____Infra_Red = (7, Weapons.R_40TD__AA_6_Acrid____Infra_Red)
APU_60_2M_with_2_x_R_60M__AA_8_Aphid_B____IR_AAM___ = (
7,
Weapons.APU_60_2M_with_2_x_R_60M__AA_8_Aphid_B____IR_AAM___,
)
R_27ET__AA_10_Alamo_D____IR_Extended_Range = (
7,
Weapons.R_27ET__AA_10_Alamo_D____IR_Extended_Range,
)
R_27ER__AA_10_Alamo_C____Semi_Act_Extended_Range = (
7,
Weapons.R_27ER__AA_10_Alamo_C____Semi_Act_Extended_Range,
)
Fuel_tank_3000L = (7, Weapons.Fuel_tank_3000L)
Fuel_tank_2000L = (7, Weapons.Fuel_tank_2000L)
Kh_31P__AS_17_Krypton____600kg__ARM__IN__Pas_Rdr = (
7,
Weapons.Kh_31P__AS_17_Krypton____600kg__ARM__IN__Pas_Rdr,
)
class Pylon8:
R_73__AA_11_Archer____Infra_Red = (8, Weapons.R_73__AA_11_Archer____Infra_Red)
R_77__AA_12_Adder____Active_Rdr = (8, Weapons.R_77__AA_12_Adder____Active_Rdr)
pylons: Set[int] = {1, 2, 3, 4, 5, 6, 7, 8}
tasks = [
task.CAP,
task.Intercept,
task.Escort,
task.FighterSweep,
task.Reconnaissance,
task.GroundAttack,
task.AntishipStrike,
task.SEAD,
]
task_default = task.CAP

View File

@ -130,6 +130,7 @@ class NewGameWizard(QtWidgets.QWizard):
russianmilitaryassetspack=self.field("russianmilitaryassetspack"),
usamilitaryassetspack=self.field("usamilitaryassetspack"),
ukrainemilitaryassetspack=self.field("ukrainemilitaryassetspack"),
mig31bm_foxhound=self.field("mig31bm_foxhound"),
)
blue_faction = self.faction_selection_page.selected_blue_faction

View File

@ -172,6 +172,8 @@ class GeneratorOptions(QtWidgets.QWizardPage):
self.registerField("usamilitaryassetspack", self.usamilitaryassetspack)
self.ukrainemilitaryassetspack = QtWidgets.QCheckBox()
self.registerField("ukrainemilitaryassetspack", self.ukrainemilitaryassetspack)
self.mig31bm_foxhound = QtWidgets.QCheckBox()
self.registerField("mig31bm_foxhound", self.mig31bm_foxhound)
modHelpText = QtWidgets.QLabel(
"<p>Select the mods you have installed. If your chosen factions support them, you'll be able to use these mods in your campaign.</p>"
@ -239,6 +241,7 @@ class GeneratorOptions(QtWidgets.QWizardPage):
("Super Étendard (v2.5.5)", self.super_etendard),
("UH-60L Black Hawk (v1.3.1)", self.uh_60l),
("Vietnam War Vessels (v0.9.0 by TeTeT)", self.vietnamwarvessels),
("MiG-31BM (v2.0)", self.mig31bm_foxhound),
]
for i in range(len(mod_pairs)):

View File

@ -0,0 +1,191 @@
local unitPayloads = {
["name"] = "MiG-31BM",
["payloads"] = {
[1] = {
["displayName"] = "R-77*2 R-37M*4 R27ER*2 ",
["name"] = "R-77*2 R-37M*4 R27ER*2 ",
["pylons"] = {
[1] = {
["CLSID"] = "{FBC29BFE-3D24-4C64-B81D-941239D12249}",
["num"] = 1,
},
[2] = {
["CLSID"] = "{E8069896-8435-4B90-95C0-01A03AE6E400}",
["num"] = 2,
},
[3] = {
["CLSID"] = "{R-37}",
["num"] = 3,
},
[4] = {
["CLSID"] = "{R-37}",
["num"] = 4,
},
[5] = {
["CLSID"] = "{R-37}",
["num"] = 5,
},
[6] = {
["CLSID"] = "{R-37}",
["num"] = 6,
},
[7] = {
["CLSID"] = "{E8069896-8435-4B90-95C0-01A03AE6E400}",
["num"] = 7,
},
[8] = {
["CLSID"] = "{FBC29BFE-3D24-4C64-B81D-941239D12249}",
["num"] = 8,
},
},
["tasks"] = {
[1] = 10,
},
},
[2] = {
["displayName"] = "R-73*2 R-33*4 3000L tanks*2",
["name"] = "R-73*2 R-33*4 3000L tanks*2",
["pylons"] = {
[1] = {
["CLSID"] = "{FBC29BFE-3D24-4C64-B81D-941239D12249}",
["num"] = 1,
},
[2] = {
["CLSID"] = "{R-33}",
["num"] = 3,
},
[3] = {
["CLSID"] = "{R-33}",
["num"] = 4,
},
[4] = {
["CLSID"] = "{R-33}",
["num"] = 5,
},
[5] = {
["CLSID"] = "{R-33}",
["num"] = 6,
},
[6] = {
["CLSID"] = "{FBC29BFE-3D24-4C64-B81D-941239D12249}",
["num"] = 8,
},
[7] = {
["CLSID"] = "{B79C379A-9E87-4E50-A1EE-7F7E29C2E87A}",
["num"] = 2,
},
[8] = {
["CLSID"] = "{B79C379A-9E87-4E50-A1EE-7F7E29C2E87A}",
["num"] = 7,
},
},
["tasks"] = {
[1] = 10,
},
},
[3] = {
["displayName"] = "Retribution BARCAP",
["name"] = "Retribution BARCAP",
["pylons"] = {
[1] = {
["CLSID"] = "{FBC29BFE-3D24-4C64-B81D-941239D12249}",
["num"] = 1,
},
[2] = {
["CLSID"] = "{16602053-4A12-40A2-B214-AB60D481B20E}",
["num"] = 2,
},
[3] = {
["CLSID"] = "{R-37M}",
["num"] = 3,
},
[4] = {
["CLSID"] = "{R-37M}",
["num"] = 4,
},
[5] = {
["CLSID"] = "{R-37M}",
["num"] = 5,
},
[6] = {
["CLSID"] = "{R-37M}",
["num"] = 6,
},
[7] = {
["CLSID"] = "{16602053-4A12-40A2-B214-AB60D481B20E}",
["num"] = 7,
},
[8] = {
["CLSID"] = "{FBC29BFE-3D24-4C64-B81D-941239D12249}",
["num"] = 8,
},
},
["tasks"] = {
[1] = 11,
},
},
[4] = {
["displayName"] = "Retribution SEAD",
["name"] = "Retribution SEAD",
["pylons"] = {
[1] = {
["CLSID"] = "{D8F2C90B-887B-4B9E-9FE2-996BC9E9AF03}",
["num"] = 7,
},
[2] = {
["CLSID"] = "{D8F2C90B-887B-4B9E-9FE2-996BC9E9AF03}",
["num"] = 2,
},
[3] = {
["CLSID"] = "{FBC29BFE-3D24-4C64-B81D-941239D12249}",
["num"] = 1,
},
[4] = {
["CLSID"] = "{FBC29BFE-3D24-4C64-B81D-941239D12249}",
["num"] = 8,
},
},
["tasks"] = {
[1] = 11,
},
},
[5] = {
["displayName"] = "Retribution SEAD Escort",
["name"] = "Retribution SEAD Escort",
["pylons"] = {
[1] = {
["CLSID"] = "{D8F2C90B-887B-4B9E-9FE2-996BC9E9AF03}",
["num"] = 7,
},
[2] = {
["CLSID"] = "{D8F2C90B-887B-4B9E-9FE2-996BC9E9AF03}",
["num"] = 2,
},
[3] = {
["CLSID"] = "{R-37M}",
["num"] = 3,
},
[4] = {
["CLSID"] = "{R-37M}",
["num"] = 4,
},
[5] = {
["CLSID"] = "{R-37M}",
["num"] = 5,
},
[6] = {
["CLSID"] = "{R-37M}",
["num"] = 6,
},
},
["tasks"] = {
[1] = 11,
},
},
},
["tasks"] = {
},
["unitType"] = "MiG-31BM",
}
return unitPayloads

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

View File

@ -0,0 +1,23 @@
description:
The MiG-31 is a heavy, long-range interceptor, with a maximum takeoff weight of 46,200 kilograms and a top speed exceeding 3,000 kilometers per hour.
Designed to operate in all weather conditions at high altitudes, the aircraft was built to counter strategic bombers and cruise missiles.
MiG-31s played critical roles in the defense networks of the Soviet Union and later Russia, particularly in Arctic and border patrol missions.
Decades after its first flight in 1975, many of the over 500 units produced remain in service, continuing to be upgraded and fielded by the Russian Aerospace Forces.
introduced: 1981
manufacturer: Mikoyan-Gurevich/Mikoyan
origin: USSR/Russia
price: 24
role: Interceptor
max_range: 800
variants:
MiG-31BM Foxhound: {}
kneeboard_units: "metric"
tasks:
BARCAP: 550
Escort: 400
Fighter sweep: 500
Intercept: 600
TARCAP: 450
SEAD: 150
SEAD Escort: 150