Mission.sqm: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Some wiki formatting)
 
(51 intermediate revisions by 5 users not shown)
Line 1: Line 1:
[[category:Operation Flashpoint: Editing]]
{{Feature|UnsupportedDoc}}
===Introduction===
{{TOC|side}}


The '''mission.sqm''' file is generated automatically by the in game editor. Any action you perform within the editor is saved in this file.


===Addons===
[[Mission.sqm]] is the file generated by the [[Mission Editor]];
it contains mission information (date, time, weather),
object placement information (position, direction and other parameters) as well as every other setting that can be set from the editor (respawn type and duration, etc).


Once you have completed your new mission it's always good practice to check the '''mission.sqm''' to remind yourself of what addons you used to make it. They will all be listed but they may not have the name you might expect them to.


'''Example:'''
== Versions ==
class Mission
{
addOns[]=
{
"MTYDC3",
"sebnam_a",
"sebnam_wp",
"sebnam_nv"
};
addOnsAuto[]=
{
"MTYDC3",
"sebnam_a",
"sebnam_nv"
};


Remember that '''mission.sqm''' file contains not only Mission, but also Intro, OutroWin and OutroLoose. Make sure that you've chacked all of these before releasing the mission.
SQM version can be found by opening the file with a basic text editor: it is the very first line of the file, to format {{hl|version{{=}}''version'';}} - correspondence below:
{| class="wikitable"
! Version
! Game
! Format
|-
| 11
|
* {{ofp}}
* {{ofpr}}
* {{arma1}}
* {{arma2}}
* {{arma2oa}}
* {{tkoh}}
| rowspan="2" | 2D
|-
| 12
|
* {{arma3}} ([[2D Editor]])
|-
| 53
|
* {{arma3}} ([[:Category:Eden Editor|Eden Editor]])
| 3D
|}


If you are unsure of your addons you can ask community members for assistance, they will always be happy to help you track down missing addons.


AddonsAuto is a list of addons which were added automatically by mission editor and can be therefore also automatically removed when editor sees the addon is no longer used.
== [[:Category:Eden Editor|Eden Editor]] format ==


When adding addons manually into addons[], you usually do not want to add it into addonsAuto[], because if you will do, mission editor will remove the addon from both places again.
As seen above, the first line is {{hl|version}}, then come:
* {{hl|class EditorData}} - [[:Category:Eden Editor|Eden Editor]] settings, like camera position, entity id
* {{hl|binarizationWanted}} - 0 to output the mission in plain (non-binary) text
* {{hl|addons}} - list of required addons
* {{hl|AddonsMetaData}} - user-friendly required addons' information
* {{hl|randomSeed}} - seed for randomisation, most likely used by [[random]]. This number is unique for each mission!
* {{hl|class ScenarioData}} - scenario's meta data (author name) as well as respawn settings (respawn type, etc)
* {{hl|class CustomAttributes}} - advanced scenario attributes (such as respawn templates, [[Arma 3: Revive|revive]], etc. Also contains'''modded''' attributes)
* {{hl|class Intro}} - if it exists: intro
* {{hl|class Mission}} - if it exists: mission
* {{hl|class {{sic|OutroLoose|OutroLose}}}} - if it exists: failure outro
* {{hl|class OutroWin}} - if it exists: success outro


Here is the BIS missing addons thread on their official forum.  
 
[http://www.flashpoint1985.com/cgi-bin/ikonboard311/ikonboard.cgi?s=9d83a6c2f411b2b986cc0346e7394107;act=ST;f=55;t=26978 BI Forums Thread]
* Intro, Mission, {{sic|OutroLoose|OutroLose}} and OutroWin contain the following sub-classes:
** {{hl|class Intel}} - date/time and weather settings
** {{hl|class Entities}} - the various entities present in the {{hl|Mission}}
** {{hl|class Connections}} - connections like synchronized triggers present in the {{hl|Mission}}
 
A bare minimum mission.sqm looks like this, the other attributes are added when the mission is saved in the editor:
<syntaxhighlight lang="cpp">
version=53;
class EditorData
{
class Camera
{
};
};
randomSeed=123456;
</syntaxhighlight>
 
=== class EditorData ===
 
<spoiler text="Show Example">
<syntaxhighlight lang="cpp">
class EditorData
{
moveGridStep=1;
angleGridStep=0.2617994;
scaleGridStep=1;
autoGroupingDist=10;
toggles=1;
mods[]=
{
"3denEnhanced"
};
class ItemIDProvider
{
nextID=13;
};
class MarkerIDProvider
{
nextID=1;
};
class Camera
{
// simplified example for the sake of readability
// ...
};
};
</syntaxhighlight>
</spoiler>
 
==== moveGridStep ====
Translation Widget's step size in meters.
 
==== angleGridStep ====
Angle Widget's step size in radians.
 
==== scaleGridStep ====
Area Scaling Widget's step size in meters.
 
==== autoGroupingDist ====
Defines the distance in meter to auto-group units.
This value can only be changed in the mission.sqm file and not from within [[:Category:Eden Editor|Eden Editor]].<br>The change is not overwritten if the mission is saved and is persistent across different mission.sqm files.
 
==== toggles ====
Is a number created out of different flags.
 
{| class="wikitable"
|+ Flag Details
! Value !! Description !! Icon
|-
| 0 || Nothing selected || {{n/a}}
|-
| 1 || Terrain Mode ATL || style="background-color:#333; text-align:center" | [[File:3den toolbar vert ATL.png|32px]]
|-
| 2 || Terrain Mode ASL / Don't adjust up vector || style="background-color:#333; text-align:center" | [[File:3den toolbar vert ASL.png|32px]]
|-
| 4 || Move in grid || style="background-color:#333; text-align:center" | [[File:3den toolbar grid translation.png|32px]]
|-
| 8 || Don't snap to surface || style="background-color:#333; text-align:center" | [[File:3den toolbar snap.png|32px]][[File:3den toolbar snap on.png|32px]]
|-
| 16 || ''Not implemented on purpose'' || {{n/a}}
|-
| 32 || Rotate in grid || style="background-color:#333; text-align:center" | [[File:3den toolbar grid rotation.png|32px]]
|-
| 64 || Scale in grid || style="background-color:#333; text-align:center" | [[File:3den toolbar grid scaling.png|32px]]
|-
| 128 || Force show bounding boxes<br>''Can not be toggled from the editor'' || {{n/a}}
|-
| 256 || Disable mouseOver model highlight<br>''Can not be toggled from the editor'' || {{n/a}}
|-
| 512 || Insert empty vehicle as default || {{n/a}}
|-
| 1024 || Allow resize/rotate widget || style="background-color:#333; text-align:center" | [[File:3den toolbar widget area.png|32px]]
|}
 
==== Mods ====
{{GVI|arma3|2.04}} Mods listed here have {{hl|c= is3DENMod = 1;}} set in [[Eden Editor: Modding#Addon_Configuration|CfgPatches]].
 
==== class ItemIDProvider ====
contains a single entry: {{hl|nextID}} that is the next item id value (auto incremented on every item addition);
 
==== class MarkerIDProvider ====
contains a single entry: {{hl|nextID}} that is the next marker id value (auto incremented on every marker addition);
 
==== class Camera ====
Defines the editor's camera position/orientation.
<syntaxhighlight lang="cpp">
class Camera
{
// positions are to format X, Z, Y
pos[]={2325.9604,24.771292,5133.4385}; // camera position
dir[]={0.361072,-0.27934057,0.88971913}; // camera vectorDir
up[]={0.10504395,0.96019292,0.25883871}; // camera vectorUp
aside[]={0.92660606,2.7686474e-007,-0.37604135}; //
};
</syntaxhighlight>
 
=== binarizationWanted ===
 
A number (0 or 1) representing a [[Boolean]], to tell the editor to save the mission.sqm to binary format or not.
 
<syntaxhighlight lang="cpp">
binarizationWanted=0;
</syntaxhighlight>
 
=== addons ===
 
A config array of '''CfgPatches''' entries, determining which addons are needed.
 
<syntaxhighlight lang="cpp">
addons[]=
{
"A3_Characters_F",
"A3_Modules_F_Sites",
"A3_Ui_F"
};
</syntaxhighlight>
 
=== AddonsMetaData ===
 
A "list" of [[#addons|required addons]]' user-friendly details, with author's name, friendly name, URL.
 
<spoiler text="Show Example">
<syntaxhighlight lang="cpp">
class AddonsMetaData
{
class List
{
items=3;
class Item0
{
className="A3_Characters_F";
name="Arma 3 Alpha - Characters and Clothing";
author="Bohemia Interactive";
url="https://www.arma3.com";
};
class Item1
{
className="A3_Modules_F";
name="Arma 3 Alpha - Scripted Modules";
author="Bohemia Interactive";
url="https://www.arma3.com";
};
class Item2
{
className="A3_Ui_F";
name="Arma 3 - User Interface";
author="Bohemia Interactive";
url="https://www.arma3.com";
};
};
};
</syntaxhighlight>
</spoiler>
 
=== randomSeed ===
 
A [[random]] seed most likely used by weather settings and/or other random values.
 
<syntaxhighlight lang="cpp">
randomSeed=4125053;
</syntaxhighlight>
 
=== ScenarioData ===
 
==== author ====
 
The mission's author name.
 
<syntaxhighlight lang="cpp">
author="Bohemia Interactive";
</syntaxhighlight>
 
=== class Mission ===
=== class Intro ===
=== class OutroWin ===
=== class OutroLoose ===
 
Constituted of two sub-entries {{Link|#class Intel}} and {{Link|#class Entities}},
This structure applies to {{Link|#class Intro}}, {{Link|#class OutroWin}} and {{Link|#class OutroLoose}} as well.
 
==== class Intel ====
Mission setup information.
 
<syntaxhighlight lang="cpp">
class Intel
{
timeOfChanges=1800.0002;
startWeather=0;
startWind=0.1;
startWaves=0.1;
forecastWeather=0;
forecastWind=0.1;
forecastWaves=0.1;
forecastLightnings=0.1;
year=2035;
day=28;
hour=13;
minute=37;
startFogDecay=0.014;
forecastFogDecay=0.014;
};
</syntaxhighlight>
 
==== class Entities ====
{{hl|class Entities}} is a data bag that can contain items, and items can contain instances of {{hl|class Entities}}.
In the example below, the "main" {{hl|class Entities}} contains an item (the group), item which contains another {{hl|class Entities}} with items (group units).
 
<syntaxhighlight lang="cpp">
class Entities
{
items=1;
class Item0
{
dataType="Group";
side="West";
class Entities
{
items=1;
class Item0
{
// simplified example for the sake of readability
// ...
};
};
};
};
</syntaxhighlight>
 
==== class ItemX ====
Where X is from 0 to items number -1.
 
A {{hl|class ItemX}} can be of the following ''dataType''s:
* "Comment"
* "Group"
* "Logic"
* "Marker"
* "Object"
* "Trigger"
* "Waypoint"
 
<spoiler text="Show Example">
<syntaxhighlight lang="cpp">
class Item0
{
dataType="Object";
class PositionInfo
{
position[]={256,1029.0015,512.0498}; // X, Z, Y in world position
};
side="West";
flags=3;
class Attributes
{
health=0.89999998;
skill=0.60000002;
ammo=0.89999998;
rank="CORPORAL";
presence=0.68964958;
isPlayable=1;
disableSimulation=1;
ignoreByDynSimulGrid=1;
reportRemoteTargets=1;
receiveRemoteTargets=1;
reportOwnPosition=1;
stance="Down";
};
id=1;
type="B_Soldier_F"; // CfgVehicles class
atlOffset=1024; // altitude offset
class CustomAttributes
{
class Attribute0
{
// simplified example for the sake of readability
// ...
};
nAttributes=1; // attributes count; similar to "items=x" in class Entities
};
};
</syntaxhighlight>
</spoiler>
 
===== Flags =====
Flag value is a combination of the following values:
* 1 = KeepHorizontal
* 2 = IsGroupLeader
* 4 = IsSnappedToSurface
* 8 = ContainsArea
 
For example, a flag of 7 means 1 + 2 + 4: KeepHorizontal, IsGroupLeader, IsSnappedToSurface and not ContainsArea.
 
===== class AttributeX =====
Attributes are children classes of items and are listed in the {{hl|class CustomAttributes}} sub-class.
 
<syntaxhighlight lang="cpp">
class Attribute0
{
property="allowDamage";
expression="_this allowdamage _value;"; // SQF code to be executed (_this = the object, _value = 'value' field below)
class Value
{
class data
{
class type
{
type[]=
{
"BOOL"
};
};
value=0; // for a boolean, 1 = true, 0 = false
};
};
};
</syntaxhighlight>
 
 
== [[2D Editor]] format ==
 
First line is {{hl|version}}, then four classes of data, all of the same structure - they are:
 
* class Mission
* class Intro
* class OutroWin
* class {{sic|OutroLoose|OutroLose}}
 
=== class Mission ===
 
It is filled as such:
<syntaxhighlight lang="cpp">
// addons required to run the mission
// Once you are done creating/updating your mission, it is always good practice
// to check the mission.sqm for presence of unwanted addons in "addOns" and "addOnsAuto"" arrays.
// They contain "CfgPatches" classes of used addons.
// Apart from "class Mission", list of addons is also present in "Intro", "OutroWin" and "OutroLoose" classes.
addOns[]=
{
"cacharacters",
"desert"
};
addOnsAuto[]=
{
"cacharacters",
"desert"
};
randomSeed=9361411; // the random seed, most probably used to generate random numbers
class Intel // pretty self-explanatory
{
startWeather=0.100000;
forecastWeather=0.300000;
year=2007;
month=6;
day=7;
hour=8;
};
</syntaxhighlight>
 
==== class Groups ====
<syntaxhighlight lang="cpp">
class Groups
{
items=1;
class Item0
{
side="WEST";
class Vehicles
{
items=1;
class Item0
{
position[]={2606.808838,14.685581,2408.266602}; // X, Z, Y
id=0;
side="WEST";
vehicle="SoldierWB"; // CfgVehicles class
player="PLAYER COMMANDER";
leader=1; // group leader
skill=0.600000;
};
};
};
};
</syntaxhighlight>
 
 
[[Category:Mission Editing]]

Latest revision as of 15:02, 15 November 2024

bi symbol white.png
Disclaimer: This page describes internal undocumented structures of Bohemia Interactive software.

This page contains unofficial information.

Some usage of this information may constitute a violation of the rights of Bohemia Interactive and is in no way endorsed or recommended by Bohemia Interactive.
Bohemia Interactive is not willing to tolerate use of such tools if it contravenes any general licenses granted to end users of this community wiki or BI products.


Mission.sqm is the file generated by the Mission Editor; it contains mission information (date, time, weather), object placement information (position, direction and other parameters) as well as every other setting that can be set from the editor (respawn type and duration, etc).


Versions

SQM version can be found by opening the file with a basic text editor: it is the very first line of the file, to format version=version; - correspondence below:

Version Game Format
11
  • Operation Flashpoint
  • Operation Flashpoint: Resistance
  • Armed Assault
  • Arma 2
  • Arma 2: Operation Arrowhead
  • Take On Helicopters
2D
12
53 3D


Eden Editor format

As seen above, the first line is version, then come:

  • class EditorData - Eden Editor settings, like camera position, entity id
  • binarizationWanted - 0 to output the mission in plain (non-binary) text
  • addons - list of required addons
  • AddonsMetaData - user-friendly required addons' information
  • randomSeed - seed for randomisation, most likely used by random. This number is unique for each mission!
  • class ScenarioData - scenario's meta data (author name) as well as respawn settings (respawn type, etc)
  • class CustomAttributes - advanced scenario attributes (such as respawn templates, revive, etc. Also containsmodded attributes)
  • class Intro - if it exists: intro
  • class Mission - if it exists: mission
  • class OutroLoosesic - if it exists: failure outro
  • class OutroWin - if it exists: success outro


  • Intro, Mission, OutroLoosesic and OutroWin contain the following sub-classes:
    • class Intel - date/time and weather settings
    • class Entities - the various entities present in the Mission
    • class Connections - connections like synchronized triggers present in the Mission

A bare minimum mission.sqm looks like this, the other attributes are added when the mission is saved in the editor:

version=53;
class EditorData
{
	class Camera
	{
	};
};
randomSeed=123456;

class EditorData

class EditorData
{
	moveGridStep=1;
	angleGridStep=0.2617994;
	scaleGridStep=1;
	autoGroupingDist=10;
	toggles=1;
	mods[]=
	{
		"3denEnhanced"
	};
	class ItemIDProvider
	{
		nextID=13;
	};
	class MarkerIDProvider
	{
		nextID=1;
	};
	class Camera
	{
		// simplified example for the sake of readability
		// ...
	};
};

moveGridStep

Translation Widget's step size in meters.

angleGridStep

Angle Widget's step size in radians.

scaleGridStep

Area Scaling Widget's step size in meters.

autoGroupingDist

Defines the distance in meter to auto-group units. This value can only be changed in the mission.sqm file and not from within Eden Editor.
The change is not overwritten if the mission is saved and is persistent across different mission.sqm files.

toggles

Is a number created out of different flags.

Flag Details
Value Description Icon
0 Nothing selected N/A
1 Terrain Mode ATL 3den toolbar vert ATL.png
2 Terrain Mode ASL / Don't adjust up vector 3den toolbar vert ASL.png
4 Move in grid 3den toolbar grid translation.png
8 Don't snap to surface 3den toolbar snap.png3den toolbar snap on.png
16 Not implemented on purpose N/A
32 Rotate in grid 3den toolbar grid rotation.png
64 Scale in grid 3den toolbar grid scaling.png
128 Force show bounding boxes
Can not be toggled from the editor
N/A
256 Disable mouseOver model highlight
Can not be toggled from the editor
N/A
512 Insert empty vehicle as default N/A
1024 Allow resize/rotate widget 3den toolbar widget area.png

Mods

Arma 3 logo black.png2.04 Mods listed here have is3DENMod = 1; set in CfgPatches.

class ItemIDProvider

contains a single entry: nextID that is the next item id value (auto incremented on every item addition);

class MarkerIDProvider

contains a single entry: nextID that is the next marker id value (auto incremented on every marker addition);

class Camera

Defines the editor's camera position/orientation.

class Camera
{
	// positions are to format X, Z, Y
	pos[]={2325.9604,24.771292,5133.4385};				// camera position
	dir[]={0.361072,-0.27934057,0.88971913};			// camera vectorDir
	up[]={0.10504395,0.96019292,0.25883871};			// camera vectorUp
	aside[]={0.92660606,2.7686474e-007,-0.37604135};	//
};

binarizationWanted

A number (0 or 1) representing a Boolean, to tell the editor to save the mission.sqm to binary format or not.

binarizationWanted=0;

addons

A config array of CfgPatches entries, determining which addons are needed.

addons[]=
{
	"A3_Characters_F",
	"A3_Modules_F_Sites",
	"A3_Ui_F"
};

AddonsMetaData

A "list" of required addons' user-friendly details, with author's name, friendly name, URL.

class AddonsMetaData
{
	class List
	{
		items=3;
		class Item0
		{
			className="A3_Characters_F";
			name="Arma 3 Alpha - Characters and Clothing";
			author="Bohemia Interactive";
			url="https://www.arma3.com";
		};
		class Item1
		{
			className="A3_Modules_F";
			name="Arma 3 Alpha - Scripted Modules";
			author="Bohemia Interactive";
			url="https://www.arma3.com";
		};
		class Item2
		{
			className="A3_Ui_F";
			name="Arma 3 - User Interface";
			author="Bohemia Interactive";
			url="https://www.arma3.com";
		};
	};
};

randomSeed

A random seed most likely used by weather settings and/or other random values.

randomSeed=4125053;

ScenarioData

author

The mission's author name.

author="Bohemia Interactive";

class Mission

class Intro

class OutroWin

class OutroLoose

Constituted of two sub-entries class Intel and class Entities, This structure applies to class Intro, class OutroWin and class OutroLoose as well.

class Intel

Mission setup information.

class Intel
{
	timeOfChanges=1800.0002;
	startWeather=0;
	startWind=0.1;
	startWaves=0.1;
	forecastWeather=0;
	forecastWind=0.1;
	forecastWaves=0.1;
	forecastLightnings=0.1;
	year=2035;
	day=28;
	hour=13;
	minute=37;
	startFogDecay=0.014;
	forecastFogDecay=0.014;
};

class Entities

class Entities is a data bag that can contain items, and items can contain instances of class Entities. In the example below, the "main" class Entities contains an item (the group), item which contains another class Entities with items (group units).

class Entities
{
	items=1;
	class Item0
	{
		dataType="Group";
		side="West";
		class Entities
		{
			items=1;
			class Item0
			{
				// simplified example for the sake of readability
				// ...
			};
		};
	};
};

class ItemX

Where X is from 0 to items number -1.

A class ItemX can be of the following dataTypes:

  • "Comment"
  • "Group"
  • "Logic"
  • "Marker"
  • "Object"
  • "Trigger"
  • "Waypoint"

class Item0
{
	dataType="Object";
	class PositionInfo
	{
		position[]={256,1029.0015,512.0498}; // X, Z, Y in world position
	};
	side="West";
	flags=3;
	class Attributes
	{
		health=0.89999998;
		skill=0.60000002;
		ammo=0.89999998;
		rank="CORPORAL";
		presence=0.68964958;
		isPlayable=1;
		disableSimulation=1;
		ignoreByDynSimulGrid=1;
		reportRemoteTargets=1;
		receiveRemoteTargets=1;
		reportOwnPosition=1;
		stance="Down";
	};
	id=1;
	type="B_Soldier_F";	// CfgVehicles class
	atlOffset=1024;		// altitude offset
	class CustomAttributes
	{
		class Attribute0
		{
			// simplified example for the sake of readability
			// ...
		};
		nAttributes=1; // attributes count; similar to "items=x" in class Entities
	};
};
↑ Back to spoiler's top

Flags

Flag value is a combination of the following values:

  • 1 = KeepHorizontal
  • 2 = IsGroupLeader
  • 4 = IsSnappedToSurface
  • 8 = ContainsArea

For example, a flag of 7 means 1 + 2 + 4: KeepHorizontal, IsGroupLeader, IsSnappedToSurface and not ContainsArea.

class AttributeX

Attributes are children classes of items and are listed in the class CustomAttributes sub-class.

class Attribute0
{
	property="allowDamage";
	expression="_this allowdamage _value;";	// SQF code to be executed (_this = the object, _value = 'value' field below)
	class Value
	{
		class data
		{
			class type
			{
				type[]=
				{
					"BOOL"
				};
			};
			value=0; // for a boolean, 1 = true, 0 = false
		};
	};
};


2D Editor format

First line is version, then four classes of data, all of the same structure - they are:

  • class Mission
  • class Intro
  • class OutroWin
  • class OutroLoosesic

class Mission

It is filled as such:

// addons required to run the mission
// Once you are done creating/updating your mission, it is always good practice
// to check the mission.sqm for presence of unwanted addons in "addOns" and "addOnsAuto"" arrays.
// They contain "CfgPatches" classes of used addons.
// Apart from "class Mission", list of addons is also present in "Intro", "OutroWin" and "OutroLoose" classes.
addOns[]=
{
	"cacharacters",
	"desert"
};
addOnsAuto[]=
{
	"cacharacters",
	"desert"
};
randomSeed=9361411; // the random seed, most probably used to generate random numbers
class Intel // pretty self-explanatory
{
	startWeather=0.100000;
	forecastWeather=0.300000;
	year=2007;
	month=6;
	day=7;
	hour=8;
};

class Groups

class Groups
{
	items=1;
	class Item0
	{
		side="WEST";
		class Vehicles
		{
			items=1;
			class Item0
			{
				position[]={2606.808838,14.685581,2408.266602}; // X, Z, Y
				id=0;
				side="WEST";
				vehicle="SoldierWB";			// CfgVehicles class
				player="PLAYER COMMANDER";
				leader=1;						// group leader
				skill=0.600000;
			};
		};
	};
};