CMF3 Engine: script mod

From cluster wiki
Jump to navigation Jump to search

The script_mod.hpp file contains meta information about the framework like the prefix, the framework version, and the minimum required Arma 3 and CBA version. It is always located in the main component of a CMF3 framework. It crafts "script safe" version numbers from the script_version.hpp file.

It uses the following format:

#define PREFIX /* framework prefix */

#include "script_version.hpp"

#define VERSION     MAJOR.MINOR
#define VERSION_STR (str MAJOR)+"."+(str MINOR)+"."+(str PATCHLVL)+"."+(str BUILD)
#define VERSION_AR  MAJOR,MINOR,PATCHLVL,BUILD

#define REQUIRED_VERSION /* Minimum required Arma 3 version (as an integer) */
#define REQUIRED_CBA_VERSION /* Minimum required CBA Version (as an array) */

A complete script_mod.hpp file can look like the following (taken from CMF3):

#define PREFIX cmf

#include "script_version.hpp"

#define VERSION     MAJOR.MINOR
#define VERSION_STR (str MAJOR)+"."+(str MINOR)+"."+(str PATCHLVL)+"."+(str BUILD)
#define VERSION_AR  MAJOR,MINOR,PATCHLVL,BUILD

#define REQUIRED_VERSION 2.08
#define REQUIRED_CBA_VERSION {3,15,6}