diff --git a/Generator/Forces/red/RED Default Armor.miz b/Generator/Forces/red/RED Armor (Hard).miz
similarity index 100%
rename from Generator/Forces/red/RED Default Armor.miz
rename to Generator/Forces/red/RED Armor (Hard).miz
diff --git a/Generator/Forces/red/RED Armor, Infantry & Artillery (Med).miz b/Generator/Forces/red/RED Armor, Infantry & Artillery (Med).miz
new file mode 100644
index 0000000..fa4ada1
Binary files /dev/null and b/Generator/Forces/red/RED Armor, Infantry & Artillery (Med).miz differ
diff --git a/Generator/Forces/red/RED Default Mixed.miz b/Generator/Forces/red/RED Default Mixed.miz
deleted file mode 100644
index 59cb155..0000000
Binary files a/Generator/Forces/red/RED Default Mixed.miz and /dev/null differ
diff --git a/Generator/Forces/red/RED Trucks & Infantry (Easy).miz b/Generator/Forces/red/RED Trucks & Infantry (Easy).miz
new file mode 100644
index 0000000..85e75b8
Binary files /dev/null and b/Generator/Forces/red/RED Trucks & Infantry (Easy).miz differ
diff --git a/Generator/MissionGenerator.py b/Generator/MissionGenerator.py
index 5b738ee..b9d8367 100644
--- a/Generator/MissionGenerator.py
+++ b/Generator/MissionGenerator.py
@@ -167,6 +167,7 @@ class Window(QMainWindow, Ui_MainWindow):
"slots": self.slot_template_comboBox.currentText(),
"zone_protect_sams": self.zone_sams_checkBox.isChecked(),
"zone_farps": self.farp_buttonGroup.checkedButton().objectName(),
+ "inf_spawn_msgs": self.inf_spawn_voiceovers_checkBox.isChecked(),
}
os.chdir(self.m.home_dir + '/Generator')
n = ROps.RotorOpsMission()
diff --git a/Generator/MissionGeneratorUI.py b/Generator/MissionGeneratorUI.py
index e558a29..a318da0 100644
--- a/Generator/MissionGeneratorUI.py
+++ b/Generator/MissionGeneratorUI.py
@@ -93,7 +93,7 @@ class Ui_MainWindow(object):
font.setPointSize(12)
self.blueqty_spinBox.setFont(font)
self.blueqty_spinBox.setMinimum(0)
- self.blueqty_spinBox.setMaximum(50)
+ self.blueqty_spinBox.setMaximum(8)
self.blueqty_spinBox.setProperty("value", 3)
self.blueqty_spinBox.setObjectName("blueqty_spinBox")
self.redqty_spinBox = QtWidgets.QSpinBox(self.centralwidget)
@@ -102,7 +102,7 @@ class Ui_MainWindow(object):
font.setPointSize(12)
self.redqty_spinBox.setFont(font)
self.redqty_spinBox.setMinimum(0)
- self.redqty_spinBox.setMaximum(50)
+ self.redqty_spinBox.setMaximum(8)
self.redqty_spinBox.setProperty("value", 2)
self.redqty_spinBox.setObjectName("redqty_spinBox")
self.scenario_label_4 = QtWidgets.QLabel(self.centralwidget)
@@ -161,7 +161,7 @@ class Ui_MainWindow(object):
font.setPointSize(12)
self.inf_spawn_spinBox.setFont(font)
self.inf_spawn_spinBox.setMinimum(0)
- self.inf_spawn_spinBox.setMaximum(50)
+ self.inf_spawn_spinBox.setMaximum(20)
self.inf_spawn_spinBox.setProperty("value", 2)
self.inf_spawn_spinBox.setObjectName("inf_spawn_spinBox")
self.scenario_label_5 = QtWidgets.QLabel(self.centralwidget)
@@ -216,7 +216,7 @@ class Ui_MainWindow(object):
font.setPointSize(12)
self.e_attack_helos_spinBox.setFont(font)
self.e_attack_helos_spinBox.setMinimum(0)
- self.e_attack_helos_spinBox.setMaximum(50)
+ self.e_attack_helos_spinBox.setMaximum(8)
self.e_attack_helos_spinBox.setProperty("value", 2)
self.e_attack_helos_spinBox.setObjectName("e_attack_helos_spinBox")
self.scenario_label_7 = QtWidgets.QLabel(self.centralwidget)
@@ -237,7 +237,7 @@ class Ui_MainWindow(object):
font.setPointSize(12)
self.e_attack_planes_spinBox.setFont(font)
self.e_attack_planes_spinBox.setMinimum(0)
- self.e_attack_planes_spinBox.setMaximum(50)
+ self.e_attack_planes_spinBox.setMaximum(8)
self.e_attack_planes_spinBox.setProperty("value", 1)
self.e_attack_planes_spinBox.setObjectName("e_attack_planes_spinBox")
self.zone_sams_checkBox = QtWidgets.QCheckBox(self.centralwidget)
@@ -257,6 +257,7 @@ class Ui_MainWindow(object):
font = QtGui.QFont()
font.setPointSize(10)
self.inf_spawn_voiceovers_checkBox.setFont(font)
+ self.inf_spawn_voiceovers_checkBox.setChecked(True)
self.inf_spawn_voiceovers_checkBox.setObjectName("inf_spawn_voiceovers_checkBox")
self.farp_never = QtWidgets.QRadioButton(self.centralwidget)
self.farp_never.setGeometry(QtCore.QRect(950, 500, 95, 20))
diff --git a/Generator/MissionGeneratorUI.ui b/Generator/MissionGeneratorUI.ui
index 06969d0..7838cc9 100644
--- a/Generator/MissionGeneratorUI.ui
+++ b/Generator/MissionGeneratorUI.ui
@@ -255,7 +255,7 @@ p, li { white-space: pre-wrap; }
0
- 50
+ 8
3
@@ -282,7 +282,7 @@ p, li { white-space: pre-wrap; }
0
- 50
+ 8
2
@@ -471,7 +471,7 @@ p, li { white-space: pre-wrap; }
0
- 50
+ 20
2
@@ -647,7 +647,7 @@ p, li { white-space: pre-wrap; }
0
- 50
+ 8
2
@@ -710,7 +710,7 @@ p, li { white-space: pre-wrap; }
0
- 50
+ 8
1
@@ -775,6 +775,9 @@ p, li { white-space: pre-wrap; }
Voiceovers on Infantry Spawn
+
+ true
+
diff --git a/Generator/RotorOpsMission.py b/Generator/RotorOpsMission.py
index 95ff623..880a8c0 100644
--- a/Generator/RotorOpsMission.py
+++ b/Generator/RotorOpsMission.py
@@ -445,7 +445,7 @@ class RotorOpsMission:
russia, "Enemy Attack Planes", plane["type"],
airport=enemy_airport,
maintask=dcs.task.CAS,
- start_type=dcs.mission.StartType.Warm,
+ start_type=dcs.mission.StartType.Cold,
group_size=2)
zone_attack(afg, plane)
@@ -471,6 +471,7 @@ class RotorOpsMission:
"RotorOps.force_offroad = " + lb("force_offroad") + "\n\n" +
"RotorOps.voice_overs = " + lb("voiceovers") + "\n\n" +
"RotorOps.zone_status_display = " + lb("game_display") + "\n\n" +
+ "RotorOps.inf_spawn_messages = " + lb("inf_spawn_msgs") + "\n\n" +
"RotorOps.inf_spawns_per_zone = " + lb("inf_spawn_qty") + "\n\n" +
"RotorOps.apcs_spawn_infantry = " + lb("apc_spawns_inf") + " \n\n"))))
self.m.triggerrules.triggers.append(trig)
diff --git a/Generator/Scenarios/Caucasus Conflict - Batumi to Kobuleti (GRIMM).miz b/Generator/Scenarios/Caucasus Conflict - Batumi to Kobuleti (GRIMM).miz
index 78a8300..f44a18e 100644
Binary files a/Generator/Scenarios/Caucasus Conflict - Batumi to Kobuleti (GRIMM).miz and b/Generator/Scenarios/Caucasus Conflict - Batumi to Kobuleti (GRIMM).miz differ
diff --git a/Generator/Scenarios/Caucasus Conflict - Nalchik to Beslan (GRIMM).miz b/Generator/Scenarios/Caucasus Conflict - Nalchik to Beslan (GRIMM).miz
index 693096c..d55089b 100644
Binary files a/Generator/Scenarios/Caucasus Conflict - Nalchik to Beslan (GRIMM).miz and b/Generator/Scenarios/Caucasus Conflict - Nalchik to Beslan (GRIMM).miz differ
diff --git a/Generator/Scenarios/Mariana Conflict - Anderson to Won Pat (GRIMM).miz b/Generator/Scenarios/Mariana Conflict - Anderson to Won Pat (GRIMM).miz
index 544c62c..a1bed71 100644
Binary files a/Generator/Scenarios/Mariana Conflict - Anderson to Won Pat (GRIMM).miz and b/Generator/Scenarios/Mariana Conflict - Anderson to Won Pat (GRIMM).miz differ
diff --git a/Generator/Scenarios/Nevada Conflict - Vegas Tour (GRIMM).miz b/Generator/Scenarios/Nevada Conflict - Vegas Tour (GRIMM).miz
index 4a47022..38828de 100644
Binary files a/Generator/Scenarios/Nevada Conflict - Vegas Tour (GRIMM).miz and b/Generator/Scenarios/Nevada Conflict - Vegas Tour (GRIMM).miz differ
diff --git a/Generator/Scenarios/PG Conflict - Abu Dhabi to Ras (GRIMM).miz b/Generator/Scenarios/PG Conflict - Abu Dhabi to Ras (GRIMM).miz
index e1e6964..68638fb 100644
Binary files a/Generator/Scenarios/PG Conflict - Abu Dhabi to Ras (GRIMM).miz and b/Generator/Scenarios/PG Conflict - Abu Dhabi to Ras (GRIMM).miz differ
diff --git a/Generator/Scenarios/Syria Conflict - Aleppo Tour (GRIMM).miz b/Generator/Scenarios/Syria Conflict - Aleppo Tour (GRIMM).miz
index 940a2af..9e3d50d 100644
Binary files a/Generator/Scenarios/Syria Conflict - Aleppo Tour (GRIMM).miz and b/Generator/Scenarios/Syria Conflict - Aleppo Tour (GRIMM).miz differ
diff --git a/MissionGenerator.exe b/MissionGenerator.exe
index 9c893ff..cb34568 100644
Binary files a/MissionGenerator.exe and b/MissionGenerator.exe differ
diff --git a/RotorOps.lua b/RotorOps.lua
index 00030aa..cd32b31 100644
--- a/RotorOps.lua
+++ b/RotorOps.lua
@@ -64,7 +64,10 @@ local initial_stage_units
local apcs = {} --table to keep track of infantry vehicles
local low_units_message_fired = false
local inf_spawn_zones = {}
-
+local cooldown = {
+ ["attack_helo_msg"] = 0,
+ ["attack_plane_msg"] = 0,
+}
RotorOps.gameMsgs = {
@@ -171,24 +174,51 @@ local sound_effects = {
["troop_dropoff"] = {'troops_unload_thanks.ogg', 'troops_unload_everybody_off.ogg', 'troops_unload_get_off.ogg', 'troops_unload_here_we_go.ogg', 'troops_unload_moving_out.ogg',},
}
-function RotorOps.eventHandler:onEvent(event)
- if (world.event.S_EVENT_ENGINE_STARTUP == event.id) then --play some sound files when a player starts engines
- local initaitor = event.initiator:getGroup():getID()
- if RotorOps.defending then
- trigger.action.outSoundForGroup(initaitor , RotorOps.gameMsgs.enemy_pushing[RotorOps.active_zone_index + 1][2])
- else
- trigger.action.outSoundForGroup(initaitor , RotorOps.gameMsgs.push[RotorOps.active_zone_index + 1][2])
+function RotorOps.getTime()
+ return timer.getAbsTime() - timer.getTime0() --time since mission started
+end
+
+
+
+function RotorOps.eventHandler:onEvent(event)
+ ---ENGINE STARTUP EVENTS
+ if (world.event.S_EVENT_ENGINE_STARTUP == event.id) then --play some sound files when a player starts engines
+ local initiator = event.initiator:getGroup():getID()
+
+ if #event.initiator:getGroup():getUnits() == 1 then --if there are no other units in the player flight group (preventing duplicated messages for ai wingman flights)
+ if RotorOps.defending then
+ trigger.action.outSoundForGroup(initiator , RotorOps.gameMsgs.enemy_pushing[RotorOps.active_zone_index + 1][2])
+ else
+ trigger.action.outSoundForGroup(initiator , RotorOps.gameMsgs.push[RotorOps.active_zone_index + 1][2])
+ end
end
+
end
+ ---TAKEOFF EVENTS
if (world.event.S_EVENT_TAKEOFF == event.id) then
- local initiator_name = event.initiator:getGroup()
- if initiator_name == "Enemy Attack Helicopters" then
- RotorOps.gameMsg(RotorOps.gameMsgs.attack_helos)
- elseif initiator_name == "Enemy Attack Planes" then
- RotorOps.gameMsg(RotorOps.gameMsgs.attack_planes)
+ local initiator_name = event.initiator:getGroup():getName()
+
+ if (initiator_name == "Enemy Attack Helicopters") then
+ --we use flights of two aircraft which triggers two events, but we only want to use one event so we use a cooldown timer
+ if ((RotorOps.getTime() - cooldown["attack_helo_msg"]) > 90) then
+ RotorOps.gameMsg(RotorOps.gameMsgs.attack_helos)
+ cooldown["attack_helo_msg"] = RotorOps.getTime()
+ else
+ env.warning("RotorOps attack helo message skipped")
+ end
end
+
+ if initiator_name == "Enemy Attack Planes" then
+ if ((RotorOps.getTime() - cooldown["attack_plane_msg"]) > 90) then
+ RotorOps.gameMsg(RotorOps.gameMsgs.attack_planes)
+ cooldown["attack_plane_msg"] = RotorOps.getTime()
+ else
+ env.warning("RotorOps attack plane message skipped")
+ end
+ end
+
end
end
@@ -535,7 +565,12 @@ function RotorOps.chargeEnemy(vars)
if vars.zone then ---mist getUnitsInZones method
- local units_in_zone = mist.getUnitsInZones(mist.makeUnitTable({'[red][vehicle]'}), {vars.zone}, "spherical")
+ local units_in_zone
+ if enemy_coal == 1 then
+ units_in_zone = mist.getUnitsInZones(mist.makeUnitTable({'[red][vehicle]'}), {vars.zone}, "spherical")
+ elseif enemy_coal == 2 then
+ units_in_zone = mist.getUnitsInZones(mist.makeUnitTable({'[blue][vehicle]'}), {vars.zone}, "spherical")
+ end
local closest_dist = 10000
local closest_unit
for index, unit in pairs(units_in_zone) do
@@ -904,13 +939,13 @@ function RotorOps.assessUnitsInZone(var)
local staged_units_remaining = {}
for index, unit in pairs(RotorOps.staged_units) do
if unit:isExist() then
- staged_units_remaining[#staged_units_remaining] = unit
+ staged_units_remaining[#staged_units_remaining + 1] = unit
end
end
local percent_staged_remain = 0
percent_staged_remain = math.floor((#staged_units_remaining / #RotorOps.staged_units) * 100)
trigger.action.setUserFlag(RotorOps.staged_units_flag, percent_staged_remain)
- debug("Staged units remaining: " + percent_staged_remain + "%")
+ debugMsg("Staged units remaining: "..percent_staged_remain.."%")
--is the game finished?