Script to convert mission with different aircraft

Accueil > Fichiers Utilisateurs > Script to convert mission with different aircraft
N'importe quelle version
Autre

Script to convert mission with different aircraft

Type - Utilitaire
Auteur - titi69
Date - 25.01.2022 11:19:58
This powershell script will convert any aircraft to another one in any mission by modifying .miz file without unzipping it or open it

I wrote this script as i start learning A10C2 , i found much more mission for A10C model and wanted to convert them into the newest model, same with some campaign
this can be done manually opening miz file with tools like winrar and modifying mission or in mission editor but it takes times when you have lot of aircraft or missions

To use this script just put all the mission you need to convert in one folder and i recommend to put the script in the same folder(like : C:\temp , make path without space,i didn't write the script to handle space in path)
to launch the script open powershell command prompt and and launch following command

Command :  .\mission_1.ps1 E:\temp\*.miz A-10C A-10C_2 ( here it will modify all miz files in the folder you can put specific miz filename)
or  .\mission_1.ps1 *.miz A-10C A-10C_2 ( if script and miz file are in the same folder)
it will launch the script (mission_1.ps1) with 3 argument
1: miz file folder path or just miz file name
2: original aircraft model in the mission
3: desired new aircraft model

basically the script is opening miz file , searching and reading "mission" within miz file and replacing A-10C with A-10C_2
you can download zip file with the script in txt format ( you can check on the script before launching it to verify it is not malicious), just rename it in .ps1 format

one thing you need to know is the names of each model used in DCS miz files , for exemple in mission editor the A10C 2 is shown as A-10C II but in miz file the name is A-10C_2

P.S.: Don't work with original mission files, make copy if something is going wrong

UPDATE: i have added second script  to verify if new aircraft name was updated
same proces but you just need to pass 2 argument
./verification.ps1 *.miz A-10C_2

you should see in result "True" at the end
Archive            : System.IO.Compression.ZipArchive
CompressedLength   : 91944
ExternalAttributes : 0
FullName           : mission
LastWriteTime      : 1/1/1980 12:00:00 AM +01:00
Length             : 2593692
Name               : mission

True

  • Licence: Freeware - Version Gratuite, Distribution non limitée
  • Langue: Anglais
  • Taille: 1.9 Ko
  • Téléchargé: 147
  • Commentaires: 10
FOLLOW US