Re: Morphing Weapons [message #58479 is a reply to message #58478] |
Mon, 12 July 2010 21:11 |
|
JohnDoe
Messages: 3007 Registered: October 2007
|
Retired
|
|
|
Okay, I've edited this post quite a few times now. Needs to be reorganized.
My base is the OBJECT_HERO_HORNS. I have added all the CTCs and CDefs that you would find in any weapon or clothing entry. I'm using the animated longsword meshes posted above for AppearanceModifier morphing, as well as the iron longsword as the "folded" static mesh in the OBJECT entry.
I have had everything set to act as a weapon, and it functioned exactly as a weapon despite all the clothing entries. Interestingly enough, it would also be automatically worn. So I has two OBJECT_HERO_HORNS going on, one as a weapon, the other as clothing, both at the same time. Unfortunately, morphing only worked on the clothing one. You think having no effect is bad? I had two no effects of different kinds at the same time.
I have had everything set to act as clothing, even going so far as to actually turn it into clothing that won't automatically be worn and so must be spawned***, they were gloves. As clothing, they morphed as expected. But it wasn't a weapon.
Switched everything back to act as a weapon except for InventoryCategory and InventoryType in the CInventoryItemDef, which remained as clothing. The item acted as clothing, morphing worked.
Switched everything once more back to act as clothing, switched InventoryCategory and InventoryType in the CInventoryItemDef to act as a weapon. Again, the item acted as a weapon, morphing did not work.
Having InventoryType and InventoryCategory not match resulted in a crash in both Clothing/Weapon and Weapon/Clothing combinations.
After countless experiments, I have played around with everything you have in the first post in every imaginable combination except the CHeroMorphDef. Which is a bad thing because the only thing the CHeroMorphDef can morph without a CAppearanceModifierDef is the Hero. What will happen is that we'll only be able to successfully implement texture morphing on the swords that act as clothing and not the swords that act as swords.
*** Unrelated notes.Something is telling the game to force the Hero to wear OBJECT_HERO_HORNS and to treat it as clothing despite it being a weapon. Wanted to see if there's anything that can be done to make the game treat the horns as a weapon despite the CInventoryItemDef saying that it's clothing. I've looked into this and nothing in any of the binaries makes any reference to the horns by ID number or entry name, so I'm guessing it's hardcoded magic. Interestingly, changing the CAppearanceModifierDef of the horns to make them more like regular clothing, specifically AppearanceType, will stop them from being worn automatically. Changing all of the values of any other clothing to mirror that of the horns, even naming the OBJECT entry to OBJECT_HERO_HORNS, does not make that item automatically worn. Whatever is making that happen is using the ID number.
Last edit, and then I quit. Tried the CHeroMorphDef. Started out with nicomon's idea and then just tried to get anything going with the CHeroMorphDef, got nothing for weapons. Exhausted this one. Tried it with and without the CAppearanceModifierDef, with static and animated meshes, same as before. Works only on clothing.
Must have edited this post over a dozen times. Time for some much earned sleep.
[Updated on: Tue, 13 July 2010 03:03] Report message to a moderator
|
|
|