Page 3 of 5

Re: Weapon sheathing

Posted: 08 Oct 2018, 18:35
by akortunov
In theory, if we are not going to add shields holstering for now, there should not be much issues with mentioned mods.

Re: Weapon sheathing

Posted: 08 Oct 2018, 20:53
by raevol
This may be a good time to have a technical discussion about this:

If we are going to add "held items" in the future, how is the engine going to distinguish between them and weapons/shields? Will it require any changes to the assets for weapons/shields? If not, will it require changes to current assets that will become held items? Or will only new types of items created by modders be able to be held items?

If we're not changing anything about current assets, could the logic to distinguish between the two be implemented now?

I'm not a developer, as you guys know, but hopefully brainstorming this a little might shed some light on what, of the future solution, can be implemented now?

Re: Weapon sheathing

Posted: 09 Oct 2018, 09:28
by Zini
Held Items are a new object type. The engine distinguishes between them like between any other object types (e.g. Misc and Activator).
If we're not changing anything about current assets, could the logic to distinguish between the two be implemented now?
There is no logic. This can not be determined automatically (not reliably anyway). To use the feature weapon objects would have to set a special flag.

Re: Weapon sheathing

Posted: 09 Oct 2018, 10:06
by raevol
Zini wrote: 09 Oct 2018, 09:28 To use the feature weapon objects would have to set a special flag.
So is this something that could be implemented now?

Re: Weapon sheathing

Posted: 09 Oct 2018, 12:21
by Zini
Nope. We can not change the data structures.

Re: Weapon sheathing

Posted: 09 Oct 2018, 13:48
by akortunov
If we really want to implement shields sheathing, I suggest this approach:
1. Check if shield model has the _sh file. If not, handle it as we handle shields now.
2. If the shield has sheath model, place it on character's back when using a one-handed weapon and weapon is holstered.
When using two-handed weapons, do not show this shield at all.
3. Also use separate [un]equipping animations when shield is equipped and sheathed for one-handed weapons, with default animations as fallback.
This approach may be a bit harder to implement, but in this case there will not be a desperate need for black/white/red/etc lists to handle this feature.

As for quivers and scabbards, they should be quite fine even without black lists.
What do you think?

Re: Weapon sheathing

Posted: 09 Oct 2018, 13:51
by Zini
Okay, that sounds reasonable.

Re: Weapon sheathing

Posted: 09 Oct 2018, 14:20
by akortunov
Zini wrote: 09 Oct 2018, 13:51 Okay, that sounds reasonable.
Ok, then I'll implement it later as a separate pull request, if my current one with scabbards and quivers will be merged. Otherwise this PR can become a quite big.

Re: Weapon sheathing

Posted: 09 Oct 2018, 16:06
by jvoisin
The MWSE version of this feature is available here, just in case ;)

Re: Weapon sheathing

Posted: 09 Oct 2018, 16:18
by psi29a
Which took inspiration from the PR made by akortunov here: https://github.com/OpenMW/openmw/pull/1615 in February but labeled for post-1.0 inclusion. But it looks like it might get relabeled pre-1.0 and be MWSE compatible. ;)