Jump to content

DML - Mission Creation Toolbox [no Lua required]


Recommended Posts

12 minutes ago, TBear said:

like that?

Almost. If you send the same signal 'ra' to both 'clone?' and 'wipe?' inputs, the results are unpredictable, since you are telling the cloner to create and wipe the same clone at the same time.

What you want is a new radio item "Clear Assisting Aircraft" that sends out a signal, maybe named  "clearAssist" and wire that same "clearAssist" flag into all cloners wipe? inputs. That way, when you choose  "Clear Assisting Aircraft" from the radio menu, all cloners receive that "clearAssist" signal and remove their last spawn.

 

Link to comment
Share on other sites

Well...I applied your suggestion and it worked fine! Many thanks!
More...Instead of using the radioMenu flag I just triggered a flag normally from Mission Editor: ONCE---TIME MORE 20---FLAG ON "clear assist". It also worked.
I just learned a very useful new thing..thanks again👍

  • Like 1
Link to comment
Share on other sites

Hi cfrag:

            stopGap.lua,This script feels very good to use。But after I uploaded the task that loaded this script to the server, except for my own choice of a new plane, there was no problem. Other players who joined the game chose a new plane, and the new plane would become damaged. After several attempts, it would become normal, and sometimes the plane would always be damaged. I initially thought it was a unit collision, so I separated the plane very far, but in the end, the problem still existed.The effect seems to conflict with the static object generated for replacement.

Link to comment
Share on other sites

3 hours ago, t349733591 said:

Other players who joined the game chose a new plane, and the new plane would become damaged.

This is caused by a synchronisation Issue in DCS, and for multiplayer, a tiny script called 'stopGapGUI' must run on the server (and only server). If you have the time, please revisit the "stopGap and stopGapGUI" Chapter in the manual, which also describes how to install stopGapGUI on the server. Note that you must re-start DCS for stopGapGUI to become active on the server.

image.png

 

10 hours ago, TBear said:

It also worked.
I just learned a very useful new thing

I so much envy you - there are lots of things to discover in ME, and even though sometimes frustrating, I find it even more rewarding when you successfully navigate these cliffs, and become more and more powerful in mission design. Have fun! 🙂 


Edited by cfrag
Link to comment
Share on other sites

On 6/15/2023 at 7:06 AM, cfrag said:

This is caused by a synchronisation Issue in DCS, and for multiplayer, a tiny script called 'stopGapGUI' must run on the server (and only server). If you have the time, please revisit the "stopGap and stopGapGUI" Chapter in the manual, which also describes how to install stopGapGUI on the server. Note that you must re-start DCS for stopGapGUI to become active on the server.

image.png

 

I so much envy you - there are lots of things to discover in ME, and even though sometimes frustrating, I find it even more rewarding when you successfully navigate these cliffs, and become more and more powerful in mission design. Have fun! 🙂 

 

Well...I cant stop thanking You for the supporr You give us 👍

Link to comment
Share on other sites

Cfrag, just a quick question before I do some mission editor testing. Should there be away to use DML to spawn random/templated train traffic similar to your wizardry with the Suez Canal? My first assumption would be to put them on a loop using DML, but thought there may be a more “dynamic” method. I am looking to populate a Normandy server with freight traffic. Thanks for all you do for the DCS community!

Link to comment
Share on other sites

On 6/19/2023 at 5:41 AM, Hallsy said:

Should there be away to use DML to spawn random/templated train traffic similar to your wizardry with the Suez Canal? My first assumption would be to put them on a loop using DML, but thought there may be a more “dynamic” method

I think the easiest way to go about trains would be as you suggest using a cloner, and regularly spawn them. That being said, trains in DCS are a bit (ok, a LOT) wonky. If you need trains for anything other than scenery flavor (like the ships in the Suez Canal are just eye candy), I'd closely inspect how they work in this version of DCS, they often do not behave as you think they will, and you may have to contend with other, unplanned trains that pop up on their own, simply because DCS feels like it.

  • Like 1
