mirror of
https://github.com/akaAgar/the-universal-mission-for-dcs-world.git
synced 2025-11-25 19:31:01 +00:00
Moved "Request objective coordinates" radio commands to new "Navigation" submenu
This commit is contained in:
parent
09e25ea09e
commit
89e390eaa0
10
README.md
10
README.md
@ -86,7 +86,7 @@ The exact content of the menu will depend on the current phase of the mission.
|
||||
- **Target count**: How many objectives will be spawned. More objectives means potentially more xp in a single sortie, so better medals, but also more work and more risk. Be aware that you can RTB to rearm/refuel at any time between objectives, but you won't accumulate as many single-sortie XP as if you complete objectives without going back to base, because XP is awarded to your profile and reset each time you land.
|
||||
- **Enemy air defense**: Amount, quality and skill of enemy surface-to-air units (AAA, MANPADS and SAM). A higher setting awards more XP.
|
||||
- **Enemy air force**: Amount, quality and skill of enemy combat air patrols. A higher setting awards more XP.
|
||||
- **Wingmen count**: **(COMING SOON!)** How many wingmen will fly by your side (from zero to three). A small XP penalty is added for each additional wingman. Wingman won't get replaced if they get shot during a mission, but they will (with full payload) each time you land and takeoff again. Only shown in single-player missions.
|
||||
- **Wingmen count**: How many wingmen will fly by your side (from zero to three). A small XP penalty is added for each additional wingman. Wingman won't get replaced if they get shot during a mission, but they will (with full payload) each time you land and takeoff again. Only shown in single-player missions.
|
||||
- **Friendly AI CAP**: Should AI fighter aicraft be spawned regularly to patrol the AO and shoot down potential threats? Disabling this option will award you more XP (only if "Enemy air force" is not set to "None") but also means you and your wingmen will be alone against the whole enemy air force.
|
||||
- **View pilot career stats**: Displays a list of your achievements, as well as your medal case. Only available when playing single-player missions and if the Lua IO module has been unsanitized (see "First setup" above)
|
||||
- **Begin mission**: Starts a mission with the current settings.
|
||||
@ -94,10 +94,11 @@ The exact content of the menu will depend on the current phase of the mission.
|
||||
#### During the mission
|
||||
|
||||
- **Mission status**: Displays a summary of the mission's status (list of objectives and progress on each objective).
|
||||
- **Objectives**: Displays a list of commands related to each of the mission's objectives.
|
||||
- **Objective coordinates**: Displays the coordinates of the objective and its BRA ("fly X for Y") relative to the player's position. Some objectives types (e.g. strike missions) are provided with exact coordinates, but must will only have approximate coordiantes, so you'll have to search for your targets in the objective area.
|
||||
- **Objectives**: Displays a list of special commands related to each of the mission's objectives. Be aware that some objectives may have no special commands associated with them.
|
||||
- **Smoke marker on target**: Asks for a friendly JTAC to pop a smoke marker on the target. Makes finding the target easier, but will cost you a small XP penalty. Only available for missions where a JTAC is available (it's pretty hard to throw a smoke grenade at an airplane or a ship in the middle of the sea).
|
||||
- **Flight**: **(COMING SOON!)** Displays a list of commands for your wingmen. Only shown in single-player missions and if wingmen are available for this mission.
|
||||
- **Navigation**: Displays a list of commands related to navigational assistance.
|
||||
- **Navigation to objective [OBJECTIVE NAME]**: Displays the coordinates of the objective, its BRA ("fly X for Y") relative to the player's position and an estimated flight time and ETA. Some objectives types (e.g. strike missions) are provided with exact coordinates, but most will only have approximate coordiantes, so you'll have to search for targets yourself once in the objective area.
|
||||
- **Flight**: Displays a list of commands for your wingmen. Only shown in single-player missions and if wingmen are available for this mission.
|
||||
- **Cover me!**: Tasks your wingmen to immediately engage any nearby air threats.
|
||||
- **Engage**: Tasks your wingmen to engage a certain type of targets. Targets must be detected by your wingmen (see "Report contacts" below), or they won't be able to engage them.
|
||||
- **Report contacts**: Asks your wingmen for a list of all detected contacts. According to range and sensors capabilities, their reports can go from perfect ID (e.g. "Su-27") to very generic descriptions (e.g. "fighter" or even "aircraft")
|
||||
@ -239,6 +240,7 @@ The core script is quite simple and small, I probably won't need too much help w
|
||||
- Increased minimum aircraft spawn altitude to avoir crashes in nearby hills
|
||||
- Infantry escaping from destroyed vehicles is now hidden on F10 map, as it should be
|
||||
- Interception objectives are now marked as complete when target is shot down
|
||||
- Moved "Request objective coordinates" radio commands to new "Navigation" submenu, which will include additional navigational assist in future versions
|
||||
- Lowered MANPADS count and skill (MANPADS are overpowered in DCS, especially SA-18)
|
||||
- "New friendly/enemy aircraft taking off" radio messages now mention their BRAA relative to the player, number of bandits taking off now displayed as a word instead of digits
|
||||
- "Rifle!" and "Missile away!" radio calls now both used for any kind of A/G missiles
|
||||
|
||||
@ -11,7 +11,7 @@ Library.radioMessages = {
|
||||
"Taking fire!",
|
||||
"Bird's hurt, trying to hold altitude!",
|
||||
"Impact on fuselage, took a solid hit!",
|
||||
"Taking damage, warning lights all over"
|
||||
"Taking damage, warning lights all over!"
|
||||
},
|
||||
pilotKillAir = {
|
||||
"Splash one $1. Rejoining.",
|
||||
@ -96,12 +96,12 @@ Library.radioMessages = {
|
||||
"$1! They got me! Left wing's gone! I'm getting out!",
|
||||
"$1! They nailed me, fire in the pit! I'm outta here!",
|
||||
"$1! Fire in the cockpit! Can't see anything! Ejecting!",
|
||||
"$1! Mayday! No control—this is it, ejecting now!"
|
||||
"$1! Mayday! No control! This is it, ejecting now!"
|
||||
},
|
||||
pilotWingmanEngageAir = {
|
||||
"$1, copy, engaging $2 now ($3).",
|
||||
"$1, tally one, pressing on $2 ($3).",
|
||||
"$1, roger, comitting on $2 ($3).",
|
||||
"$1, roger, committing on $2 ($3).",
|
||||
"$1, confirm, going after $2 ($3).",
|
||||
"$1, affirm, moving in on $2 ($3)."
|
||||
}, -- "$2" should be "bandits" in audio version
|
||||
@ -141,7 +141,7 @@ Library.radioMessages = {
|
||||
"$1. Copy, orbiting now.",
|
||||
"$1. Roger, in the hold.",
|
||||
"$1. Affirm, setting up the orbit.",
|
||||
"$1. Orbiting at pos."
|
||||
"$1. Orbiting at position."
|
||||
},
|
||||
pilotWingmanRejoin = {
|
||||
"$1, off the perch, rejoining your side.",
|
||||
@ -171,7 +171,7 @@ Library.radioMessages = {
|
||||
pilotWingmanReportContactsNew = {
|
||||
"Heads up, new contacts just popped up.$2",
|
||||
"Look out, tally fresh threats.$2",
|
||||
"Stay sharp, eyes on new group, stand by.$2",
|
||||
"Stay sharp, eyes on new group.$2",
|
||||
"Eyes open, additional threats spotted.$2",
|
||||
"Stay alert, new activity in our sector.$2",
|
||||
"Be aware, got more targets popping up.$2",
|
||||
@ -251,8 +251,10 @@ Library.radioMessages = {
|
||||
"All flights, objective $1 wrapped, keep on the good work.",
|
||||
"All callsigns, objective $1's done. Proceed direct to next waypoint."
|
||||
},
|
||||
commandObjectiveCoordinates = "We have no exact coordinates for objective $1.\nObjective should be located near:\n$2\n\nFly $3 to reach the objective.",
|
||||
commandObjectiveCoordinatesPrecise = "We have exact coordinates for objective $1.\nObjective coordinates are:\n$2\n\nFly $3 to reach the objective.",
|
||||
|
||||
commandObjectiveCoordinates = "Copy, navigational assist for objective $1.\n\n$2",
|
||||
commandObjectiveCoordinatesPrecise = "Copy, navigational assist for objective $1.\n\n$2",
|
||||
|
||||
commandObjectivesManyLeft = {
|
||||
"Stay focused, people. We still have work to do.\n$1",
|
||||
"Our work is not done yet, we have a lot to do.\n$1",
|
||||
@ -317,6 +319,13 @@ Library.radioMessages = {
|
||||
"Flight, update altitude profile to $1.",
|
||||
"Flight, altitude correction, go to $1."
|
||||
},
|
||||
playerWingmanCoverMe = {
|
||||
"Flight, need cover now.",
|
||||
"Flight, keep my six clean.",
|
||||
"Flight, engaged defensive, cover me!",
|
||||
"Flight, break off and clear my tail.",
|
||||
"Flight, keep bandits off me."
|
||||
},
|
||||
playerWingmanEngageAirDefense = {
|
||||
"Flight, prioritize $1, engage now.",
|
||||
"Flight, take down $1 systems.",
|
||||
@ -331,13 +340,6 @@ Library.radioMessages = {
|
||||
"Flight, engage $1, your discretion.",
|
||||
"Flight, you're free to engage $1."
|
||||
}, -- "$1" should be "bandits" in audio version
|
||||
playerWingmanCoverMe = {
|
||||
"Flight, need cover now.",
|
||||
"Flight, keep my six clean.",
|
||||
"Flight, engaged defensive, cover me!",
|
||||
"Flight, break off and clear my tail.",
|
||||
"Flight, keep bandits off me."
|
||||
},
|
||||
playerWingmanEngageGround = {
|
||||
"Flight, engage $1 targets.",
|
||||
"Flight, prosecute $1 targets ahead.",
|
||||
@ -364,15 +366,14 @@ Library.radioMessages = {
|
||||
-- "Flight, move to designated steerpoint."
|
||||
-- },
|
||||
playerWingmanOrbit = {
|
||||
"Flight, orbit your position.",
|
||||
"Flight, orbit at position.",
|
||||
"Flight, set up an orbit.",
|
||||
"Flight, hold on me.",
|
||||
"Flight, anchor on my current pos.",
|
||||
"Flight, orbit overhead"
|
||||
"Flight, hold on position.",
|
||||
"Flight, anchor on current position.",
|
||||
"Flight, orbit overhead."
|
||||
},
|
||||
playerWingmanRejoin =
|
||||
{
|
||||
"Flight, rejoin my side",
|
||||
playerWingmanRejoin = {
|
||||
"Flight, rejoin my side.",
|
||||
"Flight, push it up, rejoin formation.",
|
||||
"Flight, come back to route.",
|
||||
"Flight, tighten it up.",
|
||||
|
||||
@ -1,4 +1,41 @@
|
||||
TUM.atc = {}
|
||||
|
||||
do
|
||||
function TUM.atc.requestNavAssistanceToObjective(index, delayRadioAnswer)
|
||||
local obj = TUM.objectives.getObjective(index)
|
||||
if not obj then return end
|
||||
|
||||
local msgIDSuffix = ""
|
||||
if obj.preciseCoordinates then msgIDSuffix = "Precise" end
|
||||
|
||||
local players = coalition.getPlayers(TUM.settings.getPlayerCoalition())
|
||||
for _,p in ipairs(players) do
|
||||
-- Give BRA to objective
|
||||
local navInfo = "- Fly "..DCSEx.dcs.getBRAA(obj.waypoint3, p:getPoint(), false).."\n"
|
||||
|
||||
-- Give flight time and ETA
|
||||
local velocity = p:getVelocity()
|
||||
local speed = math.max(1, math.sqrt(velocity.x * velocity.x + velocity.y * velocity.y + velocity.z * velocity.z))
|
||||
local distance = DCSEx.math.getDistance2D(obj.waypoint2, DCSEx.math.vec3ToVec2(p:getPoint()))
|
||||
local timeInMinutes = math.max(1, math.floor(distance / (speed * 60)))
|
||||
local eta = DCSEx.string.getTimeString(timer.getAbsTime() + timeInMinutes * 60)
|
||||
if timeInMinutes > 600 then
|
||||
navInfo = navInfo.."- More than ten hours of flight time at current airspeed\n"
|
||||
elseif timeInMinutes > 120 then
|
||||
navInfo = navInfo.."- "..tostring(math.floor(timeInMinutes / 60)).." hours of flight time at current airspeed, ETA "..eta.."\n"
|
||||
else
|
||||
navInfo = navInfo.."- "..tostring(timeInMinutes).." minute(s) of flight time at current airspeed, ETA "..eta.."\n"
|
||||
end
|
||||
|
||||
-- Give objective coordinates
|
||||
if obj.preciseCoordinates then
|
||||
navInfo = navInfo.."\nExact coordinates for objective are:\n"
|
||||
else
|
||||
navInfo = navInfo.."\nNo exact coordinates for objective. Approximate coordinates are:\n"
|
||||
end
|
||||
navInfo = navInfo..DCSEx.world.getCoordinatesAsString(obj.waypoint3, false)
|
||||
|
||||
TUM.radio.playForUnit(DCSEx.dcs.getObjectIDAsNumber(p), "commandObjectiveCoordinates"..msgIDSuffix, { obj.name, navInfo }, "Command", delayRadioAnswer)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -19,17 +19,8 @@ do
|
||||
local obj = TUM.objectives.getObjective(index)
|
||||
if not obj then return end
|
||||
|
||||
local messageSuffix = ""
|
||||
if obj.preciseCoordinates then messageSuffix = "Precise" end
|
||||
|
||||
TUM.radio.playForCoalition(TUM.settings.getPlayerCoalition(), "playerCommandRequireObjectives", { obj.name }, "Flight", false)
|
||||
|
||||
local players = coalition.getPlayers(TUM.settings.getPlayerCoalition())
|
||||
for _,p in ipairs(players) do
|
||||
local coordinates = DCSEx.world.getCoordinatesAsString(obj.waypoint3, false)
|
||||
local braa = DCSEx.dcs.getBRAA(obj.waypoint3, p:getPoint(), false)
|
||||
TUM.radio.playForUnit(DCSEx.dcs.getObjectIDAsNumber(p), "commandObjectiveCoordinates"..messageSuffix, { obj.name, coordinates, braa }, "Command", true)
|
||||
end
|
||||
TUM.atc.requestNavAssistanceToObjective(index, true)
|
||||
end
|
||||
|
||||
function TUM.missionMenu.create()
|
||||
@ -37,15 +28,20 @@ do
|
||||
missionCommands.addCommand("☱ Mission status", nil, doCommandMissionStatus, nil)
|
||||
|
||||
local objectivesMenuRoot = missionCommands.addSubMenu("❖ Objectives")
|
||||
local navigationMenuRoot = missionCommands.addSubMenu("➽ Navigation")
|
||||
|
||||
for i=1,TUM.objectives.getCount() do
|
||||
local obj = TUM.objectives.getObjective(i)
|
||||
if obj then
|
||||
local objRoot = missionCommands.addSubMenu("Objective "..obj.name.." ("..Library.tasks[obj.taskID].description.short..")", objectivesMenuRoot)
|
||||
missionCommands.addCommand("Request objective coordinates", objRoot, doCommandObjectiveLocation, i)
|
||||
local objNameAndDescription = obj.name.." ("..Library.tasks[obj.taskID].description.short..")"
|
||||
local objRoot = missionCommands.addSubMenu("Objective "..objNameAndDescription, objectivesMenuRoot)
|
||||
TUM.supportJTAC.setupJTACOnObjective(i, objRoot)
|
||||
|
||||
missionCommands.addCommand("Navigation to objective "..objNameAndDescription, navigationMenuRoot, doCommandObjectiveLocation, i)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
TUM.wingmenMenu.create()
|
||||
TUM.supportAWACS.createMenu()
|
||||
|
||||
|
||||
@ -88,6 +88,6 @@ do
|
||||
local objectiveDB = Library.tasks[obj.taskID]
|
||||
if not DCSEx.table.contains(objectiveDB.flags, DCSEx.enums.taskFlag.ALLOW_JTAC) then return end -- No JTAC for this objective
|
||||
|
||||
missionCommands.addCommand("Require smoke marker on target ("..tostring(SMOKE_MARKER_PENALTY).."xp)", menuRoot, doCommandSmoke, index)
|
||||
missionCommands.addCommand("Smoke marker on target ("..tostring(SMOKE_MARKER_PENALTY).."xp)", menuRoot, doCommandSmoke, index)
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user