Hi,
I've created a little addon that allows for windage and elevation adjustments.[*] Just 'install' the addon and it's active within every game.[*] 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).
caveats:[*] 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.
A brief explanation on how to use mils can be found at the end of this post.
Feedback and help with the current issues is quite welcome![]()
regards, Oliver.
download here (v0.3).
0.4beta
M107, range 700m, elevation +12.25 MOA:
Create your own range card:
Sample range card for an M4SPR:
key configuration
The key assignments can be configured by editing the file "GMJ_SightAdjustment\scripts\SightAdjustme ntConfig.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: http://community.bistudio.com/wiki/d...etEventHandler
Simply comment lines by adding // at the beginning. Commented lines will be ignored by the game.
e.g.
#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
whish list[*] Enable adjustments only when using optics/sights.[*] Demo mission.
things to check/fix[*] XAM incompatibility
version history
0.4beta - 05.08.2007
- Added range card (to samples are included - M24 and M4SPR).
0.3 - 29.07.2007
- Fixed elevation/windage calculation (thank you NonWonderDog).
- Fixed clicking sound even when adjustment limit has been reached.
- Weapon configuration is read from weapon class (mode, adjustment range, adjustment steps and enabled flag).
- Removed mode and adjustment range definition from SightAdjustmentConfig.h.
- Added muzzle class to weapon config to enable check for e.g. grenade launcher usage.
- Added enabled flag which allows for disabling the mod for certain weapons.
- Added debug mode by defining GMJ_SA_DEBUG as true which disables dispersion effects.
0.2 - 18.07.2007
- Added MOA mode.
- Adjustments are as of now stored by unit and by weapon, ie. each unit can have different settings for each weapon ever used within a mission.
- Since setDir is apparently not mp compatible -> added setPos to fired event handler, which should sync the adjustments during mp games.
- Moved the definition for the keys used when adjusting windage/elevation to config file.
- Added upper and lower limit of windage/elevation adjustments.
- Reduced number of global variables to one (GMJ_SA).
- Added registered tag GMJ to addon, variables, etc.
- Cleaned up config.cpp.
0.1 - 14.07.2007
- Original release.
thanks
NonWonderDog, sickboy, Maximus-Sniper
And everyone who posted this addon on his site!
<span style='font-size:9pt;line-height:100%'>How to use mil-dot reticles</span>.
Either read this article on snipercountry.com 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.
Examples:
- 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
HOME



Reply With Quote

***Is there any relation between your mildots and the distance? How can we ajust the scope if we managed to estimate the distance (using scope's mildots)?



, though if it could be accomplished through config instead of scripts controlling every bullet fired it would even be better IMHO.



