Skip to content
Raven edited this page Jan 1, 2018 · 6 revisions

A SQDevFile is a special file I have introduced in my plugin and basically it serves as an information storage for the plugin. However these information are meant to be visible and editable by the user.
That means any changes you make in one of these files will affect the way the plugin or one of it components behave!

You can easily recognize this fileType by the extension ".sqdev"

There are several syntactical rules within a SQDevFile that have to be followed when editing such a file.
If a SQDevFile contains wrong syntax or is invalid because of anything else the plugin will bring you a popup telling you that there is an invalid SQDevFile but whatever task has been dependent on that particular file will be canceled.

The syntax is the following:

  • Every information has to end with a newLine
  • Every information must be specified in it's own line
  • An attribute has to assign it's value via "="
  • Every attribute may only be used once
  • Every attribute has to be closed with a semicolon on the same line
  • An annotation has to start with "@"
  • The argument for the annotation has to be encapsulated in quotation marks
  • only single line comments are allowed

As you can see there are attributes and annotations. So what is the difference?

Attributes

Attributes are information that have to be present in your files. Although some of them have a default value I advice everybody to take them into the file as it might lead to some confusion when the plugin uses the default values.
The syntax for attributes is <attributeName> = <value> ; \n (\n = newLine)
Currently the following attributes are implemented:

  • autoExport: This attribute defines whether the respective project should be in autoExport mode meaning that it exports the project into the ArmA missions directory everytime a contained SQF-file is being saved.
    Possible values are true and false.
  • exportDirectory: This attributes specifies the directory in which the project will be exported. Normally that will be your missions folder in the ArmA directory in MyDocuments.
  • terrain: This attributes defines the terrain the mission corresponding to the SQDevProject takes place.
  • profile: This attribute specifies the profile this project is associated with. When set during the project creation it will affect the exportDirectory and the initial content of the description.ext. Later changes will not (yet) affect those values.

Annotations

Annotations are optional and can be used multiple times. Therefore they are used whenever an information is not essential for the worklow of the plugin. Annotations do not have default values.
The general syntax for an annotation is @<annotationName> "<value>"\n (\n = newLine). Notice that the space and the quotation marks are essential in this syntax.

  • ignore: This annotation specifies a file or a folder within the SQDevProject that will be ignored during exporting the project. When a folder is specified all it's contained files and subFolders are ignored as well.
  • preserve: This annotation defines a file or a folder in the export destination folder (the missions folder in your ArmA directory) that will not be deleted during the autoClean that is performed before every export. If a folder is specified all of it's content (files + subFolders) will be preserved as well.

So that's about the theory. Let's look at an example:

profile = Raven;
exportDirectory = C:\Users\Raven\Documents\Arma 3 - Other Profiles\Raven\missions;
autoExport = true;
terrain = Altis;

// I am a single line comment
@ignore "link.sqdev"
@ignore ".project"
@preserve "myFileToPreserve.txt"
@preserve "myPreservedFolder"
Clone this wiki locally