***Tutorial*** Making Custom Weapons
And... until you've done this a few times... expect some pain and suffering. Just warning you now... eventually this gets easy, but not at first, even with these instructions...
STEPS TO MAKE CUSTOM WEAPONS:
1. Make the gun's turret, and the barrel, in your 3D software. The turret must be one piece, and the barrel another- so group them appropriately at the end of your modeling process.
2. The barrel must be on 0 Y.
3. Make an appropriate skin. Note that you can use one skin for both the barrel and the turret (using UVMapper) and the skin will be usable for both objects. Save the skin as DDS- you cannot use TGA textures on weapon objects.
4. Export the model to Milkshape, and name the turret and the barrel something unique, like "Argh_ballturret_turret" and "Argh_ballturret_barrel". Name the skin something unique, such as "Argh_ballturret_TEX".
5. Export the resulting model as a CMP file.
6. Open up UTF Edit, and use it to open the CMP you've just created. Export the VMESHDATA and VMESHREF as "VMESHDATA" and "VMESHREF", respectively. Put these two files into the same directory as meshconv.exe.
7. Use Meshconv.exe (you must open this via cmd-line, manually) and then run it like this: "meshconv VMESHDATA VMESHREF /g". Tell it that there are 2 parts, and 1 mesh for each part.
8. Now you'll have three new files sitting in the same directory as meshconv.exe: newvdata, meshref01 and meshref02.
9. Open up the working custom weapon file, and import newvdata into the VMESHDATA segment of the file. Rename the "something_something.lod0.vms" to "the name of the CMP you exported.lod0.vms"
10. Import the meshref01 into the first part (usually, this is the turret), and the meshref02 into the second part.
11. Rename the two 3DB files from "whatever they are now" to "the names you assigned the Groups in Milkshape".
12. Last but not least, go into Cmpnd-->Part_BARRELS_lod1-->Object name and change that to the name of the barrel object.
13. Check the CMP file. If nothing shows up, then the vmeshrefs are backwards- import meshref01 into the *second* part (usually the barrel) and meshref02 into the turret...
14. Assuming that things are showing up at this point, then use MS3D to import your texture into the CMP file, using the MAT exporter's option to "update an existing CMP, MAT or 3DB". Hopefully, you gave this Material a unique name in the CMP, as stated in the instructions... if not, you have to start OVER FROM THE BEGINNING. Which sucks.
15. Now you have a working weapon... you'll need to open up weapon_equip.ini and alter a weapon's instructions to fit... for example, with the Liberty Justice, change the following lines:
DA_archetype = equipment\models\weapons\li_heavy_ion_blaster.cmp
material_library = equipment\models\li_equip.mat
to
DA_archetype = equipment\models\weapons\name_of_your_new_weapon.cmp
material_library = equipment\models\weapons\name_of_your_new_weapon.cmp