Jump to content

DML - Mission Creation Toolbox [no Lua required]


Recommended Posts

i have a little issue with persistence again.
My MOOSE GCI CAP and Interceptors are not spawning again.

from the DML documentation:

Quote

Persisting dynamically spawned units is handled by the modules that spawn them (e.g. cloners, spawn zones, owned zones etc.) so please check their description for persistence support.

Yea, thats fine, but they are spawned by MOOSE A2A dispatcher, not DML. Can anyone point me to the right direction?

https://flightcontrol-master.github.io/MOOSE_DOCS/Documentation/AI.AI_A2A_Dispatcher.html


Edited by GrafRotz
Link to comment
Share on other sites

11 minutes ago, GrafRotz said:

they are spawned by MOOSE

Luckily, MOOSE and DML work peacefully side-by-side, and blissfully ignore each other. Unfortunately, that means that (since DCS does not have central spawning agency that tracks all spawns and invoke events upon spawning) each spawning framework has to keep track of their own spawns for their own persistence solution. I have a 'MOOSE bridge' and 'Mist bridge' somewhere deep inside my backlog, but these items currently do not have priority - there's a lot that I still want to accomplish before I turn my eyes to cross-framework APIs.

  • Like 1
Link to comment
Share on other sites

Version 1.3.4 - 20230705

Update, new module "Tacan Zone"

It all started a few weeks ago. We were flying somewhere over Cyprus, and my friend discovered the joys of radio navigation. After he gleefully mastered ADF: we were hunting rogue forces that betrayed their position by using radio, and we homed in on them in our Hueys.
Naturally, we progressed to TACAN (skipping VOR navigation altogether), and it immediately clicked with him. Sitting in a Tiger, he shot approaches all over the Strait of Hormus. 

image.png

And then, he issued his challenge. "You know", he said, "you should create a TACAN trainer so we can practice radio nav with constantly changing, randomized TACAN stations."
"...after all," he continued after I uncharacteristically hesitated, "it can't be that difficult if you use that DMV of yours."
He knows how to spell "DML" correctly, that was an intentional sleight. He was goading me, and it was working. Working well...

To build the TACAN Trainer, though, I first had to build a new module. Unlike the NDB module which Tacan Zone is modeled on, this one had a couple of challenges to overcome. Long story short, I love challenges  and this update contains a Tacan Zone as its newest addition - and I thoroughly enjoyed the ride to get the module out of the door. I hope you enjoy this new ability as well.

That being said, building the Tacan Zone module (and demo, and TACAN Trainer) left very little time other things. 

All Changes in Detail

Documentation
    - Main 
        - Tacan Zone documentation (new)
        - Take on TACAN demo documentation (new)
        - Cloner 'declutter' attribute (new) 
        - various corrections (minor)
        
    - Quick Ref
        - Tacan Zone (new)
        
Demos
    - Take on TACAN (new)
    
Modules
    - cfxZones 3.1.3
        - various new methods 
        - corrected bug in calculateZoneBounds()
        - upgraded zone bounds management
        
    - cloneZones 
        - new declutter option (experimental)
    
    - dcsCommon 2.8.10
        - various new methods 
        - corrected ugly bug in vMultScalar()

   - tacan 1.0.0
       - initial version

        
Enjoy,
-ch
  

  • Like 1
Link to comment
Share on other sites

cfrag,

I was trying to use DML stopGaps with DCS warehousing (non-infinite warehouse) on a multiplayer server, and it seems every time someone spawns when their aircraft sits on a warehouse such as a FAPR/airfield it adds +1 of that aircraft type to the warehouse. It's like spawning the Static Object doesn't deplete the warehouse, but removing it adds to it, so if you have say a single F-5 in the warehouse, spawn, then exit, you'll have 2/1 F-5's in the warehouse.

Are you noticing this? Any easy fix?

Link to comment
Share on other sites

9 hours ago, BodyOrgan said:

It's like spawning the Static Object doesn't deplete the warehouse, but removing it adds to it, so if you have say a single F-5 in the warehouse, spawn, then exit, you'll have 2/1 F-5's in the warehouse.

Unfortunately, the entire Warehouse mechanism is under-documented (to put it nicely), AFAIK has no API, and I don't know what triggers adding/subtracting items from the inventory. If de-spawning statics adds to the warehouse, that sounds like a bug to me, but unfortunately I can't point to any ED documentation that would tell me how this works. Then again, I'm only seldom dabbling with warehouses, so if you have pointers to better documentation, I'll certainly have a look.

I'll see if I can replicate the issue for ED to have something to investigate.

Link to comment
Share on other sites

Hi,

