====== Port ArmA 2 Vehicles to ArmA 3 ====== [[https://www.pmctactical.org/forum/viewforum.php?f=68|ArmA 3 Forum]], [[:arma3|ArmA 3]], [[arma3:config|ArmA 3 Config]], [[arma3:missions|ArmA 3 Missions]], [[arma3:modeling|ArmA 3 3D Modeling]], [[arma3:scripting|ArmA 3 Scripting]], [[arma3:terrain|ArmA 3 Terrain]], [[arma3:texturing|ArmA 3 Texturing]], [[arma3:tools|ArmA 3 Tools]] **HOWTO Port ArmA 2 Vehicles to ArmA 3** by Aplion. What is basically needed: * ArmA 3 Tools installed (Oxygen2 and AddonBuilder, from steam) * Open [[https://community.bistudio.com/wiki/Arma_2_Sample_Models|ArmA 2 samples]] * Original and installed copy of ArmA 2 and (maybe) OA expansion (as well as the rest of expansions in case you want to import any model belongs to them) * An "UnPbo" tool (as Mikero's "ExtractPbo.exe" file for example) * Basic knowledge of Oxygen2 use For this tutorial we'll try to import the HMMWV_M2 (HMMWV50.p3d) so the ArmA 2 samples file will be needed is titled as "A2SM_Data_APL". ====== Step #1 ====== * Create your main working folder of your addon (you can name it as you like). * Into this main working folder, create another one named for this example "HMMWV" (inside this folder you will have your addon main 3D file so you can name it according its name). * Into "HMMWV" folder, create these three folders ... "data" - "penetration" and "weapons". * From ArmA 2 samples folder go to ... A2SM_Data_APL/Wheeled/CA/Wheeled/ ... find the "HMMWV50.p3d" and copy paste it into your "HMMWV" folder (root - not inside any other folder). * Now open the copied "HMMWV50.p3d" into Oxygen2. * From Oxygen2 top menu go to ... Tools --> Mass Texture & Material Renaming (you will see a full list of files and their original location - path - needed for your addon) http://prntscr.com/31a700 * Now you must extract (unpbo) every original ArmA 2 pbo containing these files listed into "Mass Texture & Material Renaming" editor (we need that as the ArmA 2 samples does not contain the texture files). * Assuming that you have all needed original pbos extracted, you must now copy - paste what is listed into "Mass Texture & Material Renaming" to the appropriate folders of your addon (note : data to data, penetration to penetration and weapons to weapons folder - look at the path of each file. Also in place of any file with "TGA" extension you will find and copy - paste the "PAA" ones). * When you'll be ready, you have to replace the paths (one by one) using "Mass Texture & Material Renaming" editor ... to do that ... click (for example) on the first in list ca\data\data\default_flash_2pass.rvmat ... now right below we must put our path which must be YourMainAddonFolderName\HWMMV\data\default_flash_2 pass.rvmat ... then hit "Rename" button and proceed to the next file (you will notice that each new path is now coloured in "black" into your list ... in case it is still coloured in "red" it means that either the path you are stating is wrong or you haven't pasted this file into your folder as described above). * When you'll finished with all paths your list must contains only black lines and you can close the "Mass Texture & Material Renaming" editor. Save your p3d file now. ====== Step #2 ====== * Now the hard part ... open your YourMainAddonFolderName\HWMMV\data folder ... and using a text editor (Notepad++ preferably) you must change the paths in each .RVMAT file but also to find - copy - paste from their original locations all files refered into these .RVMAT files (example : open the "hmmwv_body.rvmat" ... note that first path is ca\wheeled\hmmwv\data\hmmwv_body_nohq.paa ... you must change it as YourMainAddonFolderName\HWMMV\data\hmmwv_body_nohq .paa but first you have to locate the "hmmwv_body_nohq.paa" from the original extracted ArmA 2 pbos and copy - paste it also into your YourMainAddonFolderName\HWMMV\data ... you must do that for each file and path into each one of the .RVMATs - Note that in case any of these paths will be wrong or any file will be missing, you will got errors in game) ... when you will be finished with all .RVMATs from "data" folder you have to do the same with .RVMATs located also into the "penetration" and "weapons" folders of your addon. In general ... all .RVMAT paths must reflect valid paths and files inside your addon. ====== Step #3 ====== * So you have all files and paths sorted in your addon now ... ok lets go back to our "HMMWV50.p3d" now ... Proxies ... that is something we must change now ... and we need to do that in every LOD of our addon. * Starting from LOD 1 ... locate the proxies (they have the word "proxy" at the beggining and a path after that) ... now our goal is to change each proxy path to something similar from ArmA 3 (current proxies are from ArmA 2 default). Double click on first proxy and you will get a pop-up for its path and ID number ... the path should be now something like \CA\temp\proxies\UAZ\cargo01 and as I said we must change it to something similar from ArmA 3 proxies ... well I found that as more appropriate, so change that line to \a3\data_f\proxies\passenger_hunter_front\Cargo01 (now you know also which is the path of ArmA 3 proxies so I believe that it is good to extract them also just to know the paths for any futured addon you wish to make) ... After this line change, just press the "OK" button without any other change ... this proxy is now fine for our purpose. Lets try to the next proxy ... double click on that and you will get again the pop-up ... now the path should be \CA\temp\proxies\hmmwv\cargo01 (note that it is different than previous proxy) ... replace with this path \a3\data_f\proxies\passenger_hunter_back\Cargo01 and do the same also for the third "cargo" proxy. * Next proxy it is something called "damagewheel_3" ... this is a separate p3d file so you have to go to the A2SM_Data_APL/Wheeled/CA/Wheeled/data/damagewheel/ of the ArmA 2 samples folder and find the "damagewheel_3.p3d" ... copy and paste this file into your "YourMainAddonFolderName\HWMMV\" folder. Before anything else you must now open the "damagewheel_3.p3d" in Oxygen2 and change paths and files as described on STEP #1 (and STEP #2 for .RVMATs). When the "damagewheel_3.p3d" will be ready save it and return to "HMMWV50.p3d" ... lets continue with proxies ... * There are four "damagewheel_3" proxies with this line in their paths .. \CA\wheeled\data\damagewheel\damagewheel_3 ... now change each path as follow ... "\YourMainAddonFolderName\HMMWV\damagewheel_3" (note : do the same for each of the four proxies named "damagewheel_3"). * OK so far, so lets continue with next proxy ... double click on proxy named "Driver" ... the path is \CA\temp\proxies\hmmwv\driver ... change it to \a3\data_f\proxies\HEMTT\Driver and hit ok to close it ... next proxy ... double click on that one named "Gunner" ... its path should be \CA\temp\proxies\hmmwv50\gunner ... change it to \a3\data_f\proxies\gunner_standup01\Gunner and again hit ok. * There is a proxy named "flag_alone" ... double click on that proxy and you'll get the path \ca\wheeled\flag_alone ... change it to \a3\data_f\proxies\Flags\flag_alone * Finally there is another proxy we have to change (last one) ... find the "zasleh2" named proxy ... double click and the path should be \CA\weapons\zasleh2_proxy ... change it to \A3\Weapons_F\Data\zasleh2_proxy ====== Step #4 ====== * Now we have changed all proxies but remember only for the LOD 1 (first lod) so lets do that for the rest but faster that time ... * Select all proxies from LOD 1 (use your CONTROL key and select them all) then press CONTROL+C to copy them ... Double click on LOD 2 and select all proxies from this lod ... hit DELETE to erase them and right click in the list ... choose "Delete Empty" ... when LOD 2 is empty from any proxies, press CONTROL+V from your keyboard to paste the proxies from LOD 1 to LOD 2 ... this LOD is now proxies ready also. * Repeat this last procedure for LODs 3 and 4 (not for the rest of the LODs for the moment as we'll handle these differently). * As LODs 1 to 4 are now proxies ready we must change also the paths from "View - Gunner" and "View - Cargo" LODs ... but as most of the times these LODs proxies position are different from the rest, we must do this on one by one basis instead pasting again from LOD 1 ... in order to make the procedure faster we'll follow this ... open "View - Gunner" LOD and find the proxies ... double click on first proxy named "Cargo" ... the path is \CA\temp\proxies\UAZ\cargo01 ... now press the drop down tab which contains this path and you will find all your previous paths from ArmA 3 (these from LOD 1) ... choose the \a3\data_f\proxies\passenger_hunter_front\Cargo01 path from drop down list and click "ok" ... follow the same procedure for all proxies in both "View - Gunner" and "View - Cargo" LODs ... by this way we'll get the appropriate proxies paths and at same time you will retain them in same position as originally was in these LODs. * After proxies work have been completed on "View - Gunner" and "View - Cargo" LODs we must finish the remain LODs, which are the "ShadowVolume" (0 - 1 and View Gunner) LODs and "Fire Geometry" LOD, ... You can copy - paste the proxies from LOD 1 again for replacing these LODs proxies (the procedure described above) but first note that some proxies are not needed for these LODs so you have to delete them after pasting LOD 1 proxies. * Now all proxies must be ok for each LOD of your addon so it is time to save the p3d. ====== Step #5 ====== * Now we need to add PhysX into our p3d model ... but as this tutorial just explains the basic for import ... you have to read [[arma3:config:bis-cars-config-guidelines|ArmA 3 Cars Config Guidelines]]. ====== Step #6 ====== * Assuming you have finished with PhysX LOD and memory points into your p3d file, lets continue with configs needed ... * Basically you need a model.cfg and a config.cpp ... these files must be placed into your YourMainAddonFolderName\HWMMV\ folder (together with your p3d) ... Now ... I believe that instead of point you to the locations of these original files, it will be better to give you my working files for this addon ... by that way it will be easier to understand, plus you will have something working as soon as you replace the paths inside them with your paths. To avoid the wall-of-text effect, the model.cfg and config.cpp were separated into their own pages. [[arma3:port-arma2-vehicles-aplion-model.cfg|Aplion model.cfg file]] [[arma3:port-arma2-vehicles-aplion-config.cfg|Aplion config.cfg file]] ====== Step #7 ====== * Go to your YourMainAddonFolderName\HWMMV\data\ folder and create inside a new one called "Anim" ... * Go to ArmA 2 samples folder under ... A2SM_Data_APL/Wheeled/CA/Wheeled/data/anim/ and locate the following files ... "Stryker_Dead.rtm", "hmmwv_Cargo01.rtm", "KIA_HMMWV_Driver.rtm", "KIA_hmmwv_gunnerOUT.rtm", "HMMWV_Driver.rtm", "hmmwv_M2gunnerOUT.rtm", "KIA_HMMWV_Cargo01.rtm", "hmmwv_Cargo01_V0.rtm" ... copy - paste them into YourMainAddonFolderName\HWMMV\data\Anim\ folder. ====== Step #8 ====== * Use ArmA 3 Tools to binarize your addon and test it through game editor ...