Jump to content

Is there an API or any other way to modify mission (miz) files programatically?


Hippo
Go to solution Solved by TEMPEST.114,

Recommended Posts

E.g. I have 10 mission files and have made multiple individual image files for each and I wish to add them as briefing images?  Is there any way to do this other than manually using the ME?  Or change the weather?  Or add triggers?  Etc.

System spec: Intel i9 13900KF @ stock,  Gigabyte GeForce RTX 4090 Gaming OC 24GB GDDR6X, Gigabyte Z690 UD DDR4, Corsair Vengeance RGB PRO SL 32GB (2 x 16GB) DDR4 3600MHz C18, Samsung 980 EVO 500 GB NVME M.2 SSD (system drive), Samsung 970 EVO 1 TB NVME M.2 SSD (games drive), Cooler Master ML360 Illusion CPU Cooler, Asus XG43UQ Monitor, Oculus Quest Pro, Thrustmaster Warthog HOTAS, MFG Crosswind Rudder Pedals

Link to comment
Share on other sites

The files within a .miz are just lua tables. As a result you can edit the files externally however you wish. Its how the user made mission generators function and tools like the upcoming DCS Web Editor work. I don't know if anyone has made a tool to modify multiple missions as a batch of sorts. Usually its something as basic as injecting different weather into the next MP mission that gets loaded by a server. 

  • Thanks 1

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

10 hours ago, Grimes said:

The files within a .miz are just lua tables. As a result you can edit the files externally however you wish. Its how the user made mission generators function and tools like the upcoming DCS Web Editor work. I don't know if anyone has made a tool to modify multiple missions as a batch of sorts. Usually its something as basic as injecting different weather into the next MP mission that gets loaded by a server. 

Thanks.  Is the structure/ available variables/ etc of mission files documented anywhere, or have people, such as those who have developed mission generators, just had to work it all out for themselves?

System spec: Intel i9 13900KF @ stock,  Gigabyte GeForce RTX 4090 Gaming OC 24GB GDDR6X, Gigabyte Z690 UD DDR4, Corsair Vengeance RGB PRO SL 32GB (2 x 16GB) DDR4 3600MHz C18, Samsung 980 EVO 500 GB NVME M.2 SSD (system drive), Samsung 970 EVO 1 TB NVME M.2 SSD (games drive), Cooler Master ML360 Illusion CPU Cooler, Asus XG43UQ Monitor, Oculus Quest Pro, Thrustmaster Warthog HOTAS, MFG Crosswind Rudder Pedals

Link to comment
Share on other sites

  • Solution
40 minutes ago, Hippo said:

Thanks.  Is the structure/ available variables/ etc of mission files documented anywhere, or have people, such as those who have developed mission generators, just had to work it all out for themselves?

there are a few posts on here, but to a large extent it's a continuous grind that everyone is seemingly made to go through for themselves just because those who came before were made to. ED have zero interest in a proper, fully functional and documented API / Scripting engine.

i.e. when you want to know how to spawn a particular unit with a particular livery and loadout, you make a mission with nothing else but that unit configured how you want it in the ME. Then save the miz, extract the mission table and grab the group table and trim out the bits you don't need / mustn't use (again trial and error and a few hard to find helpful posts) and hours/days/weeks later you are able to spawn that unit.

When you've learnt how to do that to enough distinct units, you can refactor your code to do 'most' of it as a generic spawn method, but you will still have large branching if statements to cover all the corner cases.

ED haven't really bothered with a proper API, most of this is 'untested' or 'as is' and they don't seem to care about it one bit - going by the eons old wish lists that never gets done - let alone replied to - and the fact that they never seem to mention the ME or the API in any of their 'updates' or 'year ahead' stuff... 

There is no 'official' documentation - only what Grimes has done off his own back on the HOGGIT site of all places, but that's out of date a bit, misleading, missing stuff and sometimes very opaque.

This is what it is. It seems no amount of asking, begging, pleading or bargaining can get the devs or managers at ED to make it more usable or stable or fill in the many, many, MANY flaw/gaps/bugs/missing features that have been outstanding for 10 years or so.

