Author: gmJamez
Author Website:

Requirements: Community Base addons

Version: 1.1
Signed: Yes, serverkey included

Short description:

Date: 2009-08-05 18:56

Comments: (1)


Screens from Armed Assault

GMJ Sight Adjustment
gmJamez, ported to ArmA2 by noamles

I've created a little addon that allows for windage and elevation adjustments.

    - Adjust windage by using the left and right cursor keys, elevation by using the up and down cursor keys (= default configuration). The key assignments can be configured by editing a file - explanation below.
    - Current windage and elevation settings are stored by unit and by weapon, ie. if you switch to another unit, different settings can be used for each weapon ever used by this unit within a mission.
    - Adjustments can be stored as range cards to files within the mod's directory and viewed ingame.
    - Only works for primary weapons and only for a weapons first muzzle (both by design), ie. when using e.g. M4GL the mod will only affect the 5.56 rounds, not the grenades.
    - The following parameters can be configured for each weapon by changing the weapon classes:
      - Use mils or MOA as adjustment unit
      - Adjustment steps
      - Adjustment limits
      - Disable any adjustments
    This allows other modders to create weapons that behave differently than others when used with the SightAdjustment mod (see config.cpp).
Key configuration:
The key assignments can be configured by editing the file "GMJ_SightAdjustment\scripts\SightAdjustmentConfig.h". To do that, you have to unpbo the mod, edit the file and pbo it once again.
Two setups are already included - using the cursor keys and using WASD. If you want a different set up use the key values found here:
Simply comment lines by adding // at the beginning. Commented lines will be ignored by the game.
#define GMJ_SA_KEY_Einc 200 // increase elevation adjustment
#define GMJ_SA_KEY_Edec 208 // decrease elevation adjustment
#define GMJ_SA_KEY_Winc 205 // increase windage adjustment
#define GMJ_SA_KEY_Wdec 203 // decrease windage adjustment

Range card configuration:
The range cards are stored within the mod's directory. Unfortunately I can't determine the mod's directory or read the files by using relative paths, so the mod assumes that the range card files are found here "your ArmA directory\@GMJ_SightAdjustment\Addons". If you want to store them somewhere else, change the following line within SightAdjustmentConfig.h:
#define GMJ_SA_RANGECARDPATH "@GMJ_SightAdjustment\Addons"

To create your custom range card:
1) Aim at a target and adjust the elevation until the rounds hit exactly where you aim at.
2) Select the "New" link within the range card.
3) Enter the distance into the edit control next to the "enter distance:" line.
4) Select the "New" link within the range card and push the "add" button. Your current configuration will be added to the range card.
5) Repeat steps 1-4 for all distances you wish to show on the range card.
6) Select the entire text within the text control below the "copy range card data here:" line and copy the text to your clipboard.
7) Create a new text file within the directory where the range cards are stored (default "your ArmA directory\@GMJ_SightAdjustment\Addons").
8) Paste the text and save the file as "rangecard_XXX.txt" where XXX can be anything you choose (for example indicate the gun, ammo, ...).
e.g. for an M24 range card you could save it as: rangecard_M24.txt
9) Open the file "rangecard_list.txt" within the directory where the range cards are stored (default "your ArmA directory\@GMJ_SightAdjustment\Addons") and add...
, "XXX"
... at the end without adding new lines. XXX is of course whatever you chose when saving the file just before.
10) Within the range card push the "reload" button - the new range card can be selected (no need to restart the game).

Weapon configuration:
The weapons can be configured by changing a few parameters within the weapon's class by editing the file "config.cpp" of this mod ("GMJ_SightAdjustment\config.cpp") or any other mod. To do that, you have to unpbo the mod, edit the file and pbo it once again.
Two setups are included - using mil mode (= mil dots) and MOA mode (= minute of angle).

Enable/disable adjustments by changing the GMJ_SA_enabled parameter. Adjustments will be enabled if it equals 1 and disabled for any other values or if the parameter is missing.
e.g. GMJ_SA_enabled = 1;

Switch between mil and MOA mode by changing the GMJ_SA_mode parameter. Supported values are "MIL" and "MOA".
e.g. GMJ_SA_mode = "MOA";

Set minimum and maximum value of windage/elevation adjustments by changing the GMJ_SA_adjrange array. Values are in degrees. Due to rounding errors you need to set them a tiny bit beyond the desired limit.
GMJ_SA_adjrange[] = { 2.33335, 1.66667 };
-> sight will adjust from elevation -1.166675° to 1.166675° and windage -0.833335° to 0.833335°

Set the adjustment steps by changing the GMJ_SA_adj array. Values are in degrees.
e.g. GMJ_SA_adj[] = { 0.00416667, 0.00833333 };
-> sight will be adjusted by 0.001° for elevation and 0.00833333° for windage

How to use mil-dot reticles:
Either read this article or use these approximations (best do both though):
1 mil = 1m@1000m
or for our imperial friends...
1 mil = 3.6in@100yd
When using mil-dots it really helps to think in metric units.

- So let's say you know that your shots hit about half a meter low at a distance of 500m. Easiest way to get the mil-adjustment is to think "0.5m / 0.5km" -> set elevation to 1mil.
- Your shots hit 0.3m low at 600m? Think "0.3m / 0.6km" -> set elevation to 0.5mil.
- On to a more complicated example: Let's say you wish to adjust windage for a vehicle moving in a perpendicular direction to you at about 50km/h and the distance is 300m. First of all keep in mind that 100km/h = 27.7˙m/s, so 50km/h equals roughly 14m/s. We're shooting a 7.62 NATO round so v0 ought to be about 840m/s with an m24 -> it will take the round about 0.35s to reach the target. During those 0.35s the vehicle will have moved about 5m (0.35s * 14m/s). To get the mil adjustment think "5m / 0.3km" -> set windage to about +/-17mil (+ or - depending on whether the vehicle moves from left to right or vice versa). This approximation should be good enough to get a good second hit probability. Want a first hit? Bring a calculator or a range card

Check our FAQ for a clear explanation how to use modfolders.

Included files:

Known issues:
- The mil-dot size of the ArmA weapons does not match those used by this addon.
- It overrides defined actions for the cursor key, ie. whatever command you assigned to those keys won't get executed - you can configure the mod to use different keys though.
- I wanted to enable the windage and elevation configuration mode only when in optics-mode, but unfortunately I found no way of detecting when it is enabled.

* gmJamez for making this amazing addon for ArmA1, and for the permission to port it to A2.
* Solus for making the SightAdjustment_autoInit addon to support Extended Event Handlers.
* noamles (myself) - small script changes, and small config changes.

* FIXED bug - addon stopped working after saving and loading a game.
* FIXED bug - addon stooped working after doing a HALO jump in domination.
* FIXED bug - addon caused other addon's key assigments to stop working.
* NEW - working Range cards for more weapons.
* NEW - A lot of configuration were moved to the dta folder to allow modifying without breaking the signiture.

Forum topic:
- BI forums ArmA2 topic
- BI forums Armed Assault topic

- Community Base addons

Enable javascript to be able to download from Armaholic please!

Tags: No tags