Simple CTLD and Other Mission Examples - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 12-29-2015, 03:20 PM   #1
Ciribob
ED Testers Team
 
Join Date: Mar 2015
Location: Brighton, UK
Posts: 1,785
Default Simple CTLD and Other Mission Examples

As the CTLD thread (http://forums.eagle.ru/showthread.php?t=143107) has become quite long, I thought it would be good to have a separate thread that consists of simple mission examples and/or tutorials to help new and existing mission builders.

The idea is that the thread will be a bunch of very small examples with detailed instructions of how to set it up and what to do in the mission which'll cover many of the standard use cases of CTLD. If you want to post a different script here with an example, feel free.

To keep the thread consistent, please keep discussion to a minimum and layout the post like so but feel free to add new headings or modify as you see fit.

I'm a rubbish mission designer so I really hope you guys can help out and post examples of you're own

Name: Simple Player Troop Pickup

Overview: Shows how to setup CTLD and MIST with a troop pickup zone

Scripts & Links:
CTLD version 1.5 http://forums.eagle.ru/showthread.php?t=143107
MIST version 4.0.57 https://github.com/mrSkortch/MissionScriptingTools

Keywords:

MIST, CTLD - Keywords make the thread searchable

Description / Briefing / Guide:

Spoiler:

A simple example showing how to setup MIST (required by CTLD) and CTLD with a player controlled helicopter in a pickup zone. You can load troops when you're in the zone using the F10 Radio Menu as shown in the video.

First to add MIST, get the latest version from here and extract somewhere: https://github.com/mrSkortch/MissionScriptingTools and click Download Zip

Next download the latest CTLD from here: https://github.com/ciribob/DCS-CTLD and click Download Zip and extract somewhere.

Open the mission editor and go to triggers.

Add a DO ONCE trigger, in the Condition column, add a TIME MORE of 1 and in the Action column add a DO SCRIPT. Click open on the DO SCRIPT options and select mist.lua.

Now add a second DO ONCE trigger, in the Condition column, add a TIME MORE of 2 and in the Action column add a DO SCRIPT. Click open on the DO SCRIPT options and select ctld.lua.

Add a second action of PLAY SOUND TO COUNTRY and pick a country unused by your mission, e.g. Australia and click open and select beacon.ogg

Add a third action of PLAY SOUND TO COUNTRY and pick a country unused by your mission, e.g. Australia and click open and select beaconsilent.ogg

Beacon.ogg and beaconsilent.ogg are used by the radio beacons and are required for the beacons to function.

Once you've done the above steps you can use all the mission editor functions of CTLD (https://github.com/ciribob/DCS-CTLD#...ript-functions)

To make the example complete, add a Trigger zone called pickzone1 and place it over Batumi. If you're inside this zone you can load and unload troops.

Add a Huey with a Pilot Name of helicargo1 and make it client and hot start at Batumi.

Jump in the mission, after a few seconds blue smoke will appear in the center of the pickup zone and you can now land at that smoke and pickup troops using the Radio F10 Menu.

You've just used a script in a mission. Easy!

Video (Optional!):
__________________
Scripts: Complete Transport And Logistics Deployment - CTLD / CTLD Examples - Lots of example of how to use CTLD
CSAR Script - Downed Pilot Rescue / Dedicated Server Script - Automatically launch DCS Multiplayer server at startup
Range Scoring Script - Get scores and counts hits on targets for gunnery or bombs / SimpleSlotBlock - Multiplayer dynamic Slot Blocking Script

Projects: DCS-SimpleRadio Standalone - DCS Radio Integration for All Aircraft - NO TeamSpeak Required!
DCS-SimpleRadio Troubleshooting Post / DCS-SimpleRadio Free Support Channel on Discord

Last edited by Ciribob; 12-29-2015 at 05:04 PM.
Ciribob is offline   Reply With Quote
Old 12-29-2015, 03:40 PM   #2
Ciribob
ED Testers Team
 
Join Date: Mar 2015
Location: Brighton, UK
Posts: 1,785
Default

Name: Simple Cargo Spawn

Overview:

Shows how to spawn crates using a trigger simulating a resupply

Scripts & Links:
CTLD version 1.5 http://forums.eagle.ru/showthread.php?t=143107
MIST version 4.0.57 https://github.com/mrSkortch/MissionScriptingTools

Keywords:

MIST, CTLD, Cargo Spawn AI

Description / Briefing / Guide:

Spoiler:

CTLD has the function ctld.spawnCrateAtZone which can use to to spawn a crate at a trigger zone. An idea for the function would be a resupply mission which in this mission is simulated by a C-130 landing and causing cargo to spawn.

The documentation for the function is here: https://github.com/ciribob/DCS-CTLD#...rate-at-a-zone

The mission uses a Trigger with a condition of Unit Inside zone for the C-130 to trigger a DO SCRIPT:

Code:
ctld.spawnCrateAtZone("blue", 500, "spawncrate")
Which'll spawn a Hummer crate at the spawncrate trigger zone. This can then be slingloaded or unpacked as normal.

You may want to speed up time using Ctrl + z (alt+ z to slow down again) as it takes a while for the C-130 to land.


Video:
Attached Files
File Type: miz Cargo Spawn Example.miz (79.3 KB, 90 views)
__________________
Scripts: Complete Transport And Logistics Deployment - CTLD / CTLD Examples - Lots of example of how to use CTLD
CSAR Script - Downed Pilot Rescue / Dedicated Server Script - Automatically launch DCS Multiplayer server at startup
Range Scoring Script - Get scores and counts hits on targets for gunnery or bombs / SimpleSlotBlock - Multiplayer dynamic Slot Blocking Script

Projects: DCS-SimpleRadio Standalone - DCS Radio Integration for All Aircraft - NO TeamSpeak Required!
DCS-SimpleRadio Troubleshooting Post / DCS-SimpleRadio Free Support Channel on Discord

Last edited by Ciribob; 12-29-2015 at 05:03 PM.
Ciribob is offline   Reply With Quote
Old 12-29-2015, 04:25 PM   #3
Ciribob
ED Testers Team
 
Join Date: Mar 2015
Location: Brighton, UK
Posts: 1,785
Default

Name: Simple Troop Mission

Overview:

The mission consists of a group of soldiers that need to be transported to an area and dropped off. The troops then carry out their mission and need to be picked back up and returned to base.

Scripts & Links:
CTLD version 1.5 http://forums.eagle.ru/showthread.php?t=143107
MIST version 4.0.57 https://github.com/mrSkortch/MissionScriptingTools


Description / Briefing / Guide:

Spoiler:

The attached example mission shows a common use of CTLD.

The mission consists of a group of soldiers that need to be transported to an area and dropped off. The troops then carry out their mission and need to be picked back up and returned to base.

There any many ways to do this in DCS and using CTLD, this is just one.

The mission has two groups of troops, extract10 and extract11. The groups have these names so that they can be loaded and unloaded. The list of group names is in ctld.extractableGroup in CTLD.lua and can be changed or added to as desired. Extract11 is set to Late Activation so they dont appear until activated.

Extract10 can be loaded by the helictoper and then be dropped at the green smoke. There is a trigger setup so that when extract10 appear in that zone, they are deactivated. Extract11 are then activated and carry out their task, moving to their waypoints.

Once they've completed their task, they can then be loaded and dropped back to base which has another trigger zone, checking for extract11, which triggers the end of the mission.


Video:
Apologies for the terrible mic quality and sound levels in general. First video I've done with a Mic...

Attached Files
File Type: miz Troop Mission.miz (472.4 KB, 163 views)
__________________
Scripts: Complete Transport And Logistics Deployment - CTLD / CTLD Examples - Lots of example of how to use CTLD
CSAR Script - Downed Pilot Rescue / Dedicated Server Script - Automatically launch DCS Multiplayer server at startup
Range Scoring Script - Get scores and counts hits on targets for gunnery or bombs / SimpleSlotBlock - Multiplayer dynamic Slot Blocking Script

Projects: DCS-SimpleRadio Standalone - DCS Radio Integration for All Aircraft - NO TeamSpeak Required!
DCS-SimpleRadio Troubleshooting Post / DCS-SimpleRadio Free Support Channel on Discord

Last edited by Ciribob; 12-29-2015 at 05:02 PM.
Ciribob is offline   Reply With Quote
Old 12-29-2015, 04:42 PM   #4
Mt5_Roie
3rd Party Developer
 
Mt5_Roie's Avatar
 
Join Date: Sep 2011
Posts: 1,727
Default

Great info! Will download and check them out tonight.

Question - do you have any scripts that would work for pilot rescue? I've seen the CSAR script that works for human pilots when they eject. But I'm looking for a training missions where rotor pilots have to locate and pick up pilots for training. Any thoughts?
__________________
Coder - Oculus Rift Guy - Court Jester
Mt5_Roie is offline   Reply With Quote
Old 12-29-2015, 09:13 PM   #5
Ciribob
ED Testers Team
 
Join Date: Mar 2015
Location: Brighton, UK
Posts: 1,785
Default

Quote:
Originally Posted by roiegat View Post
Great info! Will download and check them out tonight.

Question - do you have any scripts that would work for pilot rescue? I've seen the CSAR script that works for human pilots when they eject. But I'm looking for a training missions where rotor pilots have to locate and pick up pilots for training. Any thoughts?
The easiest thing to do is use the CSAR script here: http://forums.eagle.ru/showthread.php?t=146994

In the CSAR.lua you need to edit the csar.enableForAI and change it to:

Code:
csar.enableForAI = true
This'll give you the ability to rescue downed AI pilots.

For downing the pilots, add some enemy AA systems below a friendly aircraft and then deactivate the group after say 30 seconds after all the units are shot down.

Hope that helps.

As payment you could put together a sample mission and post here
__________________
Scripts: Complete Transport And Logistics Deployment - CTLD / CTLD Examples - Lots of example of how to use CTLD
CSAR Script - Downed Pilot Rescue / Dedicated Server Script - Automatically launch DCS Multiplayer server at startup
Range Scoring Script - Get scores and counts hits on targets for gunnery or bombs / SimpleSlotBlock - Multiplayer dynamic Slot Blocking Script

Projects: DCS-SimpleRadio Standalone - DCS Radio Integration for All Aircraft - NO TeamSpeak Required!
DCS-SimpleRadio Troubleshooting Post / DCS-SimpleRadio Free Support Channel on Discord
Ciribob is offline   Reply With Quote
Old 12-29-2015, 09:48 PM   #6
Ciribob
ED Testers Team
 
Join Date: Mar 2015
Location: Brighton, UK
Posts: 1,785
Default

Name: AI JTAC Auto Lase

Overview:

The mission shows two different AI JTACS who will automatically lase a target and switch to a new target once the previous target is destroyed.

Scripts & Links:
CTLD version 1.5 http://forums.eagle.ru/showthread.php?t=143107
MIST version 4.0.57 https://github.com/mrSkortch/MissionScriptingTools

Description / Briefing / Guide:

Spoiler:

This mission shows how CTLD's JTAC Auto lase can be used to mark targets for A10s and other aircraft.

The mission requires the A10C module to run.

Any AI unit can be used an auto JTAC, a good one to use is an unarmed Hummer or a predator drone. There many options that can be set for an AI JTAC, see the full documentation here: https://github.com/ciribob/DCS-CTLD#...ting-and-laser

For this mission, after CTLD has loaded there is a separate trigger with a DO SCRIPT of:
Code:
ctld.JTACAutoLase('JTAC1', 1688)
and
Code:
ctld.JTACAutoLase('JTAC2', 1690)
The second JTAC is late activated to show that its possible to do.

The numbers, 1688 and 1690 are the laser codes the two JTACs will use.

The AI JTACs need to be a in a group of one unit containing only themselves. The Group Name is used by the DO SCRIPT.


Video:

Poor shooting but I don't want to re-record it...

Attached Files
File Type: miz CTLD-JTAC-Night.miz (83.4 KB, 120 views)
__________________
Scripts: Complete Transport And Logistics Deployment - CTLD / CTLD Examples - Lots of example of how to use CTLD
CSAR Script - Downed Pilot Rescue / Dedicated Server Script - Automatically launch DCS Multiplayer server at startup
Range Scoring Script - Get scores and counts hits on targets for gunnery or bombs / SimpleSlotBlock - Multiplayer dynamic Slot Blocking Script

Projects: DCS-SimpleRadio Standalone - DCS Radio Integration for All Aircraft - NO TeamSpeak Required!
DCS-SimpleRadio Troubleshooting Post / DCS-SimpleRadio Free Support Channel on Discord

Last edited by Ciribob; 12-29-2015 at 10:04 PM. Reason: Forgot to attach mission...
Ciribob is offline   Reply With Quote
Old 12-29-2015, 11:08 PM   #7
Mt5_Roie
3rd Party Developer
 
Mt5_Roie's Avatar
 
Join Date: Sep 2011
Posts: 1,727
Default

So I build a mission in 2.0 to test it out. I set the recover AI and had a plethora of bad guys shooting at them. So my mistake in my previous attempts was that I made the unit name the required name - not the pilot name. So lesson learned there.

Attaching my file so people can learn as well.

So this got me curious, how does one navigate using bullseye in a Huey? I know in an A-10C I can program a steerwaypoint using OFSET...but how do you do it in a huey?
Attached Files
File Type: miz TestCSAR.miz (443.8 KB, 82 views)
__________________
Coder - Oculus Rift Guy - Court Jester
Mt5_Roie is offline   Reply With Quote
Old 12-30-2015, 01:06 AM   #8
AdawgPHL
Junior Member
 
AdawgPHL's Avatar
 
Join Date: Nov 2010
Location: Pennsylvania, USA
Posts: 34
Default

Is there a way to make AI choppers pick up and drop off troops?
__________________
F99th Wizard #56
AdawgPHL is offline   Reply With Quote
Old 12-30-2015, 03:05 PM   #9
Ciribob
ED Testers Team
 
Join Date: Mar 2015
Location: Brighton, UK
Posts: 1,785
Default

Name: Advanced AI Heli Troop Transport

Overview:

The mission consists of a group of soldiers that need to be transported to an area and dropped off. The troops then carry out their mission and need to be picked back up from a seperate location and returned to base by an AI Huey.

Scripts & Links:
CTLD version 1.5 http://forums.eagle.ru/showthread.php?t=143107
MIST version 4.0.57 https://github.com/mrSkortch/MissionScriptingTools

Description / Briefing / Guide:

Spoiler:

The attached example mission shows how to do troop transport entirely by AI to a location as well as the troops being returned to base.

There any many ways to do this in DCS and using CTLD, this is just one. There are easier ways, as the AI don't actually need to transport the troops, you can just spawn or activate troops using triggers when an AI Unit lands. This mission does show actual troop transport.

The mission has two groups of troops, extract10 and extract11. The groups have these names so that they can be loaded and unloaded. The list of group names is in ctld.extractableGroup in CTLD.lua and can be changed or added to as desired. Extract11 is set to Late Activation so they don't appear until activated.

Extract10 will be loaded by the helicopter and then be dropped at the green smoke.

Extract10 are loaded using a trigger with a time more of 10 seconds and a DO SCRIPT of
Code:
ctld.loadTransport("helicargo1")
The script tells the Huey to try to load any troops nearby. The helicopter will then take off and is ordered to land by Waypoint 2's advanced action. The Land task is set to end after 1 minute.

The troops are automatically unloaded when the helicopter lands the first time as it lands in a trigger zone called dropzone1.

Dropzone1 is on the list of dropoff zones so AI CTLD units will automatically unload troops as soon as they land in one of these zones. More information here: https://github.com/ciribob/DCS-CTLD#...ff-zones-setup

After a minute the helicopter is told to take off and then circle. After circling for a few minutes, its next advanced task is to land at pickzone1.

There is a trigger setup so that when extract10 appear in the first dropoff zone, dropzone1, they are deactivated. Extract11 are then activated and carry out their task, moving to their waypoints and then returning to the pickup zone call pickzone1.

CTLD.lua needs to be modified so that the AI unit can load the troops we sent to pickzone1 instead of troops from the pickup zone. This is done by changing the line in ctld.pickupZones from:

Code:
 { "pickzone1", "blue", -1, "yes", 0 },
to

Code:
 { "pickzone1", "blue", 0, "yes", 0 },
Make sure to add the modified CTLD.lua to your mission, not the original one

The reason why is that sets the pickzone to have no available troops so the AI Huey is forced to load the troops we sent back to that zone.

Once the troops are loaded, the helicopter will then takeoff and land in dropzone2 and again automatically unload the troops as its in a drop zone. There is another trigger that detects extract11 are in dropzone2 and triggers and end of mission message.

Dont forget! You can speed up and slow down time using cntrl+z and alt+z


Video:
Apologies for the terrible mic quality and sound levels in general. Also cut a bit off at the start and end... I'll get the hang of this eventually

Attached Files
File Type: miz example-with-troop-orders-ai.miz (477.2 KB, 143 views)
__________________
Scripts: Complete Transport And Logistics Deployment - CTLD / CTLD Examples - Lots of example of how to use CTLD
CSAR Script - Downed Pilot Rescue / Dedicated Server Script - Automatically launch DCS Multiplayer server at startup
Range Scoring Script - Get scores and counts hits on targets for gunnery or bombs / SimpleSlotBlock - Multiplayer dynamic Slot Blocking Script

Projects: DCS-SimpleRadio Standalone - DCS Radio Integration for All Aircraft - NO TeamSpeak Required!
DCS-SimpleRadio Troubleshooting Post / DCS-SimpleRadio Free Support Channel on Discord

Last edited by Ciribob; 12-30-2015 at 03:15 PM.
Ciribob is offline   Reply With Quote
Old 04-07-2016, 06:04 PM   #10
Bearfoot
Senior Member
 
Join Date: Jan 2016
Location: Michigan, USA
Posts: 1,060
Default

Hi Cribob,

Thank you so much for your work on this. You have definitely gone above and beyond, not only in creating this, but also providing such rich documentation and examples!

So, now, I want to ask for going abover and beyonder!

What would be great might be some recipes in cookbook style. So, you do this already in this thread, but everything is packaged away in the videos etc. But for complete beginners, it might be helpful to break it down into simple steps by text?

E.g., let's take on a the following scenario.

Multiple 4-ship flights of AI helicopters take off from a base, fly to a pick up location, pick up some troops, fly to a landing zone and land troops. Basically, the quintiessential classic bread-and-butter air assault, the most iconic of all modern combat helicopter missions.

Recipe would be:

(1) Create the helicopter groups.
Create 4 groups of 4 helicopter units. Label each group "helicargo1", "helicargo2", "helicargo3", "helicargo4" (or should that be each *unit*: "helicargo1", "helicargo2", .... "helicargo16"?). Place the groups on suitable airfields or specially-created FARPS. They need not be in the same airfield/FARPS (do they?)

(2) Create the troops.

Create 16 groups of 10 soldiers each. Place them in a suitable pick-up area, e.g. an empty field. Arrange each group so the soldiers are close to each other.

[here, at this point, I still do not understand CTLD enough to write the remainder myself; so I am just going to go with what needs to be done using stock DCS; would love to understand how to do this in detail with CTLD, as the the following does not really work very well with multiple helicopters in the same group, due to everyone but the first couple of helicopters landing too far away to be within pick-up distance of the troops regardless of the formation set]

(3) For the troops:
- For each group, create the following route: waypoint 1 = pickup zone; waypoint 2 = landing zone; waypoint 3 onwards: remainder of the mission.
- at the first waypoint create an advanced waypoint action: "Perform Task" > "Embark to transport".
- at the next waypoint create an advanced waypoint action: "Perform Task" > "Disembark"

(4) For the lift:
- Create route as follows: first waypoint = troop pickup zone; second waypoint = RTB and land; make sure to deconflict flight routes!
- At first waypoint: "Perform Task" > "Embarking"
- Select load (Add/remove); might need to click "distribution"

etc.

Last edited by Bearfoot; 04-07-2016 at 06:09 PM.
Bearfoot is offline   Reply With Quote
Reply

Tags
ctld, ctts, transport, tutorial

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 04:29 AM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.