- improved debug markers including shellView tool;
- handling of OA counterparts of A2 artillery pieces;
- AI will choose best kind of ammo on its own from possible HE, WP, SADARM;
- working ammo limitation;
- possibility of direct creating SMOKE and ILLUM salvos;
- movement predictor consideres roads.
- Fixed some bugs;
- improved calculation of salvos drift;
- added demo mission;
- new PDF manual.
- Fixed an error in the process of selecting the most advantageous target.
- Added an optional possibility to activate and deactivate script by defining and un-defining a global variable;
- added an optional possibility to selectively disable script control for up to 12 pieces of artillery;
- projectiles dispersion and salvos drift again adjusted;
- improved tracking of moving targets;
- fixed bug: AI did not take amendment for prevent "friendly fire" in "FO mode";
- fixed other minor bugs.
DETAILS OF CHANGES
To set addon to run at certain point of the mission:
1. to define a RydART_Manual variable at the beginning of the mission (for example in the init of any unit);
2. at a certain point of the mission to define with any value (via another script, a trigger, waypoint etc.) variable RydART_Start.
To turn addon off at certain point of the mission:
1. to define variables RydART_Manual and RydART_Start at the beginning of the mission (for example in the init of any unit);
2. at certain point of the mission to define with any value (via a script, a trigger or whatever else) variable RydART_Start as "nil" (RydART_Start = nil). Addon scripts will turn off at the end of their ongoing cycle.
To remove given artillery piece from the control of addon should give it one of the following names (in field "name" of unit's window in editor or via command "setVehicleVarName"): NoFAWa, NoFAWb, NoFAWc, and so on till NoFAWl (available 12 names).
Default value of RydART_Disp (shell dispersion multiplier) variable is now 0.4.
Older versions included.
version 1.1 Beta
- Improved method of selecting and assigning targets;
- improved tracking of moving targets;
- projectiles dispersion and salvos drift was adjusted;
- added additional optional variables that enable introduction of separate FO units and test shots before main salvo, also regulation of accuracy growth as a result of amendments provided by the spotters.
(package contains also 1.0 version in "old" folder)
DETAILS OF CHANGES
Currently, there is a greater chance that unit, that is considered to be the most valuable become a target. Currently, it is also important, whether it is an enemy artillery unit (highest priority), how fast it moves (the slower the better) and whether in close proximity (in salvo impact range), there are other groups or buildings or enemy weaponry (this idea was taken from thread "ECHO fire director"- thanks to valuable information about this from Evil_Echo).
Artillery should now be more deadly.
It is now possible set if batteries have to "communicate" each other on assignment objectives:
If RydART_Monogamy variable is defined with any value (is not "nil"), one enemy group will become a target for only one battery at a time.
Changed the method of calculation amendment to the target motion vector so that it is less sensitive to rapid changes of direction and more consistent with the real displacement. It now takes 20 seconds to calculate this.
Using a simple simulation of Gaussian distribution and changes in formulas adjusted projectiles dispersion and salvo drift so now, hopefully, these values should be more... "toned down". Also WNDF (see below) for MRLS is now 2.5 and for GRAD 3.5.
Also introduced possibility of replacing default system in which anyone can provide to allied batteries information about potential targets. If RydART_FO variable is not "nil (has defined value) then only certain units will be "questioned" whether they see potential targets. FO this type must meet two following conditions:
- Can not be assigned to any groups (the only member of their group);
- must belong to one of the following types units: U.S. spotter (USMC_SoldierS_Spotter), RU spotter (RU_Soldier_Spotter), CDF spotter (CDF_Soldier_Spotter), INS officer (Ins_Soldier_CO),GUER scout (GUE_Soldier_Scout) OR must to have one of the following names: FOa, FOb, FOc, FOd, FOe, FOf (the name is defined in "name" field of unit window in the editor or via script command "setvarname").
Thus, on the battlefield, in this FO mode, in addition to units enumerated classes, with spotting targets will be able to deal up to six units of any kind and any non-civilian ("civ" and "civ_RU" excluded) faction.
Additionally, with launch of a RydART_FO variable is changing method of bombardment. Salvos will be now divided into a test shot or shots (1 / 6 of salvo, rounded up) and main salvo, much more accurate thanks to the amendments after test shots. There is also possibility to set two-phased method of bombardment in normal mode, with no special FO units. To achieve this you should launch (define) variable RydART_2PhWithoutFO. By default multiplier of salvo drift in second phase of artillery fire of this kind is equal 0.2 + (random 0.2), but its non-random part can be changed by giving desired numerical value to the variable RydART_FOAccGain (eg. RydART_FOAccGain = 0.4 will set gain to value 0.4 + (random 0.2). Larger multiplier means a possibility of larger main salvo drift and thus a smaller accuracy gain from spotter's info). RydART_OnePhase sets one-phased bombardment in FO mode if not "nil".
Is still sometimes returns described on the forum this strange script behavior and moreover I had only day for test, so, for peace of mind, I described this version as "Beta".
Purpose of „Fire At Will” addon is to give in simplest way possible fully functional AI artillery to battlefield for those, who can't or simply refuse to learn script language but still want functional AI artillery in his Arma 2 missions. It was created because in my opinion it is illogical to force a player to learn script language and to study BIS_ARTY Module commands and variables even if he wants just to set up some AI artillery in his missions, while such knowledge is not required for any other types of AI combat units, which are fully functional without any scripting.
Addon supports all generic Arma 2 artillery units (howitzers: M119, D30; mortars: M252, 2B14; rocket systems: GRAD and MRLS) and its OA counterparts. Requires Arma 2 CO 1.62 or above.
To use the FAW primary, addon version in yours missions just set up some artillery batteries in editor and play with addon.
Technically you also probably can play this way any other mission, but it's not recommended due to unpredictable changes on the battlefield, that are likely to ruin mission designer’s concept.
To init FAW script version (in folder „Script Version”) place following eg in init field of any unit or activation field of trigger or in init.sqf etc.: nul = [ ] execVM „PrepArt.sqf”;
1. group of artillery must consist of the same kind of artillery units.
2. bombardment trajectory is calculated from position of leader such artillery group, so do not place leader far from rest of group.
User can also call smoke or illumination fire missions directly via:
_CFF = [reference position, available artillery groups array, ammo type, amount, FO unit] call RYD_ArtyMission;
For example for smoke screen between _badguy and player:
_CFF is an array, that contains boolean flag indicating, if mission can be conducted, chosen battery (BIS_Arty module synchronized with chosen artillery group) and leader of this artillery group.
HOW IT WORKS
Artillery of given side will shoot at enemy group (chosen with some kind of „temptation” system - targets become primarily probably more valuable enemy groups) with an amendment for its leader motion vector if:
- it is in range;
- it is spotted by any soldier of same or allied faction (except for civilian,s still spotters and other units with binoculars or sniper rifles are valuable FOs because they see and identify the enemy as potential target at a much greater distance);
- it is not captive or defenseless (leader has no weapon, no firing at harmless civilians even when they are hostile);
- it moves with speed lesser than 50 km/h because of keeping chance for hit on reasonable level;
- it is not more than 20 meters above ground (air units may become targets if are landed, or hover very low);
- there is not friendly units in „danger zone” radius (default is 200 * WNDF meters from calculated impact position); weapon nominal dispersion factor (WNDF) = 1 for mortars, 2 for howitzers, 3 for MRLS and 4 for GRAD.
If there is allied leader in „danger zone” battery try to correct impact coordinates in attempt to avoid friendly fire by moving impact point in direction of actual target position at the cost of the amendment to the motion vector, if still there is FF-danger, battery try to fire actual target position. If still there is FF-danger, battery will call off fire mission an wait for next chance. However „friendly fire” is still possible due to salvo drift (targeting error) and single rounds impact dispersion or units movement);
Drift calculation is based on factors: distance from the target point, health status of battery leader, weather (worse weather means less predictable atmospheric conditions) and battery leader's aiming skill; Maximal drift is halved when battery shoots to the same target as before;
Dispersion calculation is based on factors: distance from the target point, damage status of battery leader's vehicle (his artillery piece) or health status of battery leader if not mounted in any gun, weather and battery leader's overall skill (matters practice in proper setting and use of gun), kind of artillery.
FAW is ready to use without any initial configuration, but offers several config options to customize its work by defining them in init.sqf or any act field in editor (eg RydFAW_Active = false; values in braces are default):
RydFAW_Active (true)- setting this as false will terminate FAW; RydFAW_Manual (false)- setting this as true will make FAW waiting with calculating each new fire mission for another variable: RydFAW_Fire (false) must be set as true (eg with trigger activated via radio) each time available arty groups should seek for new targets; RydFAW_NoControl ()- each arty group (battery) held inside this array will be excluded from FAW control; RydFAW_ArtyShells (120)- number of shells available per battery per kind. Note, that SADARM ammo is rare, so battery, if can use such ammunition, will hold it in number equal to 10% (rounded up) of set value, so default this would be 12 SADARM shells for each howitzer battery; RydFAW_Interval (30)- time gap (in seconds) between each “seek for targets” cycle (each cycle each not busy battery on map looks for new fire mission opportunity); RydFAW_Debug (false)- if set as true, will be shown map markers that allows user to watch, what is going on. See DEBUG MARKERS chapter for details; RydFAW_FO ()- if this array is set as not empty (even with objNull), limited spotting mode becomes active, so only members of groups, which names are inside this array or which leaders are of proper class (see below), will have ability of spotting targets for batteries. By default, in unlimited spotting mode, each unit of same side, as battery, or allied excluding civilians, will transmit known enemy coordinates to the battery; RydFAW_FOClass
(["USMC_SoldierS_Spotter", "CDF_Soldier_Spotter", "RU_Soldier_Spotter", "Ins_Soldier_CO", "GUE_Soldier_Scout", "US_Soldier_Spotter_EP1", "CZ_Special_Forces_Scout_DES_EP1", "TK_Soldier_Spotter_EP1", "TK_INS_Soldier_Sniper_EP1", "TK_GUE_Soldier_Sniper_EP1", "GER_Soldier_Scout_EP1"])
- this array holds class names of leaders of groups, that will be automatically added to the RydFAW_FO array, if that array already is not empty (means if limited spotting is active); RydFAW_OnePhase (false) - by default, if limited spotting is active, spotters will guide fire in two steps: 1/6 of salvo (rounded up) will be used as adjustment fire, and rest, with better accuracy, in next salvo as “fire for effect” (FFE). In unlimited spotting or if this variable is set as true, whole salvo will be fired at once as FFE; RydFAW_2PhWithoutFO (false) – with this set as true also in unlimited spotting mode artillery fire will be conducted in two steps, as described above; RydFAW_Amount (6) – this holds number of shells, that in summary should be fired in each fire mission. If set with negative value – number will be randomized between 1 and 10% of current reserve of that ammo or will be equal to 12 (lesser value will be used). SADARM salvo amount is always divided by 3 (rounded up); RydFAW_Rate (0) – additional time gap in seconds between each shot in salvo. By default guns will shoot as fast, as possible; RydFAW_Disp (0.4) – multiplier of salvo dispersion radius. The bigger value, the bigger radius; RydFAW_Acc (2) – multiplier of whole salvo drift radius. The bigger value, the bigger radius; RydFAW_Safe (200) – salvo will be not planned for coordinates located within this radius (in meters) around any allied group leader; RydFAW_SpawnM (false) – by default each shell is physically present on map during whole time of flight and follows its trajectory from battery to the final impact position. If this variable is set to true – shells will be spawned only over the target area, where calculated final impact position is located; RydFAW_Monogamy (true) – by default each enemy group can be a target for only one battery at the time. If set to false – there is no such limitation, so one target can be shelled by any number of batteries at the time; RydFAW_ShellView (false) – if set to true, in debug mode there is available a tool, that allows to watch shells during their flight marked with orange “drops” in 1500 meter radius around position clicked (LMB) on map. Alt + LMB removes that watching circle; RydFAW_FOAccGain (1) – additional accuracy multiplier in second, FFE step of fire mission due to adjustments after first step. The lesser value, the greater accuracy, must be not negative. It is multiplied by spotter adjustments factor for FFE stage: (0.2 + (random 0.2)) that changes salvo drift radius;
In debug mode on map will appear and disappear some markers:
- Black square icon on every battery actual position with its name, like RYD_BIS_ARTY_Logic_0 - „m252”;
- black dot on planned impact position for every battery on firing mission;
- blue circle around planned impact position that indicates drift radius;
- red dot on a blue circle that indicates central point of salvo impact with text specifying: drift radius in meters, dispersion radius in meters, type of ammo, and Time of Flight (TOF); for example: „70m/20m - „SADARM” – TOF: 10.2”;
- red, half-transparent circle around red dot that indicates probable (approximate) radius of the dispersion salvo projectiles;
- there are also some auxiliary lines between dots.
Available is also „tracking tool” that allow to see rounds on the fly in 1500 meters radius. Projectiles are marked by orange dots, and radius of tracking by „khaki” circle.
MRLS : Range: 4900m - 15550m ; Ammo: HE
GRAD : Range: 3300m - 10100m ; Ammo: HE
Addon was created "by player for players", source scripts you can freely modify, copy, "cannibalize", to use in your projects. It is released under APL-SA license. I'll be grateful for notification about each such usage.
I will be grateful for any bugtracking, testing, opinions and ideas.