Mission.sqm: Difference between revisions
Lou Montana (talk | contribs) m (Add more page structure) |
Lou Montana (talk | contribs) (Page filling) |
||
Line 3: | Line 3: | ||
[[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). | [[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). | |||
Line 42: | Line 44: | ||
* <tt>class ScenarioData</tt> - scenario's meta data (author name) as well as respawn settings (respawn type, etc) | * <tt>class ScenarioData</tt> - scenario's meta data (author name) as well as respawn settings (respawn type, etc) | ||
* <tt>class CustomAttributes</tt> - advanced scenario attributes (such as respawn templates, [[Arma 3 Revive|revive]], etc) | * <tt>class CustomAttributes</tt> - advanced scenario attributes (such as respawn templates, [[Arma 3 Revive|revive]], etc) | ||
* <tt>class Mission</tt> - | * <tt>class Intro</tt> - if it exists: intro | ||
* <tt>class Mission</tt> - if it exists: mission | |||
* <tt>class {{sic|OutroLoose}}</tt> - if it exists: failure outro | |||
* <tt>class {{sic|OutroWin}}</tt> - if it exists: success outro | |||
* Intro, Mission, OutroLoose and OutroWin contain the following sub-classes: | |||
** <tt>class Intel</tt> - date/time and weather settings | ** <tt>class Intel</tt> - date/time and weather settings | ||
** <tt>class Entities</tt> - the various entities present in the <tt>Mission</tt> | ** <tt>class Entities</tt> - the various entities present in the <tt>Mission</tt> | ||
Line 48: | Line 56: | ||
=== class EditorData === | === class EditorData === | ||
{{ | <spoiler text="Show Example"> | ||
<syntaxhighlight lang="cpp"> | |||
class EditorData | |||
{ | |||
moveGridStep=1; | |||
angleGridStep=0.2617994; | |||
scaleGridStep=1; | |||
autoGroupingDist=10; | |||
toggles=1; | |||
class ItemIDProvider | |||
{ | |||
nextID=13; | |||
}; | |||
class MarkerIDProvider | |||
{ | |||
nextID=1; | |||
}; | |||
class Camera | |||
{ | |||
// simplified example for the sake of readability | |||
// ... | |||
}; | |||
}; | |||
</syntaxhighlight> | |||
</spoiler> | |||
==== moveGridStep ==== | |||
{{Stub}} | |||
==== angleGridStep ==== | |||
{{Stub}} | |||
==== scaleGridStep ==== | |||
{{Stub}} | |||
==== autoGroupingDist ==== | |||
Defines the distance in meter to auto-group units. | |||
==== toggles ==== | |||
{{Stub}} | |||
==== class ItemIDProvider ==== | |||
contains a single entry: <tt>nextID</tt> that is the next item id value (auto incremented on every item addition); | |||
==== class MarkerIDProvider ==== | |||
contains a single entry: <tt>nextID</tt> 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 === | === 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 === | === 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 === | === 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 === | === randomSeed === | ||
A [[random]] seed most likely used by weather settings and/or other random values. | |||
<syntaxhighlight lang="cpp"> | |||
randomSeed=4125053; | |||
</syntaxhighlight> | |||
=== ScenarioData === | === ScenarioData === | ||
=== | |||
==== author ==== | |||
The mission's author name. | |||
<syntaxhighlight lang="cpp"> | |||
author="Bohemia Interactive"; | |||
</syntaxhighlight> | |||
=== class Mission === | === class Mission === | ||
=== class Intro === | |||
=== class OutroWin === | |||
=== class OutroLoose === | |||
Constituted of two sub-entries [[#class Intel|class Intel]] and [[#class Entities|class Entities]], | Constituted of two sub-entries [[#class Intel|class Intel]] and [[#class Entities|class Entities]], | ||
Line 63: | Line 201: | ||
==== class Intel ==== | ==== 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 ==== | ==== class Entities ==== | ||
<tt>class Entities</tt> is a data bag that can contain items, and items can contain instances of <tt>class Entities</tt>. | |||
In the example below, the "main" <tt>class Entities</tt> contains an item (the group), item which contains another <tt>class Entities</tt> 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 <tt>class ItemX</tt> 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 ===== | ===== Flags ===== | ||
* KeepHorizontal = | Flag value is a combination of the following values: | ||
* | * 1 = KeepHorizontal | ||
* IsSnappedToSurface = | * 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 <tt>class CustomAttributes</tt> 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> | |||
Line 129: | Line 393: | ||
id=0; | id=0; | ||
side="WEST"; | side="WEST"; | ||
vehicle="SoldierWB"; | vehicle="SoldierWB"; // CfgVehicles class | ||
player="PLAYER COMMANDER"; | player="PLAYER COMMANDER"; | ||
leader=1; // group leader | leader=1; // group leader |
Revision as of 17:07, 22 June 2020
Template:unsupported-doc Template:SideTOC
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 |
|
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
- 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)
- class Intro - if it exists: intro
- class Mission - if it exists: mission
- class OutroLoosesic - if it exists: failure outro
- class OutroWinsic - if it exists: success outro
- Intro, Mission, OutroLoose and OutroWin contain the following sub-classes:
- class Intel - date/time and weather settings
- class Entities - the various entities present in the Mission
class EditorData
class EditorData
{
moveGridStep=1;
angleGridStep=0.2617994;
scaleGridStep=1;
autoGroupingDist=10;
toggles=1;
class ItemIDProvider
{
nextID=13;
};
class MarkerIDProvider
{
nextID=1;
};
class Camera
{
// simplified example for the sake of readability
// ...
};
};
moveGridStep
angleGridStep
scaleGridStep
autoGroupingDist
Defines the distance in meter to auto-group units.
toggles
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
};
};
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 present also 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;
};
};
};
};