Link to comment
Share on other sites

1 hour ago, waterman said:

the train always spawns as a tank not a train ?

Confirmed and removed (see below, the cfxMX.lua needed updating).

BUT - trains in DCS are janky. In the demo mission included, the Train should be removed, but Group.destry() seemingly does not remove trains (strange). So the mission works in principle, but a non-moving ghost train (other trains can move through it) remains at the original location.

 

cfxMX.lua ChooChoo Loco.miz

Link to comment
Share on other sites

25 minutes ago, buceador said:

where to install / locate the files that were contained in the zip file?

You can install them anywhere on your storage that you prefer. DML consists of a brief manual (in the Docs) directory, and many small Lua scripts (in the Modules directoy) that you add to your missions like lego bricks - add those that you want to use. 

Since you add the scripts to your mission, and in DCS missions usually are self-contained (meaning that they contain a local copy of any script you add), you are not creating dependencies for your mission. Any mission that you crate with DML will run on any other computer, even those that do not have DML installed. 

Hence, extract the zip to any place you like, browse the docs (especially the demos, and note that any demo that comes with DML has its own chapter in the docs), then have fun and build cool missions.

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

Just digged into persistence and want to leave a BIG thanks to cfrag!
Tried different ways but with DML it is as easy as it could get.
Just one hint: the persistentConfig saveInterval seems to be seconds and not minutes as documented.

@all look at the demo file, there is all you need.
The quick reference was also enough to realise a saved environment for me.

Still diggin into DML itself and looking forward, what to find out about things, which help me develop missions for our mob trying to destroy my lovely designed missions.

Link to comment
Share on other sites

Version 1.3.3 Maintenance Update -- 20230621

image.png

With the release of the fantastic Sinai map (for which I created the "Sinai Tourist Project" and "Dynamic Suez Canal" civ naval traffic because I like writing missions) and new, markedly improved Gazelle flight model, a peculiar issue with StopGap surfaced: in single-player (and only single-player), the Gazelle 'fell from the sky', from some 15-20 ft height onto the heli pad, damaging it. In multi-player, this does not happen. This prompted me to build some lesser client-server magic into the stopGap/stopGapGUI duo, so a mission can now detect if it is running as single-player or multiplayer. And with this knowledge comes a new ability: stopGap now has the ability to selectively disable the static stand-ins for a player aircraft (which creates the issue in single-player) only if the mission is run as single-player, and show all static glory when the mission runs in multiplayer. Of course, the DML version adds zones for this as well so you don't have to mess with silly naming schemes. And of course, the new stopGap is backward-compatible with older versions of stopGapGUI running on the server (in case you did not get around to updating it): in those cases it treats the new '-sp' as '-sg' until you do update the server as well. 

Other than that, PlayerScore now has new abilities to award score to a faction (instead of players) when you trigger flags - flags of your own choosing. This is an interesting concept that may see further improvements down the road.

In all here are the changes to this update:

Documentation
Main 
    - PlayerScore new flag-based scoring for factions
    - SinglePlayer-only stopGap for units 
    - corrected various typos and erroneous information
    
Demos
    - Caucasus Hangar (update: single-player only ignore)
    - Flag Score (new) adding score to a faction by changing a flag 
    

Modules
    - cfxMX 1.2.6 
        - detect Trains as separate category (were kept as vehicle)
        
    - cfxPlayerScore 1.2.0
        - Mission-designers can define arbitrary flags to assign score for a faction
    
    - cfxZones 3.1.2 
        - new ability to get numbers only from attribute list 
        
    - dcsCommon 2.8.9
        - vector methods add, sub and mult now support (xy) and (xyz)
        
    - stopGap/stopGapGUI
        - standalone supports -sp single-player unit exclusion 
        - DML supports -sp and zones to define single-player unit exclusion 
        - stopGapGUI now can tell stopGap that it is running in multiplayer
    
