User Tools

Site Tools


arma3:port-arma-2-weapons

ArmA 2 To ArmA 3 Port - Weapons

ArmA 3 Forum, ArmA 3, ArmA 3 Config, ArmA 3 Missions, ArmA 3 3D Modeling, ArmA 3 Scripting, ArmA 3 Terrain, ArmA 3 Texturing, ArmA 3 Tools

Infantry Weapons

Basically the model P3D works as is for start, of course all the new arma3 features like removable scopes etc needs some model work. But you can just binarize old p3d weapons addon and fix some config side to get your weapons in-game.

You need to replace muzzle flash proxys of course.

Config

Simple way to port your weapon config is by start using bis pistol and rifle base classes to inherit from:

class Pistol_Base_F;
class Rifle_Base_F;
 
class MyPistol: Pistol_Base_F
{
...
 
class MyRifle: Rifle_Base_F
{
...

Remember to add “A3_Weapons_F” into requiredAddons.

Launchers at least in VTE had something in their configs that they did not work by simple base class inheriting. I had to copy paste everything from “class Launcher: LauncherCore” and “class Launcher_Base_F: Launcher”.

Make sure your CfgMagazines do not include modelSpecial entrys because that will crash arma3.

String search configs for “ca\” and replace all models and textures which reference to arma2 ca\ namespace.

Needs replacing:

ArmA 2 Original ArmA 3 Replacement
CfgVehicles/Bag_Base_EP1 B_AssaultPack_Base
cursoraim = “Vehicle_Grenade_W”; EmptyCursor
ca\weapons\data\bullettracer\tracer_red.p3d \A3\Weapons_f\Data\bullettracer\tracer_red
ca\weapons\data\bullettracer\tracer_green.p3d \A3\Weapons_f\Data\bullettracer\tracer_green
CfgWeapons/VTE_m16a1/Single.textureType add textureType = “semi”;
CfgWeapons/VTE_m16a1/FullAuto.textureType add textureType = “fullAuto”;
CfgMagazines.HandGrenade_West HandGrenade
ca\weapons\ammoboxes\usbasicammo.p3d model = “\A3\Structures_F_EPB\Items\Military\Ammobox_rounds_F.p3d”;
glcuror mg

Weapon fire modes need class StandardSound:

class Single : Mode_SemiAuto
{
	sounds[] = { StandardSound };
	class StandardSound
	{
		begin1[] = {"\path\sound.wss", 1, 1, 500};
		soundBegin[] = { "begin1", 1 };
	};

Proxies

Load the weapon into Oxygen2 or whatever modelling tool you use. Remove all attachments to the weapon that are either scopes, lasers, flashlights, or silencers. Front grips and grenade launchers are not included in the customization features of Arma 3 and can therefore be kept.

Remove all proxies from the weapon. Then, create a new proxy for

  • The muzzle flash (as an example, \a3\data_f\proxies\muzzle_flash\muzzle_flash_rifle_mk20 is the muzzle flash used by the MX). Make sure this is part of the “zasleh” named selection.
  • The muzzle attachment. Proxy should point to \a3\data_f\proxies\weapon_slots\muzzle.001 and be placed roughly at the ring where the sliencer would screw onto the normal muzzle.
  • The side rail attachment. Proxy should point to \a3\data_f\proxies\weapon_slots\side.001. This is somewhat tricky to place, it should be above the right side rail and out a bit to the right. NOTE: If you are putting the side attachment on the right side, you have to rotate the proxy upside down.
  • The top rail attachment. Proxy should point to \a3\data_f\proxies\weapon_slots\top.001. This is placed directly in the center of the top rail, somewhere towards the back of the rail.

Flip-up Iron Sights

Add the vertices of the sights parts that should flip up/down to named selections. In my case I used “front sight” and “back sight”. Define rotation axis for them in the memory lod. Although not mandatory, I modelled the sights flat (i.e. flipped down) and rotate them around 270 degrees into an upward position when no optics is mounted. In your model.cfg, define rotation animations for the sights based on the hasOptics source, for example:

class backsight_flip
{
	type = "rotationZ";
	source = "hasOptics";
	memory = 1;
	selection = "back sight";
	animPeriod = 0;
	axis = "backsight axis";
	minValue = 0;
	maxValue = 0.3;
	minPhase = 0;
	maxPhase = 0.3;
	angle0 = 4.712389;
	angle1 = 0;
};

Do something similar for the front sight.

Muzzle Flash

In order to hide the muzzle flash when the a suppressor is mounted, define a “hide” animation for the muzzle flash:

class muzzleflash_hide
{
	type = "hide";
	source = "hasSuppressor";
	selection = "zasleh";
	minValue = 0;
	maxvalue = 0.25;
	hideValue = 0.01;
};

I am not entirely sure this is needed, but I had the proxy triangle show up occasionally if I didn't do this.

Inventory Icons

The inventory icon for the weapon is actually eight icons. The following naming scheme is assumed (actually only the last _xx_ca.paa is implied):

  • gear_<wpnName>_x_ca.paa
  • gear_<wpnName>_m_ca.paa
  • gear_<wpnName>_ms_ca.paa
  • gear_<wpnName>_mst_ca.paa
  • gear_<wpnName>_mt_ca.paa
  • gear_<wpnName>_s_ca.paa
  • gear_<wpnName>_st_ca.paa
  • gear_<wpnName>_t_ca.paa

Replace <wpnName> with a generic name (example: acr_wdl). The meaning of the names are: x - no attachment m - muzzle (silencer) attachment s - side rail attachment t - top rail attachment.

So, if you attach a silencer and scope to a weapon, the inventory screen will show gear_acr_wdl_mt_ca.paa as the icon. The default weapon icons show a stylized scope, laser or silencer on the weapon. Since in theory any attachment can be mounted, it's a good idea to stay with the scheme.

arma3/port-arma-2-weapons.txt · Last modified: 2024/08/03 12:18 by snakeman

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

All PMC web site download services are temporarily suspended until web site yearly fees have been recovered, want to download addons/mods? Then Support PMC.

If you are grateful for all the work PMC has done in the past 25 years, use Support PMC page.