Jump to content

Complete Transport and Logistics Deployment - CTLD


Recommended Posts

I'm really enjoying this script. It makes life so much easier, thank you very much!

 

do you have a discord for CTLD by any chance? if not, maybe I could ask here. How do I deactivate a Drop Off Zone? I see a function for deactivate Pick Up Zone and Waypoint Zone but none for Drop Off Zone. thank you very much!

▀▄▀▄▀▄ DCS: Air Assault Operations ▄▀▄▀▄▀

 

Join the fight!

YouTube Channel

Link to comment
Share on other sites

  • 2 weeks later...

 

i have never got on with moose, takes too much time and brain power to make it work, so this development that Ciribob has created with ctld is working out perfect for my needs, i fear if you rewrite it with moose and the support for this one fails, i would not have anything else to use.

 

 

 

First, CTLD is truly an awesome feat, and Ciribob deserves solid respect for producing it and making it become what it is. We use it as an absolute staple of our operations in every single mission.

 

I don't think you understand what I'm suggesting. Your knowledge quotient of MOOSE would be limited to loading MOOSE at mission start. The same way you do now with MIST. The rest would be navigating the radio menu.

 

Have you looked at the code? As well as it works, it's 100% devoid of any documentation. I don't mean end-user instructions here, but the sort of documentation that a developer would require to understand it. Without this, it's very difficult to unwind how it works when you need to extend it or fix issues.

 

The entire purpose of suggesting a rewrite it is to give it MORE support, more features and an actual development cycle with real documentation that anyone can pick up and begin to contribute with. It could work the same way externally.

 

Consider that:

 

1 - The SRS project (also critical software for MP DCS) has its own discord. It's sometimes updated multiple times in a single day.

 

2 - The MOOSE project has its own discord. With dozens of contributors & subprojects. This is where the momentum is.

 

3 - CTLD & CSAR, as critical as they are to so many, just don't.

 

4 - ED could very easily break all of this with one very small API change.

 

5 - When's the last time you saw a new feature in CTLD?

 

Users who took lots of time to unravel it all have contributed code fixes and enhancements to CTLD/CSAR that have been sitting there for almost a full year.

 

Please know that I'm writing this from a position of great admiration for the creator, the product, and the transformational effect it offers a RW experience in DCS.

 

 

We all love this software and want to see it flourish. I'm doubtful that the present path its on is the one that offers it the most longevity.

 

  • Like 3

 

Banner EDForum2020.jpg

Have fun. Don't suck. Kill bad guys. 👍

https://discord.gg/blacksharkden/

Link to comment
Share on other sites

  • 2 weeks later...

Good morning Pilots! Anyone know how to get the troops to move/search for nearby enemies? I can't seem to get this to work.Just as a test I change the settings to this....

 

ctld.maximumSearchDistance = 8000 -- max distance for troops to search for enemy

ctld.maximumMoveDistance = 8000 -- max distance for troops to move from drop point if no enemy is nearby

 

But when i drop off troops they are not moving at all even when I disembark my troops really close to there targets

 

ctld.jpg

 

Troops are just sitting there not moving, not searching, not attacking. Am i missing something in the setup maybe??

  • Like 1
Coming Soon...
The Fraternity Returns : https://thefraternitysim.com/
Link to comment
Share on other sites

Good morning Pilots! Anyone know how to get the troops to move/search for nearby enemies? ........ Am i missing something in the setup maybe??

 

No, ai response changes build by build at the moment and of course they are pretty stupid in the first place.

 

Use a wpzone and all will be good. Create an available trigger zone called wpzone1 ..... or whatever is named in your script if you have changed it.... and place the center at or behind the enemy making sure the LZ is within the zone. Any troops dropped in the zone will make their way tot he center. If enemy are in the way, bingo you have a fight, as desired.....

 

Hope this helps, sri if you already know this function...

  • Like 1

 

SIGBLOCK.png

Link to comment
Share on other sites

  • 2 weeks later...
On 11/20/2020 at 11:31 AM, Gizzy said:

 

No, ai response changes build by build at the moment and of course they are pretty stupid in the first place.

 

Use a wpzone and all will be good. Create an available trigger zone called wpzone1 ..... or whatever is named in your script if you have changed it.... and place the center at or behind the enemy making sure the LZ is within the zone. Any troops dropped in the zone will make their way tot he center. If enemy are in the way, bingo you have a fight, as desired.....

 

