README
======

Addon: asr_cfgweapons_fix_grenadiers
Version: 1.3
Developer(s): Robalo [AS]
Description: Makes the AI able to use grenade launchers like the M203 and GP-25. Without this, they almost always shoot them a few meters too far.
Thanks to HeinBloed for his GDT Mod Server Grenadier where I took the idea from.
This addon should be installed on both server and client to prevent config mismatches.


README CONTENTS
===============

01. VERSION HISTORY
02. COPYRIGHT STATEMENT
03. TERMS OF USE
04. LEGAL DISCLAIMER
05. INSTALLATION
06. REQUIRED ADDONS
07. NOTES
08. CHANGE HISTORY



01. VERSION HISTORY
===================

1.3.0 | 19 OCT 2010 | Updated for BAF and better sound mod compatibility. See change history.
1.2.1 | 08 JUL 2010 | Updated for Operation Arrowhead. See change history.
1.1.0 | 11 DEC 2009 | Removed ACE bits. See change history.
1.0.0 | 08 DEC 2009 | First release



02. COPYRIGHT STATEMENT
=======================

(c)[ 2009 ] Robalo [AS]. All rights reserved.



03. TERMS OF USE
================

This addon (hereafter 'Software') contains files to be used in the PC CD-ROM simulator "Armed Assault 2" (hereafter 'ArmA2'). To use the Software you must agree to the following conditions of use:

1. Robalo [AS] (hereafter 'The Author(s)') grant to you a personal, non-exclusive license to use the Software.

2. The commercial exploitation of the Software without written permission from The Author(s) is expressly prohibited.



04. LEGAL DISCLAIMER
====================

The Software is distributed without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. The Software is not an official addon or tool. Use of the Software (in whole or in part) is entirely at your own risk.



05. INSTALLATION
================

To begin using the Software:

1. Copy the .pbo and .pbo.bisign files to a mod (addon folder)  and launch the game with that mod loaded. For more information about addon folders please check BIS Wiki here:

http://community.bistudio.com/wiki/Addons#ArmA_2



06. REQUIRED ADDONS
===================

None.


07. NOTES
=========

Comments and suggestions are welcome. 
Here is the addon thread at BIS forums: http://forums.bistudio.com/showthread.php?t=91530


08. CHANGE HISTORY
==================

1.3.0 | 19 OCT 2010
Updated for BAF. AI units can now use the L85/UGL.
Changed configs a little for better sound mod compatibility. For example AI shooting a launcher should use that particular launcher's sound, if distinct.
Before this, the XM320, M32, M79, Mk13 were all using the M203 sound when fired by the AI.
Bundled asr_weaponreplacements.pbo, which contains a function useful for addon and mission makers: 
it will read a config class (ASR_Replacements) which defines: weapon to be replaced, variants to replace it with and optional conditions.
Here it is used to replace the M32, M79 and Mk13 with AI-enabled variants (ASR_M32, ASR_M79 and ASR_Mk13). It requires the CBA mod to work.

// ASR_Replacements config example
// can be done in addon form or in mission's description.ext
// mission config has priority
// condition can be missing and will be assumed true
// if more than one variant is set, a random one is chosen.
// classnames provided as replacements are checked to exist, otherwise no replacing is done.
// replacements must use the same ammo as the source weapon, because only the weapons are swapped.

class ASR_Replacements {
	class CfgWeapons {
		class BAF_L85A2_RIS_ACOG {
			variants[] = {"ACE_HK416_D14_ACOG_PVS14","ACE_HK416_D14_TWS"};
			condition = "_unit == leader _unit && (daytime > 21 || daytime < 5)"; // something better for the TL if the mission starts at night.
		};
		class M16A2GL {
			variants[] = {"M16A2GL","ACE_m16a2gl_scope"};
			condition = "typeOf _unit == 'TK_Special_Forces_EP1'"; // 50% chance the TK SF gets a scope for his M16A2
		};
	};
};


1.2.1 | 08 JUL 2010
Hotfixed a config error in the OA addon.
Added cfgaddons class to avoid "cannot play/edit" error messages in MP.

1.2.0 | 08 JUL 2010
Updated for Operation Arrowhead. 
There are 2 addons included which should be used depending on what version of the game you have:
a. Use only asr_cfgweapons_fix_grenadiers.pbo for Arma 2 standalone.
b. Use only asr_cfgweapons_fix_grenadiers_oa.pbo for Operation Arrowhead standalone.
c. Use both addons included if you're running Arma 2 and OA combined.

1.1.0 | 12 DEC 2009
The first release's fixes were integrated in ACE so this addon is now only needed if playing without the ACE mod.
Removed ACE config and dependency.

1.0.0 | 08 DEC 2009
First release
Created separate muzzles in config to be used only by the AI.
