|Values:||Unsigned integers: All non-negative whole numbers from 0 to either 32767, 2147483647 or 4294967295.|
|Special Values:||-1 (see below)|
This flag essentially controls exactly what it is named after: The "number of rounds carried between reloads", i.e. how many shots the object has before it needs to be/gets reloaded.
- 1 Special Values
- 2 Standard Usage
- 3 The System in Detail
- 4 Ammo on Aircraft
- 5 Ammo on Vehicles
- 6 Ammo on Infantry
- 7 Ammo on Buildings
- 8 Fixes in Ares
- 9 See also
The only special value is -1, which means "unlimited ammo". This is also the default value for the flag.
The ammo-system in RA2 and YR is mainly used for aircraft, and has therefore been re-coded to best fit this purpose; on one hand, this means that using ammo on non-AircraftTypes is often buggy, in the sense that not all flags work or have the desired effect. This also means AircraftTypes require a declaration of Ammo= to work properly, and this number must be either -1 (for unlimited ammunition) or an integer greater than 0.
In addition, Ammo can be used to limit the number of times a Tech Building can deliver it's effect, meaning that a structure with and could only promote infantry 20 times before becoming useless. This only applies to structures with and/or .
The System in Detail
The ammo and reloading system is controlled by several INI flags:
- dock with a building; this is not set on aircraft because, unlike other TechnoTypes, it defaults to "yes" for them.
Other Ammo-related flags on objects are.
And also important are:
If a unit was set to
Ammo=10 PipScale=Ammo ReloadIncrement=30% Reload=450 EmptyReload=150 InitialAmmo=1
it would start out with 1 round of ammo when it comes from it's factory. If it shot itself empty, it would take about 10 seconds (on medium game speed) until reloading started. It would then be reloaded by 3 rounds of ammo every 30 seconds, up until it's maximum amount of 10 rounds. This is all visible to the player, because the PipScale is drawn. Note that, in some cases, the unit does not necessarily need to be empty in order to reload itself.
Ammo on Aircraft
- Ammo and reloading on AircraftTypes works as seen in the game, using the manual system.
- Automatic reloading on aircraft does not appear to work.
Ammo on Vehicles
In Tiberian Sun
Ammo does not work on VehicleTypes.
In Red Alert 2 and Yuri's Revenge
Ammo and auto-reloading on VehicleTypes works perfectly, but manual reloading does not work without AI issues..
Ammo on Infantry
Ammo on Infantry does not work quite to design.
You can give Infantry ammo, but they will not auto-reload until they are damaged. If your soldier runs out of ammo, they will have to be attacked by something in order to kick-start the reloading mechanism. However, no matter what other flags you set, it will just restore the infantry to full ammo.
A partial solution to this problem is to use a "reloader" unit. I.e. a unit with a weapon that only inflicts one point of damage, uses the, and tags in conjunction with a very low value. The resulting effect is then that the unit moves up close to your unit, and then the "attacked" unit will reload as they take the negligible amount of damage from the reloader's "weapon".
Also note that an infantry can only be reloaded when all of its ammo has been depleted, regardless of how much damage it takes. The reload mechanism will only fire once all of the unit's ammunition has been depleted.
Ammo on Buildings
In Red Alert and Tiberian Sun
Buildings with a weapon and Ammo fire all shots immediately, ignoring between shots. Once all ammo has been expended, the building will fully reload instantly, however the building will wait for the duration of the weapon's before firing again. , if specified, is ignored.
In Red Alert 2 and Yuri's Revenge
Ammo on buildings is rather useless. While it does work, and even reloads, it simply reloads to full ammo as soon as it is out of rounds, meaning that it makes no difference if ammo is defined or not. Your structure won't even stop shooting while reloading.
In addition, if a building with ammo is used to force-fire somewhere, the will be ignored, turning the structure's armament into a rapidly firing weapon.
Ammo on Tech Buildings
Tech Buildings are a special case for ammunition on structures. More specifically, this involves Tech Buildings that have the tagor . The Ammo tag will then have a different function if one of these tags are present. In this instance, the Ammo tag will control the amount of uses the Tech Building has.
For example, you have a Tech Building withand . The structure will be able to promote infantry 25 times, and then can no longer promote any more infantry.
The EXE file contains a check for when a structure's ammo is depleted. Firstly, the game looks to see if the building hasor , if not its ammo is then simply reset to full.
If you were to give a base defense structre a weapon along with eitheror , the structure will empty its clip and not do anything again.
Also note that Ammo is shared with between the structure's weapon, and any applicable Tech Building function. For example, if you haveon a structure with and a weapon, you could perform 5 infantry promotions, or fire 5 rounds, or any combination of the two that totals up to 5.
Fixes in Ares
Version 0.1 of Ares fixes the Ammo logic for InfantryTypes and BuildingTypes; on the latter, Ammo is only reloaded if neithernor . No change was made on VehicleTypes and AircraftTypes (latter are still hardcoded to require manual reloading).