Modules: Firemission - Global-Conflicts-ArmA/Olsen-Framework-Arma-3 GitHub Wiki
The firemission module allows players and AI to call in firemissions for AI crewed artillery to fire. For players this is via a GUI, for AI set as forward observers they will call in artillery available to them when they become aware of enemies. How accurate this fire is and other settings can all be configured.
<mission root directory>\modules\firemission
In the editor place crewed AI units for the artillery you want to have available to you. For example, you can place a podnos mortar, M109 etc.. Give the placed artillery units a variable name.
Uncomment the respective line for the module in the <mission root directory>\modules\modules.sqf file:
#include "firemission\root.sqf"
In the init of any players you want to be able to call in artillery firemissions put this:
[this, [<artillery units available>]] call FW_fnc_FIREMIS_ArtMakePlayerObserver;
For example:
[this, [mortar1, mortar2]] call FW_fnc_FIREMIS_ArtMakePlayerObserver;
Once in game, any player playing as a unit who is designated an observer, will then be able to use the GUI to call in firemissions via the ACE self interaction menu.
The setup for AI has many options to account for how effective you want them to be, this is useful to balance difficulty in the mission. You can make enemy artillery absolutely lethal or just inconvenient.
The parameters for the FW_fnc_FIREMIS_RegisterForwardObserver
function are explained here:
- 0: unit
- 1: guns Array aviable guns for the observer
- 2: knowledgerequired (0,4) https://community.bistudio.com/wiki/knowsAbout
- 3: minRange minimum range between firemission to stop massive 10 batteries shooting 1 guy (300 is good)
- 4: viewRange max range the unit can see
- 5: dispersion dispersion in meters
- 6: burstCount number of bursts to fire
- 7: roundsPerBurst number of rounds per burst
- 8: burstWaitTime downtime between bursts
- 9: minSpottedDistance range in m of how close a spotting round needs to be to be accepted
- 10: roundIndex ammunition index from FUNC(FIREMIS_Dia_GetAmmoDisplayNameAndIndex)
For example:
[this, [arty11, arty12, arty13, arty14], 1, 300, 1000, 10, 5, 10, 300, 150, 0] call FW_fnc_FIREMIS_RegisterForwardObserver;
No setup is required for artillery units except for placing them, however if you'd like more control over each unit you can use the FW_fnc_FIREMIS_SetArtilleryData
function.
The parameters are explained here:
- 0: unit
- 1: fireRate (1, 999) firerate modifier. gunFireRate * modifier;
- 2: accuracy accuracy in meters
- 3: spottingAccuracy spotting round accuracy in meters
- 4: aimtime time needed before spotting rounds will be fired in seconds
- 5: calculationtime time needed to calculate and prep after spotting round and before actual firemission in seconds
- 6: customName custom name for the artillery gun used in the player FO dialog
- 7: unlimitedAmmo true for unlimited ammo in gun
Values of -1
will mean the default setting is left for that parameter.
For example:
[this, -1, -1, -1, -1, -1, "Artillery piece", true] call FW_fnc_FIREMIS_SetArtilleryData;
This will give the artillery battery unlimited ammo.
Use the FW_fnc_DoConstantArtillery
function, this can be used to tell a unit to constantly fire at a target with unlimited ammo, this is useful for constant suppression of an area during a mission or for immersion purposes. It takes as arguments:
- 0: unit - The unit to command fire
- 1: target <marker name, object> - The target to fire at
- 2: dispersion - How close to the target to fire within
- 3: minDelay - The minimum delay between firing (in seconds)
- 4: delayModifier - A range from 0 to the delay modifier value (in seconds) is added to the minimum delay
Example (in your modules\firemission\settings.sqf
file):
[MORT1, "ao", 100, 10, 5] call FUNC(FIREMIS_DoConstantArtillery);