do you know, what mean these values (bold):
I'm not sure. I vaguely remember that one of them might be the position where the character is moved to, after it finishes the animation.
For example, if the animation does a step forward, you want the character to end it a bit in front to where it was before.
Another one, maybe, was things like the position where the projectile (and/or the smoke) is spawned (with respect to the weapon).
Another one might be the recover time (how long before the next animation can start?)
Does anybody know better?
Am I right that it is impossible to move rifle relatively to item-bone with module system?
I think you are, or, at least, I'm not aware of any mean to control that directly.
There are the workarounds we are discussing, naturally.
Let's enumerate all the possibilities we discussed so far, plus a few new ones:
1* Switch to a different item by scripting (a, as it could be called, "parade rifle" positioned differently),
2* Giving the rifle a "sheathed" version, for when it is carried in left hand,
(which would use a new custom "carry-position", which would be based on the left-hand-item bone)
3* Using a different "frame" of a vertex animation for the carried-over-shoulder situation
And the new ones (discussed below):
4* A custom shader to move the rifle in the correct position, when carried?
5* Carry the rifle as an equipped shield?
Each of the 5 has its own difficulties to be overcome before they can actually work.
The good thing is that, its five separate battles, it just take to win one!
Some considerations for each case:
1) When I last did my modding-scripting things, it would have been a problem for a script to identify to exact moment when the rifle is equipped/unequipped.
But it is true that some short delay could be tolerated. This is because the "parade rifle" (the version which is designed to be carried over shoulder) would differ from the "action rifle" (the version which shoots), only for the positioning, so holding the wrong one for a short while is no big deal, only a minor graphical glitch.
Also, not sure how seamlessly a script can switch items, especially equipped items, without disrupting animations (and ammo count etc).
Also, the wrong positioning is probably only only one problem.
For example, how to customize animations so that the parade rifle goes over the shoulder, unless ?
2) it's might be difficult (or impossible) to customize carry positions. Plus the problems you mention, which maybe could be overcame, at least for AI,
e.g. by providing AI troops with the right equipment so they never resort to direct fist-fighting; or something else to prevent that.
3) I remember trying hard to control which frame of a per-vertex animation is used, in various different occasions, and always failing.
Maybe things are changed now.
4) Here's the idea: a custom shader could easily shift the rifle forward (its forward, i.e. toward the bayonet to be clear).
But, how to make the shader "understand" when this has to be done?
Ok, here is a VERY crude, possible hack:
one could make the rifle model use a custom shader which.... shifts it forward whenever it is held vertically.
(The transition can be smooth: the more vertical, the bigger the shift, from 0 to the right maximal amount.)
Naturally, this means that whenever the rifle is held vertical, for whatever reason, then it is shifted up.
One should think if this is ok or not (I think it might be).
Technically, it would be totally possible for a shader to do so, because a shader always "knows" the current model-view matrix,
i.e. how vertical the object being rendered is.
Naturally, if this is the first custom shader in your mod, then there is a price to pay:
(e.g. installing your mod will become a bit more complicated for your end users, at least if things are still in the way I've left them).
5) Here's the idea: a shield, as you know, is tied to the left forearm bone.
So,
maybe, it is possible to position a "parade" rifle so that this is more or less correct in most animations?
A possible thing to combine with 1. Lots of problems to hammer down, naturally.