LevelPulse Posted January 17, 2016 Posted January 17, 2016 So i want to keep everything done on "this" mod in /mod/aircraft/a-4e. However if i want to add a new bomb it won't work. I've declared the new loadout but you also need to create information about the bomb. How is this possible without having to edit DCS files outside of the Mods folder. I know the GAR-8 has done it has they have defined a local = 9b. However i see nothing that calls for info on the 9B. [sIGPIC][/sIGPIC] Director | Team Coordinator ME-163B Project The DCS Modding Hub Discord PC Specs: Intel I7 8700k 4.7Ghz Gigabyte Aorus Ultra Gaming Z370 Motherboard 16GB Corsair Vengeance DDR4 3000MHz Ram 500GB Samsung Evo 850 SSD
SkateZilla Posted January 18, 2016 Posted January 18, 2016 the GAR8 and its parameters are defined in the F86 LUA. Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill (F4-3200C16D-16GTZR x2), ASRock X470 Taichi Ultimate, XFX RX6800XT Merc 310 (RX-68XTALFD9) 3x ASUS VS248HP + Oculus HMD, Thrustmaster Warthog HOTAS + MFDs
gospadin Posted January 18, 2016 Posted January 18, 2016 Does every folder in Mods get scanned for an entry.lua automatically? My liveries, mods, and missions for DCS:World M-2000C English Cockpit | Extra Beacons Mod | Nav Kneeboard | Community A-4E
Grimes Posted January 18, 2016 Posted January 18, 2016 Its the Coremods folder and yeah it does. Its probably similar to how liveries are loading by looking for a description.lua file to define where to actually look for the actual data. So its a combo of entry.lua and whatever other files you want to use to organize the data. The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
inSky_1911CFZS Posted January 18, 2016 Posted January 18, 2016 Abolutely same problem with me. Just declared a new missile in Mods but can't get it loaded in plane. Editing payload settings in Scripts/Database/Plane/ doesn't help anyway.
SkateZilla Posted January 18, 2016 Posted January 18, 2016 What exactly are you trying to do? Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill (F4-3200C16D-16GTZR x2), ASRock X470 Taichi Ultimate, XFX RX6800XT Merc 310 (RX-68XTALFD9) 3x ASUS VS248HP + Oculus HMD, Thrustmaster Warthog HOTAS + MFDs
LevelPulse Posted January 18, 2016 Author Posted January 18, 2016 What exactly are you trying to do? Okay we wanted to make our own bomb, M-117, yes we know it's already in game, but we wanted to just test it out. However the weapon doesn't work when we've declared the loadout in the pylon. This is because DCS world can't find any data for the M-117, that's why i'm trying to find out where i would put the new weapon in the .lua? [sIGPIC][/sIGPIC] Director | Team Coordinator ME-163B Project The DCS Modding Hub Discord PC Specs: Intel I7 8700k 4.7Ghz Gigabyte Aorus Ultra Gaming Z370 Motherboard 16GB Corsair Vengeance DDR4 3000MHz Ram 500GB Samsung Evo 850 SSD
SkateZilla Posted January 24, 2016 Posted January 24, 2016 OK, You CAN Make Custom Weapons w/o Piggy backing them onto another module and use them on any aircraft that supports them by adding the CLSID to the Pylon Station. So. Step 1, Create a Folder in the /DCS World/mods/Tech/ folder (ie /DCS World/mods/Tech/CustomWeapons/ ) Step 2, Make an Entry.lua in Notepad++ --[[ Plugin Declaration Start]]-- declare_plugin("CustomWeapons", --[[ Tells DCS the Name of your Plugin ]]-- { installed = true, --[[ Will Tell DCS if the Module is Installed or Place Holder, Leave as true ]]-- dirName = current_mod_path, --[[ Tells DCS where the Module is located, Leave as current_mod_path ]]-- version = "0.0.01 Alpha", --[[ Tells DCS the Version Number, Can Change or Leave as is ]]-- state = "installed", --[[ Tells DCS the Installed State, Leave as installed ]]-- info = _("CustomWeapons"), --[[ Tells DCS the Info Balloon ]]-- }) --[[Files to be Processed]]-- dofile(current_mod_path..'/CustomWeapons.lua') --[[Tells DCS to Process the LUA File w/ You Weapons/Loadout Declarations]]-- --[[Plugin Declaration End]]-- plugin_done() Step 3, Move all your Custom Declarations to a New LUA File, Save as the Do File Name you put in your entry.lua ie, I copied my custom declaration for Dual AIM-120's from my SuperBug Mod to it's own LUA, and removed my SuperBug Mod from DCS, --[[ Begin Loadout Declarations]]-- declare_loadout( { -- category = CAT_AIR_TO_AIR, CLSID = "{LAU_115_2_AIM120}", Picture = "aim120c.png", wsTypeOfWeapon = {wsType_Weapon,wsType_Missile,wsType_AA_Missile, 106}, displayName = _("LAU115C-LAU127 2*AIM-120C"), attribute = {4, 4, 32, 106}, Cx_pil = 0.001959765625, Count = 2, Weight = 370, Elements = { { ShapeName = "LAU-115C+2_LAU127", IsAdapter = true }, { ShapeName = "AIM-120C" , Position = {0.4, -0.175, 0.17}, Rotation = {-80.0, 0.0, 0.0}}, { ShapeName = "AIM-120C" , Position = {0.4, -0.175, -0.17}, Rotation = {80.0, 0.0, 0.0}}, }, -- end of Elements }) --[[ End of Loadout Declarations ]]-- Step 4, Open Aircraft you want to add weapons too, and add the CLSID to the Pylons. (ie I Added the Above Dual AIM120 Declaration CLSID to the Mirage Pylon (Just to Verify Game Loads the Weapons). Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill (F4-3200C16D-16GTZR x2), ASRock X470 Taichi Ultimate, XFX RX6800XT Merc 310 (RX-68XTALFD9) 3x ASUS VS248HP + Oculus HMD, Thrustmaster Warthog HOTAS + MFDs
LevelPulse Posted January 24, 2016 Author Posted January 24, 2016 Thanks for the help SkateZilla, i have one more question, when declaring a new weapon (not the loadout) would that also go in customweapons.lua? [sIGPIC][/sIGPIC] Director | Team Coordinator ME-163B Project The DCS Modding Hub Discord PC Specs: Intel I7 8700k 4.7Ghz Gigabyte Aorus Ultra Gaming Z370 Motherboard 16GB Corsair Vengeance DDR4 3000MHz Ram 500GB Samsung Evo 850 SSD
SkateZilla Posted January 24, 2016 Posted January 24, 2016 yes, New Weapons should go into weapons lua as well. Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill (F4-3200C16D-16GTZR x2), ASRock X470 Taichi Ultimate, XFX RX6800XT Merc 310 (RX-68XTALFD9) 3x ASUS VS248HP + Oculus HMD, Thrustmaster Warthog HOTAS + MFDs
IAF_Phantom Posted January 30, 2016 Posted January 30, 2016 Hi SkateZilla, Is there a way to add the weapon & load-out to an existing aircraft by using a lua script ? without editing the ED aircraft file IAF.101_Phantom, 101 squadron XO, Preflight Community Manager [sIGPIC][/sIGPIC] watch your six, i'm behind you ----- Mods: IAF_Weapons: Python 3 and 4 https://www.digitalcombatsimulator.com/en/files/2835842/
SkateZilla Posted January 31, 2016 Posted January 31, 2016 they would have to be added to the Pylons Data regardless. Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill (F4-3200C16D-16GTZR x2), ASRock X470 Taichi Ultimate, XFX RX6800XT Merc 310 (RX-68XTALFD9) 3x ASUS VS248HP + Oculus HMD, Thrustmaster Warthog HOTAS + MFDs
Cytt0rak Posted January 31, 2016 Posted January 31, 2016 I have a question about cruise missiles. I modeled a SOM cruise missile. Its wings unfold when shot. How can I make it happen in dcs? Do I use arg? If its only that can I have arg number? Thanks
indiadamjones Posted February 24, 2016 Posted February 24, 2016 I think you may need a new thread I have a question about cruise missiles. I modeled a SOM cruise missile. Its wings unfold when shot. How can I make it happen in dcs? Do I use arg? If its only that can I have arg number? Thanks Animations are generally handled with draw-arguments, I believe, but I'd start a new thread, as this one has been answered already. TY, SkateZilla. | A-10C | Ka-50 | F-86 | Mig-15 | P-51D | [sIGPIC][/sIGPIC]
Hook47 Posted March 2, 2016 Posted March 2, 2016 OK, You CAN Make Custom Weapons w/o Piggy backing them onto another module and use them on any aircraft that supports them by adding the CLSID to the Pylon Station. So. Step 1, Create a Folder in the /DCS World/mods/Tech/ folder (ie /DCS World/mods/Tech/CustomWeapons/ ) Step 2, Make an Entry.lua in Notepad++ --[[ Plugin Declaration Start]]-- declare_plugin("CustomWeapons", --[[ Tells DCS the Name of your Plugin ]]-- { installed = true, --[[ Will Tell DCS if the Module is Installed or Place Holder, Leave as true ]]-- dirName = current_mod_path, --[[ Tells DCS where the Module is located, Leave as current_mod_path ]]-- version = "0.0.01 Alpha", --[[ Tells DCS the Version Number, Can Change or Leave as is ]]-- state = "installed", --[[ Tells DCS the Installed State, Leave as installed ]]-- info = _("CustomWeapons"), --[[ Tells DCS the Info Balloon ]]-- }) --[[Files to be Processed]]-- dofile(current_mod_path..'/CustomWeapons.lua') --[[Tells DCS to Process the LUA File w/ You Weapons/Loadout Declarations]]-- --[[Plugin Declaration End]]-- plugin_done() Step 3, Move all your Custom Declarations to a New LUA File, Save as the Do File Name you put in your entry.lua ie, I copied my custom declaration for Dual AIM-120's from my SuperBug Mod to it's own LUA, and removed my SuperBug Mod from DCS, --[[ Begin Loadout Declarations]]-- declare_loadout( { -- category = CAT_AIR_TO_AIR, CLSID = "{LAU_115_2_AIM120}", Picture = "aim120c.png", wsTypeOfWeapon = {wsType_Weapon,wsType_Missile,wsType_AA_Missile, 106}, displayName = _("LAU115C-LAU127 2*AIM-120C"), attribute = {4, 4, 32, 106}, Cx_pil = 0.001959765625, Count = 2, Weight = 370, Elements = { { ShapeName = "LAU-115C+2_LAU127", IsAdapter = true }, { ShapeName = "AIM-120C" , Position = {0.4, -0.175, 0.17}, Rotation = {-80.0, 0.0, 0.0}}, { ShapeName = "AIM-120C" , Position = {0.4, -0.175, -0.17}, Rotation = {80.0, 0.0, 0.0}}, }, -- end of Elements }) --[[ End of Loadout Declarations ]]-- Step 4, Open Aircraft you want to add weapons too, and add the CLSID to the Pylons. (ie I Added the Above Dual AIM120 Declaration CLSID to the Mirage Pylon (Just to Verify Game Loads the Weapons). Skatezilla, Bear with me as I am new, but I am trying to enable some non included weapons on the Mirage 2000C and having trouble getting the aircraft to recognize them. I am trying to get the MER 6 Mk 82 mounted and working, I have it mounted, but the M-2000C thinks its a fuel tank. Is something to the effect of what you have mentioned here how I would need to make it work on the aircraft in the proper mode? the CLSID is "{MER*6_MK_82}"
SkateZilla Posted March 3, 2016 Posted March 3, 2016 Skatezilla, Bear with me as I am new, but I am trying to enable some non included weapons on the Mirage 2000C and having trouble getting the aircraft to recognize them. I am trying to get the MER 6 Mk 82 mounted and working, I have it mounted, but the M-2000C thinks its a fuel tank. Is something to the effect of what you have mentioned here how I would need to make it work on the aircraft in the proper mode? the CLSID is "{MER*6_MK_82}" Please Post the code you used and I'll double check it. Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill (F4-3200C16D-16GTZR x2), ASRock X470 Taichi Ultimate, XFX RX6800XT Merc 310 (RX-68XTALFD9) 3x ASUS VS248HP + Oculus HMD, Thrustmaster Warthog HOTAS + MFDs
Hook47 Posted March 3, 2016 Posted March 3, 2016 Please Post the code you used and I'll double check it. Sure. Once I'm home I'll edit this post to display it. Thing is I know I must be missing something. I put the weapons on the pylons in Coremods/aircraft/m2000c/M2000C.lau, so it becomes selectable in armament menu, but the aircraft thinks it is a fuel tank. Here is what that code looking like (Pylon 2 used as an example) pylon(2, 0, -1.809, -0.556, 2.333, {use_full_connector_position=true, connector = "str_pnt_002", arg = 309, arg_value = 0}, { {CLSID = "{FD21B13E-57F3-4C2A-9F78-C522D0B5BCE1}", arg_value = 0.15 }, -- Super 530D {CLSID = "{Matra_S530D}", arg_value = 0.15 }, -- Super 530D {CLSID = "{Matra155RocketPod}", arg_value = 0.25 }, -- Matra Type 155 Rocket pod {CLSID = "{BCE4E030-38E9-423E-98ED-24BE3DA87C32}", arg_value = 0.35 }, -- MK-82 {CLSID = "{Mk82SNAKEYE}", arg_value = 0.35 }, -- MK-82 Snakeye {CLSID = "{ADD3FAE1-EBF6-4EF9-8EFC-B36B5DDF1E6B}", arg_value = 0.35 }, -- MK-20 Rockeye (Beluga stand-in must change) {CLSID = "{M2KC_RAFAUT_MK82}", arg_value = 0.35 }, -- MK-82 x2 {CLSID = "{M2KC_RAFAUT_MK82S}", arg_value = 0.35 }, -- MK-82S x2 {CLSID = "{MER*6_MK_82}", arg_value = 0.35 }, -- MER 6 Mk 82 Sense the aircraft still thinks it is a fuel tank, I tried declaring a new loud out under Coremods/aircraft/m2000c/weapons/M2kC_Weapons.lau but I have a feeling this is where I am messing up, partly because I don't know exactly what to put, particularly under elements. Maybe I am going about this all wrong but I am learning!. Here is that code: declare_loadout({ -- Testing category = CAT_BOMBS, CLSID = "{MER*6_MK_82}", attribute = {wsType_Weapon, wsType_Bomb, wsType_Container, WSTYPE_PLACEHOLDER}, wsTypeOfWeapon = {4, 5, 9, 31}, Count = 6, --count of wepon Cx_pil = 0.002, -- drag index of whole rack Picture = "mk82.png", displayName = _("{MER*6_MK_82}"), Weight = 100 + 2 * 232,-- weight adapter + weapon Elements = })
SkateZilla Posted March 3, 2016 Posted March 3, 2016 There's already MER * 6 MK-82 in the weapons database for DCS. Uuse CLSID: {1C97B4A0-AA3B-43A8-8EE7-D11071457185} for the Pylon, no need to declare any new loadouts Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill (F4-3200C16D-16GTZR x2), ASRock X470 Taichi Ultimate, XFX RX6800XT Merc 310 (RX-68XTALFD9) 3x ASUS VS248HP + Oculus HMD, Thrustmaster Warthog HOTAS + MFDs
Hook47 Posted March 3, 2016 Posted March 3, 2016 There's already MER * 6 MK-82 in the weapons database for DCS. Uuse CLSID: {1C97B4A0-AA3B-43A8-8EE7-D11071457185} for the Pylon, no need to declare any new loadouts Understood, and using that I can get them on the wing, but the aircraft thinks they are fuel tanks and wont enter CCRP mode to drop them. I was just wondering if you knew of a way to enable them to function like the Mk. 82s on single or twin ejectors
yufighter Posted April 3, 2016 Posted April 3, 2016 (edited) To create a new weapon had to write scripts in 4 files. After each upgrade DCS, I have to re-write them to files from the game. Does anyone have an idea how to define weapons only with the script in aircraft.lua file? example: nurs_table.lua ----------------------------------------------------------------- -- VRZ_57 ----------------------------------------------------------------- declare_nurs("VRZ_57", _("VRZ_57"), "VRZ_57", "nurs-standard", { -- FM fm = { mass = 2.175 + 1.2953515, -- start weight, kg caliber = 0.057, -- Caliber, meters cx_coeff = {1,1.2668931,0.67,0.4521834,2.08}, -- Cx L = 0.51, -- Length, meters I = 0.4313938, -- moment of inertia Ix = 0.0017991, -- not used Ma = 0.111698, -- dependence moment coefficient of by AoA Mw = 1.2351299, -- dependence moment coefficient by angular speed shapeName = "", wind_time = 0.625, -- dispersion coefficient wind_sigma = 4.85, -- dispersion coefficient wing_unfold_time = 0.017, -- Unfold time, sec }, engine = { fuel_mass = 1.0953515, -- Fuel mass, kg impulse = 160, -- Specific impuls, sec boost_time = 0, -- Time of booster action work_time = 0.475, -- Time of mid-flight engine action boost_factor= 1, -- Booster to cruise trust ratio nozzle_position = {{-0.471, 0, 0}}, -- meters tail_width = 0.052, -- contrail thickness boost_tail = 1, work_tail = 1, smoke_color = {0.6, 0.6, 0.6}; smoke_transparency = 0.3; }, warhead = warheads["VRZ_57"], }, { dist_min = 300, -- min range, meters dist_max = 1700, -- max range, meters }) warheads.lua --------------------------------------------- -- Rockets --------------------------------------------- warheads["VRZ_57"] = { mass = 1.08, expl_mass = 0.37, -- Warhead 1.08 kg, explosive 0.37 kg + fragments bonus other_factors = { 1.0, 0.5, 0.5 }, concrete_factors = { 1.0, 0.5, 0.1 }, concrete_obj_factor = 0.0, obj_factors = { 1.0, 1.0 }, cumulative_factor= 3.0, cumulative_thickness = 0.1 }; wsTypes.lua ----------------------------------------------- -- Unguided rockets ----------------------------------------------- VRZ_57 = 161; -- VRZ_57 aircraft.lua ---------------------------------------------- ---------------------------------------------- -- A1_VRZ_57 ---------------------------------------------- declare_loadout({ category = CAT_ROCKETS, CLSID = "{A1_VRZ_57}", Picture = "vrz57.png", wsTypeOfWeapon = {4, 7, 33, 161}, displayName = _("A1_VRZ_57"), attribute = {4, 7, 32, WSTYPE_PLACEHOLDER}, Cx_pil = 0.001959765625, Count = 1, Weight = 3.95, Elements = { {ShapeName = "A1", IsAdapter = true }, {ShapeName = "VRZ_57" , Position={0,-0.174918,0}}, }, -- end of Elements }) Edited April 3, 2016 by yufighter
Recommended Posts