35 Commits

Author SHA1 Message Date
David Pierron
7edb23f555 Release 2024-01
Many changes:
- Added framework/menu for JTAC special options (toggle on/off or requests)
- Added 9 Line, Smoke on TGT. Toggle lasing, Toggle speed/wind corrections special options
- Reworked the JTAC pagination system to fully utilize F1-F9 entries
- Reworked refresh for JTAC radio menus, any action triggers a refresh for a JTAC and otherwise it stays for 2min (Mitigation of the radio menu overlap when refreshing while the player is already in the radio menu)
- Bug fixes here and there regarding the criterias to display or not the target list of a JTAC and it's special options
- Updated documentation for the JTAC automatic lasing feature
- Added the ability to load dynamically the ctld.lua file in the test mission
- Bug fixes to the ctld.getGroup function
- Added a one-second delay when a JTAC is spawned, before starting auto-lase
2024-01-04 16:47:27 +01:00
David Pierron
ea762d4701 Many changes:
- Added framework/menu for JTAC special options (toggle on/off or requests)
- Added 9 Line, Smoke on TGT. Toggle lasing, Toggle speed/wind corrections special options
- Reworked the JTAC pagination system to fully utilize F1-F9 entries
- Reworked refresh for JTAC radio menus, any action triggers a refresh for a JTAC and otherwise it stays for 2min (Mitigation of the radio menu overlap when refreshing while the player is already in the radio menu)
- Bug fixes here and there regarding the criterias to display or not the target list of a JTAC and it's special options
- Updated documentation for the JTAC automatic lasing feature
- Added the ability to load dynamically the ctld.lua file in the test mission
- Bug fixes to the ctld.getGroup function
- Added a one-second delay when a JTAC is spawned, before starting auto-lase
2024-01-04 15:55:06 +01:00
David Pierron
2fba4dba03 Merge pull request #99 from ciribob/release-2023-10
Released v202310.01
2023-10-21 16:26:17 +02:00
David Pierron
5831d1ab2d releasing v202310.01 2023-10-12 13:28:34 +02:00
David Pierron
e33b78806b added the frequency in the beacon units names 2023-10-12 13:24:08 +02:00
David Pierron
7f341df588 Small updates:
- indentation
- comments
- documentation
- default values
2023-10-12 10:40:28 +02:00
David Pierron
3b4da129fd Merge pull request #92 from Proxy404/feature/jtac-smoke-offset-settings
JTAC Smoke Offset Config Options
Added JTAC configuration settings for the X, Y, and Z offsets of smoke markers for lased targets. This will enable the smoke to be configured to be off the target so as to not block the target from being visible in a TGP.
(by https://github.com/Proxy404)
2023-10-12 10:02:45 +02:00
David Pierron
09efd47acd Merge pull request #97 from Queton1-1/loadCrateMenu
Add option to show load crate in menu
If set to true, you can load crates with the F10 menu OR hovering, in case of using choppers and planes for example.
(by https://github.com/Queton1-1)
2023-10-12 10:02:06 +02:00
David Pierron
8f9eba4801 Merge pull request #93 from VEAF/change-radio-beacon-transmissions
Changed the beacons radio transmissions to follow DCS evolutions - no need to restart transmissions every 30 seconds
2023-10-12 09:57:26 +02:00
Quéton 1-1
6400becdfc Add option to show load crate in menu
Add option to show load crate in menu,
if set to true, you can load crates with the F10 menu OR hovering, in case of using choppers and planes for example.
2023-10-07 15:42:36 +02:00
David Pierron
c1891a1a52 stop transmission if ctld.removeRadioBeacon is called 2023-08-29 17:57:21 +02:00
David Pierron
c4c8e15a32 Changed the beacons radio transmissions
There is no more a need to restart transmissions every 30 seconds, as the bug has been corrected (see https://forum.dcs.world/topic/276106-arc-frequencies/page/2/).
Instead, I made changes to create the transmissions once, with a unique name (now mandatory, see https://forum.dcs.world/topic/316378-placed-adf-beacons-only-transmit-briefly/) and the "loop" parameter activated.
Then, every minute, the updateRadioBeacon function checks if the beacons' batteries are still up, and stops them if they are not. If all is ok, the transmissions are stopped and immediately restarted.
2023-08-25 17:26:30 +02:00
Austin Markiewicz
ea30456493 Added JTAC configuration settings for the X, Y, and Z offsets of smoke markers for lased targets to enable better visibility through a TGP 2023-07-21 21:42:25 -04:00
Ciaran Fisher
a3c9d369d5 Version bump 2023-04-14 16:29:18 +01:00
Ciaran Fisher
9b1cf75420 Merge pull request #85 from RafaPolit/JTAC-smoke-on-default-enemy
Fixed always-nil _enemyUnit variable passed to createSmokeMarker
2023-04-14 16:27:07 +01:00
RafaPolit
9517dabb0d Same changes without spaces removal 2023-01-09 12:59:26 -05:00
RafaPolit
b264bc2df0 Fixed always-nil variable 2023-01-09 12:54:10 -05:00
Ciaran Fisher
2632845fd3 Merge pull request #78 from VEAF/JTAC-target-selection-and-retention
JTAC target selection and retention
2022-09-28 16:57:53 +02:00
Ciaran Fisher
74526597e0 Merge pull request #79 from VEAF/JTAC-Active-Laser-Spot-Correction
JTAC active laser spot correction
2022-08-25 16:42:41 +01:00
RexAttaque
a961b7aaea Added option to enable wind and speed laser spot corrections 2022-08-24 16:22:28 +02:00
RexAttaque
240d2b6cbb Check if unit exists before trying to get it's position etc. 2022-08-23 02:01:17 +02:00
RexAttaque
65ab11aae1 Added wind correction for laseUnit(), Added target speed correction for laseUnit(), Added system to update the laser spot position for moving vehicles 2022-08-23 01:30:53 +02:00
RexAttaque
c0f9115f41 Separated both coalitions for the new JTAC indicator 2022-08-21 19:25:39 +02:00
RexAttaque
14066646e0 Fixed new groups not getting the target lists quickly after spawn 2022-08-21 19:10:18 +02:00
RexAttaque
f71649f4f0 Switched to a timer for general target list refresh, Made it so that new groups get target lists on spawn, fixed newJtac not forcing a target list refresh for more than one group, fixed indentation after rebase 2022-08-21 17:51:43 +02:00
RexAttaque
046d51d86b Added a marker when a new JTAC is added to force refresh the target lists 2022-08-20 18:34:53 +02:00
RexAttaque
166efc6160 Separated target lists for both coalitions, optimized target list build, lowered refresh rate of the target lists, removed ambiguity with target selection reset option 2022-08-19 03:30:37 +02:00
RexAttaque
17426bf487 Added CTLD JTAC target selection menu and target retention on selected unit 2022-07-24 16:07:06 +02:00
Ciaran Fisher
b801853ef2 Merge pull request #76 from fhoekstra/patch-1
Make laser code start from 1512
2022-05-17 08:22:44 +01:00
fhoekstra
4b39a322a0 Make laser code start from 1512
for DCS F-14 compatibility: codes below 1511 are not allowed
2022-05-16 23:55:29 +02:00
Ciaran Fisher
77b5f6008e Merge pull request #75 from RndName/ai-troop-limits
Use transportLimit for unknown numberOrTemplate
2022-05-10 12:25:48 +01:00
RndName
ae0d68f5ef Use transportLimit for unknown numberOrTemplate
Instead of directly using the numberOfTroops it should first check for the actual transport limit (if defined) for the given helo type. Otherwise the unitLoadLimits would be ignored for all AI flights automatically loading troops in pickup zones.
2022-05-08 11:23:07 +02:00
Ciaran Fisher
f70c6a7131 Fixed HAWK
Increased default number of launchers
2021-11-13 22:23:45 +00:00
Ciaran Fisher
3717f0f11b Updated version and mission 2021-11-13 21:32:15 +00:00
Ciaran Fisher
1911c608bb Fixed HAWK not firing
Thanks to Grimes!
2021-11-13 21:18:41 +00:00
4 changed files with 726 additions and 235 deletions

889
CTLD.lua

File diff suppressed because it is too large Load Diff

View File

@@ -101,6 +101,20 @@ You can also edit the CTLD.lua file to change some configuration options. Make s
## Setup in Mission Editor
### Test mission
You can use the `test-mission.miz` mission as a demonstration on how to use the CTLD script in a DCS mission.
This mission includes the CTLD script, a proper configuration, demonstration for some of the main features (including the "JTAC talk over the radio via SRS" functionality).
**Note to developers**: it's quite easy to set the loading of the CTLD script to dynamic, so you can make changes to the script, save it and simply reload the mission (left-shift + R) in the game to test the edits you made.
To do this, simply change the "Define loading mode" trigger (1) so that the condition reads "FLAG IS FALSE" (2), and edit the "DO SCRIPT" action (3) to replace the path with the path to the `CTLD.lua` file on your PC.
Optionaly, you can disable the STTS (text to speech over SRS) feature (4).
![dynamic_loading]
### Script Setup
**This script requires MIST version 4.0.57 or above: https://github.com/mrSkortch/MissionScriptingTools**
@@ -130,10 +144,12 @@ To use the real cargo sling behaviour, set the ```ctld.slingLoad``` option to ``
-- ************************************************************************
ctld.staticBugFix = true -- When statics are destroyed, DCS Crashes. Set this to FALSE when this bug is fixed or if you want to use REAL sling loads :)
ctld.disableAllSmoke = false -- if true, all smoke is diabled at pickup and drop off zones regardless of settings below. Leave false to respect settings below
ctld.disableAllSmoke = false -- if true, all smoke is disabled at pickup and drop off zones regardless of settings below. Leave false to respect settings below
ctld.hoverPickup = true -- if set to false you can load crates with the F10 menu instead of hovering...!
ctld.loadCrateFromMenu = false -- if set to true, you can load crates with the F10 menu OR hovering, in case of using choppers and planes for example.
ctld.enableCrates = true -- if false, Helis will not be able to spawn or unpack crates so will be normal CTTS
ctld.slingLoad = false -- if false, crates can be used WITHOUT slingloading, by hovering above the crate, simulating slingloading but not the weight...
-- There are some bug with Sling-loading that can cause crashes, if these occur set slingLoad to false
@@ -659,19 +675,29 @@ 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 = 4000 -- How far a JTAC can "see" in meters (with Line of Sight)
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 = true -- enables automatic marking of target with smoke for RED forces
ctld.JTAC_smokeOn_BLUE = true -- enables automatic 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_jtacStatusF10 = false -- enables F10 JTAC Status menu
ctld.JTAC_smokeOffset_x = 0.0 -- distance in the X direction from target to smoke (meters)
ctld.JTAC_smokeOffset_y = 2.0 -- distance in the Y direction from target to smoke (meters)
ctld.JTAC_smokeOffset_z = 0.0 -- distance in the z direction from target to smoke (meters)
ctld.JTAC_location = false -- shows location of target in JTAC message
ctld.JTAC_jtacStatusF10 = true -- enables F10 JTAC Status menu
ctld.JTAC_lock = "all" -- "vehicle" OR "troop" OR "all" forces JTAC to only lock vehicles or troops or all ground units
ctld.JTAC_location = true -- shows location of target in JTAC message
ctld.location_DMS = false -- shows coordinates as Degrees Minutes Seconds instead of Degrees Decimal minutes
ctld.JTAC_lock = "all" -- "vehicle" OR "troop" OR "all" forces JTAC to only lock vehicles or troops or all ground units
ctld.JTAC_allowStandbyMode = true -- Allow players to toggle lasing on/off
ctld.JTAC_laseSpotCorrections = true -- Allow players to toggle on/off the JTAC leading it's target, taking into account current wind conditions and the speed of the target (particularily useful against moving heavy armor)
ctld.JTAC_allowSmokeRequest = true -- Allow players to request a smoke on target (temporary)
ctld.JTAC_allow9Line = true -- Allow players to ask for a 9Line (individual) for a specific JTAC's target
```
@@ -679,19 +705,39 @@ To make a unit deployed from a crate into a JTAC unit, add the type to the ```ct
The script allows a JTAC to mark and hold an IR and Laser point on a target allowing TGP's to lock onto the lase and ease of target location using NV Goggles.
The JTAC will automatically switch targets when a target is destroyed or goes out of Line of Sight.
The JTAC will automatically switch targets when a target is destroyed or goes out of Line of Sight. Alternatively, a target list is available to chose from for each JTAC.
The JTACs can be configured globally to target only vehicles or troops or all ground targets.
JTACs can also be asked to put smoke on target, give out 9-Lines, to toggle lasing on/off and compensate the laser spot position for target movement and local wind.
*** NOTE: LOS doesn't include buildings or tree's... Sorry! ***
The script can also be useful in daylight by enabling the JTAC to mark enemy positions with Smoke. The JTAC will only move the smoke to the target every 5 minutes (to stop a huge trail of smoke markers) unless the target is destroyed, in which case the new target will be marked straight away with smoke. There is also an F10 menu option for units allowing the JTAC(s) to report their current status but if a JTAC is down it won't report in.
The script can also be useful in daylight by enabling the JTAC to automatically mark enemy positions with Smoke. The JTAC will only move the smoke to the target every 5 minutes (to stop a huge trail of smoke markers) unless the target is destroyed, in which case the new target will be marked straight away with smoke. There is also an F10 menu to get the status of all JTACs, access the target lists and options for each JTAC (such as toggling lasing on/off or requesting a smoke manually). Do note that if a JTAC is down it won't report in or have it's own menu for targets and options. JTACs also do not overlap each other so the target lists do not include already lased targets.
To add JTACS to the mission using the editor place a JTAC unit on the map putting each JTAC in it's own group containing only itself and no
The automatic smokes will be offset from the target by the distances declared in the `ctld.JTAC_smokeOffset_*` constants. Requested smokes will be put close but not on target.
In practice, this is what the F10 radio menu for JTACs looks like :
![alt text](https://imgur.com/pfVldQ1.png "JTAC F10 Radio Menu")
You can see the "JTAC Status" command and the Selection Lists for each JTAC. Those look like :
![alt text](https://imgur.com/oDtajwv.png "Selection List for a JTAC")
Each target type within LOS of the JTAC and not already being lased (by any JTAC) is listed. Quantity is indicated. There is also the Action menu which looks like :
![alt text](https://imgur.com/nYWODLj.png "Action List for a JTAC")
This will allow you to act on the behavior of the JTAC or make requests. These items get updated every minute or so to reflect current configuration, same for the target list.
*** NOTE: Please be patient with the JTAC menu, wait at least 10 seconds between commands. If a spurious command is triggered, wait the same 10 seconds and try again. Sorry for this inconvenience. ***
To add JTACs or AFACs to the mission using the editor place a JTAC/AFAC unit on the map putting each JTAC/AFAC in it's own group containing only itself and no
other units. Name the group something easy to remember e.g. JTAC1 and make sure the JTAC units have a unique name which must
not be the same as the group name. The editor should do this for you but be careful if you copy and paste.
Run the code below as a DO SCRIPT at the start of the mission, or after a delay if you prefer to activate a mission JTAC.
Run the code below as a DO SCRIPT at the start of the mission, or after a delay if you prefer to activate a mission JTAC or AFAC.
**JTAC units deployed by unpacking a crate will automatically activate and begin searching for targets immediately.**
@@ -839,7 +885,7 @@ Once you've loaded the crate, fly to where you want to drop it and drop using th
Once on the ground unpack as normal using the CTLD Commands Menu - CTLD->CTLD Commands->Unpack Crate
**Note: You can also set ```ctld.hoverPickup = false``` so you can load crates using the F10 menu instead of Hovering. **
**Note: You can also set ```ctld.hoverPickup = false``` so you can load crates using the F10 menu instead of Hovering; or keep ```ctld.hoverPickup = true``` and set ```ctld.loadCrateFromMenu = true``` so you can load the crates by hovering OR from the F10 menu**
### Real Sling Loading
@@ -1014,3 +1060,5 @@ Below is a complete list of all the "actions" plus the data that is sent through
* ```{unit = "Unit that did the action",crate = "Crate Details", spawnedGroup = "Group rearmed by crate", action = "rearm"}```
* ```{unit = "Unit that did the action",crate = "Crate Details", spawnedGroup = "Group spawned by crate", action = "unpack"}```
* ```{unit = "Unit that did the action",crate = "Crate Details", spawnedGroup = "Group repaired by crate", action = "repair"}```
[dynamic_loading]: trigger-dynamic-loading.png

Binary file not shown.

BIN
trigger-dynamic-loading.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB