Author: T.C. Original Thread: Getting your custom weapons in game Getting Your Custom Weapons In-GameHey all, Now that equipment files are accessible I've decided to write a tutorial on getting custom weapons in-game. Please note, this is not a modelling tutorial - you will need to have a basic grasp of modelling and pack file editing to get your models in game. Part one - Getting the necessary programs, files and plugins. For this tutorial you will need the following - A licensed version of Ultimate Unwrap 3d (See notes at bottom for more info + alternative); Suitable modeling software; The latest plugin for ETW file types, provided on this thread and a plugin that corresponds to your modeling application - all available plugins are here, but that list is not always up to date. Make sure all plugins are installed correctly before beginning this tutorial. The files you need to edit are in Models.pack -> Unitmodels -> euro_equipment.variant_weighted_mesh. Extract this file to your working directory. Part two - making the files editable. Open euro_equipment.variant_weighted_mesh in Ultimate Unwrap 3d. For information on what the various options do, refer to the readme.txt in the plugin .rar. Save the file as the type corresponding to your modeling program (in this case Milkshape 3d) Open the file in your modeling application. Make your edits, but pay close attention to "part 3" of this tutorial. Saving. Part three - important notes on how the models work. When editing the equipment file, you will notice every piece of equipment is in it's own group. This is because each group is exported separately when used in game - for this reason the following rules apply: 1. All vertices must be assigned to no more than 1 bone. 2. Each group must not share any vertices with any other group. 3. All weapons must be part of one group, and one group alone. You will also notice all groups start with the prefix rigid_equip_. This prefix is important and must be present in every group name. All groups also end with a two-digit number - this number identifies (I think) which weapon variant it is. You will see that some weapons, such as muskets, have four or five variants. Theoretically, up to 99 variants could be used but this figure is probably capped at around five or six, similar to how unit body part variations are capped. This variance has plenty of potential - using it you could possibly create a unit with most men having completely different weapon types. (Note that units can only have one animation type, so the weapons would have to be somewhat similar.) Part Four- Bone assignments and placements. Most weapons are assigned to the bone "Weapon1" or the bone "Weapon2" - this most likely bears relation to the primary weapon and secondary weapon slots. "Weapon3" is used to store equipment items and shields. (N.B. Judging from this, it is possible that the fourth column in warscape_equipment_themes is not just limited to shields and could be used to store another type of equipment.) You can also see that most of the equipment is placed in the traditional place it would occupy on the body - weapons and shields under the feet, ammo pouches, backpacks, drums, etc on their respective body areas (this can be proved by merging the equipment file with a unit model, as shown below). Proof To this end, weapon placements are not limited to "WeaponX" bones - you will see in the screenshot that I have made a short-sword and attached it to the "RightHand" bone (they seem reversed, actual right hand is "LeftHand" bone). I had to do this because attaching it to "Weapon1" caused graphical errors - I most likely hadn't placed it correctly. If you are attaching weapons to hand bones, make sure you place the relevant part of the weapon in the hand - the hilt of my sword wasn't necessarily glued to the hand, I had to merge the model with a unit (as shown in the picture) and manually place the sword hilt in the hand position. I had better luck when making shields - I made some obvious edits to a shield (pulled some verts out of place) and copied it. When I placed it in "Weapon3" it worked fine. Part Five - getting your model back into the game. Make sure all parts of your new weapon are assigned to one only one group and one bone. Save in your modelling program's native format. Open the in UU3d and save as type "Empire:Total War(*.variant_weighted_mesh)". When you are prompted, make sure to save as "Variant Type 5 (equipment)" or else the model will not work in game. Saving again Next you need to edit the .pack files. You will need to add the tables "warscape_equipment_themes" and "warscape_equipment_items" to your pack. In "warscape_equipment_items", make a new entry. Place the name of your model group in the column on the left, but exclude the prefix and the two-digit number representing the variance. In the column on the right, place any name you like - this name will be used to identify the weapon model in the db from now on. In warscape_equipment_themes you can make a new entry or edit an existing one - all you have to do is place the name of your model (from the right hand column in the previous table) into whichever slot you like, depending on how you want it to be used. NOTE: A lot of vanilla equipment uses the same name for db referencing and for the group name - my sword did not initially work, until I named it this way. This may be because for the two names to differ (and work) the entry in the right hand column needs to be part of a larger group. So my tip: Left hand column name = Right hand column name. You can now assign your weapon to any unit you like Shown below is a picture of my short sword in-game as well as the shield I edited. Pictures Further notes and resources. Remember that this tutorial extends to more than just weapons - all equipment used in-game is handled by this file, so the possibilities are endless. As many of you will not be willing to pay for this software, I have provided below a version of the equipment file converter to .ms3d, the Milkshape file format. You can now view the file and edit it if you like. I can convert it back to the game format on request, but I will not start running conversions just for people to see a sword extending by four inches. Nor will I deal with any problems you have if your conversion doesn't work. Hope this helps get some great mods on the road, T.C. Attached Files euro_equipment.7z (421.2 KB, 22 views)
На Запад масивно сиви облаци Од Исток сонце и вистина излези Macedonia
Forum Rules