Enjoy,    
-ch

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

hey @cfrag,

had a great experience with DML, until i added my helicopter mission.
sanitized my mission and tracket it down to DML.

First run is fine, it creates the files and all is good.
Second run, i get a CTD at the moment, the heli is approaching waypoint 1 and the "bomb" command.

2023-06-21 18:12:28.902 INFO    EDCORE (Main): try to write dump information
2023-06-21 18:12:28.914 INFO    EDCORE (Main): # -------------- 20230621-181229 --------------
2023-06-21 18:12:28.916 INFO    EDCORE (Main): DCS/2.8.6.41066 (x86_64; MT; Windows NT 10.0.22621)
2023-06-21 18:12:28.918 INFO    EDCORE (Main): D:\Games\Eagle Dynamics\DCS World\bin-mt\DCS.exe
2023-06-21 18:12:28.920 INFO    EDCORE (Main): # C0000005 ACCESS_VIOLATION at 00007ff74066098f 00:00000000
2023-06-21 18:12:28.922 INFO    EDCORE (Main): SymInit: Symbol-SearchPath: 'D:\Games\Eagle Dynamics\DCS World\bin-mt;', symOptions: 532, UserName: 'User'
2023-06-21 18:12:28.924 INFO    EDCORE (Main): OS-Version: 10.0.22621 () 0x100-0x1
2023-06-21 18:12:28.925 INFO    EDCORE (Main): 0x000000000080098f (DCS): SW + 0x36A25F
2023-06-21 18:12:28.927 INFO    EDCORE (Main): 0x00000000007fdc81 (DCS): SW + 0x367551
2023-06-21 18:12:28.929 INFO    EDCORE (Main): 0x00000000007fc1b3 (DCS): SW + 0x365A83
2023-06-21 18:12:28.931 INFO    EDCORE (Main): 0x000000000061b1aa (DCS): SW + 0x184A7A
2023-06-21 18:12:28.932 INFO    EDCORE (Main): 0x0000000000579d8c (DCS): SW + 0xE365C
2023-06-21 18:12:28.933 INFO    EDCORE (Main): 0x0000000000003b53 (World): wSimTrace::CommandsTraceDiscreteIsOn + 0x4C3
2023-06-21 18:12:28.933 INFO    EDCORE (Main): 0x000000000000405e (World): wSimCalendar::DoActionsUntil + 0x1FE
2023-06-21 18:12:28.933 INFO    EDCORE (Main): 0x0000000000876a18 (DCS): SW + 0x3E02E8
2023-06-21 18:12:28.933 INFO    EDCORE (Main): 0x00000000008766e1 (DCS): SW + 0x3DFFB1
2023-06-21 18:12:28.933 INFO    EDCORE (Main): 0x0000000000897b0a (DCS): SW + 0x4013DA
2023-06-21 18:12:28.933 INFO    EDCORE (Main): 0x0000000000856874 (DCS): SW + 0x3C0144
2023-06-21 18:12:28.933 INFO    EDCORE (Main): 0x0000000000857752 (DCS): SW + 0x3C1022
2023-06-21 18:12:28.933 INFO    EDCORE (Main): 0x000000000235aaa2 (DCS): AmdPowerXpressRequestHighPerformance + 0xFAFA9E
2023-06-21 18:12:28.934 INFO    EDCORE (Main): 0x0000000000c56952 (DCS): SW + 0x7C0222
2023-06-21 18:12:28.934 INFO    EDCORE (Main): 0x00000000000126ad (KERNEL32): BaseThreadInitThunk + 0x1D
2023-06-21 18:12:29.106 INFO    EDCORE (Main): Minidump created.

i hope you can help me and track that error down.
As i said, i had a complex mission, and all was fine, until i added the heli.

