Jump to content

DCSMissionTweaker - converting single player missions to multiplayer


dcs76

Recommended Posts

DCSMissionTweaker

 

With this tool, you can convert any single player mission into a multiplayer mission.

 

The tool can be used with missions of copyprotected DLC campaigns as well.

The copy protection is not circumvented with this tool.

All clients/players are still required to have a purchased license of that DLC campaign.

 

Download

 

Either compile the source code (found here) with Visual Studio or download a precompiled executable here:

 

https://drive.google.com/open?id=1pqKflZaAkdw_mAOhSlpCsKup3NyI4ld9

 

SHA1: 84081c37f52b371e1aa72c8bad817c699aac50d9

 

SHA256: 8051d4d1d67768a804bfe1444b1341eaf260e2cd100e35dd1e7de399b75e2873

 

The compiled executable is not signed. Windows will warn you when you try to execute it. You need to "accept the risk".

 

Disclaimer

 

As stated, this tool DOES NOT circumvent any DCS copy protection. If you tweak a mission of a copyprotected DLC campaign, all joining clients are still required to have the original DLC campaign installed. Otherwise they won't be able to join.

 

As this tool does not circumvent the copyprotection, Eagle Dynamics is ok with it. I have permission from them to publish it. If you want to know, how it works, see below.

 

Limitations

 

Quite a few missions use SPACE BAR triggers in order to advance the mission progress.

Due to this reason, one of the players/clients must also host the mission.

This hosting player is able to hit the SPACE BAR.

 

A few missions also use conditions/triggers based on specific cockpit dials or switches.

Again, those conditions/triggers will only work for the hosting player.

 

Usage

 

dcsmissiontweak.exe <path_to_missionfile.miz> <numberofclients>

 

 

This will change the units of the group the single player is part of to clients.

Only the first <numberofclients> units will be converted to clients.

The tool does not yet increase the number of existing units within the group.

If the group has fewer units than the specified <numberofclients>, only the existing units of that group are converted to clients.

 

Requirements

 

This tool runs on Windows with Microsoft .Net Framework 4.5 or higher installed.

 

Planned improvements

 

1. Changing airframe

 

This will allow flying missions with other aircraft.

This will only work if the mission does not rely on aircraft specific cockpit triggers/conditions of course.

As long as the new airframe has about the same capabilities as the original airframe the clients shouldn't have too much issues.

The first iteration of this feature will not add any loadout on the new airframe. The clients need to add the loadout themselves.

Additional iterations of that feature will attempt to convert the loadout from the original airframe to the new one.

 

2. Increasing number of units

 

If the number of clients is higher than the number of already existing units of the group, additional units (up to 4) will be added to the group.

 

3. Additional groups (with different airframe)

 

It will be possible to just add additional groups to the mission. The tool will attempt to be as smart as possible to add those units/groups.

Based on the starting configuration for the original units, the additional units will be configured and placed.

a few options will be provided to give the user some choice.

 

4. GUI

 

For the users who like a nice GUI, there will be one.

 

How does it work?

 

Essentially, miz-files are just zip archives. The file "mission" within the archive is a *lua* config file. This file contains all units. The tool simply parses this config file and updates those units. The method also works with copyprotected missions because only the triggers/conditions, scripts, behavior has been extracted into an encrypted file (extension .crypt) located side-by-side with the mission files. The miz file contains a reference to that file. This reference is not touched by the tool. The encryption mechanism does not include any checksums for the mission file itself or other content within the miz archive. This allows modifying it without breaking the copy protection. It also allows placing that miz file anywhere - even downloading from a DCS server). Upon loading that miz file, the referenced encrypted and protected file is being loaded as well. If that encrypted file cannot be located (e.g. client does not have a license of that DLC campaign or did not install it in his DCS version), that user is unable to join the mission.

 

Contributions

 

Feel free to contribute to this tool. Add issues (to the github repository mentioned above) if you find any bugs and or create pull requests for enhancements/fixes.


Edited by dcs76
  • Thanks 2
Link to comment
Share on other sites

  • 4 weeks later...

This sounds very useful. Damn it, my gpu just passed away a couple of weeks ago and i am looking to get a proper replacement soon. I will sure give this a go then. I have been trying to get EDs Red Flags working in coop with my brother. We both own the campaigns and it should be a blast to play them together. So best of luck developing this further, especially adding a UI sound good. It's really great that more and more useful tools around DCS see the light of day.

 

 

BTW: this sounds like all i need to do manually is to open a mission with a zip tool, extract the mission file, change the AIs for clients and drop that changed mission file back into the original zip?

 

 

I did the manual way just now and sure enough, i could host that mission and could join either of two client slots. Great. Can't test this with my brother atm, but this looks very promising. No idea why this way of doing this has not been posted here before. Anyway, your tool will make this a breeze i reckon! Cheers :)


Edited by sc_neo
Link to comment
Share on other sites

This is excellent, thank you for your work !

 

 

If I may add a comment, why don't you use the "release" mechanism in GitHub to host your compiled executable ?

This is easy, integrated, and usually accepted as the way of releasing a program on Github.


Edited by davidp57

Zip - VEAF :pilotfly:

 

If you want to learn, talk and fly with french-speaking friends, the Virtual European Air Force is here for you ! Meet us on our Discord and our forum

