Jump to content

DML - Mission Creation Toolbox [no Lua required]


Recommended Posts

Would it be possible to clone a ground asset in a randomized location, snapped to a road?
 

For example in the ME when you assign the type attribute to "On Road", the unit snaps to a nearby road. I understand that DML happens in game and not so much in ME, but would the same effect be possible?

Link to comment
Share on other sites

Just now, Sinclair_76 said:

Would it be possible to clone a ground asset in a randomized location, snapped to a road?

Since DML clones the entire group as you define it in ME, it also clones the path attributes that you give it. So if you check 'on road' for the template, and the clones should automatically drive to the next road. You may want to use the 'moveRoute' attribute for the cloner, when in doubt, recheck the doc's description. But it should work.

 

Link to comment
Share on other sites

38 minutes ago, Grizzley said:

Do I add these LUA files to the mission or do I install them some other place.

It's pretty much up to you. I've made a short tutorial on how I do it, see here. You can link them via doscriptfile.

38 minutes ago, Grizzley said:

When I open the .miz sample missions I see no lua files in them.

Look into the 'scariest of all places:' the 'set rules for trigger' and click on the one I usually call 'load dml'.

Adding these modules is a bit annoying at first, but you usually only do it once per mission and then forget about it.


Edited by cfrag
  • Thanks 1
Link to comment
Share on other sites

On 6/12/2022 at 8:03 PM, cfrag said:

I've completed some preliminary testing. It's not pretty as DCS does not allow scripts access the current task in the controller, but I've put some simple SALT reporting into recon mode, and added a LOT of QoL to bring this module up to DML standard. It may even make it into 1.0

This how the report looks in the message log. Coords can be in LatLon or MGRS.

image.png

And this is how it looks on the map marker (obviously it does not require coordinates).

image.png

 

So far it works like a charm. 

Would it be possible to get an altitude with the grid? Asking for a friend of course since I am way past the allotted amount of questions and requests.

 

 

1 hour ago, cfrag said:

Since DML clones the entire group as you define it in ME, it also clones the path attributes that you give it. So if you check 'on road' for the template, and the clones should automatically drive to the next road. You may want to use the 'moveRoute' attribute for the cloner, when in doubt, recheck the doc's description. But it should work.

 

I was kind of hoping to bypass the rndLoc spawn into impossible terrain. 


Edited by Sinclair_76
Link to comment
Share on other sites

Just now, Sinclair_76 said:

Would it be possible to get an altitude with the grid?

Uh. Sure. Don't know why I forgot about that. I'll see if my bird brain remembers to put it into the next release.

1 minute ago, Sinclair_76 said:

I was kind of hoping to bypass the rndLoc spawn into impossible terrain. 

Ah, I get it: You want the units to spawn directly on the nearest road, not close to road and then drive towards it. I guess I can find something for that, too. Results may be a bit unpredictable if the nearest road isn't where you think it is, and it may cause units to spawn on top of each other. I'll experiment a bit, you tell me if it's what you wanted 🙂 .

Link to comment
Share on other sites

I am trying to build an XCAS simulation within DCS where players get assigned spotted enemy units to follow or kill. The cloner in combination with the rndLoc really helps. But to further the simulation I have three more requests.

 

First Recon:
I already asked for altitude in the message. (edit and has already been taking care of - many regards) Is there a way to make the message stay visible for a longer time. Maybe make it an attribute?

Second - new feature
Most of the time targets in ie Syria would be insurgents or vehicles. Sometimes they are buildings. Would you guys be able to random select a building within a zone, turn it hostile (Red) and distribute it's location as a spot report?

Third AAR / AEW continuity.
If you play long enough even tankers and AWACS run out of gas. Would you be able to script a module which would be able to facilitate continuous operations for AAR / AEW. For example have 2x RC-135 imposters on the ground and when the flying RC-135 hits ie 25% fuel state it alerts an imposter to replace it.

Thanks for the great work you are doing. For the first time I've been able to get some things done my way in stead of tricking my way around the vanilla ME.


Edited by Sinclair_76
Link to comment
Share on other sites

11 minutes ago, Sinclair_76 said:

Is there a way to make the message stay visible for a longer time. Maybe make it an attribute?

Yes. it's the 'reportTime' attribute in the new version. Note that you should also be able to click on the map's mark to get the description minus location because, well, that's where the mark is 🙂 

24 minutes ago, Sinclair_76 said:

Would you guys be able to random select a building within a zone, turn it hostile (Red) and distribute it's location as a spot report?

Buildings (and scenery objects, as opposed to static objects) can't change their affiliation. So, I'd say no. Also, scenery objects are quite generic, so it's not guaranteed that a randomly selected object is a building (needs to be further substantiated, though). So, selecting a random scenery object inside a zone should be possible, if that's anything sensible, or if you can do something with it, is something else. Flags can only pass integers, so I'm not sure what such a specialized module would be able to do.

