Est. 2001 Intermediate

Operation Flashpoint Scripting

SQS, the line-by-line mission scripting language of Bohemia Interactive's 2001 military simulator, ancestor of the SQF language used across the Arma series

Created by Bohemia Interactive

Paradigm Procedural, Event-Driven
Typing Dynamic
First Appeared 2001
Latest Version OFP: Resistance 1.96 (April 2004); Cold War Assault Remastered source 3.05 (August 2026)

Operation Flashpoint Scripting is the language built into Operation Flashpoint: Cold War Crisis, the military simulator that Bohemia Interactive released in 2001. It is usually called SQS, after the .sqs file extension, and Bohemia’s community wiki expands that as “Status Quo Script.” Mission makers used it to move units, stage cutscenes, react to battlefield events and control the flow of a mission, all without leaving the game’s data files.

SQS matters as the first layer of a scripting tradition that lasted two decades. Its expression language became the base of SQF, the language that Bohemia’s wiki says runs all Arma games through Arma 3. In June 2026 Bohemia released the engine’s source, so its interpreter can now be read directly.

History and Origins

Bohemia Interactive built Operation Flashpoint in the Czech Republic and Codemasters published it. A Gamepressure history of the studio says development ran well past an original 1999 release target, and that publishers changed along the way. The game came out in Australia on 21 June 2001, in Europe the next day and in North America on 30 August, according to Wikipedia.

The game shipped with an in-game mission editor, and Wikipedia notes that multiplayer modes were not fixed, as mission creators set their own parameters. A language was the natural companion to that editor. Bohemia’s wiki describes scripts as instructions written by the mission author and saved as an external file that the mission references.

No source found names the person who wrote the interpreter, or dates the language apart from the game. The released code offers one small clue to its origins. Several identifiers in the evaluator are Czech: soucet (sum), soucin (product), mocnina (power) and zavorky (parentheses).

The engine’s internal codename was Poseidon, according to the 2026 README. The expansion “Status Quo Script” rests on a wiki excerpt alone, as a separate search of the game’s development history did not confirm it.

Design Philosophy

SQS is built around one idea: a script is a list of lines that the game works through over time, between frames of a running simulation. That shapes everything about it.

  1. Lines, not blocks. There is no multi-line structure. The interpreter classifies each line by its first character, and control flow is built from labels and jumps.
  2. Time is part of the language. Pausing for three seconds or waiting until a tank is destroyed takes a single character, because mission scripting is mostly about waiting.
  3. Commands act on the world. The language itself is small. Its reach comes from hundreds of game commands, usually written as infix operators such as _unit setPos _pos.
  4. Scripts must not stall the game. By default a script runs at most 100 lines per pass before yielding, unless its caller has set a different limit.

The paradigm is best described as procedural, with an event-driven side. Scripts run in sequence, but the game starts them from triggers, waypoints, unit init fields and event handlers.

Key Features

The code below comes from the current source release. The SQS scripts are unmodified test fixtures from tests/fixtures/evaluator/, which are modern files written in period style, not scripts from 2001. The behaviour described is read from the 2026 code, which has been modernized, so a few details may differ from the 2001 release. None of this code has been run for this page.

Line types

A complete Hello World is one line:

1
hint "Hello, World!"

The whole line grammar is a switch on the first character in Scripts.cpp:

Line starts withMeaning
;Comment
#Label
~Wait a number of seconds
&Wait until an absolute time
@Wait until a condition is true
?Run the statement after : if the condition is true
anything elseRun as a statement

The ~ form is simple sugar. The parser rewrites ~2 into an assignment, __waituntil = _time+(2), followed by a line that suspends until that time. _time is a variable holding the script’s elapsed seconds, and _this holds the argument passed to exec.

Control flow by goto

With no block structure, a loop is a label and a jump. This fixture patrols a unit between waypoints:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
; Patrol script - a unit patrols between waypoints
; Usage: [soldier, [[100,0,200],[300,0,400],[100,0,600]]] exec "patrol.sqs"

_unit = _this select 0
_waypoints = _this select 1
_wpCount = count _waypoints
_currentWP = 0

? _wpCount == 0 : exit

#patrol
_pos = _waypoints select _currentWP
_unit setPos _pos
~1
hint format ["%1 reached waypoint %2 at %3", name _unit, _currentWP, _pos]