I had custom save folders and removed them all but the file name.
From my side, everything looks fine.

Helipad_issue.miz

Link to comment
Share on other sites

19 hours ago, GrafRotz said:

i hope you can help me and track that error down.

Thank you for including the miz, as that helps a lot with tracking down potential errors.

Please understand that I can only support current versions of DML, and I'd like to trouble you to download the most recent version of DML, and use those newer versions of all modules. The versions that you currently use in your mission lag a couple of versions behind, and with some luck, most of the issues that you run into have been removed already.

Sorry to not being more helpful, but I promise to support an updated version much better 🙂 

-ch

 

Link to comment
Share on other sites

38 minutes ago, cfrag said:

but I promise to support an updated version much better

stupid me! I copied the config from the demo instead of using the content of the lua files. Even there is a version number.

How do i explain, that you need to change the docs again?
saveInterval in the actual Version is MINUTES!

working like a charme, persistent and unitPersistent doing, what they are supposed to do!

Link to comment
Share on other sites

Hi cfrag

  The trains are cloning good now thanks !

  I am stuck maybe you might have a simple fix ? 

" I am trying to spawn a random train with a delayed start and then have it despawn after 200 seconds."

I can make it start right away and resporn after 200 seconds.

I can make it start with a delay but then i can not work out how to make it despawn .

thanks steve

Train spawns and then respawns after 200 seconds.jpg

Train waits 30 seconds then starts.jpg

Link to comment
Share on other sites

1 hour ago, waterman said:

I can make it start with a delay but then i can not work out how to make it despawn .

Apologies when I appear a bit dense. What is the issue here: the train doesn't despawn when it should (i.e. you are giving the cloner a despawn signal to no effect), or that you did not yet find a way to make the train despawn later (you have not figured out how to make a signal after n seconds to tell the cloner to despawn)? 

Both 'circuits' look almost complete, so maybe it is best if we agree what the cloner should do, e.g.:

  • when the mission starts, do nothing
  • after n seconds, spawn a train that runs on the tracks
  • m seconds later, spawn a new train and despawn the previously spawned train
  • (repeat ad nauseam?)

Is above what you are looking for?

Link to comment
Share on other sites

On 6/27/2023 at 1:03 AM, cfrag said:

Both 'circuits' look almost complete, so maybe it is best if we agree what the cloner should do, e.g.:

  • when the mission starts, do nothing
  • after n seconds, spawn a train that runs on the tracks
  • m seconds later, spawn a new train and despawn the previously spawned train
  • (repeat ad nauseam?)

Is above what you are looking for?

Hi cfrag

***Yes that is what im trying to do***

  If you can make that happen that will be great thanks.

 

 


Edited by waterman
Link to comment
Share on other sites

You are already 90% done. The secret here is simply to add another pulser to start the entire 'circuit':

  • create a pulser for the inititial delay, and set the delay to any value that you want. If you want variability, provide a range (e.g. 100-200 will set a random delay between 100 and 200 seconds). Set zeroPulse to false so that the first pulse comes after the first delay. Set pulses to 1, since we only need one.
  • create a second pulser to provide repeating signals to the cloner. Set onStart to false to put it in dormant state, and have it wake up when the first pulser (above) sends a signal by wiring that pulser's output "pulse!" to the input "activate" by connecting to the same flag "startSchedule". I've set the time between new trains to a random value between 20 and 30 seconds.
  • create a cloner that uses templates (I'm using just one: Train1), and tell the cloner to clone every time that a signal is received on the 'clone?' input. Wire the flag named 'goTrain' into the input, which is connected to the repeating pulse's "pulse!" output. Since preWipe is enabled, the old clone is removed every time a new one is created.

Demo attched.

Once you get this to run and understand the mechanics, go full style and look at the sequencer module that can provide a full schedule, many different signals, and just oozes panache 🙂

-ch

image.png

image.png

Train Waves.miz


Edited by cfrag
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...