mirror of
https://github.com/akaAgar/the-universal-mission-for-dcs-world.git
synced 2025-11-25 19:31:01 +00:00
Debug builds now spawn an F-16 as player aircraft
This commit is contained in:
parent
850a4c7c50
commit
fdce3cbff3
@ -97,7 +97,7 @@ function makeZones($theaterJson)
|
||||
return $lua;
|
||||
}
|
||||
|
||||
function createMissionTable($theaterJson)
|
||||
function createMissionTable($theaterJson, $debugMode)
|
||||
{
|
||||
$lua = file_get_contents("./Miz/Mission.lua");
|
||||
|
||||
@ -109,6 +109,11 @@ function createMissionTable($theaterJson)
|
||||
$lua = str_replace("__MISSION_DESCRIPTION__", "The Universal Mission for DCS World is an attempt to create a fully dynamic single-player/PvE mission giving access to the whole content of DCS World.\\n\\nOpen the F10/Other submenu in the communication menu to begin.\\n\\nVisit github.com/akaAgar/the-universal-mission-for-dcs-world to learn more.", $lua);
|
||||
$lua = str_replace("__MISSION_NAME__", "The Universal Mission - ".$theaterJson["displayName"], $lua);
|
||||
$lua = str_replace("__WEATHER_TEMPERATURE__", strval($theaterJson["temperature"]), $lua);
|
||||
|
||||
if ($debugMode)
|
||||
$lua = str_replace("__PLAYER_GROUP__", file_get_contents("./Miz/PlayerGroup-Debug.lua"), $lua);
|
||||
else
|
||||
$lua = str_replace("__PLAYER_GROUP__", file_get_contents("./Miz/PlayerGroup-Release.lua"), $lua);
|
||||
|
||||
$lua = str_replace("__PLAYER_AIRDROME_ID__", strval($theaterJson["player"]["airdromeID"]), $lua);
|
||||
$lua = str_replace("__PLAYER_X__", strval($theaterJson["player"]["coordinates"][0]), $lua);
|
||||
|
||||
2
Make.php
2
Make.php
@ -23,7 +23,7 @@ function packMiz($theaterJson, $debugMode)
|
||||
if ($zip->open($filename, ZipArchive::CREATE) !== true)
|
||||
return false;
|
||||
|
||||
$zip->addFromString("mission", createMissionTable($theaterJson));
|
||||
$zip->addFromString("mission", createMissionTable($theaterJson, $debugMode));
|
||||
$zip->addFile("./Miz/Options.lua", "options");
|
||||
$zip->addFromString("theatre", $theaterJson["dcsID"]);
|
||||
$zip->addFromString("warehouses", createWarehousesTable($theaterJson));
|
||||
|
||||
102
Miz/Mission.lua
102
Miz/Mission.lua
@ -298,107 +298,7 @@ mission =
|
||||
{
|
||||
["group"] =
|
||||
{
|
||||
[1] =
|
||||
{
|
||||
["dynSpawnTemplate"] = false,
|
||||
["modulation"] = 0,
|
||||
["tasks"] = {},
|
||||
["task"] = "Nothing",
|
||||
["uncontrolled"] = false,
|
||||
["taskSelected"] = true,
|
||||
["route"] =
|
||||
{
|
||||
["points"] =
|
||||
{
|
||||
[1] =
|
||||
{
|
||||
["alt"] = 22,
|
||||
["action"] = "From Runway",
|
||||
["alt_type"] = "BARO",
|
||||
["speed"] = 138.88888888889,
|
||||
["task"] =
|
||||
{
|
||||
["id"] = "ComboTask",
|
||||
["params"] =
|
||||
{
|
||||
["tasks"] =
|
||||
{
|
||||
[1] =
|
||||
{
|
||||
["enabled"] = true,
|
||||
["auto"] = true,
|
||||
["id"] = "WrappedAction",
|
||||
["number"] = 1,
|
||||
["params"] =
|
||||
{
|
||||
["action"] =
|
||||
{
|
||||
["id"] = "Option",
|
||||
["params"] =
|
||||
{
|
||||
["value"] = true,
|
||||
["name"] = 35,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
["type"] = "TakeOff",
|
||||
["ETA"] = 0,
|
||||
["ETA_locked"] = true,
|
||||
["y"] = __PLAYER_Y__,
|
||||
["x"] = __PLAYER_X__,
|
||||
["speed_locked"] = true,
|
||||
["formation_template"] = "",
|
||||
["airdromeId"] = __PLAYER_AIRDROME_ID__,
|
||||
},
|
||||
},
|
||||
},
|
||||
["groupId"] = 1,
|
||||
["hidden"] = false,
|
||||
["units"] =
|
||||
{
|
||||
[1] =
|
||||
{
|
||||
["alt"] = 22,
|
||||
["alt_type"] = "BARO",
|
||||
["livery_id"] = "default",
|
||||
["skill"] = "Player",
|
||||
["speed"] = 138.88888888889,
|
||||
["type"] = "Su-25T",
|
||||
["unitId"] = 1,
|
||||
["psi"] = 0,
|
||||
["onboard_num"] = "010",
|
||||
["y"] = -177.707709,
|
||||
["x"] = -219.726892,
|
||||
["name"] = "Player-1",
|
||||
["payload"] =
|
||||
{
|
||||
["pylons"] = {},
|
||||
["fuel"] = "3790",
|
||||
["flare"] = 128,
|
||||
["chaff"] = 128,
|
||||
["gun"] = 100,
|
||||
},
|
||||
["heading"] = 0,
|
||||
["callsign"] =
|
||||
{
|
||||
[1] = 2,
|
||||
[2] = 1,
|
||||
[3] = 1,
|
||||
["name"] = "Springfield11",
|
||||
},
|
||||
},
|
||||
},
|
||||
["y"] = __PLAYER_Y__,
|
||||
["x"] = __PLAYER_X__,
|
||||
["name"] = "Player",
|
||||
["communication"] = true,
|
||||
["start_time"] = 0,
|
||||
["frequency"] = 124,
|
||||
},
|
||||
__PLAYER_GROUP__
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
260
Miz/PlayerGroup-Debug.lua
Normal file
260
Miz/PlayerGroup-Debug.lua
Normal file
@ -0,0 +1,260 @@
|
||||
[1] =
|
||||
{
|
||||
["dynSpawnTemplate"] = false,
|
||||
["modulation"] = 0,
|
||||
["tasks"] = {},
|
||||
["DTC"] = {},
|
||||
["uncontrollable"] = false,
|
||||
["task"] = "Nothing",
|
||||
["uncontrolled"] = false,
|
||||
["taskSelected"] = true,
|
||||
["route"] =
|
||||
{
|
||||
["points"] =
|
||||
{
|
||||
[1] =
|
||||
{
|
||||
["alt"] = 13,
|
||||
["action"] = "From Runway",
|
||||
["alt_type"] = "BARO",
|
||||
["speed"] = 138.88888888889,
|
||||
["task"] =
|
||||
{
|
||||
["id"] = "ComboTask",
|
||||
["params"] =
|
||||
{
|
||||
["tasks"] =
|
||||
{
|
||||
[1] =
|
||||
{
|
||||
["enabled"] = true,
|
||||
["auto"] = true,
|
||||
["id"] = "WrappedAction",
|
||||
["number"] = 1,
|
||||
["params"] =
|
||||
{
|
||||
["action"] =
|
||||
{
|
||||
["id"] = "EPLRS",
|
||||
["params"] =
|
||||
{
|
||||
["value"] = true,
|
||||
["groupId"] = 1,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
[2] =
|
||||
{
|
||||
["enabled"] = true,
|
||||
["auto"] = true,
|
||||
["id"] = "WrappedAction",
|
||||
["number"] = 2,
|
||||
["params"] =
|
||||
{
|
||||
["action"] =
|
||||
{
|
||||
["id"] = "Option",
|
||||
["params"] =
|
||||
{
|
||||
["value"] = true,
|
||||
["name"] = 35,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
["type"] = "TakeOff",
|
||||
["ETA"] = 0,
|
||||
["ETA_locked"] = true,
|
||||
["y"] = __PLAYER_Y__,
|
||||
["x"] = __PLAYER_X__,
|
||||
["speed_locked"] = true,
|
||||
["formation_template"] = "",
|
||||
["airdromeId"] = __PLAYER_AIRDROME_ID__,
|
||||
},
|
||||
},
|
||||
},
|
||||
["groupId"] = 1,
|
||||
["hidden"] = false,
|
||||
["units"] =
|
||||
{
|
||||
[1] =
|
||||
{
|
||||
["alt"] = 13,
|
||||
["alt_type"] = "BARO",
|
||||
["livery_id"] = "default",
|
||||
["skill"] = "Player",
|
||||
["speed"] = 138.88888888889,
|
||||
["AddPropAircraft"] =
|
||||
{
|
||||
["HelmetMountedDevice"] = 1,
|
||||
["VoiceCallsignLabel"] = "ED",
|
||||
["STN_L16"] = "00201",
|
||||
["LAU3ROF"] = 0,
|
||||
["VoiceCallsignNumber"] = "11",
|
||||
},
|
||||
["type"] = "F-16C_50",
|
||||
["Radio"] =
|
||||
{
|
||||
[1] =
|
||||
{
|
||||
["channelsNames"] = {},
|
||||
["modulations"] =
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0,
|
||||
[5] = 0,
|
||||
[6] = 0,
|
||||
[7] = 0,
|
||||
[8] = 0,
|
||||
[9] = 0,
|
||||
[10] = 0,
|
||||
[11] = 0,
|
||||
[12] = 0,
|
||||
[13] = 0,
|
||||
[14] = 0,
|
||||
[15] = 0,
|
||||
[16] = 0,
|
||||
[17] = 0,
|
||||
[18] = 0,
|
||||
[19] = 0,
|
||||
[20] = 0,
|
||||
},
|
||||
["channels"] =
|
||||
{
|
||||
[1] = 305,
|
||||
[2] = 264,
|
||||
[3] = 265,
|
||||
[4] = 256,
|
||||
[5] = 254,
|
||||
[6] = 250,
|
||||
[7] = 270,
|
||||
[8] = 257,
|
||||
[9] = 255,
|
||||
[10] = 262,
|
||||
[11] = 259,
|
||||
[12] = 268,
|
||||
[13] = 269,
|
||||
[14] = 260,
|
||||
[15] = 263,
|
||||
[16] = 261,
|
||||
[17] = 267,
|
||||
[18] = 251,
|
||||
[19] = 253,
|
||||
[20] = 266,
|
||||
},
|
||||
},
|
||||
[2] =
|
||||
{
|
||||
["channelsNames"] = {},
|
||||
["modulations"] =
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0,
|
||||
[5] = 0,
|
||||
[6] = 0,
|
||||
[7] = 0,
|
||||
[8] = 0,
|
||||
[9] = 0,
|
||||
[10] = 0,
|
||||
[11] = 0,
|
||||
[12] = 0,
|
||||
[13] = 0,
|
||||
[14] = 0,
|
||||
[15] = 0,
|
||||
[16] = 0,
|
||||
[17] = 0,
|
||||
[18] = 0,
|
||||
[19] = 0,
|
||||
[20] = 0,
|
||||
},
|
||||
["channels"] =
|
||||
{
|
||||
[1] = 127,
|
||||
[2] = 135,
|
||||
[3] = 136,
|
||||
[4] = 127,
|
||||
[5] = 125,
|
||||
[6] = 121,
|
||||
[7] = 141,
|
||||
[8] = 128,
|
||||
[9] = 126,
|
||||
[10] = 133,
|
||||
[11] = 130,
|
||||
[12] = 139,
|
||||
[13] = 140,
|
||||
[14] = 131,
|
||||
[15] = 134,
|
||||
[16] = 132,
|
||||
[17] = 138,
|
||||
[18] = 122,
|
||||
[19] = 124,
|
||||
[20] = 137,
|
||||
},
|
||||
},
|
||||
},
|
||||
["unitId"] = 1,
|
||||
["psi"] = 0,
|
||||
["onboard_num"] = "010",
|
||||
["y"] = __PLAYER_Y__,
|
||||
["x"] = __PLAYER_X__,
|
||||
["name"] = "Aerial-1-1",
|
||||
["payload"] =
|
||||
{
|
||||
["pylons"] = {},
|
||||
["fuel"] = 3249,
|
||||
["flare"] = 60,
|
||||
["ammo_type"] = 5,
|
||||
["chaff"] = 60,
|
||||
["gun"] = 100,
|
||||
},
|
||||
["heading"] = 0,
|
||||
["callsign"] =
|
||||
{
|
||||
[1] = 1,
|
||||
[2] = 1,
|
||||
["name"] = "Enfield11",
|
||||
[3] = 1,
|
||||
},
|
||||
["datalinks"] =
|
||||
{
|
||||
["Link16"] =
|
||||
{
|
||||
["settings"] =
|
||||
{
|
||||
["flightLead"] = true,
|
||||
["transmitPower"] = 3,
|
||||
["specialChannel"] = 1,
|
||||
["fighterChannel"] = 1,
|
||||
["missionChannel"] = 1,
|
||||
},
|
||||
["network"] =
|
||||
{
|
||||
["teamMembers"] =
|
||||
{
|
||||
[1] =
|
||||
{
|
||||
["TDOA"] = true,
|
||||
["missionUnitId"] = 1,
|
||||
},
|
||||
},
|
||||
["donors"] = {},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
["y"] = __PLAYER_Y__,
|
||||
["x"] = __PLAYER_X__,
|
||||
["name"] = "Aerial-1",
|
||||
["communication"] = true,
|
||||
["start_time"] = 0,
|
||||
["frequency"] = 305,
|
||||
},
|
||||
101
Miz/PlayerGroup-Release.lua
Normal file
101
Miz/PlayerGroup-Release.lua
Normal file
@ -0,0 +1,101 @@
|
||||
[1] =
|
||||
{
|
||||
["dynSpawnTemplate"] = false,
|
||||
["modulation"] = 0,
|
||||
["tasks"] = {},
|
||||
["task"] = "Nothing",
|
||||
["uncontrolled"] = false,
|
||||
["taskSelected"] = true,
|
||||
["route"] =
|
||||
{
|
||||
["points"] =
|
||||
{
|
||||
[1] =
|
||||
{
|
||||
["alt"] = 22,
|
||||
["action"] = "From Runway",
|
||||
["alt_type"] = "BARO",
|
||||
["speed"] = 138.88888888889,
|
||||
["task"] =
|
||||
{
|
||||
["id"] = "ComboTask",
|
||||
["params"] =
|
||||
{
|
||||
["tasks"] =
|
||||
{
|
||||
[1] =
|
||||
{
|
||||
["enabled"] = true,
|
||||
["auto"] = true,
|
||||
["id"] = "WrappedAction",
|
||||
["number"] = 1,
|
||||
["params"] =
|
||||
{
|
||||
["action"] =
|
||||
{
|
||||
["id"] = "Option",
|
||||
["params"] =
|
||||
{
|
||||
["value"] = true,
|
||||
["name"] = 35,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
["type"] = "TakeOff",
|
||||
["ETA"] = 0,
|
||||
["ETA_locked"] = true,
|
||||
["y"] = __PLAYER_Y__,
|
||||
["x"] = __PLAYER_X__,
|
||||
["speed_locked"] = true,
|
||||
["formation_template"] = "",
|
||||
["airdromeId"] = __PLAYER_AIRDROME_ID__,
|
||||
},
|
||||
},
|
||||
},
|
||||
["groupId"] = 1,
|
||||
["hidden"] = false,
|
||||
["units"] =
|
||||
{
|
||||
[1] =
|
||||
{
|
||||
["alt"] = 22,
|
||||
["alt_type"] = "BARO",
|
||||
["livery_id"] = "default",
|
||||
["skill"] = "Player",
|
||||
["speed"] = 138.88888888889,
|
||||
["type"] = "Su-25T",
|
||||
["unitId"] = 1,
|
||||
["psi"] = 0,
|
||||
["onboard_num"] = "010",
|
||||
["y"] = -177.707709,
|
||||
["x"] = -219.726892,
|
||||
["name"] = "Player-1",
|
||||
["payload"] =
|
||||
{
|
||||
["pylons"] = {},
|
||||
["fuel"] = "3790",
|
||||
["flare"] = 128,
|
||||
["chaff"] = 128,
|
||||
["gun"] = 100,
|
||||
},
|
||||
["heading"] = 0,
|
||||
["callsign"] =
|
||||
{
|
||||
[1] = 2,
|
||||
[2] = 1,
|
||||
[3] = 1,
|
||||
["name"] = "Springfield11",
|
||||
},
|
||||
},
|
||||
},
|
||||
["y"] = __PLAYER_Y__,
|
||||
["x"] = __PLAYER_X__,
|
||||
["name"] = "Player",
|
||||
["communication"] = true,
|
||||
["start_time"] = 0,
|
||||
["frequency"] = 124,
|
||||
},
|
||||
Loading…
x
Reference in New Issue
Block a user