Hope this helps, sri if you already know this function...

Thanks so much for the Tip Gizzy! using a WP zone worked like a charm! 

Coming Soon...
The Fraternity Returns : https://thefraternitysim.com/
Link to comment
Share on other sites

  • 3 weeks later...

Would you mind helping me with this?

 

2020-12-21 07:47:32.793 ERROR   SCRIPTING: Mission script error: [string "ctld.JTACAutoLase('JTAC3', 1688, true,"all",3)"]:1: attempt to index global 'ctld' (a nil value)
stack traceback:
    [C]: ?
    [string "ctld.JTACAutoLase('JTAC3', 1688, true,"all",3)"]:1: in main chunk
2020-12-21 07:47:36.635 ERROR   SCRIPTING: Mission script error: [string "ctld.JTACAutoLase('JTAC4', 1688, true,"all",3)"]:1: attempt to index global 'ctld' (a nil value)
stack traceback:
    [C]: ?
    [string "ctld.JTACAutoLase('JTAC4', 1688, true,"all",3)"]:1: in main chunk

Link to comment
Share on other sites

  • 2 weeks later...

Hi guys,

great script. Thanks a ton for the time invested.
I'm currently using it on one of our multiplayer servers and would like to enhance it a bit and could use some pointers on how to go about the following items:

 

1. Add JTAC Troop type - instead of a Vehicle JTAC which will spawn from a crate I would like to load a group of soldieries which will provide JTAC services once dropped.
I can add the menu item and troops but how do I enable the JTAC function for the group once deployed?
 

2. mix of internal and sling load cargo - I have sling loads enabled but would like to allow some crates to be loaded into the helicopter as well so that players can sling load one crate (e.g. vehicle crate) and internally load a repair crate or other "smaller" crate as defined in the script.
 

3. Crate/container persistency - I use the simple unit persistence script to save the status of all units in the game to provide scenario persistency during at server restart. Are crates/containers units or static objects? Any suggestion how I could save their status to make them persistent as well (currently any packed crates/containers will disappear upon restart).

Any hints and help highly appreciated. 

Thanks,
Eric

Link to comment
Share on other sites

On 1/1/2021 at 11:16 AM, IdefixRC said:

1. Add JTAC Troop type - instead of a Vehicle JTAC which will spawn from a crate I would like to load a group of soldieries which will provide JTAC services once dropped.
I can add the menu item and troops but how do I enable the JTAC function for the group once deployed?

Hi Eric, this could help you.

https://wiki.hoggitworld.com/view/DCS_command_eplrs

Bye

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

Hey All,

 

I am new to the misison editor and have been watching a lot of vids and reading a lot in the forums.  I ma progressing with most stuff, but like exhausted earleir I keep getting the following error when trying to create a MQ-9 JTAC using hte MIST and CTLD.  Mist laods first with CTLD some 5 seconds later.  What am I doing wrong? I have reinstalled both but keep getting the error. 

 

 

 

image.png

Link to comment
Share on other sites

Hi, for Ciribob and those using CTLD's autolase function, I've modified the JTACAutolase lasing function to work also with moving targets, like convoy. I've turned the fixed point on target position, updated every second, into a leading point, updated at same rate, and dynamically adapted to speed and heading.
As result the laser bomb is no longer ineffective by falling too short.
(I use a drone Jtac that updates its orbit center on moving targets)

 

In the function ctld.laseUnit I replaced this :

 

local _enemyVector = _enemyUnit:getPoint()
local _enemyVectorUpdated = { x = _enemyVector.x, y = _enemyVector.y + 2.0, z = _enemyVector.z }

 

by :

 

local _enemyVector = _enemyUnit:getPoint()
    local speed1 = _enemyUnit:getVelocity()
    local speed2 = math.sqrt(speed1.x^2 + speed1.y^2 + speed1.z^2) + 0.1
    local dir1 = mist.getHeading(_enemyUnit)
    local dir2 = mist.utils.round(dir1, 1)
    repeat
    LeadPoint = mist.getRandPointInCircle(_enemyVector, 1.4*speed2)
    LeadPointV3 = mist.utils.makeVec3GL(LeadPoint)
    ref = _enemyVector
    vec = {x = LeadPointV3.x - ref.x, y = LeadPointV3.y - ref.y, z = LeadPointV3.z - ref.z}
    dir3 = mist.utils.getDir(vec, ref)
    dir4 = mist.utils.round(dir3, 1)
    until dir4 == dir2
