Compare commits

...

6 Commits

Author SHA1 Message Date
David Pierron
def40f440c added coff.ee information to the readme 2025-07-31 08:47:54 +02:00
David Pierron
417c57f97c Bump version to 1.5.1 for release 2025-07-31 08:16:42 +02:00
David Pierron
dec5bf02b4 Stop autosmoke being the default for JTAC and drones 2025-07-31 08:16:25 +02:00
David Pierron
68693300dc By default, recon is disabled 2025-07-31 08:15:57 +02:00
David Pierron
f7f603c486 Added checks to avoind nil errors in ctld.adjustRoute 2025-07-31 08:15:31 +02:00
David Pierron
290950a16b updated README 2025-07-22 16:24:08 +02:00
2 changed files with 68 additions and 32 deletions

View File

@ -40,7 +40,7 @@ end
ctld.Id = "CTLD - "
--- Version.
ctld.Version = "1.5.0"
ctld.Version = "1.5.1"
-- To add debugging messages to dcs.log, change the following log levels to `true`; `Debug` is less detailed than `Trace`
ctld.Debug = false
@ -491,8 +491,8 @@ ctld.JTAC_LIMIT_RED = 10 -- max number of JTAC Crates for the RED Si
ctld.JTAC_LIMIT_BLUE = 10 -- max number of JTAC Crates for the BLUE Side
ctld.JTAC_dropEnabled = true -- allow JTAC Crate spawn from F10 menu
ctld.JTAC_maxDistance = 10000 -- How far a JTAC can "see" in meters (with Line of Sight)
ctld.JTAC_smokeOn_RED = true -- enables marking of target with smoke for RED forces
ctld.JTAC_smokeOn_BLUE = true -- enables marking of target with smoke for BLUE forces
ctld.JTAC_smokeOn_RED = false -- enables marking of target with smoke for RED forces
ctld.JTAC_smokeOn_BLUE = false -- enables marking of target with smoke for BLUE forces
ctld.JTAC_smokeColour_RED = 4 -- RED side smoke colour -- Green = 0 , Red = 1, White = 2, Orange = 3, Blue = 4
ctld.JTAC_smokeColour_BLUE = 1 -- BLUE side smoke colour -- Green = 0 , Red = 1, White = 2, Orange = 3, Blue = 4
ctld.JTAC_smokeMarginOfError = 50 -- error that the JTAC is allowed to make when popping a smoke (in meters)
@ -7887,26 +7887,56 @@ function ctld.adjustRoute(_initialRouteTable, _firstWpOfNewRoute) -- create a r
-- apply offset (_firstWpOfNewRoute) to SwitchWaypoint tasks
local lastWpAsAlreadySwitchWaypoint = false
for idx = 1, #adjustedRoute do
for j=1, #adjustedRoute[idx].task.params.tasks do
if adjustedRoute[idx].task.params.tasks[j].id ~= "ControlledTask" then
if adjustedRoute[idx].task.params.tasks[j].params.action.id == "SwitchWaypoint" then
local goToWaypointIndex = adjustedRoute[idx].task.params.tasks[j].params.action.params.goToWaypointIndex
adjustedRoute[idx].task.params.tasks[j].params.action.params.fromWaypointIndex = idx
adjustedRoute[idx].task.params.tasks[j].params.action.params.goToWaypointIndex = mappingWP[goToWaypointIndex]
if idx == #adjustedRoute then
lastWpAsAlreadySwitchWaypoint = true
for idx2 = 1, #adjustedRoute do
if #adjustedRoute[idx2] and
#adjustedRoute[idx2].task and
#adjustedRoute[idx2].task.params and
#adjustedRoute[idx2].task.params.tasks then
for j=1, #adjustedRoute[idx2].task.params.tasks do
if adjustedRoute[idx2].task.params.tasks[j].id and
adjustedRoute[idx2].task.params.tasks[j].id ~= "ControlledTask" then
if adjustedRoute[idx2].task.params.tasks[j].params and
adjustedRoute[idx2].task.params.tasks[j].params.action and
adjustedRoute[idx2].task.params.tasks[j].params.action.id and
adjustedRoute[idx2].task.params.tasks[j].params.action.id == "SwitchWaypoint" then
if adjustedRoute[idx2].task.params.tasks[j].params.action.params then
local goToWaypointIndex = adjustedRoute[idx2].task.params.tasks[j].params.action.params.goToWaypointIndex
adjustedRoute[idx2].task.params.tasks[j].params.action.params.fromWaypointIndex = idx2
adjustedRoute[idx2].task.params.tasks[j].params.action.params.goToWaypointIndex = mappingWP[goToWaypointIndex]
if idx2 == #adjustedRoute then
lastWpAsAlreadySwitchWaypoint = true
end
end
end
end
else -- for "ControlledTask"
if adjustedRoute[idx].task.params.tasks[j].params.task.params.action.id == "SwitchWaypoint" then
local goToWaypointIndex = adjustedRoute[idx].task.params.tasks[j].params.task.params.action.params.goToWaypointIndex
adjustedRoute[idx].task.params.tasks[j].params.task.params.action.params.fromWaypointIndex = idx
adjustedRoute[idx].task.params.tasks[j].params.task.params.action.params.goToWaypointIndex = mappingWP[goToWaypointIndex]
if idx == #adjustedRoute then
lastWpAsAlreadySwitchWaypoint = true
else -- for "ControlledTask"
if adjustedRoute[idx2].task.params.tasks[j].params and
adjustedRoute[idx2].task.params.tasks[j].params.task and
adjustedRoute[idx2].task.params.tasks[j].params.task.params and
adjustedRoute[idx2].task.params.tasks[j].params.task.params.action and
adjustedRoute[idx2].task.params.tasks[j].params.task.params.action.id and
adjustedRoute[idx2].task.params.tasks[j].params.task.params.action.id == "SwitchWaypoint" then
if adjustedRoute[idx2].task.params.tasks[j].params.task.params.action.params then
local goToWaypointIndex = adjustedRoute[idx2].task.params.tasks[j].params.task.params.action.params.goToWaypointIndex
adjustedRoute[idx2].task.params.tasks[j].params.task.params.action.params.fromWaypointIndex = idx2
adjustedRoute[idx2].task.params.tasks[j].params.task.params.action.params.goToWaypointIndex = mappingWP[goToWaypointIndex]
if idx2 == #adjustedRoute then
lastWpAsAlreadySwitchWaypoint = true
end
end
end
end
end
end
end
@ -7957,7 +7987,7 @@ ctld.reconMenuName = ctld.i18n_translate("RECON") --name of the
ctld.reconRadioAdded = {} --stores the groups that have had the radio menu added
ctld.reconLosSearchRadius = 2000 -- search radius in meters
ctld.reconLosMarkRadius = 100 -- mark radius dimension in meters
ctld.reconAutoRefreshLosTargetMarks = true -- if true recon LOS marks are automaticaly refreshed on F10 map
ctld.reconAutoRefreshLosTargetMarks = false -- if true recon LOS marks are automaticaly refreshed on F10 map
ctld.reconLastScheduleIdAutoRefresh = 0
---- F10 RECON Menus ------------------------------------------------------------------

