New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Weapon sheathing #1615
Weapon sheathing #1615
Conversation
Concerning quivers: in Skyrim, it's a bit complex. There are two ammo meshes you need for setting a ranged weapon up: one is for quiver with five static arrows (their IDs in meshes are numbered so the engine knows which not to enable if the character only has 4 or less arrows) and one arrow which the character always gets out from the quiver during archery animations, and one is for a single arrow. In content files there are two records for an arrow/bolt: one (AMMO) defines arrows of a certain type in general and another (PROJ) defines the flying arrow projectile. The first mesh is assigned to the first record. The projectile mesh is assigned to the second. |
So this is going to be a mod eventually? I'm confused as to why this needs to be a PR for the game. Would it make sense to configure it somehow so that it can be a |
It will need a mod to work, but it also needs engine-side support. The engine needs to know that if an NPC has certain nodes, it should render equipped weapons on them when sheathed. The default nifs don't contain those nodes so users won't see any change automatically -- someone will need to make a mod with the necessary changes to see a difference (provided separately, like on Nexus). |
After additional testing I noticed that crossbowmans in Morrowind use a some kind of ammo belt instead of quivers, judging by reload animation. So maybe I will have to split quivers and ammo belts to separate feature. Anyway, @scrawl, @zinnschlag, what do you think about weapon sheathing? |
Also can anyone explain why it does not work for beast races and bipedal creatures? I suppose for beast races an engine uses the xbase_animkna.nif, right? But how does the engine handle creatures? Uses per-creature model? |
IIRC, beast races use a different skeleton, one which includes tail bones that don't exist in the normal biped skeleton. They have the suffix "_kna" (Khajiit 'n Argonian). For biped creatures, I'm not sure. The model and animation handling for creatures and NPCs are in different classes, but since biped creatures share some NPC-like behavior with regard to some equipment like weapons, I don't know how exactly they're handled. |
I uploaded the updated version:
|
If this is going to be part of OpenMW codebase, user should be able to toggle this behavior in settings / in launcher. |
Again, this setting will do nothing if the player does not have modded assets (xbase_anim* at least). UPDATE: I uploaded new assets. Also related question: is it possible to use one file per animation instead of packed xbase_anim? |
Is there any way to do not edit every creature model to add new bones? |
I haven't really reviewed this, so just a general comment for now: Re: the last comment, I don't see another way than editing models because I'm sure the location you want at depends on the model. |
What kind of model? Weapon or creature ones? For example, sheathed weapon may have different position for humanoid NPCs and beast ones.
As for me, new bodyparts are good for armor and clothing (for example, if we will want to show jewelry). Not sure if bodyparts will help with weapon sheathing since creatures do not have bodyparts at all. |
A bit offtopic question: why do not add an ability to load animations from per-group .kf files? Performance issues? It would be nice to provide a couple of modded holster animations for weapon sheathing without replacing the whole xbase_anim.kf |
73de96e
to
7b2ef63
Compare
Update:
This feature is basically implemented. Now we need an independent testing. |
e8ae6ad
to
07b7212
Compare
Added quivers support: Note: autoequipping ignores ammo, so quivers will be empty for NPCs before first combat. |
I modified autoequipping, now I just ignore restockable ammo. |
I think it would probably be better to have quivers as their own item-category and require their use to be able to shoot any bow (either at all or with reasonable speed). That way the quiver would also not be auto-removed/replaced on a weapon-change. It would also create a couple of further interessting-possibilities, like:
All that would create interessting choices for the player. It would also avoid the issue that pretty much every bow that you pick up gives you a quiver that is not visible when it is lying around. Note that I'm not suggesting the same for scabbards, as those have to be build with the specific sword in mind one way or another. |
Oh, and having shields shouldered when you are not in combat would also be awesome. |
Are you sure that you installed meshes from Weapon Sheathing MWSE mod? A quote from documentation:
|
No. There's nothing in first post about it. Okay, I'm going to install it. |
fe1dd85
to
5f012a4
Compare
Ready for 0.46? :) |
Since I did not get additional bugreports, I suppose yes. |
I suppose we mostly fixed the RecastNavigation mess, right? |
5f012a4
to
2b29672
Compare
The dust has mostly settled. |
I don't think I have any particular objections to merging this. |
I haven't faced with bugs. But I've played without mods. |
Just for the record, this PR also resolves one of the last warnings being triggered by openmw in msvc 2015/2017. |
So what did we decide? Are there issues which I need to address, or we can merge this PR? |
2b29672
to
442d2ae
Compare
Updated PR by changes requested by Capostrophic. |
442d2ae
to
e7c905c
Compare
e7c905c
to
92e4550
Compare
Last call before merging... any other comments or reviews? |
I suppose there was enough time to get feedback. |
Merged! |
@@ -51,6 +63,302 @@ ActorAnimation::~ActorAnimation() | |||
{ | |||
mInsert->removeChild(iter->second); | |||
} | |||
|
|||
mScabbard.reset(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a purpose to call reset here? C++ compilers generate code to autmatically destruct all members.
Implements feature #4673.
Related topic is here.
Here are WIP animations for this feature: Animations.zip
Basic idea: add some new bones to humanoid skeleton and attach weapons/quivers/scabbards/etc to these bones.
Data format is compatible with the Weapon Sheathing mod, so you can use meshes from this mod.
xbase_anim_sh.nif is required, other files are optional.
Sheathed models for now are separate meshes with _sh suffix. If there is no scabbard for current weapon mesh, an engine will show only holstered weapon. Also scabbards and quivers do not have enchanting glow (but arrows in quiver do).
The feature is disabled by default. You should enable it in config file:
[Game]
weapon sheathing = true
use additional anim sources = true
Now this feature supports:
Holstered weapons also has glow when enchanted.
Scabbard itself does not have a glow.
Quivers itself do not have a glow, but arrows have when enchanted.
Count and type of rendered arrows depends on type and count of equipped arrows.
Notes: