Thanks for enduring my absense while i was working nonstop on this mod
# S.T.O.R.M. Framework
The **S.T.O.R.M. Framework** is an effort to make technically complex, but dynamic and immersive weather events easily available.
The framework takes care of the complexity that comes with the Arma 3's engine and handles everything needed: be it global, serverside weather parameters and AI SubSkills or local, clientside post processing, particle and sound sources.
It is Join In Progress & Dedicated Server compatible and aims to be as performance efficient as possible.
Mission Makers or Zeus Game Masters can ether, simply apply a `MainPresets` which has all details for an individual storm defined, or craft their own experience by directly requesting individual `Module Presets`.
It comes with several `MainPresets` and `Module Presets` and can easily be expanded on. Those Presets are stored as Config Classes, to be found ![here!](addons/framework/Storm_MainPresets.inc.hpp)
The following classnames are currently included as `MainPresets`:
- `STORM_Sandstorm`
- `STORM_Sandstorm_Light`
- `STORM_Sandstorm_Green`
- `STORM_Duststorm_Green`
- `STORM_SnowStorm`
- `STORM_SnowStorm_Bleak`
- `STORM_SnowStorm_Calm`
- `STORM_SnowStorm_Calm_Bleak`
- `STORM_Snowstorm_lessFog`
### Weather Effects Module
- Handles Execution of relevant Weather Systems, for example:
- Fog, including adaptation of the "Fogbase" based on the Average Altitude of all players to aim for a consistent experience even on maps with high elevation.
- Wind Transition beyond the simple "setWind 1" values.
- Comes with the handling of Rain Parameters, be it Snow or Rain.
### Particle Effects
- Handles the creation of multiple Particle Effect Spawners on each individual client and updating their position based on player movementspeed and Wind.
### Post Processes
- Handles the creation of multiple Post Processing Effects
- Currently Supports: Color Corrections, FilmGrain, Dynamic Blur.
- Can handle Multiple layers of said effect, so future special effects like blinking can be supported on a seperate later while maintaining the original ones.
### Spacial Sound Effects
- Handles and maintains muliple different types of Sound Sources in 3D Space locally on each individual client.
### AI Skill Adaptation
- Handles and Scales the SubSkills of all present AI's in the Mission during the Storm including newly created entities, ether via Script or by Zeus and returns to their previous skill Levels after a reset of the Storm.
### Unscheduled Environment
It is optimised with the help of CBA Functions to be soley executed in Unscheduled Environment.
### Join in Progress
Handles and Maintains JIP Handles for individual client side effects and deletes them once the Effect has been set back to 0.
(I bet there are still some edge cases which I havent covered, but thats a problem for future me.)
## How to Use
### Request Transition
Currently, there is only one Main Function implemented, but there is more to follow.
`[presetName, duration in minutes, intensity] call storm_fnc_request_transition`.
- PresetName: String of desired MainPreset classname
- Duration: In minutes, minimum is 1 minute.
- Intensity: Target Intensity - from 0 to 1 where 1 stands for 100% Intensity
This function will request a transition from "current" state (0 intensity if no active storm), to the desired state over the provided duration.
To reset the storm, remove all effects and return to the previous conditions, simply request a transition with the same parameters, but have 0 as the target Intensity.
#### Example
```sqf
// Will request the "STORM_Sandstorm" Template, to transition from 0% to 30% over the duration of 10 Minutes.
["STORM_Sandstorm", 10, 0.30] call storm_fnc_request_transition;
```
```sqf
// Once the player reach the objective or sth you choose to start an increase of the storm to the choosen maximum and have them, for example, defend an outpost
["STORM_Sandstorm", 10, 0.75] call storm_fnc_request_transition;
```
```sqf
//after the firefight completed, the storm settles, and gets reduced down to 15% intensity, while remaining some cosmetical aspects of it etc.
["STORM_Sandstorm", 10, 0.30] call storm_fnc_request_transition;
```
```sqf
// this will fade the storm completely to 0 ofer 10 minutes. After 10 Minutes, all Variables and active systems will be terminated on both, the server and the clients.
["STORM_Sandstorm", 10, 0.00] call storm_fnc_request_transition;
```
### Reset to Previous / Stop the Storm
Requesting a Transition to 0 from a previously established Storm will result in the termination/cleanup of all used Variables, arrays, Handlers etc.
```sqf
/*
* Function to Start a Transition from Current (0 if no previous Storm occoured) to target intensity over the defined time. The longer it takes, the better, too short transitions can impact player experience.
*
* Arguments:
* 0: _stormPreset