dimitriov Posted February 18, 2020 Share Posted February 18, 2020 (edited) If an admin could stick this ;) Hi guys, So, let's get started. Example linked in end of the post. 1) Mod organization : Post 2.5.6 static mods shall use the new database way of working. Which means this : In the Shapes folder, you need this kind of organization : With in this example : - Container_coll.EDM : The collision file for your object. You need to make it in 3dsMax. - Container_Desert.EDM : Your main file EDM - Container_destr.EDM : Your destroyed model - Container_Desert.lods : a txt file whose extension has been changed to "lods", with this included : model = { lods = { {"Container_Desert.edm",30000.0}, }, collision_shell = "Container_coll.edm"; } In this simple example : there is only one LOD, it will appear up to 30 000 m (not good for optimization for you info), and the collision model is selected. 2) The Database folder It only needs to contain one file, though you can create as many as you want, it should be named this way, the "DIM" being the name you want to give : In this file, you get this : A) The call for textures and shapes, written this way : mount_vfs_model_path (current_mod_path.."/Shapes") mount_vfs_texture_path (current_mod_path.."/Textures/Containers") B) The main function, which has to be written only once at the beginning, and which differs from the already given POLYCHOP user (little mistake in the destroyed shape file designation) : local function add_structure(f) if(f) then f.shape_table_data = { { file = f.ShapeName, life = f.Life, username = f.Name, desrt = f.ShapeNameDestr or "self", classname = f.classname or "lLandVehicle", positioning = f.positioning or "BYNORMAL" -- {"BYNORMAL", "ONLYHEIGTH", "BY_XZ", "ADD_HEIGTH"} } } if f.ShapeNameDestr then f.shape_table_data[#f.shape_table_data + 1] = { name = f.ShapeNameDestr, file = f.ShapeNameDestr, } end f.mapclasskey = "P0091000076"; f.attribute = {wsType_Static, wsType_Standing} add_surface_unit(f) GT = nil; else error("Can't add structure") end; end C) Finally, your file description : add_structure({ Name = "Container_Desert", --ID name DisplayName = _("FARP CONTAINER DESERT"), --Ingame display name ShapeName = "Container_Desert", --Main shape name (Lods selection will be automatic) ShapeNameDestr = "container_destr", --Destroyed Shape Life = 10, --Life Rate = 10, --Score when destroyed category = 'Fortification', SeaObject = false, isPutToWater = false, }) THE SHAPE NAMES SHOULD NOT BE ENDED BY A .EDM, like "Container_Desert.EDM", else, the collision will not work ! 4) Finally, your entry.lua in the main folder : declare_plugin("J'ai une énorme queue", { image = "SOO.bmp", installed = true, dirName = current_mod_path, fileMenuName = _("SOO"), version = "2.5", state = "installed", info = _("Bloub"), }) ---------------------------------------------------------------------------------------- mount_vfs_model_path (current_mod_path.."/Shapes") mount_vfs_liveries_path (current_mod_path.."/Liveries") mount_vfs_sound_path (current_mod_path.."/Sounds") ------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------- dofile(current_mod_path.."/Database/db_DIM_objects.lua") plugin_done() EXAMPLE / https://drive.google.com/file/d/1nqJ_-4qzJEQdYKL5QuO2gOJ44ro1-D9p/view?usp=sharing Edited February 19, 2020 by dimitriov 1 Link to comment Share on other sites More sharing options...
Backy 51 Posted February 18, 2020 Share Posted February 18, 2020 Great job Dimi! I don't need no stinkin' GPS! (except for PGMs :D) [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
PSV_Tango Posted February 18, 2020 Share Posted February 18, 2020 declare_plugin("J'ai une énorme queue", That's what i call a nice plugin description :lol::lol::lol: Member of the Virtual Patrouille Suisse Since 2010. High and slow, fast and low. Intel i9-12900k | 64GB RAM | RTX4090 | HP Rerverb G2 | T-50CM3 Base | WinWing Set Link to comment Share on other sites More sharing options...
joey45 Posted February 18, 2020 Share Posted February 18, 2020 More work to do... Thank you very much. The only way to make sense out of change is to plunge into it, move with it, and join the dance. "Me, the 13th Duke of Wybourne, here on the ED forums at 3 'o' clock in the morning, with my reputation. Are they mad.." https://ko-fi.com/joey45 Link to comment Share on other sites More sharing options...
dimitriov Posted February 18, 2020 Author Share Posted February 18, 2020 Using the database way of working is actually better in terms of gameplay anyway, the AI won't try to shell walls, canopy or fuel tanks because it considers them as a threat. Link to comment Share on other sites More sharing options...
Rudel_chw Posted February 18, 2020 Share Posted February 18, 2020 This is only for statics? I was using the VPC objects as fortification units, in order to have their lighting animations to work. For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra For Gaming: 34" Monitor - Ryzen 3600X - 32 GB DDR4 2400 - nVidia GTX1070ti - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar - Oculus Rift CV1 Mobile: iPad Pro 12.9" of 256 GB Link to comment Share on other sites More sharing options...
dimitriov Posted February 18, 2020 Author Share Posted February 18, 2020 Only for statics yes. Until next episode I guess . . . Link to comment Share on other sites More sharing options...
voc Posted February 18, 2020 Share Posted February 18, 2020 (edited) I checked the collisions in the old version of VPC, everything works fine. Lua files are old version. The new version also works. Thanks. Edited February 18, 2020 by voc Link to comment Share on other sites More sharing options...
Rudel_chw Posted February 18, 2020 Share Posted February 18, 2020 I checked the collisions in the old version of VPC, everything works fine. Hello Voc, glad to see you back. Can you please upload the most current version of your Mod somewhere (or update the one that is at VirPil's website) ? I can't get the Mod to work anymore, since the release of 2.5.6 :( Thanks a lot, Eduardo For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra For Gaming: 34" Monitor - Ryzen 3600X - 32 GB DDR4 2400 - nVidia GTX1070ti - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar - Oculus Rift CV1 Mobile: iPad Pro 12.9" of 256 GB Link to comment Share on other sites More sharing options...
voc Posted February 19, 2020 Share Posted February 19, 2020 Rudel_chw Hi Eduardo. I haven't decided whether I'm going to fix it or not. There are so many things to fix, it will take a lot of time. The change in LUA files will not fix it. Link to comment Share on other sites More sharing options...
Rudel_chw Posted February 19, 2020 Share Posted February 19, 2020 Rudel_chw Hi Eduardo. I haven't decided whether I'm going to fix it or not. There are so many things to fix, it will take a lot of time. Thanks for the response .. I fully understand you, real life is important and DCS is just a hobby :) If you finally do decide to fix it, perhaps you could consider to do a smaller Mod Pack, as many items are not actually widely used (at least that's my experience), while others are used a lot. A useful subset of the current Mod, would be these elements: VPC-NATO-Light Tower v2 & v3 VPC-NATO-Protection VPC-NATO-Control Tower VPC-NATO-Canopy VPC-NATO-Firehouse VPC-NATO-AGM65 Containers VP-Lighting Tower VP-GOTB 100m 250m & 750m VP-CZT-1 2 & 3 VP-CZT-Kaponir VP-Big Angar VP-Barrier VP-RZona VP-Zabor 200m VP-Firehouse VP-Angar VP-Su 24 VP-Su 35 Damage VP-Su 35 Stair VP-Su 35 Cloth VP-Su 35 Car VP-T-50 Cloth VP-House Admin VP-URAL Apa VP-URAL Tent VP-Streetlight VP-SKP VP-Electric Sub Station VP-AZT-60 Best regards and thanks a lot for creating this Mod on the first place :) Eduardo For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra For Gaming: 34" Monitor - Ryzen 3600X - 32 GB DDR4 2400 - nVidia GTX1070ti - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar - Oculus Rift CV1 Mobile: iPad Pro 12.9" of 256 GB Link to comment Share on other sites More sharing options...
dimitriov Posted February 19, 2020 Author Share Posted February 19, 2020 FYI Voc I remade your canopy V1 and V3, I used yours as reference since there is no need to reinvent the powder so it was faster. If it takes you a long time to remake models, I can already send these two to you Link to comment Share on other sites More sharing options...
Grajo Posted April 7, 2020 Share Posted April 7, 2020 Hi dimitriov, Thanks a lot for sharing this valuable info. I wish I could find a post like this like a year ago... I learned the few things I know digging in other people Mods and was not a very productive technique to be honest. I was up to write a post about how to static objects with liveries and then just found yours. Happy that I can learn something else in your post (I am in a very basic stage of DCS code understanding...) I uploaded a Small example also here (more BASIC than yours): https://www.digitalcombatsimulator.com/en/files/3308885/ The EDM and textures can be easily replaced by any user to display their own model ingame without touching any line of code. That way maybe people get hooked and start the journey to their own mods and so on... :] Will be great if you continue to share your knowledge with us in "another chapter" :thumbup: Thanks! Link to my MODs - So far... Link to comment Share on other sites More sharing options...
scrapple Posted January 19, 2021 Share Posted January 19, 2021 This post looks like it would be very useful for someone (like me) trying to figure out how to get a static object into the game. Unfortunately, the image attachments in the original post are broken, which makes it much less useful. Would it be possible to fix the attachments? Link to comment Share on other sites More sharing options...
Veteran66 Posted February 7, 2021 Share Posted February 7, 2021 hi all how link Panzer vehicle Mod to org Sound like: Maybach_HL_120TRM_EngineIdle.sdef 75mmGun.sdef 75mmGun_hall.sdef i try: mount_vfs_sound_path (current_mod_path.."/Sounds") do not work German WW2 Radio calls Mod: https://www.digitalcombatsimulator.com/en/files/2161798/ Link to comment Share on other sites More sharing options...
Recommended Posts