User Tools

Site Tools


arma2:modeling:proxy_weapons

Aircraft Proxy Weapons

Weapon proxies in ArmA 2

This explains how A2 handles weapon proxies on planes and choppers. It also shows some advanced procedures to enhance weapon load-out variety.

General proxy use seen on BIS sample models

Sadly BIS doesn't make use of the potential of the proxy system. Weapon MLOD's and proxies are modeled and adjusted in a way that doesn't make it possible to swap weapons. Well, it is possible but visually they don't fit pretty well. So if you place a AGM-65 on a place which is adjusted for a AIM-9X, the missile is halfway buried into the weapon pylon. The other way around, placing a AIM-9X on a place which is adjusted for a AGM-65, the missile will be floating below the pylon without contact.

The missile model is centered to the horizontal zero-line of the O2 grid. This goes for all BIS missile models. They are all centered. As the proxy uses this zero line as positional reference, a missile with smaller diameter doesn't fill the gap between model border and the planes pylon.

So using different weapons is generally possible but doesn't look always right.

Avoiding non-fitting weapons issue

The above described issue can be avoided very easy. Instead of having the missiles shape centered to the horizontal zero-line, we move it downwards so it's upper edge is aligned with the zero-line.

So it is off centered downwards so the zero-line doesn't go through the models center but is aligned with the upper edge of it's shape. Usually the ArmA 2 engine tends to autocenter such shapes but we can force it to not autocenter it. For this, in the Geometry LOD of the model you have to define the named property “autocenter” with value 0. This will disable the autocenter function and the model is attached as it is modeled.

Now we remember, the proxy on the plane/chopper represents the models zero-line. As now this zero-line always fits with the upper edge of the model, the diameter has no meaning at this point. The model will always appear attached correctly to the pylon. This is the very first step to have maximum freedom of later weapon load-outs.

The proxy numbering

When applying proxies, they get automatically numbered, starting from 001 ascending. This goes as long you're using the same p3d as model shape but as soon you select another shape, the numbering restarts at 001 for this new shape. BIS models use this method. Sadly this wont allow config defined different load-outs because having more than one proxy with number 001 will give unpredictable results. So while creating and placing proxies, you should stick to one single p3d as shape, regardless what the final load-out will be. It simply doesn't matter at this point.

About the loading/fire order, proxy shapes are applied in ascending orders. So if you apply a 2 round AIM-9X magazine as first, it will be placed on proxies 001 and 002. Firing order is reversed so the proxy 002 will be fired first, followed by 001.

Best practice for proxy numbering is starting at the outermost weapon station and work your way to the center, always changing left and right side so you end up having odd numbers on one side and even numbers on the other. As example, left wingtip has proxy number 001, right wingtip has number 002, outermost pylon on the left has 003 and so on.

Assuming we have 8 weapon stations on the plane, 4 on each wing, you can have 2 AIM-120, 2 AIM-9X and 4 AGM-65 with using this magazine order:

2Rnd_AIM120
2Rnd_AIM9X
4Rnd_AGM65

So this will give you AIM-120 on the wingtips, 2 AIM-9X on the outermost pylons and 4 AGM-65 on the remaining 4 inner pylons. Changing this order will also change the appearance. If you want to have the AIM-9X on the wingtips, you just add them first.

This goes for the magazines defined in the config as well as magazines applied by addMagazine scripting command.

Proxy problem: model are loaded correctly but when firing, they spawn at the center of the plane instead of their original position. Known problem, usually happens when using non-BIS model p3d files as proxy shape. When you're done with placing and adjusting the proxies, you should change the shape of all proxies to \CA\air\AIM9xSidewinder or another BIS missile shape. In Buldozer preview it might look incorrect but finally in game, with the real load-out it will work as expected.

Conclusions so far.

For maximum flexibility, the following rules should be followed:

  • Models should be centered downwards
  • Proxies should be aligned according to the down centered weapon shapes
  • Proxies should be numbered in ascending order without the same number given twice
  • The proxy shape of the final aircraft should be a default BIS weapon shape

Weapons or Magazines?

For the weapons to show up on the plane, weapons (as defined in cfgWeapons) are irrelevant. Only Magazines (as defined in cfgMagazines) defines what finally can be seen on the aircraft. The weapon only defines if you can select and fire one of the visible missiles/bombs. If you keep all magazines but you remove all weapons, the vehicle still shows up fully loaded but you can't fire any of these weapons.

This fact opens new possibilities: having other equipment loaded besides weapon systems. Fuel tanks and FFAR launchers come to mind.

The procedure is the same as for any other weapon system. Create a separate model, make it downward centered, define a ammo class (in cfgAmmo, inherit it from the GBU12 as example) and finally define a magazine in the cfgMagazines class. You don't have to define a weapon for this magazine as it wont be fired anyway.