28 minutes ago, Sinclair_76 said:

Would you be able to script a module which would be able to facilitate continuous operations for AAR / AEW.

Wouldn't a cloner that automatically respawn the original tanker be able to do that? Re-spawn the tanker when the one active right now is destroyed, or exits the zone. Does that solve the issue?

Link to comment
Share on other sites

On 8/1/2022 at 5:28 PM, Sinclair_76 said:

Would it be possible to clone a ground asset in a randomized location, snapped to a road?

Now you can (after the next release):

image.png

A couple of caveats: 

  • If the nearest road is not inside the zone, the units will still move to the nearest road, and that may be miles away
  • The formation in the template will be shot
  • The cloner takes at most 100 attempts to resolve separation between the units. If it cant resolve minimal separation, it gives up and bunches them on the road as close as they happen to be.

Edited by cfrag
  • Thanks 1
Link to comment
Share on other sites

OK, I have to admit, this 'onRoad' thing can come in really handy if you want to distribute your troops randomly through the streets of a city. Using the following simple set-up you can have your units spread throughout the streets of the city, and have them use random location each time you run the mission. All you need is a Trigger Zone and some attributes. 

So, @Sinclair_76, great request, thank you very much!

image.png

Demo mission attached for your own experiments 

Things to try: create a helicopter mission that has to hunt through the streets for these units. Use multiple different, randomized templates to make this mission even more interesting. Man, these missions almost write themselves 🙂 !

 

demo - urban random rumble.miz


Edited by cfrag
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Version 1.11 - 20220804

Update: new onRoad option for cloners, more persistence 

I'm adding persistence to some key modules (object destruct detector, owned zones, FARP Zones). Initial progress is slow, as the architecture is still not 100% final, and improving some minor detail requires me going back and retro-fit the original modules. The good news: all changes are backward-compatible, so it's a drop-in replacement if you have added persistence to your missions already.

Besides providing more persistence support, I'd like to highlight the following change:

CloneZone can now place clones on roads. This looks like a small feature, but together with randomized locations, the clone zone becomes an urban warfare scenario generator: place a couple of units, activate random and roads, and the units distribute randomly over the city's road grid. Use multiple source template, and instant variety (see previous post)!


All Changes

Documentation
    - Updates to Main and Quick Ref

Demos
    - Recon Reloaded: also uses elevation 
    
Modules
    - cfxMX 1.2.1
    - objectDestructDetector 1.3.0 - persistence support 
    - cfxOwnedZones 1.2.0 - persistence support 
    - ReconMode 2.1.1 - adds elevation to announcements
    - cfxZones 2.8.5 - new methods to better support persistence 
    - cloneZones - new options onRoad and rndHeading
    - dcsCommon 2.7.0 - new methods to better support persistence 
    - FARP Zones 1.2.0 - persistence support 
    - persistence 1.0.1 - minor enhancements 
    - theDebugger 1.1.2 - new -remove command 
    - unitPersistence 1.0.1 - late activation, no longer messes with heliports, linked static object support 

 

Cheers,

-ch

 

  • Like 1
Link to comment
Share on other sites

On 8/3/2022 at 11:30 AM, cfrag said:

OK, I have to admit, this 'onRoad' thing can come in really handy if you want to distribute your troops randomly through the streets of a city. Using the following simple set-up you can have your units spread throughout the streets of the city, and have them use random location each time you run the mission. All you need is a Trigger Zone and some attributes. 

So, @Sinclair_76, great request, thank you very much!

image.png

Demo mission attached for your own experiments 

Things to try: create a helicopter mission that has to hunt through the streets for these units. Use multiple different, randomized templates to make this mission even more interesting. Man, these missions almost write themselves 🙂 !

 

demo - urban random rumble.miz 133 kB · 5 downloads

 

Thanks for the compliment. But it's your fast responses and easy implementation that is the true catalyst for my creativity.

You think that in a later state you would be able to overcome the formation dispersal? 

For example use a small insignificant static item to establish a random location on a road and then clone a formation on top of that static marker?

I tried something like that with a moving trigger zone but the moving trigger zone gets displaced due to the different name of the cloned marker.

 


Edited by Sinclair_76
Link to comment
Share on other sites

Just now, Sinclair_76 said:

You think that in a later state you would be able to overcome the formation dispersal? 

Without having tried it, I'd say it's trivial to do, everything's already in place. I'd simply move the center of the template to a road. depending on your formation it will not guarantee that all units are on a road, though. I'll see what I can do.

 

  • Thanks 1
Link to comment
Share on other sites

