Difference between revisions of "ObjectTemplate.AddAmmoType"

From Pilot_51's Wiki
Jump to navigation Jump to search
(New page: == MDT description == ''AddAmmoType'' describes which ammo type a supply point provides (see AmmoType), and how much per second. A supply point (e.g. ammo box, repair pad, hangar, APC) can...)
 
(→‎Additional Description: Mistake in testing, the map that was used to test apparently has 2 ammo boxes on the same spot.)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== MDT description ==
+
== MDT Description ==
''AddAmmoType'' describes which ammo type a supply point provides (see AmmoType), and how much per second. A supply point (e.g. ammo box, repair pad, hangar, APC) can provide more than one type of ammo.
+
''AddAmmoType'' describes which ammo type a supply point provides (see AmmoType), and how much per second. A supply point (e.g. ammo box, repair pad, hangar, APC) can provide more than one type of ammo.<br>
 
+
<br>
The first argument is the type of ammo provided. The second argument is the amount of ammo this ammo supply point has to give out; "-1" means "infinite", and setting it to a number limits the number of reloads. The third argument is the amount of ammo of that type that is resupplied per second. The fourth is how fast the ammo box itself reloads, if argument two is not set to "-1" (this last argument is not used in any BF1942 battles, and so, according to the coders, may not actually work).
+
The first argument is the type of ammo provided. The second argument is the amount of ammo this ammo supply point has to give out; "-1" means "infinite", and setting it to a number limits the number of reloads. The third argument is the amount of ammo of that type that is resupplied per second. The fourth is how fast the ammo box itself reloads, if argument two is not set to "-1" (this last argument is not used in any BF1942 battles, and so, according to the coders, may not actually work).<br>
 
+
<br>
Here is an example, for the soldier ammo box:
+
Here is an example, for the soldier ammo box:<br>
  
 
  ObjectTemplate.AddAmmoType 1 -1 15 0
 
  ObjectTemplate.AddAmmoType 1 -1 15 0
Line 10: Line 10:
 
  ObjectTemplate.AddAmmoType 3 -1 1.2 0
 
  ObjectTemplate.AddAmmoType 3 -1 1.2 0
  
So, bullets are resupplied at 15 rounds per second, and grenades, exppacks, mines, and bazooka shells are resupplied at 1.2 per second.
+
So, bullets are resupplied at 15 rounds per second, and grenades, exppacks, mines, and bazooka shells are resupplied at 1.2 per second.<br>
 
+
<br>
The ammo boxes and APCs are interesting in that two supply points are defined for each, one with a low Radius that supplies and heals soldiers, and one outside, that supplies only vehicles with WorkOnVehicles.
+
The ammo boxes and APCs are interesting in that two supply points are defined for each, one with a low Radius that supplies and heals soldiers, and one outside, that supplies only vehicles with WorkOnVehicles.<br>
 
+
<br>
Here is the ammo type list, same as for AmmoType:
+
Here is the ammo type list, same as for AmmoType:<br>
 
+
<br>
1 - rifles, handguns, SMGs
+
1 - rifles, handguns, SMGs<br>
2 - exppack, landmine
+
2 - exppack, landmine<br>
3 - bazooka, Calliope tank shells
+
3 - bazooka, Calliope tank shells<br>
6 - jeep and scout car horn
+
6 - jeep and scout car horn<br>
7 - axis bombs
+
7 - axis bombs<br>
8 - MG42, axis plane guns
+
8 - MG42, axis plane guns<br>
9 - allied bombs, Junkers bombs
+
9 - allied bombs, Junkers bombs<br>
10 - Browning MG, allied plane guns, Junkers' belly gun
+
10 - Browning MG, allied plane guns, Junkers' belly gun<br>
14 - PT boat machineguns
+
14 - PT boat machineguns<br>
15 - PT boat torpedoes <br />
+
15 - PT boat torpedoes<br>
 +
<br>
 
''[http://mdt.planetbattlefield.gamespy.com/scripting/ObjectTemplate/Properties/AddAmmoType.shtm Source and more details]''
 
''[http://mdt.planetbattlefield.gamespy.com/scripting/ObjectTemplate/Properties/AddAmmoType.shtm Source and more details]''
 
+
<br>
 
== Additional Description ==
 
== Additional Description ==
 
+
The fourth value is similar to the third value, except it gives ammo to itself to be given away, much like an ammo box for the ammo box.<br>
 
+
The actual reloading happens slightly slower than every half-second and gives about 53-54% the ammo of the third value. To test, I set the third value to 100 and watched the very first reload when I was out of ammo, it was always either 53 or 54. I also set the third value to 2 and went into the reload area with an even number of ammo and noticed that the ammo count was changing between odd and even numbers every few reloads.<br>
 +
The timing for reloading does not start once the soldier or vehicle is ready to receive ammo, but it is constantly giving ammo at the same time to all soldiers or vehicles in its radius.<br>
 +
<br>
 
[[Category:Battlefield 1942]]
 
[[Category:Battlefield 1942]]

Latest revision as of 00:07, 18 December 2008

MDT Description

AddAmmoType describes which ammo type a supply point provides (see AmmoType), and how much per second. A supply point (e.g. ammo box, repair pad, hangar, APC) can provide more than one type of ammo.

The first argument is the type of ammo provided. The second argument is the amount of ammo this ammo supply point has to give out; "-1" means "infinite", and setting it to a number limits the number of reloads. The third argument is the amount of ammo of that type that is resupplied per second. The fourth is how fast the ammo box itself reloads, if argument two is not set to "-1" (this last argument is not used in any BF1942 battles, and so, according to the coders, may not actually work).

Here is an example, for the soldier ammo box:

ObjectTemplate.AddAmmoType 1 -1 15 0
ObjectTemplate.AddAmmoType 2 -1 1.2 0
ObjectTemplate.AddAmmoType 3 -1 1.2 0

So, bullets are resupplied at 15 rounds per second, and grenades, exppacks, mines, and bazooka shells are resupplied at 1.2 per second.

The ammo boxes and APCs are interesting in that two supply points are defined for each, one with a low Radius that supplies and heals soldiers, and one outside, that supplies only vehicles with WorkOnVehicles.

Here is the ammo type list, same as for AmmoType:

1 - rifles, handguns, SMGs
2 - exppack, landmine
3 - bazooka, Calliope tank shells
6 - jeep and scout car horn
7 - axis bombs
8 - MG42, axis plane guns
9 - allied bombs, Junkers bombs
10 - Browning MG, allied plane guns, Junkers' belly gun
14 - PT boat machineguns
15 - PT boat torpedoes

Source and more details

Additional Description

The fourth value is similar to the third value, except it gives ammo to itself to be given away, much like an ammo box for the ammo box.
The actual reloading happens slightly slower than every half-second and gives about 53-54% the ammo of the third value. To test, I set the third value to 100 and watched the very first reload when I was out of ammo, it was always either 53 or 54. I also set the third value to 2 and went into the reload area with an even number of ammo and noticed that the ammo count was changing between odd and even numbers every few reloads.
The timing for reloading does not start once the soldier or vehicle is ready to receive ammo, but it is constantly giving ammo at the same time to all soldiers or vehicles in its radius.