User Tools

Site Tools


arma3:port-arma2

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
arma3:port-arma2 [2017-01-11 10:33]
snakeman lot of porting notes added.
arma3:port-arma2 [2017-12-28 15:46]
snakeman page split up to more readable lenght.
Line 1: Line 1:
 ====== ArmA 2 To ArmA 3 Port ====== ====== ArmA 2 To ArmA 3 Port ======
  
-How to port ArmA 2 addons into ArmA 3, hasty guide but more tutorials are planned!+**How to port ArmA 2 character, vehicle and weapon ​addons into ArmA 3**
  
- +HOWTO Port ArmA 2[[arma3:port-arma-2-character|Character]], [[arma3:port-arma-2-terrain|Terrain]][[arma3:port-arma-2-vehicle-tank|Vehicle - Tank]], [[arma3:port-arma-2-vehicles-general|Vehicles ​General]] and [[arma3:port-arma-2-weapons|Weapons]].
-====== Character ====== +
- +
-Howto port ArmA 2 character into ArmA 3 +
- +
-  - model.cfg from [[arma3:bis-example-character-model|BIS ArmA 3 example ​character ​model]]+
-  - delete old proxies from your modelimport new ones from bis arma3 example character. +
-  ​config.cpp changes to have the uniform as cfgWeapons thingy. +
- +
-You can get arma2 p3d model to work in-game without arma3 crashing with only a model.cfg update, however this is not properly working model since all proxies (like characters weapon) is missing. This is just an small piece of info that if you absolutely must get your character in-game to check the model or textures or whatever, you can do it. +
- +
-For minimum porting effort you must have p3d changed for arma3 proxy names and model.cfg for arma3 OFP2_ManSkeleton stuff, then some small config tweaks obviously. +
- +
-P3D model features. Resolution LODs 1-2 no head modeled, LODs 3 and lower head modeled. +
- +
-A3_character_example.p3d Resolution LODs 1-2 proxy list: +
-<​code>​ +
-proxy:​\a3\characters_f\heads\bysta.001 +
-proxy:​\a3\characters_f\proxies\backpack.001 +
-proxy:​\a3\characters_f\proxies\binoculars.001 +
-proxy:​\a3\characters_f\proxies\equipment.001 +
-proxy:​\a3\characters_f\proxies\flag.001 +
-proxy:​\a3\characters_f\proxies\glasses.001 +
-proxy:​\a3\characters_f\proxies\headgear.001 +
-proxy:​\a3\characters_f\proxies\hmd.001 +
-proxy:​\a3\characters_f\proxies\launcher.001 +
-proxy:​\a3\characters_f\proxies\pistol.001 +
-proxy:​\a3\characters_f\proxies\weapon.001 +
-</​code>​ +
- +
-Res LOD 3, removed this: +
-<​code>​ +
-proxy:​\a3\characters_f\proxies\glasses.001 +
-</​code>​ +
- +
-Res LOD 4, removed these: +
-<​code>​ +
-proxy:​\a3\characters_f\proxies\binoculars.001 +
-proxy:​\a3\characters_f\proxies\glasses.001 +
-proxy:​\a3\characters_f\proxies\hmd.001 +
-</​code>​ +
- +
-View-Pilot, removed these: +
-<​code>​ +
-proxy:​\a3\characters_f\heads\bysta.001 +
-proxy:​\a3\characters_f\proxies\glasses.001 +
-</​code>​ +
- +
-**Characters Config** +
- +
-Class replacements:​ +
-^ ArmA 2 Original ^ ArmA 3 Replacement ^ +
-USMC_Soldier_Base | B_Soldier_base_F | +
-| GUE_Soldier_Base | I_G_Soldier_base_F | +
-| RU_Soldier_Base | O_Soldier_base_F | +
-| Mine | ATMine_Range_Mag | +
-| Pipebomb | SatchelCharge_Remote_Mag | +
- +
-Replace identityTypes with "​LanguageENG_F",​ "​Head_NATO",​ "​NoGlasses"​ or similar (look from arma3 configs some examples). +
- +
-Comment out class Wounds for starters (dunno why?). +
- +
-  * in character config, uniformClass property has to contain the name of the uniform class the character is wearing +
-  * in uniform config, uniformClass property in the ItemInfo subclass has to contain the name of one of the characters who are wearing the uniform +
- +
-Remove "​ItemMap",​ "​ItemCompass",​ "​ItemWatch"​ and "​ItemRadio"​ from weapons/​respawnweapons. These are placed through linkedItems now. +
- +
- +
-====== ​Terrain ​====== +
- +
-Howto port ArmA 2 Terrain WRP into ArmA 3 +
- +
-  - roads from arma2then disable new shapefile roads in config; newRoadsShape = "";​ +
-  - config inherit from stratis and required addons "​A3_Map_Stratis"​ +
- +
-WRP files from arma2 Visitor 3 work just fine in arma3 binarize and in-game, **you don't need to re-compile the terrain.** +
- +
-If you choose to re-compile PEW through Terrain Builder, it basically assumes you have layers.cfg, the ground close textures and satellite images still available. +
- +
-Remember that this is totally //​optional//​ task, you do not need to re-compile PEW through terrain builder. +
- +
-Terrain Builder: +
-  ​file -> import ​-> maps, choose visitor3 pew project file +
-  ​set northing 200000 and easting 0 +
-  - set layers.cfg +
-  - file -> import -> satellite mask +
-  - file -> import -> satellite texture +
-  - check that terrain and satellites have correct sizes +
-  - rebuild terrain +
-  - generate layers +
-  - file -> export -> wrp +
-  - convert png to paa +
-All done +
- +
-**Terrain Config** +
- +
-New values in CfgSurfaces:​ +
-<code cpp> +
-class CfgSurfaces +
-+
- class Default{};​ +
- class Water{}; +
- class GdtStratisConcrete:​ Default +
-+
- access = 2; +
- files = "​gdt_strconcrete_*";​ +
- character = "​Empty";​ +
- soundEnviron = "​concrete";​ +
- soundHit = "​concrete";​ +
- rough = 0.05; +
- maxSpeedCoef = 1; +
- dust = 0.15; +
- lucidity = 0.3; +
- grassCover = 0.0; +
- impact = "​hitConcrete";​ +
- maxClutterColoringCoef = 1.35; +
- }; +
-</​code>​ +
- +
-**Terrain Objects** +
- +
-Objects in general do not cause errors if they are not used, well doh quite obvious but still. If you just binarize objects you get no errors in binarize or in-game. +
- +
-**Terrain Objects Config** +
- +
-VTE_objects_cfg worked off the box without errors, no changes had to be made. Seems like the base classes are same as in arma2. +
- +
- +
-====== ​Vehicle - Tank ====== +
- +
-Howto port ArmA 2 Vehicle into ArmA 3 +
- +
-Animations are necessary to get in/out of the vehicle. +
- +
-Unpack tracked.pbo from your ArmA 2 and copy the following files from the data\anim\ directory:​ +
-<​code>​ +
-KIA_Abrams_Driver.rtm +
-KIA_Abrams_Gunner.rtm +
-KIA_Abrams_Commander.rtm +
-KIA_Abrams_CommanderOut.rtm +
-KIA_Abrams_DriverOut.rtm +
-KIA_Abrams_GunnerOut.rtm +
-Abrams_Commander.rtm +
-Abrams_CommanderOut.rtm +
-Abrams_Gunner.rtm +
-Abrams_GunnerOut.rtm +
-Abrams_DriverOut.rtm +
-Abrams_Driver.rtm +
-</​code>​ +
- +
-Config.cpp:​ +
-<code cpp> +
-class KIA_Abrams_Commander : DefaultDie +
-+
- actions = "​DeadActions";​ +
- file = "​\ADDON\anims\KIA_Abrams_Commander.rtm";​ +
- terminal = 1; +
- soundEnabled = 0; +
- connectTo[= {"​DeadState",​ 0.1}; +
- speed = 0.5; +
- looped = 0; +
-}; +
- +
-class Abrams_Commander : Crew +
-+
- file = "​\ADDON\anims\Abrams_Commander.rtm";​ +
- interpolateTo[= {"​KIA_Abrams_Commander"​1}; +
-}; +
- +
-class Abrams_CommanderOut : Abrams_Commander +
-+
- file = "​\ADDON\anims\Abrams_CommanderOut.rtm";​ +
- interpolateTo[] = {"​KIA_Abrams_Commander",​ 1}; +
-}; +
- +
-class KIA_Abrams_Driver : DefaultDie +
-+
- actions = "​DeadActions";​ +
- file = "​\ADDON\anims\KIA_Abrams_Driver.rtm";​ +
- speed = 0.5; +
- looped = 0; +
- terminal = 1; +
- soundEnabled = 0; +
- connectTo[] = {"​DeadState",​ 0.1}; +
-}; +
- +
-class Abrams_Driver ​Crew +
-+
- file = "​\ADDON\anims\Abrams_Driver.rtm";​ +
- interpolateTo[] = {"​KIA_Abrams_Driver",​ 1}; +
-}; +
- +
-class Abrams_DriverOut : Abrams_Driver +
-+
- file = "​\ADDON\anims\Abrams_DriverOut.rtm";​ +
- interpolateTo[] = {"​KIA_Abrams_Driver",​ 1}; +
-}; +
- +
-class KIA_Abrams_Gunner : DefaultDie +
-+
- actions = "​DeadActions";​ +
- file = "​\ADDON2\anims\KIA_Abrams_Commander.rtm";​ +
- speed = 0.5; +
- looped = 0; +
- terminal = 1; +
- soundEnabled = 0; +
- connectTo[] = {"​DeadState",​ 0.1}; +
-}; +
- +
-class Abrams_Gunner : Crew +
-+
- file = "​\ADDON2\anims\Abrams_Commander.rtm";​ +
- interpolateTo[] = {"​KIA_Abrams_Gunner",​ 1}; +
-}; +
-</​code>​ +
- +
-Replace each driverOpticsModel = "​\ca\Tracked\optika_tank_driver";​ with the following:​ +
-driverOpticsModel = "​\a3\armor_f\driverOptics";​ +
- +
-Replace each gunnerOpticsModel = "​\ca\Tracked\optika_tank_gunner";​ with the following:​ +
-gunnerOpticsModel = "​\a3\armor_f\2D_scope_strider_commander";​ +
- +
-Replace each gunnerOpticsModel = "​\ca\Tracked\optika_tank_driver";​ with the following:​ +
-gunnerOpticsModel = "​\a3\armor_f\2D_scope_crows";​ +
- +
-Replace each gunnerOutOpticsModel = "​\ca\Weapons\optika_empty";​ with the following:​ +
-gunnerOutOpticsModel = "​\A3\weapons_f\reticle\optics_empty";​ +
- +
-Replace each cursor = "​\ca\Weapons\Data\w_weapon_mg";​ with the following:​ +
-cursor = "​mg";​ +
- +
-Replace each cursorAim = "​\ca\Weapons\Data\w_weapon_mg";​ with the folloowing:​ +
-cursorAim = "​mg";​ +
- +
- +
-====== Vehicles ​General ====== +
- +
-Model changes you most likely have to do are proxys. Many proxy:​\ca\... paths in your models wheter these are driver/​cargo/​pilot/​gunner or weapon proxies. It is the same easy search for "​ca\"​ strings in P3D model paths. +
- +
-Its somewhat difficult to give a guide which arma2 proxy to replace with what arma3 proxy, but here is quick glance of what I did with VTE. +
- +
-Proxy replacements:​ +
-^ ArmA Original ^ VTE / ArmA 3 Replacement ^ +
-\ca\a10\agm65.p3d | \pmc\vte_ordnance\VTE_mk82.p3d | +
-| \ca\air\agm114hellfire.p3d | \pmc\vte_ordnance\VTE_mk82.p3d | +
-| \ca\air\aim9xsidewinder.p3d | \pmc\vte_ordnance\VTE_AIM9_mesh.p3d | +
-| \ca\air\gbu12.p3d | \pmc\vte_ordnance\VTE_mk82.p3d | +
-| \ca\air\mk82_rack.p3d | \pmc\vte_ordnance\VTE_mk82.p3d | +
-| \ca\air_e\aim9xsidewinder.p3d | \pmc\vte_ordnance\VTE_AIM9_mesh.p3d | +
-| \ca\temp\proxies\a10\pilot.001 | \a3\data_f\proxies\pilot_plane_fighter_03\pilot.001 | +
-| \ca\weapons\zasleh_pistol_proxy.001 | \pmc\vte_weapons\zasleh_pistol_proxy.001 | +
-| \ca\weapons\zasleh1_pilot_proxy.p3d | \pmc\vte_weapons\zasleh1_pilot_proxy.p3d | +
-| \ca\weapons\zasleh1_proxy.001 | \pmc\vte_weapons\zasleh1_proxy.001 | +
-| \ca\weapons\zasleh2_pilot_proxy.001 | \pmc\vte_weapons\zasleh2_pilot_proxy.001 | +
-| \ca\weapons\zasleh2_proxy.001 | \pmc\vte_weapons\zasleh2_proxy.001 | +
-| \ca\weapons\zasleh2_proxy.p3d | \pmc\vte_weapons\zasleh2_proxy.p3d | +
-| \ca\wheeled\flag_alone.p3d | \A3\data_f\proxies\Flags\flag_alone.p3d | +
- +
-Like I said, its difficult to give detailed guide which proxies replace what because there is so many different addons and variations of proxies used, hopefully the above gives some idea though. +
- +
-You can find all arma3 proxies from a3\data_f\proxies\ directory. +
- +
-**Vehicles ​Config** +
- +
-Lot of ca\ path changes need to be made as it was common that arma2 addons referenced sounds from ca\ files. +
- +
-Tank Sound Replacements:​ +
-<​code>​ +
-soundServo[= {"​A3\Sounds_F\vehicles\armor\noises\servo_armor_comm",​ 1, 1, 30}; +
-soundGetIn[= {"​A3\Sounds_F_EPB\Tracked\noises\get_in_out",​ 0.56234133, 1}; +
-soundGetOut[] = {"​A3\Sounds_F_EPB\Tracked\noises\get_in_out",​ 0.56234133, 1, 20}; +
-</​code>​ +
- +
-Tank Optics Replacements: +
-<​code>​ +
-gunnerOpticsModel = "​\A3\weapons_f\reticle\Optics_Gunner_02_F";​ +
-or commander with \A3\weapons_f\reticle\Optics_Commander_02_F +
-gunnerOutOpticsModel = "";​ +
-</​code>​ +
- +
-Artillery Optics Replacements:​ +
-<​code>​ +
-gunnerOpticsModel = "​\A3\Weapons_F\acc\reticle_Mortar_01_F.p3d";​ +
-</​code>​ +
- +
-General path changes: *.?​pp,​*.rvmat,​*.bisurf,​*.p3d search for ca\ +
- +
-Model in this example is the Arma 3 Samples\Addons\Test_Heli_01\Test_Heli_01.p3d\\ +
-proxy: +
-<​code>​ +
-\a3\Data_f\proxies\Heli_Light_02\Pilot +
-\a3\Data_f\proxies\Heli_Light_02\gunner +
-\a3\Data_f\proxies\Heli_Light_02\Cargo +
-</​code>​ +
- +
-You need to comment out or replace these from arma2: +
-<​code>​ +
-driverAction = "​AH1Z_Pilot";​ +
-driverInAction = "​AH1Z_Pilot";​ +
-</​code>​ +
-They do not work, you cannot get in to your vehicle if you have incorrect driverAction etc configs.\\ +
-Tank actions: +
-<​code>​ +
-driverAction = "​driver_apctracked3_out";​ +
-driverInAction = "​driver_apctracked3_in";​ +
-gunnerAction = "​commander_mbt3_out";​ +
-gunnerAction = "​gunner_mbt3_out";​ +
-gunnerInAction = "​commander_mbt3_in";​ +
-gunnerInAction = "​gunner_mbt3_in";​ +
-</​code>​ +
- +
-Truck actions: +
-<​code>​ +
-driverAction = "​driver_Truck_02";​ +
-getInAction = "​GetInMRAP_01";​ +
-getOutAction = "​GetOutLow";​ +
-</​code>​ +
- +
-Static actions: +
-<​code>​ +
-gunnerAction = "​gunner_static_low01";​ +
-gunnerAction = "​gunner_standup01";​ +
-gunnerAction = "​Disabled";​ +
-gunnerAction = "​gunner_staticlauncher";​ +
-gunnerAction = "​Mortar_Gunner";​ +
-</​code>​ +
- +
-It is very important to get your base inheritance class correct if you have many vehicles which inherits. Don't try to fix one vehicle at the time, TEST with one vehicle but fix your BASE inheritance class first. +
- +
- +
-====== 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. +
- +
-**Weapons Config** +
- +
-Simple way to port your weapon config is by start using bis pistol and rifle base classes to inherit from: +
-<code cpp> +
-class Pistol_Base_F;​ +
-class Rifle_Base_F;​ +
- +
-class MyPistol: Pistol_Base_F +
-+
-... +
- +
-class MyRifle: Rifle_Base_F +
-+
-... +
-</​code>​ +
-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 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:​ +
-<code cpp> +
-class Single : Mode_SemiAuto +
-+
- sounds[= { StandardSound }; +
- class StandardSound +
-+
- begin1[= {"​\path\sound.wss",​ 1, 1, 500}; +
- soundBegin[] = { "​begin1",​ 1 }; +
- }; +
-</​code>​ +
- +
-**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: +
-<code cpp> +
-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; +
-}; +
-</​code>​ +
- +
-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: +
-<code cpp> +
-class muzzleflash_hide +
-+
- type = "​hide";​ +
- source = "​hasSuppressor";​ +
- selection = "​zasleh";​ +
- minValue = 0; +
- maxvalue = 0.25; +
- hideValue = 0.01; +
-}; +
-</​code>​ +
- +
-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-arma2.txt · Last modified: 2017-12-28 15:46 by snakeman