A simple flag controlled clone somehow doesn't seem to work in the MIZ file below. I've made sure that all the scripts are updated. So not sure why it's not working.

It's regarding cloners T1 and T1-1.

 

Are you able to tell me what I am doing wrong, I can get it to work on a new miz file.

edit: I've reverted to an older version of the mission and copied the new DML modules etc. and everything works. So no more help needed.

Syrian Lion - XCAS - 2.02.miz


Edited by Sinclair_76
Link to comment
Share on other sites

17 hours ago, Sinclair_76 said:

Are you able to tell me what I am doing wrong, I can get it to work on a new miz file.

If this happens to me, I usually break out the debugger and do two things: 

  • put the cloner's input flags on observe (you can do that in ME by listing them inside the zone with the 'debug?' flag
  • force the cloner with the debugger's '-inc' command and see what happens. 

This tells me if I'm triggering the correct flags in the mission (first bullet), and if the cloner is set up and clones correctly (second bullet) 

  • Like 1
Link to comment
Share on other sites

Version 1.1.2 - 20220811

Update: More persistence 

image.png

Last week was a grueling tour-de-force of adding persistence to the main mission-making modules (yeah, I love alliterations as much as the next guy), by way of updating existing missions to persistence. The concept has proven sound, is resilient to bugs, and extends well to other modules. 

As a result, DML now has a solid (albeit not yet complete) foundation for persistence. And what a foundation it is:

  • DML can persist dynamically spawned AI groups (ground, air, sea)
  • All ME-placed AI groups can now persist, with sea-group persistence being somewhat limited (due to aircraft carriers that throw a spanner in the works. Currently sea groups will be eliminated when all ships inside the group have been destroyed, and spawn at their ME-set location, not save-time location)
  • Even better: when using dynamically spawned units from spawners (not cloners) with orders, these units can immediately continue their tasks (because unlike cloned groups, they use a different, ad-hoc order scheme that can continue whre they left off)
  • Now persists FARP zones and object destruct detected zones
  • Did I mention that it persists dynamically spawned units, including those that you picked up and then dropped somewhere else with your helicopter? You know, those guys with 'lase' orders? Yeah, thy are persisted too.
  • Oh, yeah, and also in the mix: limited airframes will persist the amount of air frames you have lost already, SSBClient will remember the planes you trashed, and PlayerScore remember the units you killed. 

Changes in this release

- Documentation
    - Updates to modules with persistence 
    - Small updates to Quick Ref
    
- Modules 
    - GroundTroops 1.7.7
        bug fix 
    - Helo Troops 2.2.0 
        persistence support 
    - cfxMX 1.2.2
        added cross-references 
    - Owned Zones 1.2.1
        persistence support
    - Player Score 1.4.0
        persistence support
    - Spawn Zones 1.7.0
        persistence support 
    - SSBClient 2.1.0
        persistence support 
    - changer 1.0.3
        inverted on/off
    - Clone Zones 1.5.0
        persistence support 
    - dcsCommon 2.7.3
        new functionality 
    - Group Tracker 1.1.4
        additional inputs/outputs 
    - Limited Airframes 1.5.0
        persistence support 
    - persistence 1.0.2
        some QoL improvements
    - RND Flags 1.4.0
        persistence support 
    - unitPersistence 1.1.1
        supports air and sea, some bug fixes 

 

Enjoy,

-ch

(effing null)


Edited by cfrag
  • Thanks 1
Link to comment
Share on other sites

3 minutes ago, Sinclair_76 said:

Did I do something wrong?

No, and I have no idea how this bug has made it into release, since I regression tested it. Line 904 should read 

cloneZones.allCObjects[rawData.name] = theData

Below please find a corrected version.

... it makes me a bit uncomgfortable that this slipped out, so I'll re-regression test everything tonight.

-ch

cloneZone.lua


Edited by cfrag
  • Thanks 1
Link to comment
Share on other sites

Yes, as expected, I kind of screwed up on the regression test. There are two bugs in the current release for cloners that will affect you if you are using persistence with static objects.

Version 1.5.1 is enclosed below, will be part of the coming release.

Sorry about that.

cloneZone.lua

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

4 hours ago, Grizzley said:

Do you know offhand if CTLD troop and vehicle spawning would work with the new persistence

Not having looked at the code (yet), I find that very unlikely. DML can only persist what you design in ME and what you tell it to spawn. CTLD doesn't use DML, hence DML doesn't know of any spawns from that fine script and will not persist those spawns. 

  • Thanks 1
Link to comment
Share on other sites

Hi,

I am also getting this Getflag / Setflag  error message trying to use unitZone with a linked unit. The flag and actions work fine but once they have triggered I get the repeating message. The boom Message is from my flag (50).

Screen_220817_081336.jpg

Screen_220817_081359.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
×
×
  • Create New...