Jump to content

How to add spawnable crates in CTLD script


BMGZ06

Recommended Posts

I am new to this but I know that another server using CTLD has the Volcan M163 and M6 Linebacker as a spawnable crate. I have followed the code string examples in the .lua for CTLD and gave it a unique weight and tried several different names for the Volcan AAA and when the crate spawns it says it s a Vulcan AAA but then unpacking it becomes a tank. Not sure where I am going wrong.

 

 

{ weight = 395, desc = "Vulcan - AA", unit = "Vulcan M163", side = 2, cratesRequired = 1 },

 

also tried just placing the string under the ground forces section as:

 

{ weight = 395, desc = "Vulcan - AA", unit = "Vulcan M163", side = 2 },

 

 

same issue for M6 Linebacker

System Specs: 13900K, Strix Z790 Gaming E, MSI 4090 Sprim Liquid X  OC'd, 64gb Gskill Trident Z DDR5, Samsung 980 PRO M.2 SSD,. Winwing throttle, Winwing panels/MIPs and VKB GF3/MCGU stick, MFG Crosswind V2, HP REVERB G2.

 

 

Link to comment
Share on other sites

Came across this post:

https://forums.eagle.ru/showthread.php?t=174971

 

For the Vulcan it says "Vulcan" and for the M6 it says "M6 Linebacker". Not sure if it's the words in quotes that it needs or the preceding word. In the Linebacker case, you could try M6_Linebacker.

 

Let us know of that works.

 

-Wraith

 

EDIT: Appears to be the names in quotes you would need to use.


Edited by wraith70
Link to comment
Share on other sites

Came across this post:

https://forums.eagle.ru/showthread.php?t=174971

 

For the Vulcan it says "Vulcan" and for the M6 it says "M6 Linebacker". Not sure if it's the words in quotes that it needs or the preceding word. In the Linebacker case, you could try M6_Linebacker.

 

Let us know of that works.

 

-Wraith

 

EDIT: Appears to be the names in quotes you would need to use.

 

Thanks for the help. What actually ended up working was setting it to M163 Vulcan with a weight of 600. Now they both work!

System Specs: 13900K, Strix Z790 Gaming E, MSI 4090 Sprim Liquid X  OC'd, 64gb Gskill Trident Z DDR5, Samsung 980 PRO M.2 SSD,. Winwing throttle, Winwing panels/MIPs and VKB GF3/MCGU stick, MFG Crosswind V2, HP REVERB G2.

 

 

Link to comment
Share on other sites

Look in your DCS installation ../Scripts/Database

 

In case of the Linebacker, look in the ../vehicles/SAM folder.

Open the M6 Linebacker.lua and find:

 

GT.Name = "M6 Linebacker";

 

Its the GT.Name entry you want to enter in CTLD the 'unit =' entry for all the units you want to add in CTLD. 'desc =' in CTLD is the name you see in the CTLD menu.

 

Some AA examples:

{ weight = 399, desc = "SA-19 Tunguska 2S6", unit = "2S6 Tunguska", side = 1, cratesRequired = 2 },
{ weight = 400, desc = "Strela 10M3", unit = "Strela-10M3", side = 1, cratesRequired = 1 },
{ weight = 401, desc = "SA-9 Strela-1", unit = "Strela-1 9P31", side = 1, cratesRequired = 1 },
{ weight = 402, desc = "M6 Linebacker", unit = "M6 Linebacker", side = 2, cratesRequired = 1 },
{ weight = 403, desc = "SA-8 OSA 9A33", unit = "Osa 9A33 ln", side = 1, cratesRequired = 2 },
{ weight = 404, desc = "Roland ADS", unit = "Roland ADS", side = 2, cratesRequired = 2 },
{ weight = 405, desc = "ZSU-23-4 Shilka", unit = "ZSU-23-4 Shilka", side = 1, cratesRequired = 1 },
{ weight = 406, desc = "M163 Vulcan", unit = "Vulcan", side = 2, cratesRequired = 1 },

 

Weight I think is just an ID, has to be unique for the given entry.

- Jack of many DCS modules, master of none.

- Personal wishlist: F-15A, F-4S Phantom II, JAS 39A Gripen, SAAB 35 Draken, F-104 Starfighter, Panavia Tornado IDS.

 

| Windows 11 | i5-12400 | 64Gb DDR4 | RTX 3080 | 2x M.2 | 27" 1440p | Rift CV1 | Thrustmaster Warthog HOTAS | MFG Crosswind pedals |

Link to comment
Share on other sites

Look in your DCS installation ../Scripts/Database

 

In case of the Linebacker, look in the ../vehicles/SAM folder.

Open the M6 Linebacker.lua and find:

 

GT.Name = "M6 Linebacker";

 

Its the GT.Name entry you want to enter in CTLD the 'unit =' entry for all the units you want to add in CTLD. 'desc =' in CTLD is the name you see in the CTLD menu.

 

Some AA examples:

