mirror of
https://github.com/spencershepard/RotorOps.git
synced 2025-11-10 15:45:30 +00:00
1.4.1 (#42)
* RotorOpsPerks, mist change, ice halo fix * Update RotorOpsPerks.lua - added new points conditions, revised cas bonus - allow perks to be defined dynamically - option to silence point scoring messages - added red coalition support - multicrew support! Update MissionGenerator.exe for release
This commit is contained in:
@@ -549,6 +549,7 @@ class Window(QMainWindow, Ui_MainWindow):
|
||||
"imports": self.imports_list,
|
||||
}
|
||||
|
||||
# holds our generator options. We'll pull from the UI or the scenario config file
|
||||
data = {
|
||||
"objects": objects,
|
||||
"credits": credits,
|
||||
@@ -591,6 +592,7 @@ class Window(QMainWindow, Ui_MainWindow):
|
||||
"red_cap": self.scenario.getConfigValue("red_cap", default=True),
|
||||
"blue_cap": self.scenario.getConfigValue("blue_cap", default=True),
|
||||
"rotorops_server": self.scenario.getConfigValue("rotorops_server", default=False),
|
||||
"perks": self.perks_checkBox.isChecked(),
|
||||
}
|
||||
|
||||
logger.info("Generating mission with options:")
|
||||
|
||||
@@ -236,7 +236,7 @@ class Ui_MainWindow(object):
|
||||
self.label_2.setFont(font)
|
||||
self.label_2.setObjectName("label_2")
|
||||
self.scenario_label_9 = QtWidgets.QLabel(self.centralwidget)
|
||||
self.scenario_label_9.setGeometry(QtCore.QRect(480, 401, 251, 23))
|
||||
self.scenario_label_9.setGeometry(QtCore.QRect(500, 401, 251, 23))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(10)
|
||||
self.scenario_label_9.setFont(font)
|
||||
@@ -258,21 +258,21 @@ class Ui_MainWindow(object):
|
||||
self.tankers_checkBox.setChecked(True)
|
||||
self.tankers_checkBox.setObjectName("tankers_checkBox")
|
||||
self.voiceovers_checkBox = QtWidgets.QCheckBox(self.centralwidget)
|
||||
self.voiceovers_checkBox.setGeometry(QtCore.QRect(500, 594, 171, 31))
|
||||
self.voiceovers_checkBox.setGeometry(QtCore.QRect(500, 584, 171, 31))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(9)
|
||||
self.voiceovers_checkBox.setFont(font)
|
||||
self.voiceovers_checkBox.setChecked(True)
|
||||
self.voiceovers_checkBox.setObjectName("voiceovers_checkBox")
|
||||
self.smoke_pickup_zone_checkBox = QtWidgets.QCheckBox(self.centralwidget)
|
||||
self.smoke_pickup_zone_checkBox.setGeometry(QtCore.QRect(500, 541, 231, 20))
|
||||
self.smoke_pickup_zone_checkBox.setGeometry(QtCore.QRect(500, 530, 231, 20))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(9)
|
||||
self.smoke_pickup_zone_checkBox.setFont(font)
|
||||
self.smoke_pickup_zone_checkBox.setChecked(False)
|
||||
self.smoke_pickup_zone_checkBox.setObjectName("smoke_pickup_zone_checkBox")
|
||||
self.game_status_checkBox = QtWidgets.QCheckBox(self.centralwidget)
|
||||
self.game_status_checkBox.setGeometry(QtCore.QRect(500, 570, 221, 21))
|
||||
self.game_status_checkBox.setGeometry(QtCore.QRect(500, 560, 221, 21))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(9)
|
||||
self.game_status_checkBox.setFont(font)
|
||||
@@ -339,7 +339,7 @@ class Ui_MainWindow(object):
|
||||
self.generateButton.setStyleSheet("")
|
||||
self.generateButton.setObjectName("generateButton")
|
||||
self.farp_always = QtWidgets.QRadioButton(self.centralwidget)
|
||||
self.farp_always.setGeometry(QtCore.QRect(500, 431, 261, 24))
|
||||
self.farp_always.setGeometry(QtCore.QRect(520, 431, 261, 24))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(9)
|
||||
self.farp_always.setFont(font)
|
||||
@@ -348,14 +348,14 @@ class Ui_MainWindow(object):
|
||||
self.farp_buttonGroup.setObjectName("farp_buttonGroup")
|
||||
self.farp_buttonGroup.addButton(self.farp_always)
|
||||
self.farp_never = QtWidgets.QRadioButton(self.centralwidget)
|
||||
self.farp_never.setGeometry(QtCore.QRect(500, 491, 271, 24))
|
||||
self.farp_never.setGeometry(QtCore.QRect(520, 491, 271, 24))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(9)
|
||||
self.farp_never.setFont(font)
|
||||
self.farp_never.setObjectName("farp_never")
|
||||
self.farp_buttonGroup.addButton(self.farp_never)
|
||||
self.farp_gunits = QtWidgets.QRadioButton(self.centralwidget)
|
||||
self.farp_gunits.setGeometry(QtCore.QRect(500, 460, 261, 24))
|
||||
self.farp_gunits.setGeometry(QtCore.QRect(520, 460, 261, 24))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(9)
|
||||
self.farp_gunits.setFont(font)
|
||||
@@ -458,6 +458,13 @@ class Ui_MainWindow(object):
|
||||
self.farp_spawn_checkBox.setChecked(False)
|
||||
self.farp_spawn_checkBox.setTristate(False)
|
||||
self.farp_spawn_checkBox.setObjectName("farp_spawn_checkBox")
|
||||
self.perks_checkBox = QtWidgets.QCheckBox(self.centralwidget)
|
||||
self.perks_checkBox.setGeometry(QtCore.QRect(500, 610, 171, 31))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(9)
|
||||
self.perks_checkBox.setFont(font)
|
||||
self.perks_checkBox.setChecked(True)
|
||||
self.perks_checkBox.setObjectName("perks_checkBox")
|
||||
MainWindow.setCentralWidget(self.centralwidget)
|
||||
self.menubar = QtWidgets.QMenuBar(MainWindow)
|
||||
self.menubar.setGeometry(QtCore.QRect(0, 0, 1280, 29))
|
||||
@@ -655,6 +662,8 @@ class Ui_MainWindow(object):
|
||||
self.time_comboBox.setStatusTip(_translate("MainWindow", "Mission start time of day. \'Default\' is the start time as defined by the mission template designer."))
|
||||
self.farp_spawn_checkBox.setStatusTip(_translate("MainWindow", "Add helicopter slots where zone FARPs will be built. Helicopters will be empty fuel, requiring the FARP to be established to refuel and rearm."))
|
||||
self.farp_spawn_checkBox.setText(_translate("MainWindow", "Spawns at zone FARPs"))
|
||||
self.perks_checkBox.setStatusTip(_translate("MainWindow", "Adds a rewards system with points for kills, troop drops, etc. See the F10 menu to use Perks."))
|
||||
self.perks_checkBox.setText(_translate("MainWindow", "Perks"))
|
||||
self.menuMap.setTitle(_translate("MainWindow", "Map"))
|
||||
self.menuFilter.setTitle(_translate("MainWindow", "Filter"))
|
||||
self.menuPreferences.setTitle(_translate("MainWindow", "Preferences"))
|
||||
|
||||
@@ -619,7 +619,7 @@ p, li { white-space: pre-wrap; }
|
||||
<widget class="QLabel" name="scenario_label_9">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>480</x>
|
||||
<x>500</x>
|
||||
<y>401</y>
|
||||
<width>251</width>
|
||||
<height>23</height>
|
||||
@@ -688,7 +688,7 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>500</x>
|
||||
<y>594</y>
|
||||
<y>584</y>
|
||||
<width>171</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
@@ -712,7 +712,7 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>500</x>
|
||||
<y>541</y>
|
||||
<y>530</y>
|
||||
<width>231</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
@@ -736,7 +736,7 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>500</x>
|
||||
<y>570</y>
|
||||
<y>560</y>
|
||||
<width>221</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
@@ -946,7 +946,7 @@ p, li { white-space: pre-wrap; }
|
||||
<widget class="QRadioButton" name="farp_always">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>500</x>
|
||||
<x>520</x>
|
||||
<y>431</y>
|
||||
<width>261</width>
|
||||
<height>24</height>
|
||||
@@ -970,7 +970,7 @@ p, li { white-space: pre-wrap; }
|
||||
<widget class="QRadioButton" name="farp_never">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>500</x>
|
||||
<x>520</x>
|
||||
<y>491</y>
|
||||
<width>271</width>
|
||||
<height>24</height>
|
||||
@@ -994,7 +994,7 @@ p, li { white-space: pre-wrap; }
|
||||
<widget class="QRadioButton" name="farp_gunits">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>500</x>
|
||||
<x>520</x>
|
||||
<y>460</y>
|
||||
<width>261</width>
|
||||
<height>24</height>
|
||||
@@ -1317,6 +1317,30 @@ p, li { white-space: pre-wrap; }
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="perks_checkBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>500</x>
|
||||
<y>610</y>
|
||||
<width>171</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>9</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string>Adds a rewards system with points for kills, troop drops, etc. See the F10 menu to use Perks.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Perks</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="menubar">
|
||||
<property name="geometry">
|
||||
|
||||
@@ -20,7 +20,8 @@ def triggerSetup(rops, options):
|
||||
trig.actions.append(dcs.action.DoScriptFile(rops.scripts["Splash_Damage_2_0.lua"]))
|
||||
trig.actions.append(dcs.action.DoScriptFile(rops.scripts["CTLD.lua"]))
|
||||
trig.actions.append(dcs.action.DoScriptFile(rops.scripts["RotorOps.lua"]))
|
||||
script = ""
|
||||
if options["perks"]:
|
||||
trig.actions.append(dcs.action.DoScriptFile(rops.scripts["RotorOpsPerks.lua"]))
|
||||
script = ("--OPTIONS HERE!\n\n" +
|
||||
"RotorOps.CTLD_crates = " + lb("crates") + "\n\n" +
|
||||
"RotorOps.CTLD_sound_effects = true\n\n" +
|
||||
|
||||
@@ -348,6 +348,11 @@ class RotorOpsMission:
|
||||
# Add AI Flights
|
||||
self.addFlights(options, red_forces, blue_forces)
|
||||
|
||||
# Add source statics
|
||||
if options["perks"]:
|
||||
# fat cow farps require source objects to work (can't be dynamically inserted)
|
||||
self.addSourceStatics(options)
|
||||
|
||||
# Set the Editor Map View
|
||||
self.m.map.position = self.conflict_zones["ALPHA"].position
|
||||
self.m.map.zoom = 100000
|
||||
@@ -365,6 +370,11 @@ class RotorOpsMission:
|
||||
|
||||
# set the weather and time
|
||||
|
||||
#pydcs bug fix
|
||||
if self.m.weather.halo.preset == {}:
|
||||
self.m.weather.halo.preset = dcs.weather.Halo.Preset.Auto
|
||||
self.m.weather.halo.crystals = None
|
||||
|
||||
if options["random_weather"]:
|
||||
# self.m.random_weather = True
|
||||
max = len(dcs.cloud_presets.CLOUD_PRESETS) - 1
|
||||
@@ -813,6 +823,36 @@ class RotorOpsMission:
|
||||
f_cap_spawn_point = primary_f_airport.position.point_from_heading(e_airport_heading + 180, 100000)
|
||||
self.m.triggers.add_triggerzone(f_cap_spawn_point, 30000, hidden=True, name="BLUE_CAP_SPAWN")
|
||||
|
||||
# Fat Cow
|
||||
if True:
|
||||
helo_type = dcs.helicopters.CH_47D
|
||||
name = "FAT COW"
|
||||
|
||||
airport = self.getParking(primary_f_airport, helo_type, friendly_airports, 1)
|
||||
|
||||
if carrier:
|
||||
afg = self.m.flight_group_from_unit(
|
||||
combinedJointTaskForcesBlue,
|
||||
name,
|
||||
helo_type,
|
||||
carrier,
|
||||
start_type=dcs.mission.StartType.Cold,
|
||||
group_size=1)
|
||||
afg.set_skill(dcs.unit.Skill.Excellent)
|
||||
afg.late_activation = True
|
||||
|
||||
elif airport:
|
||||
afg = self.m.flight_group_from_airport(
|
||||
combinedJointTaskForcesBlue,
|
||||
name,
|
||||
helo_type,
|
||||
airport=airport,
|
||||
start_type=dcs.mission.StartType.Cold,
|
||||
group_size=1)
|
||||
afg.set_skill(dcs.unit.Skill.Excellent)
|
||||
afg.late_activation = True
|
||||
|
||||
|
||||
if options["f_awacs"]:
|
||||
awacs_name = "AWACS"
|
||||
awacs_freq = 266
|
||||
@@ -966,8 +1006,6 @@ class RotorOpsMission:
|
||||
group_size=group_size)
|
||||
zone_attack(afg, airport)
|
||||
|
||||
else:
|
||||
return
|
||||
|
||||
if source_helo and afg:
|
||||
for unit in afg.units:
|
||||
@@ -1202,3 +1240,48 @@ class RotorOpsMission:
|
||||
def addMods(self):
|
||||
dcs.helicopters.helicopter_map["UH-60L"] = aircraftMods.UH_60L
|
||||
self.m.country(jtf_blue).helicopters.append(aircraftMods.UH_60L)
|
||||
|
||||
def addSourceStatics(self, options):
|
||||
insert_point = None
|
||||
if self.m.terrain.name == "Caucasus":
|
||||
insert_point = dcs.mapping.Point(-500000, 200000, dcs.terrain.Caucasus)
|
||||
elif self.m.terrain.name == "Falklands":
|
||||
insert_point = dcs.mapping.Point(216000, -990000, dcs.terrain.Falklands)
|
||||
elif self.m.terrain.name == "MarianaIslands":
|
||||
insert_point = dcs.mapping.Point(686200, 71200, dcs.terrain.MarianaIslands)
|
||||
elif self.m.terrain.name == "PersianGulf":
|
||||
insert_point = dcs.mapping.Point(-350000, -800000, dcs.terrain.PersianGulf)
|
||||
elif self.m.terrain.name == "Nevada":
|
||||
insert_point = dcs.mapping.Point(-140000, -300000, dcs.terrain.Nevada)
|
||||
elif self.m.terrain.name == "Syria":
|
||||
insert_point = dcs.mapping.Point(235000, -440000, dcs.terrain.Syria)
|
||||
|
||||
if insert_point:
|
||||
|
||||
for i in range(1, 4):
|
||||
fuel = self.m.static_group(name="FAT COW FUEL " + str(i),
|
||||
_type=dcs.statics.Fortification.FARP_Fuel_Depot,
|
||||
country=self.m.country(jtf_blue),
|
||||
position=insert_point.random_point_within(1000, 1000),
|
||||
heading=0,
|
||||
hidden=True,)
|
||||
fuel.units[0].name = "FAT COW FUEL " + str(i)
|
||||
|
||||
ammo = self.m.static_group(name="FAT COW AMMO " + str(i),
|
||||
_type=dcs.statics.Fortification.FARP_Ammo_Dump_Coating,
|
||||
country=self.m.country(jtf_blue),
|
||||
position=insert_point.random_point_within(1000, 1000),
|
||||
heading=0,
|
||||
hidden=True, )
|
||||
ammo.units[0].name = "FAT COW AMMO " + str(i)
|
||||
|
||||
tent = self.m.static_group(name="FAT COW TENT " + str(i),
|
||||
_type=dcs.statics.Fortification.FARP_Tent,
|
||||
country=self.m.country(jtf_blue),
|
||||
position=insert_point.random_point_within(1000, 1000),
|
||||
heading=0,
|
||||
hidden=True, )
|
||||
tent.units[0].name = "FAT COW TENT " + str(i)
|
||||
|
||||
self.m.farp(self.m.country(jtf_blue), "FAT COW FARP " + str(i),
|
||||
insert_point.random_point_within(1000, 1000), hidden=True, dead=False, farp_type=dcs.unit.InvisibleFARP)
|
||||
|
||||
Binary file not shown.
BIN
Generator/install_forge/IFSetup.exe
Normal file
BIN
Generator/install_forge/IFSetup.exe
Normal file
Binary file not shown.
@@ -1,7 +1,7 @@
|
||||
# ROTOROPS VERSION
|
||||
maj_version = 1
|
||||
minor_version = 3
|
||||
patch_version = 2
|
||||
minor_version = 4
|
||||
patch_version = 1
|
||||
|
||||
version_url = 'https://dcs-helicopters.com/app-updates/versioncheck.yaml'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user