inSky_1911CFZS Posted January 18, 2016 Posted January 18, 2016 Hi guys I've finished a new missile, both texturing and modeling are done. Just wonder if there is a way to add a completely new A2A missile in DCS, without replace any stock missile in game, and load it in FC3 aircraft? Haven't seen much people in this forum ask this question, any advice? Thanks
SkateZilla Posted January 18, 2016 Posted January 18, 2016 You would have to create a Module, and define it in the modules data lua. Theres likely a more direct way, (ie define the weapon directly), but this is the one I know of. Create a basic Aircraft AI only module and define new missile there, then define the clsid. You're still gonna have to modify loadouts to include new clsid for new missile. Last time I checked the custom Missiles/Pods I defined for a project Im working on were able to be added to loadout of other aircraft. When i get home I'll post examples. 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 Posted January 18, 2016 You would have to create a Module, and define it in the modules data lua. Theres likely a more direct way, (ie define the weapon directly), but this is the one I know of. Create a basic Aircraft AI only module and define new missile there, then define the clsid. You're still gonna have to modify loadouts to include new clsid for new missile. Last time I checked the custom Missiles/Pods I defined for a project Im working on were able to be added to loadout of other aircraft. When i get home I'll post examples. Please do! [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
inSky_1911CFZS Posted January 19, 2016 Author Posted January 19, 2016 You would have to create a Module, and define it in the modules data lua. Theres likely a more direct way, (ie define the weapon directly), but this is the one I know of. Create a basic Aircraft AI only module and define new missile there, then define the clsid. You're still gonna have to modify loadouts to include new clsid for new missile. Last time I checked the custom Missiles/Pods I defined for a project Im working on were able to be added to loadout of other aircraft. When i get home I'll post examples. So you mean the new misssile CLSID can only be used in the additional aircraft?I'll try. Thanks in advance.
SkateZilla Posted January 19, 2016 Posted January 19, 2016 (edited) So, Using the GAR-8 as an example: in your LUA that Defines the Aircraft (ie Aircraft=<name> after the last line: add_aircraft(AIRCRAFTNAME) (or in your own weapons.lua if you have weapon declarations as a separate file) You gotta past the missile info/attributes and the LoadOut CLSID Block. You'll Also Need to know the WSTypes for Stage 3 of the wsType: wsType_AA_Missile = 7 wsType_AS_Missile = 8 wsType_AA_TRAIN_Missile = 100 wsType_AS_TRAIN_Missile = 101 local MISSILE_NAME = { category = CAT_AIR_TO_AIR, name = "MISSILE-NAME", user_name = _("MISSILE-NAME"), wsTypeOfWeapon = {wsType_Weapon,wsType_Missile,wsType_AA_Missile,WSTYPE_PLACEHOLDER}, --1st Level= 4 (wsType_Weapon), 2nd Level = 4 (wsType_Missile), 3rd Level = 32 (wsType_Container), 4th Level = wsType_PLACEHOLDER --Attributes (From GAR-8) Escort = 0, Head_Type = 1, sigma = {3, 3, 3}, M = 74.39, H_max = 18000.0, H_min = -1, Diam = 127.0, Cx_pil = 2.58, D_max = 4000.0, D_min = 300.0, Head_Form = 0, Life_Time = 30.0, Nr_max = 10, v_min = 140.0, v_mid = 350.0, Mach_max = 2.2, t_b = 0.0, t_acc = 2.2, t_marsh = 0.0, Range_max = 11000.0, H_min_t = 1.0, Fi_start = 0.3, Fi_rak = 3.14152, Fi_excort = 0.79, Fi_search = 0.09, OmViz_max = 0.2, warhead = simple_aa_warhead(10), exhaust = { 1, 1, 1, 1 }, X_back = -1.455, Y_back = 0.0, Z_back = 0.0, Reflection = 0.0182, KillDistance = 5.0, ccm_k0 = 10.0, -- Counter Countermeasures Probability Factor. Value = 0 - missile has absolutely resistance to countermeasures. Default = 1 (medium probability) --seeker sensivity params SeekerSensivityDistance = 4000, -- The range of target with IR value = 1. In meters. In forward hemisphere. SeekerCooled = false, -- True is cooled seeker and false is not cooled seeker. shape_table_data = { { name = "MISSILE-NAME", file = "SHAPENAME", life = 1, fire = { 0, 1}, username = "MISSILE-NAME", index = WSTYPE_PLACEHOLDER, }, }, --Model Data Attributes from GAR-8 ModelData = { 58 , -- model params count 0.35 , -- characteristic square (?????????????????? ???????) -- ????????? ??????????? ?x 0.04 , -- Cx_k0 ?????? ?x0 ?? ??????? ( M << 1) 0.08 , -- Cx_k1 ?????? ???? ????????? ??????? 0.02 , -- Cx_k2 ???????? ?????? ?? ??????? ? ????????? ??????? 0.05, -- Cx_k3 ?????? Cx0 ?? ?????????? ( M >> 1) 1.2 , -- Cx_k4 ???????? ????? ?? ???????? ???????? 1.2 , -- ??????????? ?????? ?????? (??????????????? sqrt (M^2-1)) -- ????????? ??????????? Cy 0.5 , -- Cy_k0 ?????? ?y0 ?? ??????? ( M << 1) 0.4 , -- Cy_k1 ?????? Cy0 ?? ?????????? ( M >> 1) 1.2 , -- Cy_k2 ???????? ?????(??????) ?? ???????? ???????? 0.29 , -- 7 Alfa_max ???????????? ??????????????? ????, ??????? 0.0, --??????? ???????? ??????????? ???????? ??????? ????? -- Engine data. Time, fuel flow, thrust. -- t_statr t_b t_accel t_march t_inertial t_break t_end -- Stage -1.0, -1.0, 2.2, 0.0, 0.0, 0.0, 1.0e9, -- time of stage, sec 0.0, 0.0, 8.45, 0.0, 0.0, 0.0, 0.0, -- fuel flow rate in second, kg/sec(????????? ?????? ????? ??????? ??/???) 0.0, 0.0, 17150.0, 0.0, 0.0, 0.0, 0.0, -- thrust, newtons 25.0, -- ?????? ??????????????, ??? 18.0, -- ????? ?????? ?????????????, ??? 0, -- ?????????? ?????? ??????????????, ? 2.0, -- ????? ???????? ????????? ?????????? (?????? ??????, ????????????), ??? 1.0e9, -- ????????? ?? ???? ? ?????? ?????, ??? ?????????? ??????? ?????? ??????????? ?????? "?????", ? 1.0e9, -- ????????? ?? ????, ??? ??????? ?????? "?????" ??????????? ? ?????? ????????? ?? ?????? ???????????????? ????????? (?????? ???? ?????? ??? ????? ??????????? ?????????), ? 0.0, -- ????? ???? ?????????? ?????????? ?????? ????? 30.0, -- ?????????? ????????? ????????? ?????????? 0.0, -- ?????? ???????? ?????????? ???????????? ???????????, ???????? ??????? ? ?? 1.19, -- ????????????? ??????? ???-??????, ???? ??????? ??????? ??????? K0 1.0, -- ????????????? ??????? ???-??????, ???? ??????? ??????? ??????? K1 2.0, -- ????????????? ??????? ???-??????, ?????? ??????????? ??????? ?????????? 0.0, 0.0, 0.0, 0.0, 0.0, -- DLZ. ?????? ??? ???????? ?????????? ????? (????????? ?? ???????) 9000.0, -- ????????? ?????? 180(?????????) ????, ?=10000?, V=900??/?, ? 4000.0, -- ????????? ?????? 0(? ?????) ????, ?=10000?, V=900??/?, ? 4000.0, -- ????????? ?????? 180(?????????) ????, ?=1000?, V=900??/?, ? 0.2, -- ?????????? ??????????? ????????? ????? ??? ?????????? ??????? ???????? ???????? ?? ????? ??????????? ????. 1.0, -- ???????????? ?????????. ?????? ?????? ??????????? ????????? ????? ? ?????? ?????????. ?????????? ????????? ??? ???????? ????. 1.4, -- ???????????? ?????????. ?????? ?????? ??????????? ????????? ????? ? ??????? ?????????. ?????????? ????????? ??? ???????? ?????. -3.0, -- ???????????? ?????????. ???? ???????? ?????? ??????????? ?????????, ??????? - ?????? ?????????. 0.5, -- ????????? ????????????? ??????? ?????? ? ??????? ? ?????? ????????? ?? ?????? ????????. }, } declare_weapon(MISSILE_NAME) -- Must Match Line1 declare_loadout({ category = CAT_AIR_TO_AIR, CLSID = "{MISSILE_NAME_CLSID}", -- Picture = "aim9p.png", -- Image That shows in Loadout Editor wsTypeOfWeapon = MISSILE_NAME.wsTypeOfWeapon, -- Must Match Line One Name displayName = _("MISSILE-NAME"), --MUST MATCH PREVIOUS USER NAMES attribute = {4, 4, 32, WSTYPE_PLACEHOLDER}, Cx_pil = 0.001959765625, Count = 1, Weight = 100, Elements = { { ShapeName = "SHAPENAMEOFPYLON_OR_ADAPTER", IsAdapter = true }, { ShapeName = "SHAPENAME_OF_MISSILE" , Position = {0,-0.124918,0}}, --ATTACHMENT POSITION }, -- end of Elements }) Then you add the "{MISSILE_NAME_CLSID}" Under the pylons data. Edited February 12, 2016 by SkateZilla 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
inSky_1911CFZS Posted January 19, 2016 Author Posted January 19, 2016 So, Using the GAR-8 as an example: in your LUA that Defines the Aircraft (ie Aircraft=<name> after the last line: add_aircraft(AIRCRAFTNAME) You gotta past the missile info/attributes and the LoadOut CLSID Block. You'll Also Need to know the WSTypes for Stage 3 of the wsType: wsType_AA_Missile = 7 wsType_AS_Missile = 8 wsType_AA_TRAIN_Missile = 100 wsType_AS_TRAIN_Missile = 101 local MISSILE_NAME = { category = CAT_AIR_TO_AIR, name = "MISSILE-NAME", user_name = _("MISSILE-NAME"), wsTypeOfWeapon = {wsType_Weapon,wsType_Missile,wsType_AA_Missile,WSTYPE_PLACEHOLDER}, --1st Level= 4 (wsType_Weapon), 2nd Level = 4 (wsType_Missile), 3rd Level = 32 (wsType_Container), 4th Level = wsType_PLACEHOLDER --Attributes (From GAR-8) Escort = 0, Head_Type = 1, sigma = {3, 3, 3}, M = 74.39, H_max = 18000.0, H_min = -1, Diam = 127.0, Cx_pil = 2.58, D_max = 4000.0, D_min = 300.0, Head_Form = 0, Life_Time = 30.0, Nr_max = 10, v_min = 140.0, v_mid = 350.0, Mach_max = 2.2, t_b = 0.0, t_acc = 2.2, t_marsh = 0.0, Range_max = 11000.0, H_min_t = 1.0, Fi_start = 0.3, Fi_rak = 3.14152, Fi_excort = 0.79, Fi_search = 0.09, OmViz_max = 0.2, warhead = simple_aa_warhead(10), exhaust = { 1, 1, 1, 1 }, X_back = -1.455, Y_back = 0.0, Z_back = 0.0, Reflection = 0.0182, KillDistance = 5.0, ccm_k0 = 10.0, -- Counter Countermeasures Probability Factor. Value = 0 - missile has absolutely resistance to countermeasures. Default = 1 (medium probability) --seeker sensivity params SeekerSensivityDistance = 4000, -- The range of target with IR value = 1. In meters. In forward hemisphere. SeekerCooled = false, -- True is cooled seeker and false is not cooled seeker. shape_table_data = { { name = "MISSILE-NAME", file = "SHAPENAME", life = 1, fire = { 0, 1}, username = "MISSILE-NAME", index = WSTYPE_PLACEHOLDER, }, }, --Model Data Attributes from GAR-8 ModelData = { 58 , -- model params count 0.35 , -- characteristic square (?????????????????? ???????) -- ????????? ??????????? ?x 0.04 , -- Cx_k0 ?????? ?x0 ?? ??????? ( M << 1) 0.08 , -- Cx_k1 ?????? ???? ????????? ??????? 0.02 , -- Cx_k2 ???????? ?????? ?? ??????? ? ????????? ??????? 0.05, -- Cx_k3 ?????? Cx0 ?? ?????????? ( M >> 1) 1.2 , -- Cx_k4 ???????? ????? ?? ???????? ???????? 1.2 , -- ??????????? ?????? ?????? (??????????????? sqrt (M^2-1)) -- ????????? ??????????? Cy 0.5 , -- Cy_k0 ?????? ?y0 ?? ??????? ( M << 1) 0.4 , -- Cy_k1 ?????? Cy0 ?? ?????????? ( M >> 1) 1.2 , -- Cy_k2 ???????? ?????(??????) ?? ???????? ???????? 0.29 , -- 7 Alfa_max ???????????? ??????????????? ????, ??????? 0.0, --??????? ???????? ??????????? ???????? ??????? ????? -- Engine data. Time, fuel flow, thrust. -- t_statr t_b t_accel t_march t_inertial t_break t_end -- Stage -1.0, -1.0, 2.2, 0.0, 0.0, 0.0, 1.0e9, -- time of stage, sec 0.0, 0.0, 8.45, 0.0, 0.0, 0.0, 0.0, -- fuel flow rate in second, kg/sec(????????? ?????? ????? ??????? ??/???) 0.0, 0.0, 17150.0, 0.0, 0.0, 0.0, 0.0, -- thrust, newtons 25.0, -- ?????? ??????????????, ??? 18.0, -- ????? ?????? ?????????????, ??? 0, -- ?????????? ?????? ??????????????, ? 2.0, -- ????? ???????? ????????? ?????????? (?????? ??????, ????????????), ??? 1.0e9, -- ????????? ?? ???? ? ?????? ?????, ??? ?????????? ??????? ?????? ??????????? ?????? "?????", ? 1.0e9, -- ????????? ?? ????, ??? ??????? ?????? "?????" ??????????? ? ?????? ????????? ?? ?????? ???????????????? ????????? (?????? ???? ?????? ??? ????? ??????????? ?????????), ? 0.0, -- ????? ???? ?????????? ?????????? ?????? ????? 30.0, -- ?????????? ????????? ????????? ?????????? 0.0, -- ?????? ???????? ?????????? ???????????? ???????????, ???????? ??????? ? ?? 1.19, -- ????????????? ??????? ???-??????, ???? ??????? ??????? ??????? K0 1.0, -- ????????????? ??????? ???-??????, ???? ??????? ??????? ??????? K1 2.0, -- ????????????? ??????? ???-??????, ?????? ??????????? ??????? ?????????? 0.0, 0.0, 0.0, 0.0, 0.0, -- DLZ. ?????? ??? ???????? ?????????? ????? (????????? ?? ???????) 9000.0, -- ????????? ?????? 180(?????????) ????, ?=10000?, V=900??/?, ? 4000.0, -- ????????? ?????? 0(? ?????) ????, ?=10000?, V=900??/?, ? 4000.0, -- ????????? ?????? 180(?????????) ????, ?=1000?, V=900??/?, ? 0.2, -- ?????????? ??????????? ????????? ????? ??? ?????????? ??????? ???????? ???????? ?? ????? ??????????? ????. 1.0, -- ???????????? ?????????. ?????? ?????? ??????????? ????????? ????? ? ?????? ?????????. ?????????? ????????? ??? ???????? ????. 1.4, -- ???????????? ?????????. ?????? ?????? ??????????? ????????? ????? ? ??????? ?????????. ?????????? ????????? ??? ???????? ?????. -3.0, -- ???????????? ?????????. ???? ???????? ?????? ??????????? ?????????, ??????? - ?????? ?????????. 0.5, -- ????????? ????????????? ??????? ?????? ? ??????? ? ?????? ????????? ?? ?????? ????????. }, } declare_weapon(MISSILE_NAME) -- Must Match Line1 declare_loadout({ category = CAT_AIR_TO_AIR, CLSID = "{MISSILE_NAME_CLSID}", -- Picture = "aim9p.png", -- Image That shows in Loadout Editor wsTypeOfWeapon = MISSILE_NAME.wsTypeOfWeapon, -- Must Match Line One Name displayName = _("MISSILE-NAME"), --MUST MATCH PREVIOUS USER NAMES attribute = {4, 4, 32, WSTYPE_PLACEHOLDER}, Cx_pil = 0.001959765625, Count = 1, Weight = 100, Elements = { { ShapeName = "SHAPENAMEOFPYLON_OR_ADAPTER", IsAdapter = true }, { ShapeName = "SHAPENAME_OF_MISSILE" , Position = {0,-0.124918,0}}, --ATTACHMENT POSITION }, -- end of Elements }) Then you add the "{MISSILE_NAME_CLSID}" Under the pylons data. A little bit of understanding question: The code add_aircraft(AIRCRAFT_NAME) is located at the end of the the code. That means,in the AIRCRAFT_NAME.lua, first declare the aircraft(FM,weight,gear pos,light pos ,etc),then declare the Pylons and loadouts,and finally declare the new missile? Is that correct?
SkateZilla Posted January 19, 2016 Posted January 19, 2016 (edited) Yes, the missile and loadout declaration are outside of all the brackets for the Aircraft Edited January 19, 2016 by SkateZilla 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
SVKSniper Posted January 19, 2016 Posted January 19, 2016 My 50 cent: Skate you make new A/A missile??? I make and doesnt work...why?? First: wsType_AA_Missile = 7 (this i understand if you declare missile) but doesnt work if you make new A/A missile in F-86.lua i see: local MISSILE_NAME = { category = CAT_AIR_TO_AIR, name = "MISSILE-NAME", user_name = _("MISSILE-NAME"), wsTypeOfWeapon = {wsType_Weapon,wsType_Missile,wsType_AA_Missile,WSTYPE_PLACEHOLDER}, is right,ok but in declaration is(and i dont understand why) wsTypeOfWeapon = MISSILE_NAME.wsTypeOfWeapon, --is ok attribute = {4, 4, 32, WSTYPE_PLACEHOLDER}, --why is 32 if for A/A missile is num. 7 ??????? If i change to 7 doesnt work..... Support my work
SVKSniper Posted January 19, 2016 Posted January 19, 2016 Now I did a quick test and result.......wokrs!:) Only i dont understand is atribute for missile: in db_weapons_data.lua is atribute for A/A missile example: {4, 4, 7, 19} Here is my lua code and works: [color=Red][color=Black][color=Red][color=Black]local R23R = { category = CAT_AIR_TO_AIR, name = "R23R", user_name = _("R23R"), wsTypeOfWeapon = {wsType_Weapon,wsType_Missile,wsType_AA_Missile,WSTYPE_PLACEHOLDER}, Escort = 1, Head_Type = 6, sigma = {5.6, 5, 5.6}, M = 215.0, H_max = 28000.0, H_min = 20.0, Diam = 200.0, Cx_pil = 3, D_max = 12000.0, D_min = 700.0, Head_Form = 1, Life_Time = 100.0, Nr_max = 18, v_min = 140.0, v_mid = 500.0, Mach_max = 3.0, t_b = 0.0, t_acc = 5.0, t_marsh = 0.0, Range_max = 35000.0, H_min_t = 20.0, Fi_start = 0.3, Fi_rak = 3.14152, Fi_excort = 0.87, Fi_search = 0.1, OmViz_max = 0.35, warhead = simple_aa_warhead(10), exhaust = { 1, 1, 1, 1 }, X_back = -1.3281, Y_back = -0.102, Z_back = 0.0, Reflection = 0.036, KillDistance = 6.0, shape_table_data = { { name = "R23R", file = "R23R", life = 1, fire = { 0, 1}, username = "R-23R", [color=Red]if you change to "R23R" on HUD you see "R23R" but with[/color][/color] [color=Black][color=Red]"R-23R" you see on HUD correct "23R" [/color] index = WSTYPE_PLACEHOLDER, }, }, ModelData = { 58 , -- model params count 0.9 , -- characteristic square (őŕđŕęňĺđčńňč÷ĺńęŕ˙ ďëîůŕäü) -- ďŕđŕěĺňđű çŕâčńčěîńňč Ńx 0.05 , -- Cx_k0 ďëŕíęŕ Ńx0 íŕ äîçâóęĺ ( M << 1) 0.12 , -- Cx_k1 âűńîňŕ ďčęŕ âîëíîâîăî ęđčçčńŕ 0.02 , -- Cx_k2 ęđóňčçíŕ ôđîíňŕ íŕ ďîäőîäĺ ę âîëíîâîěó ęđčçčńó 0.07 , -- Cx_k3 ďëŕíęŕ Cx0 íŕ ńâĺđőçâóęĺ ( M >> 1) 1.2 , -- Cx_k4 ęđóňčçíŕ ńďŕäŕ çŕ âîëíîâűě ęđčçčńîě 1.2 , -- ęîýôôčöčĺíň îňâŕëŕ ďîë˙đű -- ďŕđŕěĺňđű çŕâčńčěîńňč Cy 0.9 , -- Cy_k0 ďëŕíęŕ Ńy0 íŕ äîçâóęĺ ( M << 1) 0.8 , -- Cy_k1 ďëŕíęŕ Cy0 íŕ ńâĺđőçâóęĺ ( M >> 1) 1.2 , -- Cy_k2 ęđóňčçíŕ ńďŕäŕ(ôđîíňŕ) çŕ âîëíîâűě ęđčçčńîě 0.239 , -- 7 Alfa_max ěŕęńčěŕëüíűé áŕëŕíńčđîâŕ÷íűé óăîë, đŕäčŕíű 0.0, --óăëîâŕ˙ ńęîđîńňü ńîçäŕâŕéěŕ˙ ěîěĺíňîě ăŕçîâűő đóëĺé -- t_statr t_b t_accel t_march t_inertial t_break t_end -1.0, -1.0 , 6.0 , 0.0, 0.0, 0.0, 1.0e9, -- time interval 0.0, 0.0 , 10.0 , 0.0, 0.0, 0.0, 0.0, -- fuel flow rate in second kg/sec(ńĺęóíäíűé đŕńőîä ěŕńńű ňîďëčâŕ ęă/ńĺę) 0.0, 0.0 , 40000.0, 0.0 , 0.0, 0.0, 0.0, -- thrust 6000 by doc 1.0e9, -- ňŕéěĺđ ńŕěîëčęâčäŕöčč, ńĺę 60.0, -- âđĺě˙ đŕáîňű ýíĺđăîńčńňĺěű 0, -- đŕńňî˙íčĺ äî ďîâĺđőíîńňč ńđŕáŕňűâŕíč˙ đŕäčîâçđűâŕňĺë˙, ě 0.4, -- âđĺě˙ çŕäĺđćęč âęëţ÷ĺíč˙ óďđŕâëĺí˙, ńĺę 1.0e9, -- 5000.0, -- äŕëüíîńňü äî öĺëč â ěîěĺíň ďóńęŕ, âűřĺ ęîňîđîé âűďîëí˙ĺňń˙ ěŕíĺâđ íŕáîđŕ âűńîňű 1.0e9, -- 10000.0, -- äŕëüíîńňü äî öĺëč íŕ ňđŕńńĺ, ěĺíĺĺ ęîňîđîé íŕ÷číŕĺňń˙ çŕâĺđřĺíčĺ ěŕíĺâđŕ íŕáîđŕ âűńîňű (äëćĺí áűňü áîëüřĺ ÷ĺě ďđĺäűëóůčé ďŕđŕěĺňđ) 0.0, -- ńčíóń óăëŕ âîçâűřĺíč˙ ňđŕĺęňîđčč íŕáîđŕ ăîđęč 50.0, -- ďđîäîëüíîĺ óńęîđĺíč˙ âçâĺäĺíč˙ âçđűâŕňĺë˙ 0.0, -- ěîäóëü ńęîđîńňč ńîîáůŕéěűé ęŕňŕďóëüňíűě óńňđîéńňâîě, âűřčáíűě çŕđ˙äîě č ňä 1.19, -- őŕđŕęňđčńňčęŕ ńčńňĺěű ŃŔÓ-ĐŔĘĹŇŔ, ęîýô ôčëüňđŕ âňîđîăî ďîđ˙äęŕ K0 1.0, -- őŕđŕęňđčńňčęŕ ńčńňĺěű ŃŔÓ-ĐŔĘĹŇŔ, ęîýô ôčëüňđŕ âňîđîăî ďîđ˙äęŕ K1 2.0, -- őŕđŕęňđčńňčęŕ ńčńňĺěű ŃŔÓ-ĐŔĘĹŇŔ, ďîëîńŕ ďđîďóńęŕíč˙ ęîíňóđŕ óďđŕâëĺíč˙ 0.0, 0.0, 0.0, 0.0, 0.0, -- DLZ. Äŕííűĺ äë˙ đŕńń÷ĺňŕ äŕëüíîńňĺé ďóńęŕ (číäčęŕöč˙ íŕ ďđčöĺëĺ) 1.0, 1.0, 1.0, 0.2, 0.6, 1.4, -3.0, 0.5, }, } declare_weapon(R23R) declare_loadout({ category = CAT_AIR_TO_AIR, CLSID = "{R23R}", Picture = "R-23R.png", wsTypeOfWeapon = R23R.wsTypeOfWeapon, displayName = _("R-23R"), attribute = {4, 4, 32, WSTYPE_PLACEHOLDER}, Cx_pil = 0.001959765625, Count = 1, Weight = 100, Elements = { { ShapeName = "R23R" , Position = {0,0,0}}, }, -- end of Elements })[/color][/color][/color][/color] Support my work
Boberro Posted January 19, 2016 Posted January 19, 2016 You have to check "missile levels declaration". Each missile, bomb, nurs ect have own style - A-A missile, A-G missile ect. Example {4, 4, 7, 19} means: 4 - it is a weapon 4 - it is a missile 7 - it is a A-A missile 19 - identificator of the declared object (IIRC it is that) Glance at wsTypes.lua and Types.lua. I tried to make a new weapon from scratch but the connections between files are very enormous - you can see it based on existing weapons. Reminder: Fighter pilots make movies. Bomber pilots make... HISTORY! :D | Also to be remembered: FRENCH TANKS HAVE ONE GEAR FORWARD AND FIVE BACKWARD :D ಠ_ಠ ツ
LevelPulse Posted January 19, 2016 Posted January 19, 2016 Would this process also work for creating a new bomb? [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
SVKSniper Posted January 19, 2016 Posted January 19, 2016 You have to check "missile levels declaration". Each missile, bomb, nurs ect have own style - A-A missile, A-G missile ect. Example {4, 4, 7, 19} means: 4 - it is a weapon 4 - it is a missile 7 - it is a A-A missile 19 - identificator of the declared object (IIRC it is that) Glance at wsTypes.lua and Types.lua. I tried to make a new weapon from scratch but the connections between files are very enormous - you can see it based on existing weapons. But doesnt work if i define {4, 4, 7, 19}.....missile works with in declaration {4, 4, 32, WSTYPE_PLACEHOLDER} and that is what i dont understand.....:( You know what I mean??? Support my work
Boberro Posted January 19, 2016 Posted January 19, 2016 Did you check all numbers? Perhaps the missile ID you want to create is somewhere duplicated. New thing must have non-occupied name, I've seen in the files a policy "n+1" number so the last number of the objects plus 1. I do not want to confuse you, perhaps I say it wrong or I am wrong. I do mods for myself and doing that I got some exp, that's all. Reminder: Fighter pilots make movies. Bomber pilots make... HISTORY! :D | Also to be remembered: FRENCH TANKS HAVE ONE GEAR FORWARD AND FIVE BACKWARD :D ಠ_ಠ ツ
inSky_1911CFZS Posted January 19, 2016 Author Posted January 19, 2016 Yes, the missile and loadout declaration are outside of all the brackets for the Aircraft Thank you so much!It works. Will upload my mod after it's finished:)
SVKSniper Posted January 19, 2016 Posted January 19, 2016 Did you check all numbers? Perhaps the missile ID you want to create is somewhere duplicated. New thing must have non-occupied name, I've seen in the files a policy "n+1" number so the last number of the objects plus 1. I do not want to confuse you, perhaps I say it wrong or I am wrong. I do mods for myself and doing that I got some exp, that's all. This all i know....if you see in db_mods.lua ED declare for next missile(containers,bomb,etc.): local WSTYPE_PLACEHOLDER = "</WSTYPE>" local next_aircraft_index = 255 local next_bomb_index = 255 local next_missile_index = 255 local next_container_index = 255 local parts_index_start = 255That is in my previous post i define WSTYPE_PLACEHOLDER(this change your ID missiles).....and if you check my lua code you see in local missile code is for "wsTypeOfWeapon" declare as "wsType_AA_Missile".......problem is in declaration loadout: [color=Red][color=Black][color=Red][color=Black]attribute = {4, 4, [color=Red] 32[/color], WSTYPE_PLACEHOLDER},[/color][/color][/color][/color][color=Red][color=Black][color=Red][color=Black] [/color][/color][/color][/color] You can test my lua code first with number "32" and than change to "7"(for A/A missile). This number is only problem.....why i declare as "container"(in delaration loadout)..... and I would like to know the answer to that question:( Support my work
SkateZilla Posted January 19, 2016 Posted January 19, 2016 I have 32 for all my custom missiles attributes, Im pretty sure its that way for the GAR as well. *(Will double check) the last number defines the MISSILE ID. ie if you open the weapons database or wsTypes each missile has their own ID. if your making a new loadout declaration with existing missile the 4th number would be the missile ID. a NEW missile would need the placeholder variable, and have the placeholder defined: wsTypeOfWeapon = MISSILE_NAME.wsTypeOfWeapon Im sure theres a more coreect way to add missiles other than piggy backing them on a new module. but I dont know what that is. Could maybe do a Mods/tech/MyMissiles/ folder, make a Entry LUA with command to do file MyMissiles.lua,, and place the missioe data in theMyMissiles.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
SkateZilla Posted January 19, 2016 Posted January 19, 2016 Would this process also work for creating a new bomb? Yes, just have to change attributes, I do not have a sample for Local Bomb declaration attributes though 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
SkateZilla Posted January 19, 2016 Posted January 19, 2016 This all i know....if you see in db_mods.lua ED declare for next missile(containers,bomb,etc.): local WSTYPE_PLACEHOLDER = "</WSTYPE>" local next_aircraft_index = 255 local next_bomb_index = 255 local next_missile_index = 255 local next_container_index = 255 local parts_index_start = 255That is in my previous post i define WSTYPE_PLACEHOLDER(this change your ID missiles).....and if you check my lua code you see in local missile code is for "wsTypeOfWeapon" declare as "wsType_AA_Missile".......problem is in declaration loadout: [color=Red][color=Black][color=Red][color=Black]attribute = {4, 4, [color=Red] 32[/color], WSTYPE_PLACEHOLDER},[/color][/color][/color][/color][color=Red][color=Black][color=Red][color=Black] [/color][/color][/color][/color] You can test my lua code first with number "32" and than change to "7"(for A/A missile). This number is only problem.....why i declare as "container"(in delaration loadout)..... and I would like to know the answer to that question:( You try attribute = {4, 4, 7, WSTYPE_PLACEHOLDER}, ?? 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
SVKSniper Posted January 19, 2016 Posted January 19, 2016 You try attribute = {4, 4, 7, WSTYPE_PLACEHOLDER}, ?? Yes...doesnt work only with attribute = {4, 4, 32, WSTYPE_PLACEHOLDER}, Support my work
SkateZilla Posted January 19, 2016 Posted January 19, 2016 i think for load out the attributes have to be 4,4,32, x for A2A Missiles. Like I said, mine were all 32, so was The GAR8's 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
SVKSniper Posted January 19, 2016 Posted January 19, 2016 Yes Skate....but i think only programer from ED can reply to question why....but i need answer if i make other type missile and weapons..... I think that our debate will help a lot of people in the development of new weapons Support my work
Boberro Posted January 20, 2016 Posted January 20, 2016 If we are to the weapons.... I guess you know it is also need to make a smoke for a missile? It is not just edit two files and we get working new weapon. As far I noticed Config\Weapons and Scripts folder are mainly to be edited (not all files of course). Do you know how can I change a *class* of the ground vehicle or the ship? Despite my efforts I cannot force ships to fly. I've seen nowhere value which defines this unit class (airplane, building, ship, ground unit) can be in the air or not). I modified ME, set value for ships (height) but they start glued to the ground. I can put them on the land though. Reminder: Fighter pilots make movies. Bomber pilots make... HISTORY! :D | Also to be remembered: FRENCH TANKS HAVE ONE GEAR FORWARD AND FIVE BACKWARD :D ಠ_ಠ ツ
SVKSniper Posted January 20, 2016 Posted January 20, 2016 If we are to the weapons.... I guess you know it is also need to make a smoke for a missile? It is not just edit two files and we get working new weapon. As far I noticed Config\Weapons and Scripts folder are mainly to be edited (not all files of course). Im not sue if i understand(sory for my english) but smoke define in local part: exhaust = { 1, 1, 1, 1 }, --RGBA X_back = -1.3281, Y_back = -0.102, Z_back = 0.0, Do you know how can I change a *class* of the ground vehicle or the ship? Despite my efforts I cannot force ships to fly. I've seen nowhere value which defines this unit class (airplane, building, ship, ground unit) can be in the air or not). I modified ME, set value for ships (height) but they start glued to the ground. I can put them on the land though. When I tried to make a new FARP(without success) saw classes as defined in unitsclasses.lua..... Support my work
Boberro Posted January 21, 2016 Posted January 21, 2016 What I meant, some special missiles have "schemes" in the path: \Config\Weapons\schemes\missiles. Regarding unit classes I glanced the file you mentioned (unitclasses.lua) but I have found nothing interesting regarding what value sets the ground unit is glued to the earth, as ships well. I changed weight but no effect. There must be some kind of variable which sets that a tank can't fly. Settings them starting in air (modified ME) is no go - I set 500m alt but they start on the ground. Something must block this. Reminder: Fighter pilots make movies. Bomber pilots make... HISTORY! :D | Also to be remembered: FRENCH TANKS HAVE ONE GEAR FORWARD AND FIVE BACKWARD :D ಠ_ಠ ツ
Recommended Posts