local _enemyVectorUpdated = { x = LeadPointV3.x, y = LeadPointV3.y + 2.0, z = LeadPointV3.z }

 

 

 

Link to comment
Share on other sites

Hey All,
 
I am new to the misison editor and have been watching a lot of vids and reading a lot in the forums.  I ma progressing with most stuff, but like exhausted earleir I keep getting the following error when trying to create a MQ-9 JTAC using hte MIST and CTLD.  Mist laods first with CTLD some 5 seconds later.  What am I doing wrong? I have reinstalled both but keep getting the error. 
 
 
 
image.png.f02d85e34eb9b92d8f3143a7ef2d646b.png
That means ctld isn't loaded
Hi, for Ciribob and those using CTLD's autolase function, I've modified the JTACAutolase lasing function to work also with moving targets, like convoy. I've turned the fixed point on target position, updated every second, into a leading point, updated at same rate, and dynamically adapted to speed and heading.
As result the laser bomb is no longer ineffective by falling too short.
(I use a drone Jtac that updates its orbit center on moving targets)
 
In the function ctld.laseUnit I replaced this :
 
local _enemyVector = _enemyUnit:getPoint()
local _enemyVectorUpdated = { x = _enemyVector.x, y = _enemyVector.y + 2.0, z = _enemyVector.z }
 
by :
 
local _enemyVector = _enemyUnit:getPoint()
    local speed1 = _enemyUnit:getVelocity()
    local speed2 = math.sqrt(speed1.x^2 + speed1.y^2 + speed1.z^2) + 0.1
    local dir1 = mist.getHeading(_enemyUnit)
    local dir2 = mist.utils.round(dir1, 1)
    repeat
    LeadPoint = mist.getRandPointInCircle(_enemyVector, 1.4*speed2)
    LeadPointV3 = mist.utils.makeVec3GL(LeadPoint)
    ref = _enemyVector
    vec = {x = LeadPointV3.x - ref.x, y = LeadPointV3.y - ref.y, z = LeadPointV3.z - ref.z}
    dir3 = mist.utils.getDir(vec, ref)
    dir4 = mist.utils.round(dir3, 1)
    until dir4 == dir2
local _enemyVectorUpdated = { x = LeadPointV3.x, y = LeadPointV3.y + 2.0, z = LeadPointV3.z }
 
[/url]  
 
Sounds great!

I've not worked on CTLD in a long time, been busy with SRS but if you send a pull request I can look to add it

Sent from my HD1903 using Tapatalk

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

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...

Hello all. Just searched this thread, didn't see any discussion of this, so I wanted to mention it.

 

In the CTLD.lua there is a comment that says:

 

ctld.enabledFOBBuilding = true -- if true, you can load a crate INTO a C-130 than when unpacked creates a Forward Operating Base (FOB) which is a new place to spawn (crates) and carry crates from
-- In future i'd like it to be a FARP but so far that seems impossible...
-- You can also enable troop Pickup at FOBS

 

I'm the right mixture of dumb and smart to try it anyway, and found that it is possible to spawn a working FARP static object via the FOB crates function. I remember a year or more ago this did not work, but now it does. I don't know when or why it changed. This is very exciting! I've wanted to be able to do this in missions forever. An advancing front line; reducing RTB flight times; dynamic mission design; etc.

 

Maybe I'm wrong and it's always worked. But if not, give it a try! Simple change to the object deployed by unpacking the crate(s):

 

function ctld.spawnFOB(_country, _unitId, _point, _name)

    local _crate = {
        ["category"] = "Heliports",
        ["type"] = "FARP",

      --  ["unitId"] = _unitId,
        ["y"] = _point.z,
        ["x"] = _point.x,
        ["name"] = _name,
        ["canCargo"] = false,
        ["heading"] = 0,
    }

    _crate["country"] = _country
    mist.dynAddStatic(_crate)
    local _spawnedCrate = StaticObject.getByName(_crate["name"])
    --local _spawnedCrate = coalition.addStaticObject(_country, _crate)
 