View File

@ -11,6 +11,8 @@ It's open-source and free as in free beer (you don't have to pay to use it), and
We're always looking for help, please reach out to [Zip on Discord](https://discordapp.com/users/421317390807203850) if you want to participate in maintenance or development.
And if you'd like to support our work, you can [buy me a coffee](https://coff.ee/veaf_zip)!
## Contents
This script is a rewrite of some of the functionality of the original Complete Combat Troop Transport Script (CTTS) by Geloxo (http://forums.eagle.ru/showthread.php?t=108523), as well as adding new features.
@ -865,10 +867,11 @@ For example, if the laser code is *1688*, the frequency will be *40.40Mhz*.
JTAC frequency is available through the "JTAC Status" radio menu
#### Jtac-automatic-orbiting-over-lased-target
By setting parameter ctld.enableAutoOrbitingFlyingJtacOnTarget = true, a script
dedicated script puts in orbit each flying JTAC over his detected target.
Associated with CTLD/JTAC functions, you can assign a fly route to the JTAC drone,
this one follow it, and start orbiting when he detects a target.
By setting parameter ctld.enableAutoOrbitingFlyingJtacOnTarget = true, a script dedicated script puts in orbit each flying JTAC over his detected target.
Associated with CTLD/JTAC functions, you can assign a fly route to the JTAC drone, this one follow it, and start orbiting when he detects a target.
As soon as it don't detect a target, it restart following its initial route at the nearest waypoint
# In Game
@ -927,11 +930,13 @@ ctld.JTAC_WEIGHT = 15 -- kg
```
## Limit troop Loading
The number of Infantries units in mission can be limited by setting the table below :
ctld.nbLimitSpwanedTroops = {0, 0} -- {redLimitInfantryCount, blueLimitInfantryCount}
`ctld.nbLimitSpawnedTroops = {0, 0} -- {redLimitInfantryCount, blueLimitInfantryCount}`
When this cumulative number of troops is reached for a coalition, no more troops can be loaded onboard, and a message is sent to player.
If ctld.nbLimitSpwanedTroops = {0, 0} (both values at 0) the limit control is disabled.
If set to `ctld.nbLimitSpawnedTroops = {0, 0}` (both values at 0) the limit control is disabled. This is the default.
If either value is non-zero, limit control becomes active for both coalitions.
## Cargo Spawning and Sling Loading
@ -1024,13 +1029,14 @@ Rearming:
You can also repair a partially destroyed HAWK / BUK or KUB system by dropping a repair crate next to it and unpacking. A repair crate will also re-arm the system.
## Crate Repacking
The F10 menu allows you to repack units having associated crate types in the "ctld.spawnableCrates" table.
Simply land near the unit you wish to repack and select it from the list presented by the "CTLD//Vehicle/FOB transport...//Repack Vehicles" menu.
The defined radius of vehicles detection is specified by the parameter
ctld.maximumDistanceRepackableUnitsSearch = 200 -- max distance from transportUnit to search force repackable units in meters
The F10 menu allows you to repack units having associated crate types in the "ctld.spawnableCrates" table.
Simply land near the unit you wish to repack and select it from the list presented by the "CTLD//Vehicle/FOB transport...//Repack Vehicles" menu.
The defined radius of vehicles detection is specified by the parameter `ctld.maximumDistanceRepackableUnitsSearch` (default 200 meters).
WARNING: Due to technical reasons related to the refresh time of the F10 menus, there may be inconsistencies between the type of vehicles requested and those provided. It is recommended to wait 5 to 10 seconds without moving after landing and opening the F10 menu for a packaging order.
*WARNING*: Due to technical reasons related to the refresh time of the F10 menus, there may be inconsistencies between the type of vehicles requested and those provided. It is recommended to wait 5 to 10 seconds without moving after landing and opening the F10 menu for a packaging order.
## Forward Operating Base (FOB) Construction
FOBs can be built by loading special FOB crates from a **Logistics** unit into a C-130 or other large aircraft configured in the script. To load the crate use the F10 - Troop Commands Menu. The idea behind FOBs is to make player vs player missions even more dynamic as these can be deployed in most locations. Once destroyed the FOB can no longer be used.