You're going to have to treat this like a reverse engineering problem and with the help of kind people on the forums and searching for old posts, try and slowly piece it together. 

I say this as someone who started in ME mission design and lua scripting just about 6 months ago with no experience of lua or scripting and no understanding of the (awful) mission editor. 

It's been a very steep curve but there are some amazing and kind people on this forum (and a few that really, really aren't) and finally last month I was able to spawn the units I wanted at an airfield of my choosing at run time, and have full control of tankers and awacs and make them come to my players upon request and change their tanking alt and speed and even lead them to their chosen homebase whilst tanking. 

It is possible, but it's a long, long climb. 

And then be prepared for players to not give a crap about all your hard work.

  • Thanks 1
Link to comment
Share on other sites

4 hours ago, Elphaba said:

there are a few posts on here, but to a large extent it's a continuous grind that everyone is seemingly made to go through for themselves just because those who came before were made to. ED have zero interest in a proper, fully functional and documented API / Scripting engine.

i.e. when you want to know how to spawn a particular unit with a particular livery and loadout, you make a mission with nothing else but that unit configured how you want it in the ME. Then save the miz, extract the mission table and grab the group table and trim out the bits you don't need / mustn't use (again trial and error and a few hard to find helpful posts) and hours/days/weeks later you are able to spawn that unit.

When you've learnt how to do that to enough distinct units, you can refactor your code to do 'most' of it as a generic spawn method, but you will still have large branching if statements to cover all the corner cases.

ED haven't really bothered with a proper API, most of this is 'untested' or 'as is' and they don't seem to care about it one bit - going by the eons old wish lists that never gets done - let alone replied to - and the fact that they never seem to mention the ME or the API in any of their 'updates' or 'year ahead' stuff... 

There is no 'official' documentation - only what Grimes has done off his own back on the HOGGIT site of all places, but that's out of date a bit, misleading, missing stuff and sometimes very opaque.

This is what it is. It seems no amount of asking, begging, pleading or bargaining can get the devs or managers at ED to make it more usable or stable or fill in the many, many, MANY flaw/gaps/bugs/missing features that have been outstanding for 10 years or so.

You're going to have to treat this like a reverse engineering problem and with the help of kind people on the forums and searching for old posts, try and slowly piece it together. 

I say this as someone who started in ME mission design and lua scripting just about 6 months ago with no experience of lua or scripting and no understanding of the (awful) mission editor. 

It's been a very steep curve but there are some amazing and kind people on this forum (and a few that really, really aren't) and finally last month I was able to spawn the units I wanted at an airfield of my choosing at run time, and have full control of tankers and awacs and make them come to my players upon request and change their tanking alt and speed and even lead them to their chosen homebase whilst tanking. 

It is possible, but it's a long, long climb. 

And then be prepared for players to not give a crap about all your hard work.

Great post, thank you.

  • Thanks 1

System spec: Intel i9 13900KF @ stock,  Gigabyte GeForce RTX 4090 Gaming OC 24GB GDDR6X, Gigabyte Z690 UD DDR4, Corsair Vengeance RGB PRO SL 32GB (2 x 16GB) DDR4 3600MHz C18, Samsung 980 EVO 500 GB NVME M.2 SSD (system drive), Samsung 970 EVO 1 TB NVME M.2 SSD (games drive), Cooler Master ML360 Illusion CPU Cooler, Asus XG43UQ Monitor, Oculus Quest Pro, Thrustmaster Warthog HOTAS, MFG Crosswind Rudder Pedals

Link to comment
Share on other sites

nullI've created an open source browser based miz editor which is currently in closed BETA.

It will be integrated with DCS Web Editor but also works standalone.

 

image.png


Edited by winghunter
  • Like 2

DCS Web Editor - New 3D Mission Editor for DCS that runs in your browser

DCS Web Viewer free browser based mission planner / viewer

dcs web editor new(2).png
4090 RTX, 13700KF, water cooled

Link to comment
Share on other sites

  • Recently Browsing   0 members

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