Modules - Global-Conflicts-ArmA/Olsen-Framework-Arma-3 GitHub Wiki
What are modules?
Modules are separate additions to the core framework meant to group features and settings together. They will typically have a settings file that needs to be tailored before the module can be properly activated. Modules can provide specialized functions and behaviours that can enable mission makers to add features to their missions such as immersive snow effects, clicker sound functionality, capture zones, and more.
modules.sqf
The modules.sqf file controls which modules are enabled for the mission. To activate a module uncomment the include line:
//#include "start_text\root.sqf"
to ->
#include "start_text\root.sqf"
to disable a module you can simply put //
in front of the #include line again.
Example:
//#include "start_text\root.sqf"
#include "jip_teleport\root.sqf"
#include "marker_control\root.sqf"
Module structure
Modules are structured with their own folder, functions, and variables. Each module is structured differently but most modules will have their own COMPONENT
value which will dictate the name for variables and functions. eg: a module with a COMPONENT
name of HOST
and a function name of isRescued
will generate a global function value of HOST_fnc_isRescued
that can be used globally. Variable names will simply be the COMPONENT
value combined with the variable name, separated by an underscore.
Module structure example:
jip teleport
- init.sqf
- root.sqf
- settings.sqf
- teleportAction.sqf
root.sqf
This is the "activation" file for the module. It is where the framework first includes the module. At various times during initialization the root.sqf is included. Different configs are defined within #ifdef
blocks, eg:
#ifdef description_external_functions
#include "functions\CfgFunctions.hpp"
#endif
This enables the framework to include entries to various config classes.
init
Module inits are activated via the XEH init classes eg:
#ifdef description_XEH_PreInit
class COMPONENT {
clientInit = "'' call compile preprocessFileLineNumbers 'modules\hostage\preInitClient.sqf'";
};
#endif
settings.sqf/.hpp
If the module has any settings then the settings.sqf or settings.hpp file must be made. It is important to properly comment the settings so that the mission maker can tweak the module to his needs. The following is an example of the settings for the clicker module:
// actionKey that activates the clicker sound. This will determine the binded key for the action
// actionKey names can be found at https://community.bistudio.com/wiki/inputAction/actions
GVAR(actionKey) = "nightVision";
// array of possible randomly selected clicker sounds, in .ogg format.
GVAR(soundArray) = ["cricket1.ogg"];
// level of volume generated by clicker. 1 - 2 are recommended, 5 is max.
GVAR(volume) = 1;
Current modules
- ACRE Setup
- AI Drivers
- Anti ND
- JIP
- Self Actions
- Weapon Helper
- A3 Endscreen
- ACE Medical
- AI Behaviour
- AI Link
- AI Skill
- AI Tasks
- Ambient Animation
- Ambient Effects
- AO Limit
- AO Limit Soft
- Backpack On Chest
- Billboards
- Call Mission
- Capture Zone
- Clicker
- Cover Map
- Currency
- CVC Check
- Daylight
- Env Parameters
- Extract
- Firemission
- Gas
- Grad Fortifications
- Headless AI
- Hostage
- In Game Brief
- Knock Down
- Marker Control
- Paraflare
- Rank Icons
- Remove Map
- Set Face
- Setup Timer
- Snow
- Start In Parachute
- Start On Team Color
- Start Text
- Task Control
- Tracking Markers
- Vehicle Boost
Experimental modules:
These modules may or may not work and aren't supported in their current state
- AI Attack
- Radio Messages
- Random Scenario