If you're a mission creator, you may want to check the VEAF Mission Creation Tools (and its GitHub repository) a set of open-source scripts and tools that make creating a dynamic mission a breeze !

Link to comment
Share on other sites

  • 10 months later...

Oh, no I have no idea how to do that. Would you be able to paste a command prompt snippet I could use, assuming its sitting in a common directory?

 

Cheers

 

EDIT: Just saw that you have already done this in the original post, apologies!


Edited by Chang739
Link to comment
Share on other sites

Say, I looked at the source code you provided and I cannot for the life of me understand it.

Are you positive it's the correct code ?

All I see is a window with a button that opens a file browser dialog, and nothing else.

Zip - VEAF :pilotfly:

 

If you want to learn, talk and fly with french-speaking friends, the Virtual European Air Force is here for you ! Meet us on our Discord and our forum

If you're a mission creator, you may want to check the VEAF Mission Creation Tools (and its GitHub repository) a set of open-source scripts and tools that make creating a dynamic mission a breeze !

Link to comment
Share on other sites

Yeah, but where is the code that actually does something, in the GitHub repository you linked, please ?

I searched and could'nt find anything else than a basic GUI (as in not a command line app) that does nothing.

Zip - VEAF :pilotfly:

 

If you want to learn, talk and fly with french-speaking friends, the Virtual European Air Force is here for you ! Meet us on our Discord and our forum

If you're a mission creator, you may want to check the VEAF Mission Creation Tools (and its GitHub repository) a set of open-source scripts and tools that make creating a dynamic mission a breeze !

Link to comment
Share on other sites

sure, no problem, at least I was not mistaken :D

Zip - VEAF :pilotfly:

 

If you want to learn, talk and fly with french-speaking friends, the Virtual European Air Force is here for you ! Meet us on our Discord and our forum

If you're a mission creator, you may want to check the VEAF Mission Creation Tools (and its GitHub repository) a set of open-source scripts and tools that make creating a dynamic mission a breeze !

Link to comment
Share on other sites

  • 9 months later...
  • 5 months later...

Is this tool (the one from your Google Drive link) compatible with the latest DCS Beta? (version 2.7.6.13133)

 

I'm trying to make the following campaign multiplayer to enjoy w my bud. (DLC Persian Freedom)

 

The app successfully created the campaign file "Persian Freedom WARTHOG 1 FINAL_mp.miz"  

 

I created a server, launched the new "Persian Freedom WARTHOG 1 FINAL_mp.miz" but there is only one playable slot available. 

 

I opened the new file in the editor and noticed the new plane it created is not set to "Client". 

 

I would appreciate any help! Thanks!

DCS.jpg


Edited by TechSystm
Link to comment
Share on other sites

  • 4 months later...
  • 1 year later...

I've tried to fork this project and fix some bugs, but am rapidly running out of steam since after tweaking the source code and running a mission through it DCS fails to load the mission. The log doesn't contain any useful information about why though. I've checked the diff of the modifications and it's not doing anything unexpected to the .miz file.

For example, fixing this bug seems trivial:

Unhandled exception. System.OverflowException: Value was either too large or too small for an Int32.
   at DCSMissionTweaker.MissionParser.Parse(Stream stream) in D:\My Documents\Source Code\Csharp\GitHub\DCSMissionTweaker\MissionParser.cs:line 92
   at DCSMissionTweaker.MissionParser.ParseFile(String filePath) in D:\My Documents\Source Code\Csharp\GitHub\DCSMissionTweaker\MissionParser.cs:line 21
   at DCSMissionTweaker.Program.Main(String[] args) in D:\My Documents\Source Code\Csharp\GitHub\DCSMissionTweaker\Program.cs:line 17

The value it's having trouble with is: `9663676414` and when I change it to a long the mission is tweaked as expected, that value remains the same in the new file, yet DCS fails to load it:

2023-06-05 16:07:23.159 INFO    SECURITYCONTROL (Main): Loaded Mods/campaigns/P-51D The Blue Nosed Bastards of Bodney/P51DBLUENOSEDBASTARDS.pak.crypt
2023-06-05 16:07:23.160 ERROR   Dispatcher (Main): Mission Load Error: Failed to load the mission.

It's just a text file... but I've spent about all the time I'm willing to spend on it, unless anyone has any obvious insights I've missed.

Here's the mission file diff: 

diff --git a/mission.orig b/mission
index bfe04c0..8d327a2 100644
--- a/mission.orig
+++ b/mission
@@ -3241,7 +3241,7 @@ mission =
                                             [3] = 1,
                                             ["name"] = "Springfield11",
                                         }, -- end of ["callsign"]
-                                        ["skill"] = "Player",
+                                        ["skill"] = "Client",
                                     }, -- end of [1]
                                     [2] =
                                     {
@@ -3278,7 +3278,7 @@ mission =
                                         }, -- end of ["payload"]
                                         ["y"] = 11854.875862566,
                                         ["heading"] = -2.7936613726009,
-                                        ["skill"] = "Excellent",
+                                        ["skill"] = "Client",
                                         ["callsign"] =
                                         {
                                             [1] = 2,

 Edit: Maybe it's something about the zip library i'm using with vscode and .net core 7.3...


Edited by DoktorSleepless
Link to comment
Share on other sites

  • Recently Browsing   0 members

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