Now, here's the thing. I tried specifying the single helipad. Unpacking spawns the full size one. I tried the new invisible FARP. Nope.

So, I'm missing something. Either in DCS itself, or in the 4.4.9 MIST, or in CTLD itself. Remember, I'm still pretty dumb in scripting, just trial and error edits.

 

Does anyone know more about this, or would be willing to take a look?

Simple .miz attached. (I can rebuild it for Caucasus map if needed)

 

ETA: The dynamically spawned FARP cannot be used for player aircraft slots AFAIK, unless you deploy the crates in an area where the slots were already pre-placed in the ME. Maybe there's some scripting voodoo capable of that, I don't know. It's fine with me even so. I'm more interested in the ability to dynamically decide to create a working Forward Arming and Refueling Point wherever I want on the map, based on resources I/we transport there.

 

testing invis FARP.miz


Edited by Wakeshift
clarification/addition
  • Like 2

i7 9700k | GTX 1080 | 32 gb | X55 + ProFlight pedals | TrackIR | Win10

 

Caucasus | Nevada | Persian Gulf | Normandy | Channel | Syria

A-10C | AV-8B | F/A-18C | F-16C | UH-1H | SA342 | Mi8 | Ka50 | FC3 | CA | SC | Kiowa

Link to comment
Share on other sites

@Wakeshiftyes since that comment was written you can now spawn a FARP and have it function for rearm / refuel

 

Slots though are baked into the mission itself so cannot be dynamically added unfortunately

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

Link to comment
Share on other sites

I'm late to the party then, haha. Thanks @Ciribob

 

Has anyone been able to spawn a single helipad rather than the full 4-spot FARP object? Or better yet, the new Invisible FARP? That would be the ideal usage for me.

 

i7 9700k | GTX 1080 | 32 gb | X55 + ProFlight pedals | TrackIR | Win10

 

Caucasus | Nevada | Persian Gulf | Normandy | Channel | Syria

A-10C | AV-8B | F/A-18C | F-16C | UH-1H | SA342 | Mi8 | Ka50 | FC3 | CA | SC | Kiowa

Link to comment
Share on other sites

  • 2 weeks later...

Sorry if this question has been answered somewhere in the 41 pages of this thread, or if I'm in the wrong place.. But I have a question about transporting ground units with CTLD.

 

I've been playing around lately with the CTLD options in one of the MP PVE servers (server: 4YA Syria something something.. :tongue:)

 

I noticed that when I insert ground troops (anti tank squad for instance), they start moving towards a certain position on the map. (I assume this location is somehow set by the mission creator). Once I know where they move to, I can decide where to drop them off in order to get the most out of them. 

 

However, when inserting ground vehicles like a Stryker or a Humvee (by loading, unloading and unpacking crates), these vehicles don't move.

Is this normal or did the mission creator fail to give them proper routes/waypoints?

Also when I click the inserted units icon in the F10 map, it says it's uncontrolled.. so that doesn't look good :tongue:

 

I have seen others deploy vehicles and then take control of those vehicles, using the Combined Arms module. Is that the only way of effectively making use of this CTLD function?


Edited by sirrah

System specs:

 

i7-8700K @stock speed - GTX 1080TI @ stock speed - AsRock Extreme4 Z370 - 32GB DDR4 @3GHz- 500GB SSD - 2TB nvme - 650W PSU

HP Reverb G1 v2 - Saitek Pro pedals - TM Warthog HOTAS - TM F/A-18 Grip - TM Cougar HOTAS (NN-Dan mod) & (throttle standalone mod) - VIRPIL VPC Rotor TCS Plus with ALPHA-L grip - Pointctrl & aux banks <-- must have for VR users!! - Andre's SimShaker Jetpad - Fully adjustable DIY playseat - VA+VAICOM

 

~ That nuke might not have been the best of ideas, Sir... the enemy is furious ~ GUMMBAH

Link to comment
Share on other sites

On 2/7/2021 at 2:16 PM, Wakeshift said:

Hello all. Just searched this thread, didn't see any discussion of this, so I wanted to mention it.

 

In the CTLD.lua there is a comment that says:

 