since actually I hava much more free time I decide to go back learning DML features. I already have a full mission well working with DML (and I'm very satisfied of it 😉), but did it by just adapting what was already done in the tutorial missions.

Now I want to go deeper in the subject so I started to read again with more attention all the chapters and try to produce by myself all DML zones.

Easy to say....less to do 😄
Actually I'm dealing with Clones Zones. I started from the basics, by just setting few templates and and a zone that randomly chose from them to spawn units in tha map.

But no joy...even if i do exactly what is written in the manual, nothing happens...

What amI I doing wrong?

 

TB_DML_Randomizer.miz

  • Like 1
Link to comment
Share on other sites

28 minutes ago, TBear said:

But no joy...even if i do exactly what is written in the manual, nothing happens...

I'll have a look. Usually, it's just a small thing 🙂 - and a chance for me to improve the docs

  • Like 1
Link to comment
Share on other sites

2 hours ago, TBear said:

Actually I'm dealing with Clones Zones. I started from the basics, by just setting few templates and and a zone that randomly chose from them to spawn units in tha map.

My recommendation: when you are using clone zones, also include the cloneZones script.

It's always something small. 🙂 

Link to comment
Share on other sites

9 hours ago, cfrag said:

My recommendation: when you are using clone zones, also include the cloneZones script.

It's always something small. 🙂 

Ho boy...sorry...that was an oversight !

I'll give it a look when I back home 👍👍👍

From now I should make a sort of "strict" checklist of steps needed to make things work 😉

Link to comment
Share on other sites

On 7/13/2023 at 7:45 PM, TBear said:

I made it...very simple and basic, but at least I understood what i did 😁

 

Hi,

I'm trying to implement what I did in a more complex mission. The purpose is to spawn a random type of SAM in a ONE random position, chosen from THREE possible ones. It seem that it works fine and as intendend except for this message i get at mission start...

image.png

Now, if i follow the message suggestion, everything still works fine except that the it spawns TWO sams instead of one, even if the "pollSize" attribute is set to ONE.

thanks in advance for any suggestion.

OP_Sum_Bug_test.miz


Edited by TBear
Link to comment
Share on other sites

9 minutes ago, TBear said:

it works fine and as intendend except for this message i get at mission start

The warnings that you are receiving are some QoL code that notify you that you are using an outdated version of providing information to the module, and to nudge you to change this at your leisure. You currently use two attributes: 'RND' to designate this zone as a randomizer, and 'flags!' to tell it which flags to randomize.

image.png

A while ago, I streamlined this to use only a single attribute: "RND!" (note the exclamation point) which has the relevant flags as an attribute. This is reflected in the manual thusly:

image.png

So the new, simpler way to set up a the randomizer in your mission is this:

image.png

(add exclamation point to RND, move the flags "AA, AB, AC" to the RND! attribute value, remove the flags! attribute)

That will also get rid of the warnings. 

I guess the short way of saying above: when you get a warning, re-visit the "shock-block" (manual)'s relevant chapter to see what has changed.

Have fun,
-ch

 

Link to comment
Share on other sites

Ok...now I understandand better...I think 😉

2 hours ago, cfrag said:

image.png

The point is that, in this case, "RND" and "flags!" attributes are redundant. My first attempt to follow the message suggestion was to simply substitute "flags!" with "RND!" without canceling the first line, thats why I got rid of the warning message, but I started to have always one spawned unit more than desired. At first, my thought was that the first line was just a way to "activate" a module and did not effect actually his behaviour.

Another lesson learned 🙂

Thanks for Yor patience

 

Link to comment
Share on other sites

  • 2 weeks later...

Version 1.4.0 - Utility release, plus style points for geeks!

When I started on DML more than two years ago (without then knowing what it would eventually become), I designed it modular, while writing somewhat old-fashioned code. The modularization turned out to be perfect. The heart of DML are two modules: "DCS Common", which is pretty much a grab back of convenience stuff, and "cfxZones", which is the central zone manager that gives DML its incredible flexibility. Today, cfxZones is what enables all DML modules to be controlled via zone attributes, and each and every module also uses it to set and read flags. Put differently, trigger zones are integral to DML, and DML has its own version of zones.

It's been a thorn in my side - for over a year now - that during design, for various reasons (yeah, being lazy is definitely one of them), I did not make DML zones object-oriented. It's a small thing - few people who use DML will ever notice this: DML biggest boon is that you can use it without ever writing a single line of Lua code. But I do, and every time that I worked on, or reworked, a module it bothered me. 

image.png


No more. As of version 1.4 of DML, we now have OOP zones. Agreed: except for myself, few, if any, would ever notice the difference. But I can feel like Neo: finally that splinter in my mind is gone.

Witness
 
    if cfxZones.hasProperty(theZone, "in?") then 
        theFlag = cfxZones.getStringFromZoneProperty(theZone, "in?", "none")
    end

versus
 
    if theZone:hasProperty("in?") then 
        theFlag = theZone:getStringFromZoneProperty("in?", "none")
    end

Above code (if you understand it, which is NOT required, I'm just geeking out here) does exactly the same. To me, the second example, however, oozes style. Finally, module code can have the style and panache that is worthy of DML's entire architecture. Yeah, it took me a couple of weeks. The modules remail the same, there's no speed improvement. And I feel that it was totally worth it. The changes are 100% transparent - old modules still work like before, and absolutely nothing has changed for anyone using updated modules in existing missions. Everything is exactly as before. Except that I smile a lot more while designing or changing existing modules. 

Which I did, of course. I needed a couple of modules to verify that indeed, the new OOP "DML Zones" are 100% compatible and code that takes advante of the new OOP works exactly as before, even in mixed environments. So I took the radioMenu module, and added new significant abilities: 

  • the ability to immediately acknowledge when a menu item is chosen
  • the ability to selectively (per menu item) set the output flag method (i.e. individual methods). One beneficial side effect is that now, readioMenus can mimic DCS's rather pedestrian 'Set a flag to a certain value' on item level.
  • full wildcard support for cooldown and acknowledge, on the same level as the 'messenger' and 'valet' modules.

And I also changed a couple of other modules, but on a much smaller level.

All changes:

Documentation
    Main
        - immediate output method changes
        - updates to radioMenu
        - finally got around to document "(Simple) Mission Restart"
        - typos, corrections, minor stuff everywhere
        
    Quick Ref 
        - updated radioMenu 
        - updated immediate output method 
        
Demos
    (no changes)
    
Modules 
    - smokeZones 1.2.0
        - Now uses OOP dmlZones
      
    - cfxZones 4.0.0 
        - Adds OOP dmlZones, fully bridged, first class zones support
        - code clean-up
      
    - cloneZone 1.8.0
        - corrected minor bugs 
        - dmlZones upgrade 
        
    - dcsCommon 1.9.0 
        - support/cleanup for cfxZones 4.0

    - flareZone 1.1.0 
        - moved to dmlZones 
        - minor bugfixing 
        
    - messenger 2.3.0 
        - moved to dmlZones 
        
    - radioMenu 2.1.0
        - moved to dmlZones 
        - new ackX attributes for each menu item
        - new valX attributes for each menu item 
        - full wildcard support for cooldown and ack 

    - stopGap 1.0.7
        - small bugfix in config zone reading 
        - moved to dmlZones 
        
    - tacan 1.1.0 
        - moved to dmlZones 

Enjoy,

-ch

  • Like 2
Link to comment
Share on other sites

I’m really just getting into DML but I am loving the ease of use for a non-lua scripter.  Right now I’m working on a simple air-quake type mission (not the end goal just the starting point) where I have 5-6 enemy spawns and 3 friendly spawns.  All spawns are random central spawners with 6 clone sources.  I have a couple issues that I’m trying to resolve.  One is adding in a randomized time delay between possible spawn events. So if the latest spawned group from the spawner is all shot down, I’d like to include a randomized time delay between spawn events.  I tried to use timeDelay between clone? and empty! (as well as other locations withing the randomizer trigger zone list) but with no luck.  I understand that this call alone wouldn’t randomize it. 

The other issue is when spawned AI RTB, I haven’t figured out how to have them despawn as soon as they land so that another group can spawn.  Instead have to wait the 30 minutes for them to time out.  Any help with these two items is appreciated!

Link to comment
Share on other sites

39 minutes ago, Thunder Chicken22 said:

I tried to use timeDelay between clone? and empty! (as well as other locations withing the randomizer trigger zone list) but with no luck.

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.

42 minutes ago, Thunder Chicken22 said:

The other issue is when spawned AI RTB, I haven’t figured out how to have them despawn as soon as they land so that another group can spawn. 

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 🙂 

 

Link to comment
Share on other sites

22 hours ago, 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 🙂 

 

Hey thanks. I was able to get the delay function to work using delay flags in the same way as the attack of the clonez example.  Works like a charm.  I will read some more of the documentation tonight about unitZone and exitZone! functions to see if that might work for despawning.  Also, can you have cloned groups spawn from the airfield that either taxi then takeoff or spawn on the runway? I was just thinking of it as I'm writing so haven't tried it. 

Link to comment
Share on other sites

Hi,cflag san

DML is great 🙂

I am now using the Guardian Angel function. I use this function not as a trainer but as a missile alert.

The problem with Guardian Angel is.
The message "Missile, missile, missile".
I would like to be able to specify the display time freely instead of 30 seconds.

Also, I was shot by Igra S. on the manpad and it does not seem to display the name of the weapon.

I don't know if it is because I am not using it as a trainer, but it is often DISAPPEARED.
Does this mean it is not IR Missed or Lost Track?

Link to comment
Share on other sites

1 hour ago, tsuyopooh said:

I would like to be able to specify the display time freely instead of 30 seconds.

Good idea, thank you! I'll if I can add this quickly to the config zone and warning code.

1 hour ago, tsuyopooh said:

Also, I was shot by Igra S. on the manpad and it does not seem to display the name of the weapon.

I don't know if it is because I am not using it as a trainer, but it is often DISAPPEARED.
Does this mean it is not IR Missed or Lost Track?

I'm not quite sure I fully understand what you are reporting here, but I'll have a look if something is off with manpads.

Link to comment
Share on other sites

 

57 minutes ago, cfrag said:

Good idea, thank you! I'll if I can add this quickly to the config zone and warning code.

🙂

I unregistered the callback and turned on the ANNOUNCER flag.

As shown in the screenshot.

"weapon name: DISAPPEARD"
is empty.

Also, DISAPPEARD was returned when the missile hit

DCS 2023-07-29 23-59-25.jpg

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...