-
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
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 launch_NLAW_F: Launcher_Base_F {
AGM_UsedTube = "AGM_launch_NLAW_Used_F"; // The class name of the used tube.
};
class AGM_launch_NLAW_Used_F: launch_NLAW_F { // the used tube should be a sub class of the disposable launcher
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
};
more coming soon.