Weapon sheathing

Everything about development and the OpenMW source code.
User avatar
akortunov
Posts: 435
Joined: 13 Mar 2017, 13:49
Location: Samara, Russian Federation
Github profile: https://github.com/akortunov

Re: Weapon sheathing

Post by akortunov » 08 Oct 2018, 18:35

In theory, if we are not going to add shields holstering for now, there should not be much issues with mentioned mods.

User avatar
raevol
Posts: 2786
Joined: 07 Aug 2011, 01:12
Location: Caldera

Re: Weapon sheathing

Post by raevol » 08 Oct 2018, 20:53

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?

User avatar
Zini
Posts: 5531
Joined: 06 Aug 2011, 15:16

Re: Weapon sheathing

Post by Zini » 09 Oct 2018, 09:28

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.

User avatar
raevol
Posts: 2786
Joined: 07 Aug 2011, 01:12
Location: Caldera

Re: Weapon sheathing

Post by raevol » 09 Oct 2018, 10:06

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?

User avatar
Zini
Posts: 5531
Joined: 06 Aug 2011, 15:16

Re: Weapon sheathing

Post by Zini » 09 Oct 2018, 12:21

Nope. We can not change the data structures.

User avatar
akortunov
Posts: 435
Joined: 13 Mar 2017, 13:49
Location: Samara, Russian Federation
Github profile: https://github.com/akortunov

Re: Weapon sheathing

Post by akortunov » 09 Oct 2018, 13:48

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?
Last edited by akortunov on 09 Oct 2018, 14:16, edited 1 time in total.

User avatar
Zini
Posts: 5531
Joined: 06 Aug 2011, 15:16

Re: Weapon sheathing

Post by Zini » 09 Oct 2018, 13:51

Okay, that sounds reasonable.

User avatar
akortunov
Posts: 435
Joined: 13 Mar 2017, 13:49
Location: Samara, Russian Federation
Github profile: https://github.com/akortunov

Re: Weapon sheathing

Post by akortunov » 09 Oct 2018, 14:20

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.

User avatar
ap0
Posts: 275
Joined: 11 Aug 2011, 18:47
Contact:

Re: Weapon sheathing

Post by ap0 » 09 Oct 2018, 16:06

The MWSE version of this feature is available here, just in case ;)

User avatar
psi29a
Posts: 4274
Joined: 29 Sep 2011, 10:13
Github profile: https://github.com/psi29a/
Contact:

Re: Weapon sheathing

Post by psi29a » 09 Oct 2018, 16:18

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. ;)

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests