Table of Contents
ArmA 2 Artillery Module
ArmA 2 Forum, ArmA 2 Home, ArmA 2 Config, ArmA 2 File Formats, ArmA 2 Missions, ArmA 2 3D Modeling, ArmA 2 Scripting, ArmA 2 Terrain, ArmA 2 Texturing, ArmA 2 Tools
Introduction
The ARTY module allows scenario designers to utilize AI and player-controlled Artillery in their scenarios. ARTY supports any properly configured unit and will support fixed or self propelled vehicles as artillery pieces. The framework supports rocket artillery such as the MLRS and Grad weapon systems, as well as the standard mortars and howitzers.
ARTY Quick Start
This section describes how to get started making missions with the ARTY Module.
The Artillery Firing Interface
If you just want to play around with the Artillery as a player, you can do so by doing the following. Set up a static Artillery vehicle (empty). Put an Artillery GameLogic on the map. Then, start the game and get into the Artillery.
You will see an option to target the artillery in your action menu. Clicking this brings up the artillery firing interface map. Each fall line on the map shows the fall altitude of your shell (or mortar round) at a given elevation and azimuth.
Note that you will need to be using ARTY ammo for this to work. Load an ARTY Magazine in your vehicle if you do not have one loaded already.
Setting up a battery
The first step to using the ARTY module with the AI is to set up a battery. You can have either a real battery or a virtual battery. For purposes of this tutorial we will use a real battery. The battery can consist of a group of any kind of artillery unit, but there are some simple ground rules that should be followed:
- The battery must consist of the same kind of artillery unit. Note that you can have men in the group as well (such as drivers and gunners for the MLRS and Grad).
- The battery should be crewed by AI. The fire mission execution scripts depend on the AI firing their artillery pieces in the correct sequence. This allows the scripts behind the Artillery System Logic to act like a virtual FDC, giving commands to the members of the battery just as a real FDC would in the field.
- Self-propelled Artillery vehicles will need to stop to execute fire missions, so take this into account when making your missions.
Setting up a battery involves laying down a few artillery units in the editor and setting them up as a group. In order to “ARTY enable” this group, create an Artillery System game logic and Synchronize it to one of the units using the Synchronize (F5) function of the editor.
Note that the Artillery System will consider the unit that is synced to to be the “lead” unit. What this means is that this unit's position will be considered to be the canonical position of the Artillery battery, and firing solutions will be calculated accordingly.
Creating fire missions
Because there are numerous variables involved in setting up a fire mission, there is a type of array known as a fire mission template that is used to generalize specific types of fire missions. To set up a fire mission template, create an array consisting of the following elements, in respective order:
- Mission Type: “IMMEDIATE” or “TIMED”
- The IMMEDIATE mission type will complete after a requested number of rounds have been fired.
- The TIMED mission type will complete after a specific number of seconds have elapsed.
- Ordnance Type: This is a string indicating the general type of ordnance to fire. Ordnance types are defined either by default or by calling the BIS_ARTY_F_AddOrdnanceType function. For each type of artillery, there are one or more ordnance types. Common default ordnance types include:
- “HE” - High Explosive
- “WP” - White Phosphorous (“Willie Pete”)
- “SADARM” - Search and Destroy Armor
- “LASER” - Laser guided artillery shell
- “ILLUM” - Flares
- “SMOKE” - Non-Incendiary Smoke
- Rate of Fire: The delay, in seconds, between each shot. This delay will be applied globally throughout the entire battery. For example, if gun 1 fires, there will be a delay between that event and when gun 2 fires (and so on).
- Duration of Mission OR Round Count: This depends on the mission type. This value is used as follows:
- For IMMEDIATE missions, the number of rounds to fire.
- For TIMED missions, the number of seconds to sustain fire.
For example: We want to define a fire mission template that has the battery firing 15 rounds of high explosive ammunition. To do this, we define the following template:
_heTemplate = [“IMMEDIATE”, “HE”, 0, 15];
Requesting Fire Support
To use your new battery in a fire support role, you can call the BIS_ARTY_F_ExecuteTemplateMission function. In order to do this, you must first have a target. Target coordinates must always be given in 3d, with the Z component being the altitude above sea level. This is particularly critical if you are not using spawn mode, because otherwise the artillery will not be able to properly calculate a firing solution.
The easiest way to test this is to set a target vehicle or unit, and then use:
_targetPos = getPosASL _targetUnit
Then call the fire mission in on the position by using:
[_myBattery, _targetPos, _heTemplate] call BIS_ARTY_F_ExecuteTemplateMission;
Depending on how far away you are from the battery and its initial orientation, you may have to wait a few moments for it to rotate into place. After this happens, you will hear the artillery firing on the target and soon see the shells hitting in the vicinity (or on top of) your target vehicle.
Also note that when calling any of ARTY's functions, the artillery logic itself counts as your “battery” variable.
ARTY Modes
ARTY has two primary modes of operation: Spawn and non-Spawn. Both modes are useful in different instances.
Spawn Mode
This is the simplest artillery mode and is based on the shell-spawning found in the original Warfare. In this mode, shells will spawn in the air above your target after their time of flight has elapsed. The Artillery battery will still calculate a firing solution so you will see a realistic flight time, but there is no risk of complications from your shells hitting terrain in front of the artillery battery or along the trajectory. You should use spawn mode in cases where the scenario requires that the artillery shells always impact their target and you do not want to worry about micromanaging the position of the artillery battery.
Turn on spawn mode by running the following SQF code, where _battery is your group of artillery pieces:
[_battery, true] call BIS_ARTY_F_SetShellSpawn;
Non-Spawn Mode
In non-spawn mode, artillery shells will be shot at an elevation and azimuth appropriate to the firing solution and will then be allowed to fly to their target on their own. However, you must be careful using this mode as large terrain obstructions, such as mountains, will block the battery's fire. In addition, if you place your battery in a poor position (such as in front of a building or trees), disaster could occur. Since non-spawn mode is the more realistic of the two firing modes, care must be taken in battery deployment to ensure that you do not cause an accident. The ARTY system uses high-angle fires by default.
Non-Spawn mode is enabled by default, but it can be reactivated through:
[_battery, false] call BIS_ARTY_F_SetShellSpawn;
Virtual Artillery
The virtual artillery feature is used to simulate an artillery battery somewhere on the map, but where none actually exists. To use virtual artillery, set up a battery as you usually would, but instead of an actual artillery piece, lay down a Virtual Artillery Piece gamelogic.
The virtual artillery piece will do everything that a real artillery piece does, without physically existing. It cannot be destroyed by the enemy and will not show up as an enemy vehicle on radar. The virtual artillery piece is primarily used in cases such as during a random Artillery Barrage secop request, where the battery is spawned somewhere on the map and there is no time to pick a suitable place for it.
Because of its “virtual” nature, the virtual artillery piece needs to simulate a specific real artillery piece. By default, it will simulate an M119, but you can change this with the BIS_ARTY_F_SetVirtualGun function. For instance, to set up a virtual D30, do the following on a piece of virtual artillery (in this case _virtualPiece):
[_virtualPiece, “D30”] call BIS_ARTY_F_SetVirtualGun;
The Secop Manager takes advantage of the virtual artillery system in cases where a real artillery battery is not specified during the addition of the “Artillery Barrage” secop request.
Keep in mind that virtual artillery will operate in spawn and non-spawn mode as well. Shells are being spawned at either end of the trajectory in both cases.
Using ARTY with the Secop Manager
The Secop manager or (SOM) is currently the simplest way to take advantage of the artillery system. To use this, you must have a Secop Manager gamelogic synced to the player. If you want to use SOM with a real artillery battery, you must have constructed a battery using either real or virtual artillery.
To add the artillery barrage to the list of Secop requests, you need to decide which ones should be available. As of the time of this writing, there are 9 fire mission templates loaded into the Secop manager which are available as Secop fire missions:
- Immediate suppression, high explosive - Fire 10 rounds as fast as the battery can.
- Immediate smoke - Fire 6 smoke shells.
- Immediate suppression, Willie Pete - Same as Immediate HE, but with WP.
- Illumination mission - One flare munition every 10 seconds for 3 minutes.
- LASER - Fire two laser guided HE shells.
- SADARM – Stagger three SADARMs ten seconds apart.
- HE Fire For Effect - Bombard with continuous HE for one minute.
- WP Fire For Effect – Bombard with continuous WP for one minute.
- Adjust fire - Fire two HE rounds at the target.
When using a physical or virtual artillery battery, a list of one or more of these FM types (by ID) will need to be included. For instance, if I wanted to have SOM call on my artillery battery (with RIPPER as the Artillery Module logic), I would run the following:
[["artillery_barrage"], player, [[RIPPER, [7,8,9]]]] call BIS_SOM_addSupportRequestFunc;
The above will allow the two fire for effect missions and the adjust fire mission to be called by the SOM.
However, the SOM will also run fire missions without an artillery battery specified. When you add this type of support request, it will utilize spawned virtual artillery pieces set in spawn mode, so you don't need to worry about the position of the battery—SOM will generate it automatically. Adding this type of support request is accomplished without passing parameters to the SOM as follows:
[["artillery_barrage"], player, [[]]] call BIS_SOM_addSupportRequestFunc;
The SOM will handle all communications between the player and the HQ entity. Remember to only provide fire missions that are available for that Artillery battery (for instance, don't give the Grad an Illumination mission) or you will get an error.
ARTY Vehicles and Magazines
This is a list of ARTY-enabled vehicles and their corresponding magazine types. Note that this does not include magazine types not compatible with the Artillery Module.
ClassName | Description | ARTY Magazines | Default Ordnance Types | Default SOM Fire Mission IDs |
---|---|---|---|---|
M119 | 105mm Towed Howitzer (British Royal Ordnance) | ARTY_30Rnd_105mmHE_M119, ARTY_30Rnd_105mmWP_M119, ARTY_30Rnd_105mmSADARM_M119, ARTY_30Rnd_105mmLASER_M119, ARTY_30Rnd_105mmSMOKE_M119, ARTY_30Rnd_105mmILLUM_M119 | HE, WP, ILLUM, SADARM, LASER, SMOKE | 1,2,3,4,5,6,7,8,9 |
D30 | D30 122mm Towed Howitzer (Former Soviet Union) | ARTY_30Rnd_122mmHE_D30, ARTY_30Rnd_122mmWP_D30, ARTY_30Rnd_122mmSADARM_D30, ARTY_30Rnd_122mmLASER_D30,ARTY_30Rnd_122mmSMOKE_D30, ARTY_30Rnd_122mmILLUM_D30 | HE, WP, ILLUM, SADARM, LASER, SMOKE | 1,2,3,4,5,6,7,8,9 |
M252 | 81mm Mortar (United States) | ARTY_8Rnd_81mmHE_M252, ARTY_8Rnd_81mmWP_M252, ARTY_8Rnd_81mmILLUM_M252 | HE, WP, ILLUM | 1,3,4,7,8,9 |
2b14_82mm, 2b14_82mm_INS, 2b14_82mm_CDF, 2b14_82mm_GUE | 2B14 82mm Podnos Mortar (Former Soviet Union) | ARTY_8Rnd_82mmHE_2B14, ARTY_8Rnd_82mmWP_2B14, ARTY_8Rnd_82mmILLUM_2B14 | HE, WP, ILLUM | 1,3,4,7,8,9 |
MLRS | M270 Multiple Launch Rocket System (United States) | ARTY_12Rnd_227mmHE_M270 | HE | 1,7,9 |
GRAD_CDF, GRAD_INS, GRAD_RU | BM-21 “Grad” (Former Soviet Union) | ARTY_40Rnd_120mmHE_BM21 | HE | 1,7,9 |
Frequently Asked Questions
I tried using the Secop Module method and it doesn't work. Why?
You may have to wait for the Secop Module to load properly. Spooner provided a helpful example of one useful way to get this to work:
// Assumes you have called your SecOp module "socom". waitUntil { not isNil { socom getVariable "initDone"} }; waitUntil { socom getVariable "initDone" }; // The request commands in the biki are fine. [["artillery_barrage"], player, [[]]] call BIS_SOM_addSupportRequestFunc;
Why does the MLRS blow up when I try to use it as a player?
You need to add an Artillery Module magazine with the rocket artillery for it to work properly. Try doing the following in the init field of your MLRS:
this addMagazine "ARTY_12Rnd_227mmHE_M270";
Feel free to remove the current magazines before doing this.
Why can't I get the targeting system to work?
Ensure that you have one of the listed Artillery Module magazines loaded into the vehicle you are using.
Example Missions
How to use the Artillery Module and the Secop Manager with a physical MLRS battery
This mission puts a MLRS battery on the Southeast corner island. From there, you can put fire on most of the map by using the Secop Manager's support request. To add another support request, use the radio option. Pay attention to the trigger that adds the Secop Request.
ArtyDemo_MLRS_SOM.zip By Headspace.
How to use Virtual Artillery pieces with the Secop Manager
This mission is very similar to the above, but it uses “Virtual” MLRS batteries instead. The init field of the Artillery Module gamelogic describes how to tell the virtual artillery pieces what type of artillery to simulate.
ArtyDemo_MLRS_SOM_VIRTUAL.zip By Headspace
Notes
Easier way to use arty is with SOCOM, but the BIS Wiki example is less than detailed enough to work. You must wait until the socom is fully iniated before setting up the fire missions (again, the instructions assume you will put the code in a radio trigger, which makes sense in a test mission, but not a real mission):
// Assumes you have called your SOCOM module "socom". waitUntil { not isNil { socom getVariable "initDone"} }; waitUntil { socom getVariable "initDone" }; // The request commands in the bis wiki are fine. [["artillery_barrage"], player, [[]]] call BIS_SOM_addSupportRequestFunc;
You will get a hint that the mission type has been added, then communication→socom→request artillery will allow you to click on the map to place arty (and clearly shows min/max ranges). This is definitely the best way to use artillery, IMHO.