-
Notifications
You must be signed in to change notification settings - Fork 84
For Addon Makers
Want to make sure that your mod works with AGM features, or want to prevent it from colliding with an addon of yours? Read on.
- Backblast & Cannon Overpressure Zone
- Fire Control System
- Weapon Jamming and Overheating simulation
- "Deploy bipod" instead of resting
- Disposable Rocket Launchers
- Adding to the Interaction Menu
The backblast of a launcher is handled by these 3 values:
AGM_Backblast_Angle = 60; // angle of the backblast area
AGM_Backblast_Range = 10; // maximum range of the backblast
AGM_Backblast_Damage = 1; // maximum damage of the backblast
The values above are the default values for any launcher properly inherited off of the right base class Launcher_Base_F
. To disable backblast for your launcher alltogether, simply set AGM_Backblast_Range
or AGM_Backblast_Damage
to 0. The damage of the backblast decreases with range and angle.
The overpressure zone created by tank cannons works similarly:
AGM_DangerZone_Angle = 90;
AGM_DangerZone_Range = 50;
AGM_DangerZone_Damage = 2;
There are no default values here (unless you use cannon_120mm
), so you need to enter these manually.
By default, the FCS is enabled for all tracked vehicles. For wheeled vehicles it needs to be enabled manually. These are the values available:
AGM_FCSEnabled = 0; // bool; 1 = FCS on; 0 = FCS off
AGM_FCSMinDistance = 0; // minimum distance of the vehicles' range finder (in meters)
AGM_FCSMaxDistance = 5000; // maximum distance of the vehicles' range finder (in meters)
AGM_FCSDistanceInterval = 1; // precision of the vehicles' range finder (in meters)
When lasing a target out of range, the closest possible value is used. The Fire Control System is only available for the primary Gunner of a vehicle.
By default, all weapons inheriting from Rifle_Base_F
and Rifle_Long_Base_F
will have default values.
AGM_Jamming_Reliability = 0.004; // 40 malfunctions on 10,000 rounds fired.
AGM_Overheating_Increment = 0.012; // How much the weapon heats up for every shot. Max temperature is 3. 250 shots for max temp.
AGM_Overheating_Cooldown = 0.002; // How fast the weapon cools down every second. 1500 seconds / 25 minutes for a complete cooldown from max temp.
AGM_Overheating_Dispersion = 0.001; // Base dispersion in radians when the weapon is overheated. Increases the hotter the weapons gets.
AGM_clearJamAction = "GestureReloadMX"; // Custom jam clearing action. Default uses reload animation. Use empty string to undefine.
AGM_Overheating_allowSwapBarrel = 1; // 1 to enable barrel swap. 0 to disable. Meant for machine guns where you can easily swap the barrel without dismantling the whole weapon.
Some of these entries require AGM v0.94.
This requires the addon makers to add a line to their weapons class.
class Rifle_Base_F;
class MY_Gun : Rifle_Base_F {
AGM_Bipod = 1;
};
This requires the addon makers to add a line to their weapons class and to create a duplicate of the rocket launcher that uses a dummy magazine.
class CfgWeapons {
class Launcher_Base_F;
class launch_NLAW_F: Launcher_Base_F {
AGM_UsedTube = "AGM_launch_NLAW_Used_F"; // The class name of the used tube.
magazines[] = {"AGM_PreloadedMissileDummy"}; // The dummy magazine
};
class AGM_launch_NLAW_Used_F: launch_NLAW_F { // the used tube should be a sub class of the disposable launcher
author = "$STR_AGM_Core_AGMTeam";
displayName = "$STR_AGM_Disposable_UsedTube";
descriptionShort = "$STR_AGM_Disposable_UsedTubeDescription";
magazines[] = {"AGM_UsedTube_F"}; // This will disable the used launcher class from being fired again.
//picture = ""; @todo
//model = ""; @todo
weaponPoolAvailable = 0;
};
};
class CfgWeapons {
class ItemCore;
class InventoryOpticsItem_Base_F;
class optic_LRPS: ItemCore {
AGM_ScopeAdjust_Horizontal[] = {-50,50};
AGM_ScopeAdjust_Vertical[] = {-70,70};
class ItemInfo: InventoryOpticsItem_Base_F {
class OpticsModes {
class Snip {
discreteDistance[] = {1};
discreteDistanceInitIndex = 0;
};
};
};
};
};
class CfgWeapons {
class Launcher_Base_F;
class launch_Titan_base: Launcher_Base_F {
AGM_enableTopDownAttack = 0; //0 to disable, disabled by default
};
class launch_Titan_short_base: launch_Titan_base {
AGM_enableTopDownAttack = 1; //1 to enable
};
};
tbd.
Config inheritance:
class CfgVehicles {
class Man;
class CAManBase: Man {
class AGM_Actions {};
class AGM_SelfActions {};
};
class LandVehicle;
class Car: LandVehicle {
class AGM_Actions {};
class AGM_SelfActions {};
};
class Tank: LandVehicle {
class AGM_Actions {};
class AGM_SelfActions {};
};
class Air;
class Helicopter: Air {
class AGM_Actions {};
class AGM_SelfActions {};
};
class Plane: Air {
class AGM_Actions {};
class AGM_SelfActions {};
};
class Ship
class Ship_F: Ship {
class AGM_Actions {};
class AGM_SelfActions {};
};
class StaticWeapon: LandVehicle {
class AGM_Actions {};
class AGM_SelfActions {};
};
class StaticMortar;
class Mortar_01_base_F: StaticMortar {
class AGM_Actions {};
class AGM_SelfActions {};
};
};
more coming soon.