So taking the above already described plane with 8 weapon pylons as example:

2Rnd_AIM120
2Rnd_AIM9X
2Rnd_AGM65
2Rnd_Fueltank

… A plane with 4 A-A missiles, 2 A-G missiles and 2 Fuel tanks. Same method can be used for FFAR pods and multi racks (which allow attaching more than one ordnance per pylon, but more about that later).

As you see, already at this point you have extreme flexibility for your weapon load-outs with only one single vehicle p3d file. You don't need fancy scripting, hiding selections or work with setObjectTexture, which at the end is still pretty limiting.

Proxy layering.

Until now, our fictive sample plane has 8 weapon stations, so the max missiles/bombs we could apply was limited to 8. Of course there are multi racks which expands the capacity of a pylon to 2, 3 or even 4 weapons. But in the past, it was common to have a separate plane model for such variants. Just look at BIS AV-8 as example.

But as already described above, you can have non weapon equipment as magazines loaded on the plane, this includes multi racks. The procedure is always the same: create a separate p3d file for the multi rack, define a ammo in cfgAmmo and finally a magazine in cfgMagazine.

Now comes the tricky part, creating and placing proxies accordingly. To begin, just select a regular weapon p3d as proxy shape. Adjust it so it fits.

Stage 1

Proxy 1

When done, change the proxy shape to the desired multi rack, in this example we set up a dual rail first.

Stage 2

Proxy 1 Proxy 2 Proxy 3

As you see, proxy 1 now shows the dual rail and 2 new proxies for weapons. Right now, only with this, the magazines would be applied as follows:

1Rnd_Dualrail
2Rnd_AIM9X

This does fill all proxies so far. But maybe you want to have a triple rail as well on this pylon.

Change the shape of your proxy 1 to the triple rail p3d and maybe hide proxies 2 and 3 before proceeding to the next steps.

Proxy 2 Proxy 3
Proxy 5 Proxy 6
Proxy 4
Proxy 1
Stage 3

Now we encounter a little, although not unsolvable, problem. As you remember, weapon shapes of added magazines are applied to the proxies in ascending order and there is no direct way to assign them to a specific proxy. But we also remember that any p3d can act as weapon shape. We already used the same method on fuel tanks, FFAR pods and multi racks. Now we create a new p3d file which only contains a very small (0.001 x 0.001 x 0.001) box, without any textures or colors assigned. So in fact it will be invisible. Also here define ammo and magazines. The magazine load-out sequence for the above pic could look like this:

1Rnd_Triplerail
2Rnd_invisibleMag
3Rnd_AGM65

The first magazine adds the triple rail to proxy 1, the second magazine adds 2 invisible shapes to proxy 3 and 4 and the last magazine finally adds 3 AGM-65 to proxies 4, 5 and 6.

Let me show you a example magazine load-out which uses this method to it's max:

magazines[] =
{
	"500Rnd_20mm_M61A1",
	"GLT_2Rnd_AIM9X",
	"GLT_2Rnd_AIM120",
	"GLT_Triplerail",
	"GLT_Wingtank",
	"GLT_Droptank",
	"GLT_empty_6",
	"GLT_6Rnd_AGM65",
	"360Rnd_CMFlare_Chaff_Magazine"
};

While experimenting with this method, certain numbering order helps to keep things in a more or less logical order. So the proxies of the first layer (above named Stage 1) should be numbered for outside to center, layer 2 (see Stage 2) should be numbered from center to outside and the final layer (stage 3) again from outside to center.

First it loads a pair of AIM-9X on the wingtips. Next a pair of AIM-120 to the outermost pylons. Then it adds a triple rail to the following pylons and finally a pair of drop tanks on the innermost pylons and a single fuel tank on the centerline pylon. This was all on the first layer, now we move to the second layer. There are 6 proxies for the innermost pylon so it also could take a triple rail magazine, but now we don't need them as there are fuel tanks attached to it. So we fill these 6 proxies (3 on each wing) with empty filler magazine as described earlier. The next proxies are those for the pylon where the triple rails are, so we add a 6 round AGM-65 magazine. At the end, there are 4 proxies left as the outermost pylon is prepared to carry a double rail for AIM weapons. But as we don't use them and they are at the very end, we don't need to apply a filler magazine.

So keep in mind, the loading order of the magazines defines the appearance on the vehicle. Magazines for non-proxy weapons (like Machine guns or FFAR pods) can be added at any time, be it as first, last or in between. They wont interfere with proxy weapons.

arma2/modeling/proxy_weapons.txt · Last modified: 2011-07-22 14:05 (external edit)