{ weight = 399, desc = "SA-19 Tunguska 2S6", unit = "2S6 Tunguska", side = 1, cratesRequired = 2 },
{ weight = 400, desc = "Strela 10M3", unit = "Strela-10M3", side = 1, cratesRequired = 1 },
{ weight = 401, desc = "SA-9 Strela-1", unit = "Strela-1 9P31", side = 1, cratesRequired = 1 },
{ weight = 402, desc = "M6 Linebacker", unit = "M6 Linebacker", side = 2, cratesRequired = 1 },
{ weight = 403, desc = "SA-8 OSA 9A33", unit = "Osa 9A33 ln", side = 1, cratesRequired = 2 },
{ weight = 404, desc = "Roland ADS", unit = "Roland ADS", side = 2, cratesRequired = 2 },
{ weight = 405, desc = "ZSU-23-4 Shilka", unit = "ZSU-23-4 Shilka", side = 1, cratesRequired = 1 },
{ weight = 406, desc = "M163 Vulcan", unit = "Vulcan", side = 2, cratesRequired = 1 },

 

Weight I think is just an ID, has to be unique for the given entry.

 

This is where I am confused. You are correct about the "M6 Linebacker", but for the Vulcan, it is this:

 

GT.Name = "Vulcan";
GT.Aliases = {"M163 Vulcan"}
GT.DisplayName = _("AAA Vulcan M163");

 

OP said "M163 Vulcan" worked for him. So you can use GT.Name or GT.Aliases?


Edited by wraith70
Link to comment
Share on other sites

I dont know. I just know GT.Name works for me.

- Jack of many DCS modules, master of none.

- Personal wishlist: F-15A, F-4S Phantom II, JAS 39A Gripen, SAAB 35 Draken, F-104 Starfighter, Panavia Tornado IDS.

 

| Windows 11 | i5-12400 | 64Gb DDR4 | RTX 3080 | 2x M.2 | 27" 1440p | Rift CV1 | Thrustmaster Warthog HOTAS | MFG Crosswind pedals |

Link to comment
Share on other sites

This is where I am confused. You are correct about the "M6 Linebacker", but for the Vulcan, it is this:

 

GT.Name = "Vulcan";
GT.Aliases = {"M163 Vulcan"}
GT.DisplayName = _("AAA Vulcan M163");

 

OP said "M163 Vulcan" worked for him. So you can use GT.Name or GT.Aliases?

 

I will upload my lua code for it when I get back home today.

System Specs: 13900K, Strix Z790 Gaming E, MSI 4090 Sprim Liquid X  OC'd, 64gb Gskill Trident Z DDR5, Samsung 980 PRO M.2 SSD,. Winwing throttle, Winwing panels/MIPs and VKB GF3/MCGU stick, MFG Crosswind V2, HP REVERB G2.

 

 

Link to comment
Share on other sites

This is where I am confused. You are correct about the "M6 Linebacker", but for the Vulcan, it is this:

 

GT.Name = "Vulcan";
GT.Aliases = {"M163 Vulcan"}
GT.DisplayName = _("AAA Vulcan M163");

 

OP said "M163 Vulcan" worked for him. So you can use GT.Name or GT.Aliases?

 

 

Here is the entire crate code string I am using for the ground forces section

 

ctld.spawnableCrates = {
   -- name of the sub menu on F10 for spawning crates
   ["Ground Forces"] = {
       --crates you can spawn
       -- weight in KG
       -- Desc is the description on the F10 MENU
       -- unit is the model name of the unit to spawn
       -- 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
       -- dont use that option with the HAWK Crates
       { weight = 500, desc = "HMMWV - TOW", unit = "M1045 HMMWV TOW", side = 2 },
       { weight = 505, desc = "HMMWV - MG", unit = "M1043 HMMWV Armament", side = 2 },

       { weight = 510, desc = "BTR-D", unit = "BTR_D", side = 1 },
       { weight = 495, desc = "BRDM-2", unit = "BRDM-2", side = 2 },
{ weight = 515, desc = "MBT M1A2 Abrams", unit = "MBT M1A2 Abrams", side = 2 },
{ weight = 517, desc = "Linebacker", unit = "M6 Linebacker", side = 2 },
	
			
       { weight = 520, desc = "HMMWV - JTAC", unit = "Hummer", side = 2, }, -- 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 = 250, desc = "SPH 2S19 Msta", unit = "SAU Msta", side = 1, cratesRequired = 3 },
       { weight = 255, desc = "M-109", unit = "M-109", side = 2, cratesRequired = 3 },

       { weight = 252, desc = "Ural-375 Ammo Truck", unit = "Ural-375", side = 1, cratesRequired = 2 },
       { weight = 253, desc = "M-818 Ammo Truck", unit = "M 818", side = 2, cratesRequired = 2 },

       { weight = 800, desc = "FOB Crate - Small", unit = "FOB-SMALL" }, -- Builds a FOB! - requires 3 * ctld.cratesRequiredForFOB

 

 

 

This is for the Vulcan under the AA Crates section:

 

{ weight = 600, desc = "Vulcan", unit = "M163 Vulcan", side = 2 },

System Specs: 13900K, Strix Z790 Gaming E, MSI 4090 Sprim Liquid X  OC'd, 64gb Gskill Trident Z DDR5, Samsung 980 PRO M.2 SSD,. Winwing throttle, Winwing panels/MIPs and VKB GF3/MCGU stick, MFG Crosswind V2, HP REVERB G2.

 

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

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