_currentWP = _currentWP + 1
? _currentWP >= _wpCount : goto "done"
goto "patrol"

#done
hint format ["%1 patrol complete (%2 waypoints)", name _unit, _wpCount]
exit

exec starts a script running alongside the game, and goto takes its label as a string, so it can be computed at runtime.

Variables and types

Identifiers are lowercased by the parser, so the language is case-insensitive. A leading underscore makes a variable local to its script. Anything else is global to the mission:

1
2
_count = 0
enemiesDestroyed = true

Values carry their types at runtime. Alongside numbers, booleans, strings and arrays, the game adds its own types for objects, groups and sides, such as the Object taken by getDammage.

Code as strings

The most distinctive thing in the evaluator is what a block is. The tokenizer defines OPEN_STRING as { and CLOSE_STRING as }, so { ... } is simply a second way of writing a string, one that can contain quotes. if returns a value of a special IF type, else is an ordinary binary operator that packs two strings into an array, and then is another operator that evaluates one of them:

1
if (alive _unit) then {hint "still fighting"} else {hint "unit lost"}

forEach, count, call and while ... do work in the same way, taking strings to evaluate. Control flow is therefore not syntax at all, only operators applied to text.

Operator precedence

Every command is a nular, unary or binary operator, and the priorities live in a single GamePriority enum. From loosest to tightest:

PriorityOperators
Lowest||, or
&&, and
==, !=, >, <, >=, <=
Binary commands, such as select, then and setPos
else
+, -
*, /, %, mod, atan2
Unary commands and functions
Highest^

Unary commands bind tighter than all binary operators other than ^, so count _list - 1 subtracts from the result of count.

Spelling as a fossil

One famous command name shows how permanent a scripting API can become. The engine registers the commands setDammage and getDammage, with a double m. The released source also carries the correct setDamage and damage as aliases of the same functions, while the old spellings remain, presumably so that existing scripts keep working.

Evolution

From SQS to SQF

SQS’s line rules became limiting. Control structures had to fit on one line, and Bohemia’s wiki notes that a line over 4,096 characters was an error in Operation Flashpoint. The source shows the same buffer size in its line reader.

SQF, or .sqf files, took a different approach. It keeps the same expressions but drops the line grammar: statements end in semicolons, and { ... } blocks can span lines. Here is a function in that style, written for this page from the commands in the source. It runs through preprocessFile, which handles the // comment, and returns the value of its last expression:

1
2
3
4
5
// average.sqf
private ["_sum"];
_sum = 0;
{ _sum = _sum + _x } forEach _this;
_sum / count _this
1
2
average = preprocessFile "average.sqf"
_mean = [10, 20, 30] call average

The date of the change is unclear. Bohemia’s wiki agrees on version 1.85, which appeared in October 2002, but its pages disagree on the meaning:

ClaimSource
SQF appeared in Resistance at version 1.85Bohemia wiki (search excerpt)
SQF syntax existed from v1.85, but was first used for script files in Armed AssaultBohemia wiki, another page (search excerpt)
Scripts in Operation Flashpoint are limited to SQS syntaxBohemia wiki (search excerpt)

The released source fits the second reading best. preprocessFile, loadFile and call are all there, so a .sqf file can be loaded as a string and called as a function. But spawn, execVM, sleep and waitUntil are all absent, so there is no way to run such a file as a separate timed script. Only SQS can pause. Bohemia’s wiki pages could not be opened for this article, so those three claims rest on excerpts.

SQF replaced SQS as the main language of the Arma series, though SQS was never removed: the wiki calls it obsolete but still available.

Later versions of the game

Operation Flashpoint: Elite, the Xbox edition, added its own scripting commands. Bohemia’s wiki lists 108 of them, including spawn and preprocessFileLineNumbers, neither of which is in the 2026 PC source. The series then moved on through Armed Assault (2006), Arma 2 and Arma 3 with SQF as the main language. Arma Reforger (early access 2022, version 1.0 in 2023) replaced SQF with Enforce Script, which Bohemia describes as object-oriented, close to C#, and case-sensitive.

Current Relevance

