Finished new Group Pickup

Added Early Warning Radar
Reduced weights of crates
This commit is contained in:
Ciaran Fisher
2015-11-25 21:32:57 +00:00
parent 8f40fccde4
commit b69119fc49
3 changed files with 167 additions and 69 deletions
+44 -32
View File
@@ -20,6 +20,8 @@
ctld = {} -- DONT REMOVE! ctld = {} -- DONT REMOVE!
ctld.openBeta15 = true -- set to false if you're on 1.2
-- ************************************************************************ -- ************************************************************************
-- ********************* USER CONFIGURATION ****************************** -- ********************* USER CONFIGURATION ******************************
-- ************************************************************************ -- ************************************************************************
@@ -347,10 +349,10 @@ ctld.vehicleTransportEnabled = {
-- You can also add an optional coalition side to limit the group to one side -- You can also add an optional coalition side to limit the group to one side
-- for the side - 2 is BLUE and 1 is RED -- for the side - 2 is BLUE and 1 is RED
ctld.loadableGroups = { ctld.loadableGroups = {
{name = "Standard Group", inf = 5, mg = 3, at = 2 }, -- will make a loadable group with 5 infantry, 3 MGs and 2 anti-tank for both coalitions {name = "Standard Group", inf = 6, mg = 2, at = 2 }, -- will make a loadable group with 5 infantry, 2 MGs and 2 anti-tank for both coalitions
{name = "Anti Air", inf = 2, aa = 3 }, {name = "Anti Air", inf = 2, aa = 3 },
-- {name = "Anti Tank", inf = 2, at = 6 }, {name = "Anti Tank", inf = 2, at = 6 },
{name = "Mortar Squad", inf = 2, mortar = 5 }, {name = "Mortar Squad", mortar = 6 },
-- {name = "Mortar Squad Red", inf = 2, mortar = 5, side =1 }, --would make a group loadable by RED only -- {name = "Mortar Squad Red", inf = 2, mortar = 5, side =1 }, --would make a group loadable by RED only
} }
@@ -368,46 +370,49 @@ ctld.spawnableCrates = {
-- cratesRequired - if set requires that many crates of the same type within 100m of each other in order build the unit -- cratesRequired - if set requires that many crates of the same type within 100m of each other in order build the unit
-- side is optional but 2 is BLUE and 1 is RED -- side is optional but 2 is BLUE and 1 is RED
-- dont use that option with the HAWK Crates -- dont use that option with the HAWK Crates
{ weight = 1400, desc = "HMMWV - TOW", unit = "M1045 HMMWV TOW", side = 2 }, { weight = 500, desc = "HMMWV - TOW", unit = "M1045 HMMWV TOW", side = 2 },
{ weight = 1200, desc = "HMMWV - MG", unit = "M1043 HMMWV Armament", side = 2 }, { weight = 505, desc = "HMMWV - MG", unit = "M1043 HMMWV Armament", side = 2 },
{ weight = 1700, desc = "BTR-D", unit = "BTR_D", side = 1 }, { weight = 510, desc = "BTR-D", unit = "BTR_D", side = 1 },
{ weight = 1900, desc = "BRDM-2", unit = "BRDM-2", side = 1 }, { weight = 515, desc = "BRDM-2", unit = "BRDM-2", side = 1 },
{ weight = 1100, desc = "HMMWV - JTAC", unit = "Hummer", side = 2, }, -- used as jtac and unarmed, not on the crate list if JTAC is disabled { weight = 520, desc = "HMMWV - JTAC", unit = "Hummer", side = 2, }, -- used as jtac and unarmed, not on the crate list if JTAC is disabled
{ weight = 1500, desc = "SKP-11 - JTAC", unit = "SKP-11", side = 1, }, -- used as jtac and unarmed, not on the crate list if JTAC is disabled { weight = 525, desc = "SKP-11 - JTAC", unit = "SKP-11", side = 1, }, -- used as jtac and unarmed, not on the crate list if JTAC is disabled
{ weight = 200, desc = "2B11 Mortar", unit = "2B11 mortar" }, { weight = 100, desc = "2B11 Mortar", unit = "2B11 mortar" },
{ weight = 500, desc = "SPH 2S19 Msta", unit = "SAU Msta", side = 1, cratesRequired = 3 }, { weight = 250, desc = "SPH 2S19 Msta", unit = "SAU Msta", side = 1, cratesRequired = 3 },
{ weight = 501, desc = "M-109", unit = "M-109", side = 2, cratesRequired = 3 }, { weight = 255, desc = "M-109", unit = "M-109", side = 2, cratesRequired = 3 },
}, },
["AA Crates"] = { ["AA Crates"] = {
{ weight = 210, desc = "Stinger", unit = "Stinger manpad", side = 2 }, { weight = 50, desc = "Stinger", unit = "Stinger manpad", side = 2 },
{ weight = 215, desc = "Igla", unit = "SA-18 Igla manpad", side = 1 }, { weight = 55, desc = "Igla", unit = "SA-18 Igla manpad", side = 1 },
-- HAWK System -- HAWK System
{ weight = 1000, desc = "HAWK Launcher", unit = "Hawk ln", side = 2}, { weight = 540, desc = "HAWK Launcher", unit = "Hawk ln", side = 2},
{ weight = 1010, desc = "HAWK Search Radar", unit = "Hawk sr", side = 2 }, { weight = 545, desc = "HAWK Search Radar", unit = "Hawk sr", side = 2 },
{ weight = 1020, desc = "HAWK Track Radar", unit = "Hawk tr", side = 2 }, { weight = 550, desc = "HAWK Track Radar", unit = "Hawk tr", side = 2 },
{ weight = 1021, desc = "HAWK Repair", unit = "HAWK Repair" , side = 2 }, { weight = 555, desc = "HAWK Repair", unit = "HAWK Repair" , side = 2 },
-- End of HAWK -- End of HAWK
-- KUB SYSTEM -- KUB SYSTEM
{ weight = 1026, desc = "KUB Launcher", unit = "Kub 2P25 ln", side = 1}, { weight = 560, desc = "KUB Launcher", unit = "Kub 2P25 ln", side = 1},
{ weight = 1027, desc = "KUB Radar", unit = "Kub 1S91 str", side = 1 }, { weight = 565, desc = "KUB Radar", unit = "Kub 1S91 str", side = 1 },
{ weight = 1025, desc = "KUB Repair", unit = "KUB Repair", side = 1}, { weight = 570, desc = "KUB Repair", unit = "KUB Repair", side = 1},
-- End of KUB -- End of KUB
-- BUK System -- BUK System
-- { weight = 1022, desc = "BUK Launcher", unit = "SA-11 Buk LN 9A310M1"}, -- { weight = 575, desc = "BUK Launcher", unit = "SA-11 Buk LN 9A310M1"},
-- { weight = 1023, desc = "BUK Search Radar", unit = "SA-11 Buk SR 9S18M1"}, -- { weight = 580, desc = "BUK Search Radar", unit = "SA-11 Buk SR 9S18M1"},
-- { weight = 1024, desc = "BUK CC Radar", unit = "SA-11 Buk CC 9S470M1"}, -- { weight = 585, desc = "BUK CC Radar", unit = "SA-11 Buk CC 9S470M1"},
-- { weight = 1025, desc = "BUK Repair", unit = "BUK Repair"}, -- { weight = 590, desc = "BUK Repair", unit = "BUK Repair"},
-- END of BUK -- END of BUK
{ weight = 505, desc = "Strela-1 9P31", unit = "Strela-1 9P31", side = 1, cratesRequired = 3 }, { weight = 595, desc = "Early Warning Radar", unit = "1L13 EWR" },
{ weight = 506, desc = "M1097 Avenger", unit = "M1097 Avenger", side = 2, cratesRequired = 3 },
{ weight = 405, desc = "Strela-1 9P31", unit = "Strela-1 9P31", side = 1, cratesRequired = 3 },
{ weight = 400, desc = "M1097 Avenger", unit = "M1097 Avenger", side = 2, cratesRequired = 3 },
}, },
} }
@@ -2704,10 +2709,16 @@ function ctld.updateRadioBeacon(_beaconDetails)
local _groupController = _radio.group:getController() local _groupController = _radio.group:getController()
local _sound = "l10n/DEFAULT/"..ctld.radioSound local _sound = ctld.radioSound
if _radio.silent then if _radio.silent then
_sound = "l10n/DEFAULT/"..ctld.radioSoundFC3 _sound = ctld.radioSoundFC3
end end
if ctld.openBeta15 then
_sound = "l10n/DEFAULT/".._sound
end
_groupController:setOption(AI.Option.Ground.id.ROE, AI.Option.Ground.val.ROE.WEAPON_HOLD) _groupController:setOption(AI.Option.Ground.id.ROE, AI.Option.Ground.val.ROE.WEAPON_HOLD)
trigger.action.radioTransmission(_sound, _radio.group:getUnit(1):getPoint(), _radio.mode, false, _radio.freq, 1000) trigger.action.radioTransmission(_sound, _radio.group:getUnit(1):getPoint(), _radio.mode, false, _radio.freq, 1000)
@@ -3864,14 +3875,15 @@ function ctld.addF10MenuOptions()
missionCommands.addCommandForGroup(_groupId, "Unload Troops", _troopCommandsPath, ctld.unloadTroops, { _unitName, true }) missionCommands.addCommandForGroup(_groupId, "Unload Troops", _troopCommandsPath, ctld.unloadTroops, { _unitName, true })
missionCommands.addCommandForGroup(_groupId, "Extract Troops", _troopCommandsPath, ctld.extractTroops, { _unitName, true }) missionCommands.addCommandForGroup(_groupId, "Extract Troops", _troopCommandsPath, ctld.extractTroops, { _unitName, true })
missionCommands.addCommandForGroup(_groupId, "Check Cargo", _troopCommandsPath, ctld.checkTroopStatus, { _unitName })
local _loadPath = missionCommands.addSubMenuForGroup(_groupId, "Load From Zone", _troopCommandsPath)
for _,_loadGroup in pairs(ctld.loadableGroups) do for _,_loadGroup in pairs(ctld.loadableGroups) do
if not _loadGroup.side or _loadGroup.side == _unit:getCoalition() then if not _loadGroup.side or _loadGroup.side == _unit:getCoalition() then
missionCommands.addCommandForGroup(_groupId, "Load ".._loadGroup.name, _troopCommandsPath, ctld.loadTroopsFromZone, { _unitName, true,_loadGroup,false }) missionCommands.addCommandForGroup(_groupId, "Load ".._loadGroup.name, _loadPath, ctld.loadTroopsFromZone, { _unitName, true,_loadGroup,false })
end end
end end
missionCommands.addCommandForGroup(_groupId, "Check Cargo", _troopCommandsPath, ctld.checkTroopStatus, { _unitName })
if ctld.unitCanCarryVehicles(_unit) then if ctld.unitCanCarryVehicles(_unit) then
local _vehicleCommandsPath = missionCommands.addSubMenuForGroup(_groupId, "Vehicle / FOB Transport", _rootPath) local _vehicleCommandsPath = missionCommands.addSubMenuForGroup(_groupId, "Vehicle / FOB Transport", _rootPath)
+89 -3
View File
@@ -1,13 +1,34 @@
# DCS-CTLD # DCS-CTLD
Complete Troops and Logistics Deployment for DCS World Complete Troops and Logistics Deployment for DCS World
## Contents
- [Features](#features)
- [Setup in Mission Editor](#setup-in-mission-editor)
- [In Game](#in-game)
- [Troop Loading and Unloading](#troop-loading-and-unloading)
- [Cargo Spawning and Sling Loading](#cargo-spawning-and-sling-loading)
- [Crate Unpacking](#crate-unpacking)
- [Forward Operating Base (FOB) Construction](#forward-operating-base-fob-construction)
- [Radio Beacon Deployment](#radio-beacon-deployment)
- [Advanced Scripting](#advanced-scripting)
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. 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.
## Features
The script supports: The script supports:
* Troop Loading / Unloading via Radio Menu * Troop Loading / Unloading via Radio Menu
* AI Units can also load and unload troops automatically * AI Units can also load and unload troops automatically
* Troops can spawn with RPGs and Stingers / Iglas if enabled. * Troops can spawn with RPGs and Stingers / Iglas if enabled.
* Different troop groups can be loaded. The groups can easily be modifed by editing CTLD. By Default the groups are:
* AT Group
* AA Group
* Mortar Group
* Standard Group
* Vehicle Loading / Unloading via Radio Menu for C-130 / IL-76 (Other large aircraft can easily be added) (https://www.digitalcombatsimulator.com/en/files/668878/?sphrase_id=1196134) * Vehicle Loading / Unloading via Radio Menu for C-130 / IL-76 (Other large aircraft can easily be added) (https://www.digitalcombatsimulator.com/en/files/668878/?sphrase_id=1196134)
* You will need to download the modded version of the C-130 from here (JSGME Ready) that fixes the Radio Menu * You will need to download the modded version of the C-130 from here (JSGME Ready) that fixes the Radio Menu
* Coloured Smoke Marker Drops * Coloured Smoke Marker Drops
@@ -15,7 +36,11 @@ The script supports:
* Extractable soldier groups added via mission editor * Extractable soldier groups added via mission editor
* Unit construction using crates spawned at a logistics area and dropped via Simulated Cargo Sling or Real Cargo Sling * Unit construction using crates spawned at a logistics area and dropped via Simulated Cargo Sling or Real Cargo Sling
* HAWK AA System requires 3 separate and correct crates to build * HAWK AA System requires 3 separate and correct crates to build
* HAWK system can also be rearmed after construction by dropping another Hawk Launcher nearby and unpacking * HAWK system can also be rearmed after construction by dropping another Hawk Launcher nearby and unpacking. Separate repair crate can also be used.
* BUK AA System requires 2 separate and correct crates to build
* BUK system can also be rearmed after construction by dropping another BUK Launcher nearby and unpacking. Separate repair crate can also be used.
* KUB AA System requires 2 separate and correct crates to build
* KUB system can also be rearmed after construction by dropping another KUB Launcher nearby and unpacking. Separate repair crate can also be used.
* HMMWV TOW * HMMWV TOW
* HMMWV MG * HMMWV MG
* HMMWV JTAC - Will Auto Lase and mark targets with smoke if enabled * HMMWV JTAC - Will Auto Lase and mark targets with smoke if enabled
@@ -35,6 +60,7 @@ The script supports:
* Count Crates in Zone * Count Crates in Zone
* Works for both crates added by the Mission Editor and Crates spawned by Transports * Works for both crates added by the Mission Editor and Crates spawned by Transports
* Count soldiers extracted to a zone (the soldiers disappear) * Count soldiers extracted to a zone (the soldiers disappear)
* Advanced Scripting Callback system
A complete test mission is included. A complete test mission is included.
@@ -43,7 +69,7 @@ You can also edit the CTLD.lua file to change some configuration options. Make s
## Setup in Mission Editor ## Setup in Mission Editor
### Script Setup ### Script Setup
**This script requires MIST version 4.0.55 or above: https://github.com/mrSkortch/MissionScriptingTools** **This script requires MIST version 4.0.57 or above: https://github.com/mrSkortch/MissionScriptingTools**
First make sure MIST is loaded, either as an Initialization Script for the mission or the first DO SCRIPT with a "TIME MORE" of 1. "TIME MORE" means run the actions after X seconds into the mission. First make sure MIST is loaded, either as an Initialization Script for the mission or the first DO SCRIPT with a "TIME MORE" of 1. "TIME MORE" means run the actions after X seconds into the mission.
@@ -202,7 +228,7 @@ You can also spawn extractable infantry groups at a specified trigger zone using
The parameters are: The parameters are:
* group side (red or blue) * group side (red or blue)
* number of troops to spawn * number of troops to spawn OR Group Description
* the name of the trigger to spawn the extractable troops at * the name of the trigger to spawn the extractable troops at
* the distance the troops should search for enemies on spawning in meters * the distance the troops should search for enemies on spawning in meters
@@ -212,6 +238,12 @@ ctld.spawnGroupAtTrigger("red", 10, "spawnTrigger", 1000)
or or
```lua ```lua
ctld.spawnGroupAtTrigger("blue", 5, "spawnTrigger2", 2000) ctld.spawnGroupAtTrigger("blue", 5, "spawnTrigger2", 2000)
```
or
```lua
ctld.spawnGroupAtTrigger("blue", {mg=1,at=2,aa=3,inf=4,mortar=5}, "spawnTrigger2", 2000)
-- Spawns 1 machine gun, 2 anti tank, 3 anti air, 4 standard soldiers and 5 mortars
``` ```
### Activate / Deactivate Pickup Zone ### Activate / Deactivate Pickup Zone
@@ -547,6 +579,31 @@ The C130 / IL-76 gets an extra radio option for loading and deploying vehicles.
The C-130 / IL-76 can also load and unload FOB crates from a Logistics area, see FOB Construction for more details. The C-130 / IL-76 can also load and unload FOB crates from a Logistics area, see FOB Construction for more details.
Different Troop Groups can be loaded from a pickup zone. The ```ctld.loadableGroups``` list can be modified if you want to change the loadable groups.
```lua
-- ************** INFANTRY GROUPS FOR PICKUP ******************
-- Unit Types
-- inf is normal infantry
-- mg is M249
-- at is RPG-16
-- aa is Stinger or Igla
-- mortar is a 2B11 mortar unit
-- You must add a name to the group for it to work
-- You can also add an optional coalition side to limit the group to one side
-- for the side - 2 is BLUE and 1 is RED
ctld.loadableGroups = {
{name = "Standard Group", inf = 6, mg = 2, at = 2 }, -- will make a loadable group with 5 infantry, 2 MGs and 2 anti-tank for both coalitions
{name = "Anti Air", inf = 2, aa = 3 },
{name = "Anti Tank", inf = 2, at = 6 },
{name = "Mortar Squad", mortar = 6 },
-- {name = "Mortar Squad Red", inf = 2, mortar = 5, side =1 }, --would make a group loadable by RED only
}
```
## Cargo Spawning and Sling Loading ## Cargo Spawning and Sling Loading
Cargo can be spawned by transport helicopters if they are close enough to a friendly logistics unit using the F10 menu. Crates are always spawned off the nose of the unit that requested them. Cargo can be spawned by transport helicopters if they are close enough to a friendly logistics unit using the F10 menu. Crates are always spawned off the nose of the unit that requested them.
@@ -715,9 +772,38 @@ Once you've got the right frequency, you should see a white arrow on the compass
The Huey ADF can be a dodgy and occasionaly points the wrong direction but it should eventually settle on the correct direction. The Huey ADF can be a dodgy and occasionaly points the wrong direction but it should eventually settle on the correct direction.
Radio configured to the correct frequency for a beacon: Radio configured to the correct frequency for a beacon:
![alt text](http://i1056.photobucket.com/albums/t379/cfisher881/dcs.exe_DX9_20150608_075150_zps0uqgw4zt.png~original "ARC-9 Radio") ![alt text](http://i1056.photobucket.com/albums/t379/cfisher881/dcs.exe_DX9_20150608_075150_zps0uqgw4zt.png~original "ARC-9 Radio")
White pointer pointing to beacon on the compass: White pointer pointing to beacon on the compass:
![alt text](http://i1056.photobucket.com/albums/t379/cfisher881/dcs.exe_DX9_20150608_075211_zpsdaus4wxt.png~original "Radio Compass") ![alt text](http://i1056.photobucket.com/albums/t379/cfisher881/dcs.exe_DX9_20150608_075211_zpsdaus4wxt.png~original "Radio Compass")
# Advanced Scripting
CTLD has an optional callback API that can be used to trigger actions in code
The example below as a DO SCRIPT will output the callback "action" type for every action:
```lua
ctld.addCallback(function(_args)
trigger.action.outText(_args.action,10)
end)
```
Below is a complete list of all the "actions" plus the data that is sent through. For more information its best to check the CTLD Code to see more details of the arguments.
* ```{unit = "Unit that did the action", unloaded = "DCS Troops Group", action = "dropped_troops"}```
* ```{unit = "Unit that did the action", unloaded = "DCS Vehicles Group", action = "dropped_vehicles"}```
* ```{unit = "Unit that did the action", unloaded = "List of picked up vehicles", action = "load_vehicles"}```
* ```{unit = "Unit that did the action", unloaded = "List of picked up troops", action = "load_troops"}```
* ```{unit = "Unit that did the action", unloaded = "List of dropped troops", action = "unload_troops_zone"}```
* ```{unit = "Unit that did the action", unloaded = "List of dropped vehicles", action = "unload_vehicles_zone"}```
* ```{unit = "Unit that did the action", extracted = "DCS Troops Group", action = "extract_troops"}```
* ```{unit = "Unit that did the action", extracted = "DCS Vehicles Group", action = "extract_vehicles"}```
* ```{unit = "Unit that did the action",position = "Point of FOB", action = "fob" }```
* ```{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"}```
BIN
View File
Binary file not shown.