Equipment

Everything about development and the OpenMW source code.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Equipment

Post by Zini »

This is not how vanilla Morrowind works, .
Really? You can wear a skirt over pants? I never tried that. Well, I never tried to wear a skirt anyway. ;)
and don't forget that modders use this slots for other things so it could screw up a few things if we changed it
We don't plan to change anything. The data structures will probably be different, but the user should see no difference.
Also gauntlets/bracers and gloves actually are incompatible, don't know how I got the idea that they aren't.
So only one slot for them.
I'm not sure exactly how it works, but this is not it. I could make an attempt at how I think the game calculates the armor but it's pretty complicated, since stats and skills play a role, and I suspect the game finds the average of the stuff you are wearing by some method, so whether you are wearing boots with 0 armor or shoes makes a difference. Also, the unarmored calculations are pretty weird, and I think bugged in the original game.
Okay, forgot about unarmoured. But we have some formulae on the wiki and that does not look overly strange. New plan: MWWorld::Class gets a function that returns the armour class (heavy, medium, light, none; we need it anyway) and another function that returns the armour rating. The InventoryStore class sums these up, after multiplying each with a slot specific factor and the appropriate skill factor.
User avatar
werdanith
Posts: 295
Joined: 26 Aug 2011, 16:18

Re: Equipment

Post by werdanith »

Zini wrote:Really? You can wear a skirt over pants? I never tried that. Well, I never tried to wear a skirt anyway. ;)
Clearly you've never played an enchanter then. No slots can be wasted. :P
User avatar
werdanith
Posts: 295
Joined: 26 Aug 2011, 16:18

Re: Equipment

Post by werdanith »

I looked into how equipped items show in the inventory and this is the order:
Weapon, arrows, alphabetically sorted list of armors, alphabetically sorted list of clothes/rings/amulets/belts.
In my opinion this is another strong indicator that vanilla Morrowind has distinct slots for armors and clothes internally.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Equipment

Post by Zini »

It is not. That just means that MW stores references to different record types in separate data structures. As we do, unfortunately. This implementation is the result of a design flaw in the very early stage of OpenMW, which has caused us a lot of trouble already. Maybe something to get rid of for OpenMW 2.0.

What MW does internally is of very little relevance for use anyway.
User avatar
werdanith
Posts: 295
Joined: 26 Aug 2011, 16:18

Re: Equipment

Post by werdanith »

Of course, I'm aware that under the cover the implementation could vary, it's all bits underneath anyway. The reason I'm arguing is because I fear the possibility, that this will make implementation of other features needlessly more complicated later on and require workarounds, like the issue you just mentioned. Anyway, you are the one doing the implementing so it's all up to whatever makes the most sense to you.
jhooks1
Posts: 780
Joined: 06 Aug 2011, 21:34

Re: Equipment

Post by jhooks1 »

Pretty sure you can only equip gauntlets or gloves, not both, so there should be a hand slot. Also weapons should have their own weapon slot.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Equipment

Post by Zini »

Done. Finally. Might still be a bit rough. And completely untested, because nothing is using the equipment functionality yet. Also, there might be more mistakes in the slot system. I see little point in hunting them down now. It will all become pretty obvious (and easy to test) as soon as we have an inventory UI.

Speaking of inventory UI: If someone wants the task, now would be a good time. There was one attempt before, but it has not gotten beyond prototype stage and with the new container backend, it probably wouldn't even compile anymore. But it is still possible that some of the old code is salvageable.

My next task will be auto-equipping (for NPCs). Once that is done, we are ready for the implementation of equipment/clothing rendering.
User avatar
psi29a
Posts: 5361
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: Equipment

Post by psi29a »

Zini wrote:Done.
...
My next task will be auto-equipping (for NPCs). Once that is done, we are ready for the implementation of equipment/clothing rendering.
Awesome work Zini and crew. :)

I have a feeling that the next two releases will make an impression on people with the amount of user visible updates.
Post Reply