The status of Historical is fair for SQS as a language for new work, but the code is more accessible now than ever. In June 2026 Bohemia published the engine at BohemiaInteractive/CWR under GPL-3.0-or-later, alongside a demo of Arma: Cold War Assault Remastered, and the full game followed on 16 July, according to GamingOnLinux. The source README lists Windows x64 and Linux x64 builds, and says the repository takes no pull requests and will not be continuously updated. The game’s data is separate, under Bohemia’s APL-SA licence, and the Arma and Operation Flashpoint names are not licensed. The credits point to a community continuation, ofpisnotdead-com/CWR-CE.

The repository ships a PoseidonEvaluator command-line tool and an SqsRunner class, so SQS can now run outside a mission. The two interpreters are not identical: the code contains later additions, such as exitWith and a for loop, that this page does not attribute to the 2001 game.

Community documentation survives on Bohemia’s wiki. OFPEC, the Operation Flashpoint Editing Center, was described by Bohemia’s wiki as the main repository of editing resources, running since August 2001, though forum posts report that it has been offline at times.

Why It Matters

SQS is a good example of a language grown to fit a job and not designed in the abstract. Its one-character wait commands look crude next to a modern scripting language, but they express exactly what a mission author needs to say. Its string-based blocks are an inexpensive way to get control flow from an operator evaluator, and they arguably kept the implementation small.

It also shows how long a game’s scripting decisions last. The operators, the underscore rule for locals and even a misspelled command name outlived the game they were written for. Community work built on those choices helped keep the game alive for more than two decades, as the source release itself acknowledges.

Timeline

2001
Operation Flashpoint: Cold War Crisis is released on 21 June in Australia and 22 June in Europe, followed by North America on 30 August, with SQS scripts and an in-game mission editor
2002
The expansions Red Hammer and Resistance are released in February and June
2002
The Resistance 1.85 patch appears in mid-October. Bohemia's community wiki dates SQF syntax to this version, though its pages disagree on whether SQF scripts were usable before Armed Assault
2004
Codemasters releases the Resistance 1.96 patch in April, the last version found for the original Operation Flashpoint
2005
Operation Flashpoint: Elite reaches Xbox, in Taiwan in August, PAL regions in October and North America in November. Bohemia's wiki keeps a separate list of scripting commands new to this edition
2006
Arma: Armed Assault is released, with SQF as the main scripting language and SQS still supported
2011
Bohemia Interactive re-releases the game, reportedly around June, as Arma: Cold War Assault, after Codemasters kept the Operation Flashpoint name
2017
Arma: Cold War Assault is released for Linux and macOS on 14 March
2022
Arma Reforger enters early access in May, moving the series to Enforce Script, an object-oriented language for the Enfusion engine. Version 1.0 follows in November 2023
2026
Bohemia Interactive publishes the Poseidon engine source, including the SQS interpreter, in June under GPL-3.0-or-later, alongside a demo of Arma: Cold War Assault Remastered
2026
The full Arma: Cold War Assault Remastered is released on 16 July, according to GamingOnLinux

Notable Uses & Legacy

Operation Flashpoint missions

The game's own mission flow calls SQS. The released engine source runs named scripts such as init.sqs, initintro.sqs, editor.sqs and exit.sqs at fixed points in a game

Finnish Defence Forces Mod

A large community modification, released from June 2003 to December 2005 according to Bohemia's wiki. The sources found do not itemise its scripts

WarGames (WGL) mod

A complete conversion for Operation Flashpoint aimed at realism, built by community authors to fix balance and gameplay problems, especially online. Its scripts are likewise not itemised in the sources found

CSLA mod

A Czechoslovak army modification whose second version, CSLA 2, was released in January 2004. Its Mod DB page, seen only as a search excerpt, says almost all Czech mission makers used it

Virtual Battlespace (VBS1)

A military training simulator derived from Operation Flashpoint by Bohemia Interactive Australia. The US Marine Corps later bought an enterprise licence covering VBS1 and VBS2. The sources found confirm the engine lineage, not how it used the scripting language

Cold War Assault engine tests

In the 2026 source release, the integration tests are in-game scenarios driven by SQF, and the repository ships a command-line evaluator for scripts

Language Influence

Influenced

SQF

Running Today

Run examples using the official Docker image:

docker pull
Last updated: