GEIST Posted September 14, 2021 Posted September 14, 2021 Hi, how does one combine edm shapes into a single mod. Ships/Aircraft carriers are using several shapes merged into a single asset so it must be possible somehow. Can't seem to figure this out on how to merge them together in a .lua file. Any help would be appreciated. Thank you!
GEIST Posted September 14, 2021 Author Posted September 14, 2021 Ah btw - this is for more terrain assets that I am working on. But I do need to split them out into different parts to be able to get the resolution I want to. Just trying to check on how to best approach it. Cheers!
GEIST Posted September 15, 2021 Author Posted September 15, 2021 (edited) I got one step closer but still need to put it all together. I added connectors and in the Modelviewer I can simply connect a new shape.edm to it. So that works well and how I'd like it to. But I couldn't find any reference on how that would look like in lua code (or maybe that can be done in a mission editor?) Is there any code ref on how that would work? connectors: GT.connector = (ConnectorA,"ModelPatchA"); GT.connector = (ConnectorB,"ModelPatchB"); Or something like that? I found the kneeboard mod which somehow managed to attach the kneeboard to the knees - but unfortunately the files are not available anymore. Edited September 15, 2021 by GEIST
GEIST Posted September 16, 2021 Author Posted September 16, 2021 I found this snipped of code from the map editor titled Details & Subobjects: Obviously this is very old and from the map and not shapes.edm editor. But anyone with some lua knowledge maybe can make sense of this? test cubes lods=1. max dist=150.000000(auto=1498.201538) semantics=Sea,Undef distances: DP_MAIN=150.000000, DP_SHADOWS=0.000000, DP_REFLECTION=0.000000, DP_MAX=0.000000 No collision shape connectors: detail:barrel[5] view distance=600.000000 subobject:barrel[5] Lods: lod 0: center=(-2.500000, 1.500000, 2.500000) radius=5.852350 prior bias: 0/structured prior bias: 0/merged: 1[288-24]/boxtype=MAIN computeSemantic="" shaderDefine="STANDARTSTRUCTURE" ------Main: distance 0-0-100-160 verts=00048/00072 semantic="Building" material=VaryHouse4.1 ----------------------------------------------------------- LODS COUNT:1
GEIST Posted September 16, 2021 Author Posted September 16, 2021 More code snippets: This time from the F-16 pylons. I would assume that it would need to look something like that to define the connectors in the lua file. Pylons = { pylon(1, 0, -2.2, 0.002, -4.739, { arg = 308, arg_value = 0, use_full_connector_position = true, connector = "Pylon1", }, tips, 1 ) } Now checking the payloads.lua makes everything a lot more cryptic. The previously defined pylons are mentioned but not by name. Instead by this CLSID (I had hoped it would be either the name or arg statement from above). Anyone who created pylons on a plane mod.. how did you connect the payloads to the pylons? local unitPayloads = { ["name"] = "F-16C_50", ["payloads"] = { [1] = { ["name"] = "AIM-120C*2, AIM-9X*2, MK-82*6, FUEL*2, TGP", ["pylons"] = { [1] = { ["CLSID"] = "{40EF17B7-F508-45de-8566-6FFECC0C1AB8}", ["num"] = 1, },
GEIST Posted September 16, 2021 Author Posted September 16, 2021 (edited) More progress. I hope nobody minds me adding all this here: Found this on a ship .lua The last line would probably give some indication on how the connectors are define. Now the last missing piece is how to define a .edm file for this part of the code: set_recursive_metatable(GT.WS[ws], GT_t.WS_t.ship_TOMAHAWK ) -- Tomahawk rear ws = GT_t.inc_ws(); GT.WS[ws] = {} set_recursive_metatable(GT.WS[ws], GT_t.WS_t.ship_TOMAHAWK ) GT.WS[ws].area = 'Bort_Col_Top' GT.WS[ws].center = 'POINT_MK_41_40' GT.WS[ws].LN[1].PL[1].ammo_capacity = 16; GT.WS[ws].LN[1].max_number_of_missiles_channels = 16; -- unlimited GT.WS[ws].LN[1].BR = { {connector_name = 'POINT_MK_41_33', recoilArgument = 209, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2}, {connector_name = 'POINT_MK_41_34', recoilArgument = 210, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2}, {connector_name = 'POINT_MK_41_35', recoilArgument = 211, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2}, {connector_name = 'POINT_MK_41_36', recoilArgument = 212, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2}, {connector_name = 'POINT_MK_41_37', recoilArgument = 213, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2}, {connector_name = 'POINT_MK_41_38', recoilArgument = 214, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2}, {connector_name = 'POINT_MK_41_39', recoilArgument = 215, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2}, {connector_name = 'POINT_MK_41_40', recoilArgument = 216, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2}, {connector_name = 'POINT_MK_41_41', recoilArgument = 217, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2}, {connector_name = 'POINT_MK_41_42', recoilArgument = 218, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2}, {connector_name = 'POINT_MK_41_43', recoilArgument = 219, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2}, {connector_name = 'POINT_MK_41_44', recoilArgument = 220, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2}, {connector_name = 'POINT_MK_41_45', recoilArgument = 221, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2}, {connector_name = 'POINT_MK_41_46', recoilArgument = 222, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2}, {connector_name = 'POINT_MK_41_47', recoilArgument = 223, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2}, {connector_name = 'POINT_MK_41_48', recoilArgument = 224, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2}, } The tomahawk model is not part of the ship edm. So it must be spawned there somehow.... Edited September 16, 2021 by GEIST
joey45 Posted September 17, 2021 Posted September 17, 2021 Correct. Missiles are separate. The edm file is in the main shapes folder of the game or mod. The the connector tells the game that a missile goes there pointing in a certain direction. 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
Recommended Posts