I made a script that calculates the ballpark min and max ranges for any given artillery piece. I know this is over 4 years late but if anyone will benefit from this then it's worth it.
By changing the values of the 3 local variables, you can calculate the min and max ranges for your artillery piece.
them being:
<Variable name> Variable name of the unit,
<Integer> Array index of the ammunition you want to use for the ranges, found easily from the unit's ammunition array with the command 'magazines <your unit>'
<Integer> How much can it throw off by. (i.e real max range is 2125m, with and increment of 50m, the script will give you a max range of 2100m, or with it being the minimum range, it will give you a minimum range of 2150m)
I advice you to keep the _Increment at under 100m. At 200m I had it calculate the absolute maximum range for an artillery piece and it probably can't even shoot that far with doArtilleryFire. Needs more testing tho.
The script informs the ranges in the SystemChat, but this can easily be changed to any other form.
Script:
//Manually change these values for your usage
_Vehicle = 'Variable name of the artillery unit';
_MagazineSlot = 'Magazines array index for the ammunition (you can find it by counting down from the units magazines, i.e (hint str magazines <your unit> ) and count from 0 to what you want)';
_Increment = 'Increments at which the script will check if the range is at min or max (basically the accuracy of the values you get for the ranges with how much it can throw off)';
//Code:
_MaxRange = -1;
_MinRange = -1;
_Position = getPosASL _Vehicle;
while{_MaxRange < 0}
do{
_Test = _Position inRangeOfArtillery[[_Vehicle], ((magazines _Vehicle) select _MagazineSlot)];
if(_Test && _MinRange < 0) then {_MinRange = _Position distance _Vehicle;};
if(!_Test && _MinRange >= 0) then {_MaxRange = _Position distance _Vehicle;};
_Position = [
(_Position select 0) + _Increment,
(_Position select 1),
(_Position select 2)
];
};
_MaxRange = _MaxRange - (_MaxRange%_Increment) - _Increment;
_MinRange = _MinRange - (_MinRange%_Increment) + _Increment;
systemChat format["max range = %1", _MaxRange];
systemChat format["min range = %1", _MinRange];