ctld.enabledFOBBuilding = true -- if true, you can load a crate INTO a C-130 than when unpacked creates a Forward Operating Base (FOB) which is a new place to spawn (crates) and carry crates from
-- In future i'd like it to be a FARP but so far that seems impossible...
-- You can also enable troop Pickup at FOBS

 

I'm the right mixture of dumb and smart to try it anyway, and found that it is possible to spawn a working FARP static object via the FOB crates function. I remember a year or more ago this did not work, but now it does. I don't know when or why it changed. This is very exciting! I've wanted to be able to do this in missions forever. An advancing front line; reducing RTB flight times; dynamic mission design; etc.

 

Maybe I'm wrong and it's always worked. But if not, give it a try! Simple change to the object deployed by unpacking the crate(s):

 

function ctld.spawnFOB(_country, _unitId, _point, _name)

    local _crate = {
        ["category"] = "Heliports",
        ["type"] = "FARP",

      --  ["unitId"] = _unitId,
        ["y"] = _point.z,
        ["x"] = _point.x,
        ["name"] = _name,
        ["canCargo"] = false,
        ["heading"] = 0,
    }

    _crate["country"] = _country
    mist.dynAddStatic(_crate)
    local _spawnedCrate = StaticObject.getByName(_crate["name"])
    --local _spawnedCrate = coalition.addStaticObject(_country, _crate)
 

Now, here's the thing. I tried specifying the single helipad. Unpacking spawns the full size one. I tried the new invisible FARP. Nope.

So, I'm missing something. Either in DCS itself, or in the 4.4.9 MIST, or in CTLD itself. Remember, I'm still pretty dumb in scripting, just trial and error edits.

 

Does anyone know more about this, or would be willing to take a look?

Simple .miz attached. (I can rebuild it for Caucasus map if needed)

 

ETA: The dynamically spawned FARP cannot be used for player aircraft slots AFAIK, unless you deploy the crates in an area where the slots were already pre-placed in the ME. Maybe there's some scripting voodoo capable of that, I don't know. It's fine with me even so. I'm more interested in the ability to dynamically decide to create a working Forward Arming and Refueling Point wherever I want on the map, based on resources I/we transport there.

 

testing invis FARP.miz 96.66 kB · 1 download

 

 

You need to add a shape_name and it will work!

 

Nice find brother.

 

You can learn what it should be by adding one of the objects elsewhere in the miz then unpacking the miz and opening the mission file in an editor.
 

    local _crate = {
        ["category"] = "Heliports",
        ["shape_name"] = "invisiblefarp",
        ["type"] = "Invisible FARP",
      --  ["unitId"] = _unitId,
        ["y"] = _point.z,
        ["x"] = _point.x,
        ["name"] = _name,
        ["canCargo"] = false,
        ["heading"] = 0,
    }


 

 

  • Like 2

 

Banner EDForum2020.jpg

Have fun. Don't suck. Kill bad guys. 👍

https://discord.gg/blacksharkden/

Link to comment
Share on other sites

  • 2 weeks later...
On 2/24/2021 at 10:03 PM, fargo007 said:

 

You need to add a shape_name and it will work!

 

Nice find brother.

 

You can learn what it should be by adding one of the objects elsewhere in the miz then unpacking the miz and opening the mission file in an editor.
 


    local _crate = {
        ["category"] = "Heliports",
        ["shape_name"] = "invisiblefarp",
        ["type"] = "Invisible FARP",
      --  ["unitId"] = _unitId,
        ["y"] = _point.z,
        ["x"] = _point.x,
        ["name"] = _name,
        ["canCargo"] = false,
        ["heading"] = 0,
    }


 

 

Really awesome! I got a full farp from a 3-crate Herc drop, I can use CTLD to load troops but the farp isnt supplied with fuel or ammo

Link to comment
Share on other sites

You'll have to move the correct vehicles there, or modify the script to spawn the other objects instead of the tower it produces by default. 

 

I used a farp tent. This provides immediate rearm functionality but I still need to be able to get vehicles there for the other stuff.  

 

Just as easy to have it spawn a farp fuel dump which would give you refuel but no rearm.  

 

Or modify it to put everything there if you want. 

 

"Let your conscience be your guide!"  

 

Banner EDForum2020.jpg

Have fun. Don't suck. Kill bad guys. 👍

https://discord.gg/blacksharkden/

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...