Miscellaneous Forums > Troubleshooting

FF7 weapon bone miscalculated after adding new animation

(1/1)

Quid?:
Hello,

I am a bit desesperate so I hope there is still someone who can help.
Simply, I add new animations to a da with hex editing, and after a few miss and try things are getting better.

Except with the weapon of the model, aqaa if it's relevant, in game the said weapon, the bludgeon\club is flying\disapearing\jumping around as soon as any new animation has been added to the DA file.
Screens if it help:






I can't find any reason within the DA for this behavior of the weapon, yet if it's the vanilla file without new animation it's all good, I add a new animation, it's not. Oh and in kimera every frame look fine. I didn't use "compute weapon" either, I tried on a backup to see if it solved the issue, but it didn't.
I also update the AA\skeleton with the appropriate numbers of both body and weapons animations. Any idea?

Edit, sorry, just when I finally decide to ask, I find a thread with the path to my answer:


--- Quote from: quantumpencil on 2019-06-05 05:32:43 ---1: Yes, that's because weapons actually have their own animations, for player model characters they are offset by 0x34 within the **da files (and this is, unfortunately, how the battle engines finds them). If you want the weapon to animate, then you will need to repack a corresponding weapon animation at index 0x6 + 0x34.

--- End quote ---

Thanks to quantumpencil. The search function never found this thread for me, oh well.

Edit2, sorry again, I just don't understand what the logic\pattern is and where I am supposed to place the weapon animations after all. If in fully working aqda vanilla the first body animation start à offset 04(hex), and it's corresponding weapon animation start at offset 1410, I don't see what Quantumpencil meant at all... All I get is that there must be a very strict positionning in the hexa, but what is it's logic\calculation?
 

Quid?:
Well it has been almost three months and I setted the problem aside after many complex failures at solving it, and then, coming back to it I finally figured it out!

All along it was right there, the only and yet perhaps "dumb" thing I didn't think of.
Ok, In aqaa there is 16 vanilla animations + 16 weapon animations.
On those, only 10 are used in the vanilla game, and the six remaining are "dummy" unused animations.

I knew this, but I didn't want to touch or delete the unused anims and in all my attempts I was increasing to that number of total animations for the model, which was exactly the source of the problem.

When quantumpencil wrote this:

--- Quote ---1: Yes, that's because weapons actually have their own animations, for player model characters they are offset by 0x34 within the **da files (and this is, unfortunately, how the battle engines finds them). If you want the weapon to animate, then you will need to repack a corresponding weapon animation at index 0x6 + 0x34.
--- End quote ---

He meant that somehow the battle engine search by a set number of body animations for the corresponding weapon animation when a weapon bone is involved. If it isn't clear, player model characters have 34(hex) body animations, and unless you know bettter than me you don't want to change that number. In the shinra soldier case, he has 10(hex) body anim, and it's the same thing, decrease or increasing that number just throw off every calculations made by the battle engine, whatever they might exactly be. You have to make due with the unused animations which are already there, to summarize.

So by replacing the unused animations, the weapon animations aren't throw off and everything is solved as far as I can tell after a few tests, finally.
I can live with this, especially since it is not relevant to models without weapon bone and that the few which have one also have a few unused anims to work with if I feel like it.

Boy it seem so stupid now, especially after all the more complicated attempts that I tried to understand the problem.

Well, maybe someday it will help some other traveler on this road.

Navigation

[0] Message Index

Go to full version