A.F. Posted July 30, 2023 Posted July 30, 2023 hi, I'm just trying to make friends with DML. So I am still very new here! I would like to start a smoke only when I enter a trigger zone with the plane. I already know how to place the smoke and I can do it. But I can't get the smoke to start until I fly into the trigger zone. Can someone help me?
cfrag Posted July 30, 2023 Author Posted July 30, 2023 13 minutes ago, A.F. said: But I can't get the smoke to start until I fly into the trigger zone. Apologies for sounding a bit stupid here. Can you tell me what you are trying to do: a) wait with the smoke until you are flying into the zone, and then start the smoke or b) start the smoke at mission start and then end smoke when you fly into the zone? In DML everything is controlled with flags, and you can connect flags to the inputs that control the functions, usually triggering a function when the the value of the flag that is connected to the input (denoted with a question mark "?") changes. If you want to implement a), you'd change the flag that you have connected to the smoke zone's "startSmoke?" attribute. To implement b) you'd change the value of the flag that you connect with "stopSmoke?". Note that when stopping a zone to smoke, a peculiarity of DCS is that it can take up to 5 minutes for DCS to put out the smoke, so it will not happen instantaneously (in contrast to start smoking, which will happen within a second). If you can't get it to work, simply continue asking, and I'm sure we can sort this out quicky.
cfrag Posted July 30, 2023 Author Posted July 30, 2023 22 hours ago, tsuyopooh said: As shown in the screenshot. "weapon name: DISAPPEARD" is empty. It seems that DCS has changed the way it handles transient object names, like for example missiles. I have updated the code, and removed the 'Disappeared' message, as it should only be reported when verbosity is on. Also as requested, a new config attribute 'msgTime' no controls how long individual messages from Guardian Angel stay up. The demo (see below) uses some 5 seconds. The updated guardianAngel will be part of the next release, it's included below for your convenience (and if you have the time, tests) guardianAngel.lua Testing Angels.miz
tsuyopooh Posted July 31, 2023 Posted July 31, 2023 On 7/30/2023 at 10:55 PM, cfrag said: The updated guardianAngel will be part of the next release, it's included below for your convenience (and if you have the time, tests) Tested, OK. Thank you. Also, weapon name is now displayed! It would be better if the callback had a player name of targetUnit. I can't seem to remember the player name of the aircraft in flight.
Thunder Chicken22 Posted July 31, 2023 Posted July 31, 2023 On 7/28/2023 at 1:08 AM, cfrag said: It looks to me as if you are 99% where you want to be, I'd use the same approach. So let's look at the attributes. There's a good likelihood that you either forgot to add the relevent module (happens to me all the time), or mis-spelled an attribute. If you can't get it to run, post the miz (or pm it to me), and I'm sure we can fix that in no time. Ah, that's an interesting set-up. I'd rework re-spawning so that whenever a group entirely leaves a zone (perhaps use the unitZone module), instead of after it has been destroyed (when destroyed, the group also has left the zone). Then run the exitZone! signal through the time delay and you should be set. The AI planes can RTB and park as much as they want. I have not rested above, just a suggestion - the great stuff about Lego-Missionbuilding I wanted to follow up on my previous quest to despawn AI flights after they land so I trigger another spawn cycle right away instead of waiting for DCS to despawn them after they park (like PvE servers do.) I thought about your exitZone approach, but it isn’t clear to me how it would work. Still new at this. One approach I have thought about is using the LZ module, using the landed flag to trigger a wipe of the unit (or group) that landed. I can’t get wipe to work in that way and perhaps I’m misunderstanding how wipes work exactly. A third alternative is to create landing detection zones, one for each group, to detect when a particular group has landed at a particular airfield and that bangs that group’s spawn flag. This isn’t particularly attractive as it creates lots of complexity which will only get worse when I implement airfield capture logic. I also considered just one landing detection zone per airfield that banged multiple group’s flags but quickly rejected it as it would obviously spawn all those groups regardless if they are still airborne/alive or not. Would lead to rapid buildup of multiple groups in a unrealistic way. So, I would appreciate any feedback to these approaches and how I might better approach this problem.
cfrag Posted July 31, 2023 Author Posted July 31, 2023 (edited) 34 minutes ago, tsuyopooh said: It would be better if the callback had a player name of targetUnit The callback passes you the name of the target unit. So, to retrieve the player name from that unit, you can simply try this: local theUnit = Unit.getByName(targetName) -- access unit if theUnit and Unit.isExist(theUnit) then local controlledBy = "AI" -- default to "AI" as player name if theUnit.getPlayerName and theUnit:getPlayerName() then -- is playerName method iomplemented? controlledBy = theUnit:getPlayerName() -- copy player name end -- "controlledBy" now contains the name of the player, or "AI" end Edited July 31, 2023 by cfrag
tsuyopooh Posted July 31, 2023 Posted July 31, 2023 1 hour ago, cfrag said: コールバックはターゲット ユニットの名前を渡します。したがって、そのユニットからプレイヤー名を取得するには、次のことを試すだけです。 Thank you I trying
cfrag Posted August 1, 2023 Author Posted August 1, 2023 17 hours ago, Thunder Chicken22 said: One approach I have thought about is using the LZ module, using the landed flag to trigger a wipe of the unit (or group) that landed. I can’t get wipe to work in that way and perhaps I’m misunderstanding how wipes work That appears to be a workable approach if you know where the aircraft will land, and when you are ok with the first aircraft that lands triggers the wipe. With regards to wiping, cloners remember only what the spawned in the last clone cycle, and when they receive a signal on the 'wipe?' input, they will despawn whatever they cloned last time. I think you may want to connect the LZ landed! event to the cloner's 'clone?' input to cause a new clone cycle, and maybe also set 'preWipe' to true so that last sawn is wiped automatically - but only if you are sure that the last clone also was whatever landed in the LZ just now. Since there is no 'correct' way to go about this, I think you have the privilege to decide on one approach, and then try to make it work . I'm sure we can find a good way to do this. That's what I love about mission building: solving the puzzle to make it work, even if DCS can be a formidable "opponent".
Thunder Chicken22 Posted August 1, 2023 Posted August 1, 2023 10 hours ago, cfrag said: That appears to be a workable approach if you know where the aircraft will land, and when you are ok with the first aircraft that lands triggers the wipe. With regards to wiping, cloners remember only what the spawned in the last clone cycle, and when they receive a signal on the 'wipe?' input, they will despawn whatever they cloned last time. I think you may want to connect the LZ landed! event to the cloner's 'clone?' input to cause a new clone cycle, and maybe also set 'preWipe' to true so that last sawn is wiped automatically - but only if you are sure that the last clone also was whatever landed in the LZ just now. Since there is no 'correct' way to go about this, I think you have the privilege to decide on one approach, and then try to make it work . I'm sure we can find a good way to do this. That's what I love about mission building: solving the puzzle to make it work, even if DCS can be a formidable "opponent". I was planning on using multiple LZ zones per airfield, each flagged to a specific group that my land there. That way I can catch any group that may end up there and only respawn that specific group that landed there. Problem is that I’m getting a scripting error kicking back which prevents the LZ module from loading. I get this only when I add a group or unit attribute. When I do not add a group or unit flag, the LZ module loads (and works)fine. But when I add in groups or units flag, I get the error. I’m not sure what is causing the issue. The error window is shown, followed by the cloner attributes, then the LZ zone attributes that work, followed by a LZ zone that casts the error. Finally the DML loadout for this mission.
cfrag Posted August 2, 2023 Author Posted August 2, 2023 (edited) 10 hours ago, Thunder Chicken22 said: I’m getting a scripting error kicking back which prevents the LZ module from loading. Can I trouble you to re-download DML and use the newest versions of dcsCommon and LZ to make sure that we are looking at the same code (or use the scripts attached to the miz - simply copy/paste them into your mission)? Also please be advised that for cloners, the the attribute "empty+1" is deprecated and should be replaced with "empty!" I've attached a small miz that seemingly replicates what you are doing, and I can't reproduce the error. Once we do, I'm sure we can resolve the rest very quickly. Cheers, -ch LZTest.miz Edited August 2, 2023 by cfrag
Thunder Chicken22 Posted August 2, 2023 Posted August 2, 2023 9 hours ago, cfrag said: Can I trouble you to re-download DML and use the newest versions of dcsCommon and LZ to make sure that we are looking at the same code (or use the scripts attached to the miz - simply copy/paste them into your mission)? Also please be advised that for cloners, the the attribute "empty+1" is deprecated and should be replaced with "empty!" I've attached a small miz that seemingly replicates what you are doing, and I can't reproduce the error. Once we do, I'm sure we can resolve the rest very quickly. Cheers, -ch LZTest.miz 125.5 kB · 1 download I'm a dope. I had a old version of dcsCommon. It works perfectly now. Thanks!
shredder176 Posted August 4, 2023 Posted August 4, 2023 Hi all, Is there a way to trigger events based on a player's elevation? I want to trigger events if someone busts an altitude (eg. message, radar active, missiles, etc). appreciate any sharing of examples and advice, thank you for everyone's time.
cfrag Posted August 4, 2023 Author Posted August 4, 2023 2 hours ago, shredder176 said: Is there a way to trigger events based on a player's elevation? I want to trigger events if someone busts an altitude Mission Editor itself provides a trigger condition for that: "Unit's AGL Altitude Higher Than". Add an Action "FLAG INCREASE" and you have an output source for when a specific unit goes higher than a certain altitude. 1
tsuyopooh Posted August 4, 2023 Posted August 4, 2023 It would be useful to have a filter by altitude for the unit zone. ALT ALT< ALT> and ALT< It would be useful to be able to overlap unit zones and flag them differently, such as ALT<, ALT>, ALT>, and ALT<. This assumes the unit has height information.(Ground Alt) Ex. UnitZone lookFor * matching player entaerZone! enterMiddle alt< 1000 alt> 500 UnitZone lookFor * matching player entaerZone! enterLow alt< 300
tsuyopooh Posted August 4, 2023 Posted August 4, 2023 On 8/1/2023 at 12:17 AM, cfrag said: The callback passes you the name of the target unit. So, to retrieve the player name from that unit, you can simply try this: local theUnit = Unit.getByName(targetName) -- access unit if theUnit and Unit.isExist(theUnit) then local controlledBy = "AI" -- default to "AI" as player name if theUnit.getPlayerName and theUnit:getPlayerName() then -- is playerName method iomplemented? controlledBy = theUnit:getPlayerName() -- copy player name end -- "controlledBy" now contains the name of the player, or "AI" end It worked perfectly. Thank you 1
cfrag Posted August 4, 2023 Author Posted August 4, 2023 43 minutes ago, tsuyopooh said: It would be useful to have a filter by altitude for the unit zone. I thought about that before, and I think I could add that - but I'm a bit hesitant to do because I'm sure that it will only take a few minutes for people (rightly) requesting the ability to also similarly check MSL, speed, life, heading, fps, fuel and other things, making the module quite unwieldly. I'll think about it, but no promises. 1
Mistermann Posted August 8, 2023 Posted August 8, 2023 Okay - I am feeling extremely inept today. I simply want to debug some missions I am working on using the interactive debugger. I don't have any DML in my mission (blasphemy, I know). Looking at your documentation, it says the following about establishing the interactive debugger. I just downloaded the most recent version of DML from Github (v1.4.0). However, when I try and locate the script file "Mission Debugger.lua" there's no such entry in the content of the zip file. I see theDebugger.lua, but that's for DML missions, right? I am sure I am simply being an idiot - who can direct me back on course? Thanks. System Specs: Spoiler Callsign:Kandy Processor:13th Gen Intel(R) Core(TM) i9-13900K - RAM: 64GB - Video Card: NVIDIA RTX 4090 - Display: Pimax 8kx VR Headset - Accessories: VKB Gunfighter III MCG Ultimate, VKB STECS Standard, Thrustmaster TPR Pedals, Simshaker JetPad, Predator HOTAS Mounts, 3D Printed Flight Button Box Video Capture Software: Open Broadcaster Software (OBS), Video Editing Software: PowerDirector 365 Into The Jungle Apache Campaign - Griffins Kiowa Campaign - Assassins Thrustmaster TWCS Mod
cfrag Posted August 8, 2023 Author Posted August 8, 2023 4 minutes ago, Mistermann said: I don't have any DML in my mission HERETIC!!!!!one Thou shall find the apostate version "Mission Debugger" at "Shunned Central" here. You are still loved, even if you can't be helped 1
Mistermann Posted August 8, 2023 Posted August 8, 2023 Thank you, Sir! I will enter shunned central on the pretense that I will leverage DML in my next creation! System Specs: Spoiler Callsign:Kandy Processor:13th Gen Intel(R) Core(TM) i9-13900K - RAM: 64GB - Video Card: NVIDIA RTX 4090 - Display: Pimax 8kx VR Headset - Accessories: VKB Gunfighter III MCG Ultimate, VKB STECS Standard, Thrustmaster TPR Pedals, Simshaker JetPad, Predator HOTAS Mounts, 3D Printed Flight Button Box Video Capture Software: Open Broadcaster Software (OBS), Video Editing Software: PowerDirector 365 Into The Jungle Apache Campaign - Griffins Kiowa Campaign - Assassins Thrustmaster TWCS Mod
cfrag Posted August 10, 2023 Author Posted August 10, 2023 (edited) Version 1.4.1 (20230810) - Functionality Update Summertime and the living is easy... well, if you like heat, that is. Being of Northener stock, anything above 17°C is unwelcome, but it puts a dazzling smile on the face of my very special one. And when she smiles, everything is easy, so I don't complain. Except about the heat. Since the heat nearly prevents me from donning my VR goggles, and I flatly refuse flying without them (anyone who has ever spent a second in DCS VR understands), changes to DML are small. Still, I've managed to work in some exciting updates: CivAir now supports 'off-map destinations' making that small tool very, very easy to use with great results. Other changes include a slow adaptation of OOP zones (just for me, I guess), and some uptick in usability for some modules (Recon, Guardian Angel), and there is another experimental (and wholly undocumented) addition that I'm trying to work out: duel zones. But - summer time... and here are the Changes: Manual Main - CivAir new off-map connectors - Recon Mode new attributes - Small corrections - Civ Air International demo documentation Quick Ref - Updates to CivAir, ReconMode Demos - CivAir international (new) - ReconMode reloaded (update) Modules - ReconMode 2.2.0 - new marksLocked attribute - new marksFadeAfter attribute - OOP migration for zones - cfxZones 4.0.1 - new dmlZones:getName() - CivAir 2.0.0 - new inbound zones - new outbound zones - on start locations now randomize to 30%-70% of itinery - miscellaneous fixes, updates - OOP migration for zones - dcsCommon 2.9.2 - typos corrected - duel (experimental) - not yet ready for release - guardianAngel 3.0.5 - overhauled missile naming - new msgTime attribute - better verbosity - OOP zones update - unitZone 1.2.5 - better reading of config zones Enjoy, -ch Edited August 10, 2023 by cfrag 3
Mistermann Posted August 10, 2023 Posted August 10, 2023 Amazing work, @cfrag Thanks for all you do for us. -The Heretic 1 System Specs: Spoiler Callsign:Kandy Processor:13th Gen Intel(R) Core(TM) i9-13900K - RAM: 64GB - Video Card: NVIDIA RTX 4090 - Display: Pimax 8kx VR Headset - Accessories: VKB Gunfighter III MCG Ultimate, VKB STECS Standard, Thrustmaster TPR Pedals, Simshaker JetPad, Predator HOTAS Mounts, 3D Printed Flight Button Box Video Capture Software: Open Broadcaster Software (OBS), Video Editing Software: PowerDirector 365 Into The Jungle Apache Campaign - Griffins Kiowa Campaign - Assassins Thrustmaster TWCS Mod
tsuyopooh Posted August 12, 2023 Posted August 12, 2023 cflag san, I have a question about the stopGaps module. Is Helo not supported? One more thing, DML publishes documents in PDF, is it possible to publish them in HTML? I don't speak English so I use translations, but it is difficult with PDF. Web browsers translate easily.
cfrag Posted August 12, 2023 Author Posted August 12, 2023 3 hours ago, tsuyopooh said: I have a question about the stopGaps module. Is Helo not supported? Hey, @tsuyopooh, stopGaps does support helicopters, but in single-player mode (and in multiplayer without the stopGapGUI server plug-in) some planes and helicopters react badly to any terrain that is not absolutely flat - it seems that the helicopters then drop form the highest point of that terrain piece to the ground, which can be very bad. To prevent this, use stop-gap's ability to suppress stopGap in single-player mode, or place them on flat surfaces (e.g. airfields). 3 hours ago, tsuyopooh said: DML publishes documents in PDF, is it possible to publish them in HTML? I feel that HTML is a really, really bad format to publish in; I write the documentation in MS Word, and exporting to (M)HTML is a mixed bag at best, export to PDF seems to be the best compromise for me: it preserves my layout, output files are reasonably small, and every computer can read PDF. There are applications that can readily extract text from PDF, so that may help you. 2
Spanker79 Posted August 12, 2023 Posted August 12, 2023 (edited) @cfrag Any plans of creating a cleaning module which will remove destroyed units in order to declutter the battlefield/map from their carcasses? (sorry for my bad English) Edited August 12, 2023 by Spanker79 ◈ Lock-On Greece / DCS World Greece http://lockon-greece.forumotion.net/ 1st Hellinic Virtual Squadron for Flaming Cliffs & DCS World ~ Flying since 2008 ~
cfrag Posted August 12, 2023 Author Posted August 12, 2023 (edited) 16 minutes ago, Spanker79 said: Any plans of creating a cleaning module which will remove destroyed units in order to declutter the battlefield/map from their carcasses? Yes, but I recommend caution. The cloneZone already has an optional 'declutter' attribute that when set to true (note: the manual currently incorrectly states to set it to false) does exactly what you are asking for. To do this, it invokes world.removeJunk(), which currently has a somewhat tarnished reputation as it may be linked to some server crashes. ED is allegedly investigating possible issues. The wiper module is currently also slated to receive this ability, also optionally, with the same caveat: use at your own risk. Upgrade of wiper should be ready within a couple of weeks if I can keep to my current schedule (I'm still working on the experimental 'duel' module). Edited August 12, 2023 by cfrag 1
Recommended Posts