*I am using DEI 1.2.4 + XIIICaesar's legions as a base to do the modification, mostly because it has the rigid model for roman scabbard sheathed/empty*
*this is not a mod to be used, but a working way to share with the modders, as achieving this will require modification on the units variantmeshdefinition, and the animation fragments*
Here are two screenshots first[IMG]<a href="https://ibb.co/dgqW09Z"><img src="https://i.ibb.co/PQnmZpk/Total-War-Rome-II-Screenshot-2019-06-21-21-00-49-58.png" alt="Total-War-Rome-II-Screenshot-2019-06-21-21-00-49-58" border="0"></a>[/IMG]
[IMG]<a href="https://ibb.co/dgqW09Z"><img src="https://i.ibb.co/PQnmZpk/Total-War-Rome-II-Screenshot-2019-06-21-21-00-49-58.png" alt="Total-War-Rome-II-Screenshot-2019-06-21-21-00-49-58" border="0"></a> <a href="https://ibb.co/T2D921b"><img src="https://i.ibb.co/4twht2Y/Total-War-Rome-II-Screenshot-2019-06-21-21-00-54-04.png" alt="Total-War-Rome-II-Screenshot-2019-06-21-21-00-54-04" border="0"></a>[/IMG]
Explain:
I realized that when the roman units holds their pilum, the sword is in a position where there is no scabbard, as many have complained. Thanks to DEI team there are two rigid model of roman scabbards in the mod, one with a sword sheathed, one being empty. After numourous trial-and-error I found out that if the I set the scabbard model to have a same SLOT name as the weapon, when the weapon bone is set to off in the animation fragments, the rigid model will also disappear.
Here is a brief procedure using legio X
1. in land_unit_table, find the table with the row of the unit you want to have this feature. locate the animation column, and find the animation set in the animation_tables.
2. in the animation_table, for DEI 1.2.4 there is a fragment called rome_man_javelin_legionary_fragment.txt, basically contains everthing animation scene related to throwing pilum.
3. open that .txt, find and replace every [weapon_bone_1=on, weapon_bone_2=on] to [weapon_bone_1=on, weapon_bone_2=off], don't include the brackets. this will make sure the gladius won't get hanged on their butts,
4. open the folder variantmeshs, in PFM/RPFM whatever, direct to _variantmodels/man/armour/, create a new variantmeshdefinition called scabbard.variantmeshdefinition, name doesn't matter. inside, put these lines:
<VARIANT_MESH>
<SLOT name="weapon_1" attach_point="bn_hips" >
<VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/roman_gladius_empty_scabbard_sheathed_polybian.rigid_model_v2" />
</SLOT>
<SLOT name="weapon_2" attach_point="bn_hips" >
<VARIANT_MESH model="VariantMeshes/_VariantModels/man/armour/roman_gladius_empty_scabbard_polybian.rigid_model_v2" />
</SLOT>
</VARIANT_MESH>
5, then include this scabbard.variantmeshdefinition into your unit's variantmeshdefinition file.
I have been trying to achieve this for soooo long and finally it worked, can't help to share it! Let me know if any explaination is needed.