Ripcord Posted December 31, 2024 Posted December 31, 2024 (edited) Happy New Year, best wishes to all in 2025! So I really don't do much in DCS and this is my first ever attempt at a mod. I really wanted to create a pack of simple buildings that are more in the regional style of our middle east theaters. I think many here have asked about or commented on this idea, so hardly original. Thanks to the many here that made YT tutorials in the EDM export feature in Blender. And the templates - you guys are the best. After a few days of googling errors, I was able to get one in the sim. Then I found others here that had borrowed some lua script from somewhere, and I got a rough draft of a fortified AI armed building that shoots. So how cool is that? DCS Armed Building Test As I make progress and/or add buildings, I'll post updates here in this thread. Couple small observations - the detection range seems high in comparison with Hummers or some other ground AI units. The armed building is happy to fire on helicopters, as well. And of course, any helo assets with AGM or rockets won't hesitate to engage. Edited December 31, 2024 by Ripcord 7 [sIGPIC][/sIGPIC]
Ripcord Posted December 31, 2024 Author Posted December 31, 2024 Building 2 https://ko-fi.com/album/Armed-Building-02-in-Iraq-D1D0188Y8R Do they stand out too much from the other local buildings in the area? This is Iraq, near QYW. 7 [sIGPIC][/sIGPIC]
Ripcord Posted January 3 Author Posted January 3 (edited) @Priest These are the same as the existing armed house or armed barracks that we have now. Just automatic 7.62mm weapons. This is a pretty low-tech project. Just hoping/planning to do a number of these for variety. Edited January 3 by Ripcord [sIGPIC][/sIGPIC]
Ripcord Posted January 3 Author Posted January 3 Here is the content of the lua file - taken and adapted from a couple others that I used as a guide, found here on these forums. I have yet to go thru and try to revise/edit/modify these positions and angles, so there is still room for improvement on these. GT = {}; GT_t.ws = 0; set_recursive_metatable(GT, GT_t.generic_stationary); set_recursive_metatable(GT.chassis, GT_t.CH_t.STATIC); GT.chassis.life = 50 -- copied over GT.visual.shape = "MEArmedBldg01"; -- edm name GT.visual.shape_dstr = "s4_crush" -- using destroyed shape model from an existing object GT.CustomAimPoint = {-3,1.5,0} --Burning after hit GT.visual.fire_size = 1.3 --relative burning size GT.visual.fire_pos = {-2,0,0}; GT.visual.fire_time = 900 --burning time (seconds) GT.visual.min_time_agony = 20; GT.visual.max_time_agony = 180; GT.sensor = {}; set_recursive_metatable(GT.sensor, GT_t.SN_visual); GT.sensor.height = 3.0; GT.sensor.max_range_finding_target = 1000; local __LN_PK = {}; set_recursive_metatable(__LN_PK, GT_t.LN_t.machinegun_7_62); __LN_PK.connectorFire = false; __LN_PK.distanceMax = 800; for i=2,10 do -- 1000 rnds __LN_PK.PL[i] = {}; set_recursive_metatable(__LN_PK.PL[i], __LN_PK.PL[1]); end __LN_PK.BR[1].pos = {1,0,0}; GT.WS = {}; GT.WS.maxTargetDetectionRange = 2000; local ws = 0; for i=1,4 do ws = GT_t.inc_ws(); GT.WS[ws] = {}; GT.WS[ws].maxBottom = math.rad(-15); GT.WS[ws].maxTop = math.rad(45); GT.WS[ws].angles = { {math.rad(180), math.rad(-180), math.rad(-15), math.rad(45)}, }; GT.WS[ws].omegaY = math.rad(120); GT.WS[ws].omegaZ = math.rad(120); GT.WS[ws].pidY = {p=10,i=0.05,d=2,inn=3,}; GT.WS[ws].pidZ = {p=10,i=0.05,d=2,inn=3,}; __LN = add_launcher(GT.WS[ws], __LN_PK); end GT.WS[1].pos = {1,1.5,1}; GT.WS[1].maxLeft = math.rad(55); GT.WS[1].maxRight = math.rad(-55); GT.WS[1].angles[1][1] = math.rad(55); GT.WS[1].angles[1][2] = math.rad(-55); GT.WS[2].pos = {-13,1.5,0}; GT.WS[2].maxLeft = math.rad(-125); GT.WS[2].maxRight = math.rad(125); GT.WS[2].angles[1][1] = math.rad(-125); GT.WS[2].angles[1][2] = math.rad(125); GT.WS[2].reference_angle_Y = math.rad(180); GT.WS[3].pos = {0,1.5,-20}; GT.WS[3].maxLeft = math.rad(145); GT.WS[3].maxRight = math.rad(35); GT.WS[3].angles[1][1] = math.rad(145); GT.WS[3].angles[1][2] = math.rad(35); GT.WS[3].reference_angle_Y = math.rad(90); GT.WS[4].pos = {0,1.5,20}; GT.WS[4].maxLeft = math.rad(-35); GT.WS[4].maxRight = math.rad(-145); GT.WS[4].angles[1][1] = math.rad(-35); GT.WS[4].angles[1][2] = math.rad(-145); GT.WS[4].reference_angle_Y = math.rad(-90); GT.Name = "MEArmedBldg01"; GT.DisplayName = _("Armed Building01"); GT.Rate = 5; GT.DetectionRange = 0; GT.ThreatRange = GT.WS[1].LN[1].distanceMax; GT.mapclasskey = "P0091000076"; GT.attribute = {wsType_Ground,wsType_Tank,wsType_Gun,wsType_GenericFort, "Fortifications", "CustomAimPoint", }; GT.category = "Fortification"; add_surface_unit(GT) [sIGPIC][/sIGPIC]
Priest Posted January 3 Posted January 3 Low tech is great. Would it be possible to make an armed "mini" bunker or pillbox something small enough, but tall enough that we could stack in on top of the static sandbag assets and covered up with camo nets to create a firing position? When I try to do this with infantry units they always run off and do their own thing eventually, and the existing "Bunker 2" fortification is a little too big for this. Doesn't have to be fancy at all! Even a downscaled "Bunker 2" would probably work well enough.
Ripcord Posted January 3 Author Posted January 3 (edited) Yes sir, I guess so. For me this is just substituting out a different model. If M92 has already provided the sandbags and the netting/blinds objects, then maybe the user could make their own, similar to what you describe. So something smaller, basically Bunker 2 just smaller? Just trying to understand what you have in mind. Edited January 3 by Ripcord [sIGPIC][/sIGPIC]
Ripcord Posted January 3 Author Posted January 3 First 5 armed buildings - this located in Lashkar Gah in Afghanistan. Obviously the textures don't blend in that well here, so will need to modify that some. 2 [sIGPIC][/sIGPIC]
Ripcord Posted January 5 Author Posted January 5 (edited) I am noticing now that it is a bit of a challenge to get these buildings placed so that they are level. Is there a trick to this? Assuming this is because the model contains a collision component in the edm file. Now I have about 20 buildings in game. Texturing is still off but they do look better when placed in rural areas or on outskirts of town. I like how sometimes the map gives you these nice little pockets or courtyards with a bit of fencing around it. Just drop it right in. This somewhere SE of Deir Ez-Zur on the Western edge of the Syria map. Edited January 5 by Ripcord 1 [sIGPIC][/sIGPIC]
TeTeT Posted January 5 Posted January 5 2 minutes ago, Ripcord said: I am noticing now that it is a bit of a challenge to get these buildings placed so that they are level. Is there a trick to this? Yes, there is a setting in the lua that controls that. I forgot which one, but if you look at the VAP buildings, you will find some that stay level and others that tilt. I used the values from the once that stay level in Vietnam War Vessels Buildings. You can d/l a preview from https://tetet.de/dcs/mods/vwv_buildings-2024-10-31.zip if you don't want to grab the whole mod. Good luck, TeTeT 2
Ripcord Posted January 5 Author Posted January 5 (edited) @TeTeT you sir, are the man! First this gives me a template of how to package up multiple objects - right now I am dropping them in there one by one. Your method looks way cleaner. EDIT - and I see I can provide multiple 'liveries' for the building objects, which might prove to be useful. Edited January 5 by Ripcord 1 [sIGPIC][/sIGPIC]
Ripcord Posted January 5 Author Posted January 5 53 minutes ago, TeTeT said: Yes, there is a setting in the lua that controls that. I forgot which one, but if you look at the VAP buildings, you will find some that stay level and others that tilt. I used the values from the once that stay level in Vietnam War Vessels Buildings. You can d/l a preview from https://tetet.de/dcs/mods/vwv_buildings-2024-10-31.zip if you don't want to grab the whole mod. Good luck, TeTeT OK I see that the objects are level on a hillside. Is this, by any chance, the setting in the lua file that needs to be present? positioning = "ONLYHEIGTH"; [sIGPIC][/sIGPIC]
TeTeT Posted January 5 Posted January 5 Kudos really goes to Tobsen and EightBall, as they wrote the VAP config, I merely copied what I needed. The positioning field is needed, but it's not clear to me on which table exactly. I'm a bit short of time right now to check this myself, so you might want to do some testing. 2
Ripcord Posted January 5 Author Posted January 5 6 minutes ago, TeTeT said: Kudos really goes to Tobsen and EightBall, as they wrote the VAP config, I merely copied what I needed. The positioning field is needed, but it's not clear to me on which table exactly. I'm a bit short of time right now to check this myself, so you might want to do some testing. Yep, still testing. Not there yet. [sIGPIC][/sIGPIC]
Ripcord Posted January 5 Author Posted January 5 (edited) shazam! Building sitting level on a slope. Don't know what exactly it was in the script files, but I just completed adapted this file structure/format and it worked. So let's not overthink it. thanks again @TeTeT for sharing. Edited January 5 by Ripcord 5 [sIGPIC][/sIGPIC]
joey45 Posted January 6 Posted January 6 Looking awesome dude. 1 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
Ripcord Posted January 7 Author Posted January 7 Need to go back and adjust the scale of these buildings, I think. How much do you think this needs in terms of reduction? 40% smaller, 50% maybe? [sIGPIC][/sIGPIC]
Ripcord Posted January 7 Author Posted January 7 This is a scale reduction of about 45%. Much better, I think. 1 [sIGPIC][/sIGPIC]
Ripcord Posted January 12 Author Posted January 12 Starting now to consider making some adjustments to damage settings. Read more here 2 [sIGPIC][/sIGPIC]
Ripcord Posted January 17 Author Posted January 17 (edited) Managed to get 50 buildings placed on the Syria map. Textures need improvement on many of these buildings, but they, at least they shoot back. Here's an update post on the mod page: First Look Video Edited January 17 by Ripcord 3 [sIGPIC][/sIGPIC]
Ripcord Posted January 19 Author Posted January 19 (edited) I am testing this, but I am sure somebody here already knows the answer to this already: GT.WS[1].pos = {2,3.5,1} -- location or position coordinates within the model So if these are x,y,z coordinates, I gather that x = front/back, y is up/down (vertical height) and z must be left/right. Do I have these right? Kinda hard to tell in model viewer. Edited January 19 by Ripcord [sIGPIC][/sIGPIC]
SullyFUBAR Posted January 24 Posted January 24 Yes, your understanding of the coordinate system seems correct for most game engines and simulation models: x: Typically represents the front/back direction (positive x is usually forward). y: Represents the up/down vertical height. z: Represents the left/right direction (positive z is usually to the right).
Kappa-131st Posted April 11 Posted April 11 (edited) Great I hope for armed building for so long!! It's great to make embush ! I hope their is different type of armed house : - Simple with 7.62mm weapon or 12.7 - Sniper House - AT house (like RPG) - ATGM house (like kornet or javelin) - Manpad house (stinger / igla) When green alert, we don't see anyone. When red alert, we see people at the windows Edited April 11 by Kappa-131st
Recommended Posts