Fudge Posted October 22, 2013 Share Posted October 22, 2013 I've got a 3D model of a building and currently have managed to get it in game using the old method (editing the data base entries and such), however I would like to be able to add the structures through the mod folder system if possible. Currently I've got the mod folder to load, with the icons and backgrounds, and using some code from the forum I'm able to add in my house as a unit, I would like to know how to add it as a structure, and then add in other models using the same set up. Currently in entry.lua I've got an edited CA entry declare_plugin("Britain 1940 by Fudge", { image = "CA.bmp", installed = true, -- if false that will be place holder , or advertising dirName = current_mod_path, version = "0.1", binaries = { }, fileMenuName = _("Britain"), update_id = "CA", version = "1.2.6", state = "installed", info = _("A collection of structures to populate the English county side. 1940"), InputProfiles = { }, Skins = { { name = _("Britain 1940"), dir = "Skins/1" }, }, Options = { { name = _("Britain 1940"), nameId = "Britain 1940", dir = "Options", }, }, }) -------------------------------------------------------------------- --dofile(current_mod_path../'loadex.lua') dofile(current_mod_path..'/buildings.lua') plugin_done() This then loads buildings.lua --mounting 3d model paths and texture paths mount_vfs_model_path (current_mod_path.."/Shapes") --mount_vfs_liveries_path (current_mod_path.."/Liveries") mount_vfs_texture_path (current_mod_path.."/Textures") GT = {}; set_recursive_metatable(GT, GT_t.generic_stationary) set_recursive_metatable(GT.chassis, GT_t.CH_t.STATIC); GT.chassis.life = 1 GT.visual.shape = "Terraced_End_01.EDM" GT.visual.shape_dstr = "" --Burning after hit GT.visual.fire_size = 0 --relative burning size GT.visual.fire_pos = {0,0,0}; GT.visual.fire_time = 0 --burning time (seconds) GT.time_agony = 180; GT.Name = "Terraced_End_01_mod" GT.DisplayName = _("Terraced End 01") GT.Rate = 1 GT.DetectionRange = 0; GT.ThreatRange = 0; GT.mapclasskey = "P0091000076"; GT.attribute = {wsType_Ground,wsType_Tank,wsType_NoWeapon,wsTypeVAZ, }; GT.category = "Civilians"; add_surface_unit(GT) Thanks for any help Link to comment Share on other sites More sharing options...
joey45 Posted October 22, 2013 Share Posted October 22, 2013 I have a few FARPs I would like to get in through the mod folder aswel. 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...
Red.01 Posted October 27, 2013 Share Posted October 27, 2013 Same here The lack of info on how to get models into the game is amazing. I think its time they added a auto importer that installs your model in the correct place. Link to comment Share on other sites More sharing options...
jib Posted October 28, 2013 Share Posted October 28, 2013 Here is a short thread about it http://forums.eagle.ru/showthread.php?t=96165 This is a long thread about it with some gems of info in there http://forums.eagle.ru/showthread.php?t=89164 You can download my DSHK Gun I have linked there. https://skydrive.live.com/?cid=b379ad3e017f62a1&id=B379AD3E017F62A1%21554&authkey=!AGv1hfw1qAv9PxM I have a static building template somewhere I will see if I can find it. 1 Mods I use: KA-50 JTAC - Better Fire and Smoke - Unchain Rudder from trim KA50 - Sim FFB for G940 - Beczl Rocket Pods Updated! Processor: Intel Q6600 @ 3.00GHz GPU: GeForce MSI RTX 2060 6GB RAM: Crucial 8GB DDR2 HDD: 1TBGB Crucial SSD OS: Windows 10, 64-bit Peripherals: Logitech G940 Hotas, TrackiR 5, Voice Activated commands , Sharkoon 5.1 headset. ,Touch Control for iPad, JoyToKey Link to comment Share on other sites More sharing options...
Fudge Posted October 28, 2013 Author Share Posted October 28, 2013 Thank you very much. Those are the threads I've currently been going though. I seem unable to download your gun in the zip file, Skydrive is complaining about unable to scan for virus. Would be great if you can find your static building template, would be ideal. Link to comment Share on other sites More sharing options...
Fudge Posted November 2, 2013 Author Share Posted November 2, 2013 I've now solved map icons, health bar and adding multiple units under one lua file. Code below shows my changes. Still looking into how to use the objects as a static object instead of a unit that can not move. building.lua --mounting 3d model paths and texture paths mount_vfs_model_path (current_mod_path.."/Shapes") --mount_vfs_liveries_path (current_mod_path.."/Liveries") mount_vfs_texture_path (current_mod_path.."/Textures") CWTT = {}; set_recursive_metatable(CWTT, GT_t.generic_stationary) set_recursive_metatable(CWTT.chassis, GT_t.CH_t.STATIC); CWTT.chassis.life = 0 CWTT.visual.shape = "Conc_Bar_tall_x3.EDM" CWTT.visual.shape_dstr = "Conc_Bar_tall_x3.EDM" --Burning after hit CWTT.visual.fire_size = 0 --relative burning size CWTT.visual.fire_pos = {0,0,0}; CWTT.visual.fire_time = 0 --burning time (seconds) CWTT.time_agony = 180; CWTT.Name = "Conc_Bar_tall_x3" CWTT.DisplayName = _("Concrete Barricade Tall X3") CWTT.Rate = 1 CWTT.DetectionRange = 0; CWTT.ThreatRange = 0; CWTT.mapclasskey = "P0091000076"; CWTT.attribute = {wsType_Ground,wsType_Tank,wsType_NoWeapon,wsTypeVAZ, }; CWTT.category = "Fortification"; add_surface_unit(CWTT) CWTF = {}; set_recursive_metatable(CWTF, GT_t.generic_stationary) set_recursive_metatable(CWTF.chassis, GT_t.CH_t.STATIC); CWTF.chassis.life = 0 CWTF.visual.shape = "Conc_Bar_tall_x5.EDM" CWTF.visual.shape_dstr = "Conc_Bar_tall_x5.EDM" --Burning after hit CWTF.visual.fire_size = 0 --relative burning size CWTF.visual.fire_pos = {0,0,0}; CWTF.visual.fire_time = 0 --burning time (seconds) CWTF.time_agony = 180; CWTF.Name = "Conc_Bar_tall_x5" CWTF.DisplayName = _("Concrete Barricade Tall X5") CWTF.Rate = 1 CWTF.DetectionRange = 0; CWTF.ThreatRange = 0; CWTF.mapclasskey = "P0091000076"; CWTF.attribute = {wsType_Ground,wsType_Tank,wsType_NoWeapon,wsTypeVAZ, }; CWTF.category = "Fortification"; add_surface_unit(CWTF) CWTX = {}; set_recursive_metatable(CWTX, GT_t.generic_stationary) set_recursive_metatable(CWTX.chassis, GT_t.CH_t.STATIC); CWTX.chassis.life = 0 CWTX.visual.shape = "Conc_Bar_tall_x10.EDM" CWTX.visual.shape_dstr = "Conc_Bar_tall_x10.EDM" --Burning after hit CWTX.visual.fire_size = 0 --relative burning size CWTX.visual.fire_pos = {0,0,0}; CWTX.visual.fire_time = 0 --burning time (seconds) CWTX.time_agony = 180; CWTX.Name = "Conc_Bar_tall_x10" CWTX.DisplayName = _("Concrete Barricade Tall X10") CWTX.Rate = 1 CWTX.DetectionRange = 0; CWTX.ThreatRange = 0; CWTX.mapclasskey = "P0091000076"; CWTX.attribute = {wsType_Ground,wsType_Tank,wsType_NoWeapon,wsTypeVAZ, }; CWTX.category = "Fortification"; add_surface_unit(CWTX) CWTXX = {}; set_recursive_metatable(CWTXX, GT_t.generic_stationary) set_recursive_metatable(CWTXX.chassis, GT_t.CH_t.STATIC); CWTXX.chassis.life = 0 CWTXX.visual.shape = "Conc_Bar_tall_x20.EDM" CWTXX.visual.shape_dstr = "Conc_Bar_tall_x20.EDM" --Burning after hit CWTXX.visual.fire_size = 0 --relative burning size CWTXX.visual.fire_pos = {0,0,0}; CWTXX.visual.fire_time = 0 --burning time (seconds) CWTXX.time_agony = 180; CWTXX.Name = "Conc_Bar_tall_x20" CWTXX.DisplayName = _("Concrete Barricade Tall X20") CWTXX.Rate = 1 CWTXX.DetectionRange = 0; CWTXX.ThreatRange = 0; CWTXX.mapclasskey = "P0091000076"; CWTXX.attribute = {wsType_Ground,wsType_Tank,wsType_NoWeapon,wsTypeVAZ, }; CWTXX.category = "Fortification"; add_surface_unit(CWTXX) The mod files http://www.mediafire.com/download/j6a7f48dbnqzlab/FudgesFortifications.zip :pilotfly: Link to comment Share on other sites More sharing options...
jib Posted November 5, 2013 Share Posted November 5, 2013 I Still looking into how to use the objects as a static object instead of a unit that can not move. having a quick look it could be this bit of code CWTX.attribute = {wsType_Ground,wsType_Tank,wsType_NoWeapon,wsTypeVAZ, you seem to be declaring it as a tank. Im not sure what to replace it with. Mods I use: KA-50 JTAC - Better Fire and Smoke - Unchain Rudder from trim KA50 - Sim FFB for G940 - Beczl Rocket Pods Updated! Processor: Intel Q6600 @ 3.00GHz GPU: GeForce MSI RTX 2060 6GB RAM: Crucial 8GB DDR2 HDD: 1TBGB Crucial SSD OS: Windows 10, 64-bit Peripherals: Logitech G940 Hotas, TrackiR 5, Voice Activated commands , Sharkoon 5.1 headset. ,Touch Control for iPad, JoyToKey Link to comment Share on other sites More sharing options...
tacca Posted October 31, 2014 Share Posted October 31, 2014 having a quick look it could be this bit of code CWTX.attribute = {wsType_Ground,wsType_Tank,wsType_NoWeapon,wsTypeVAZ, you seem to be declaring it as a tank. Im not sure what to replace it with. I thought I should post this in case anyone comes across this looking for similar answers. Here is what it should be as far as i know (which isnt much) to just be a static object and not a unit GT.attribute = {wsType_Ground,wsType_Tank,wsType_NoWeapon,wsType_GenericFort, "Fortifications", }; GT.category = "Fortification"; and change out GT for CWTX or whatever prefix you are using (although it might have to be GT)??? Ultimate JSMGE Guide for DCS - Video Version ----------- Frenchy's NVG mod for DCS 1.5 and 2.0 ----------- Mirage 2000 photoshop livery templates ----------- Frenchy :) Link to comment Share on other sites More sharing options...
Recommended Posts