Implementing Activation Sounds

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

Re: Implementing Activation Sounds

Post by Zini »

Any. There are at least some object types that can also be activated by a NPC (initiated by a script). And for post-1.0, I can easily imaging extending this to all object types.
User avatar
sirherrbatka
Posts: 2159
Joined: 07 Aug 2011, 17:21

Re: Implementing Activation Sounds

Post by sirherrbatka »

and don't forget about telekinesis spell. With that you can open chest without being close to it. You can even disarm trap.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Implementing Activation Sounds

Post by Zini »

Right. Completely forgot about it.
User avatar
psi29a
Posts: 5361
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: Implementing Activation Sounds

Post by psi29a »

sir_herrbatka wrote:and don't forget about telekinesis spell. With that you can open chest without being close to it. You can even disarm trap.
That is a 'Pro Tip' if I ever saw one. ;)

To be fair, I've never 'beaten' Morrowind, I hope to fix that with OpenMW one day. :D
ezzetabi
Posts: 407
Joined: 03 Feb 2012, 16:52

Re: Implementing Activation Sounds

Post by ezzetabi »

I am not the only one! I actually beat it only once via back path!
User avatar
werdanith
Posts: 295
Joined: 26 Aug 2011, 16:18

Re: Implementing Activation Sounds

Post by werdanith »

Pull requested Report time.
I fixed relative and 3d sounds, now at last they work properly. (Special thanks to Scrawl ;))
I've added activation sounds for everything, a couple of notes:
According to scrawl there may be differences between the sounds of thrown weapons, this may need to be looked into.
Also there is this:
Record: SOUN 'Item Bodypart Up'
Sound: Fx\item\item.wav
No idea what it represents.
Also, had to add a new argument to playSound in order to handle the disappearing items, when picked up.
And teleportation doors do no play 3d sounds. Why that is the case is left as an exercise to the reader.

I've added special functions for pick up and put down sounds, they should come in handy later for the inventory, I've also added a function to tell the weight category of armors which was needed and will come in handy later.

If anything sounds wrong let me know.

Also, special thanks to Scrawl and Sir_Herrbatka, for their help.

Now with the sound working a may look into the waterfalls in Vivec sounding weird, no promises though.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Implementing Activation Sounds

Post by Zini »

What exactly is this new sound argument (untracked) doing?

Also, it seems we have some duplicate code here. I already implemented an armour class function (as part of the equipment code). It gives the armour class as a skill index instead of a separate enum, but that should be good enough. Also, yours is wrong, according to our wiki. Can you please merge in my master branch, delete your armour class code and use mine instead?
User avatar
werdanith
Posts: 295
Joined: 26 Aug 2011, 16:18

Re: Implementing Activation Sounds

Post by werdanith »

Zini wrote:What exactly is this new sound argument (untracked) doing?
If you play a 3d sound, the manager adds it to a list of sounds in the cell, that prevents it from being played again if it's already playing. Also if an item gets disabled it is removed from the list and stops playing. This may be useful for scripted sounds but both of these properties are impractical for pick up sounds. So, when you use the untracked option the sound doesn't get added to the list, and you can hear the sound after the item has disappeared, plus you can hear two of them in succession.
Zini wrote:Also, it seems we have some duplicate code here. I already implemented an armour class function (as part of the equipment code). It gives the armour class as a skill index instead of a separate enum, but that should be good enough. Also, yours is wrong, according to our wiki. Can you please merge in my master branch, delete your armour class code and use mine instead?
I've got the armor categories from here:
http://www.uesp.net/wiki/Morrowind:Medium_Armor
Haven't looked at the wiki, or at your branch yet.
User avatar
werdanith
Posts: 295
Joined: 26 Aug 2011, 16:18

Re: Implementing Activation Sounds

Post by werdanith »

Zini wrote:Can you please merge in my master branch, delete your armour class code and use mine instead?
I did, after much frustration since I had to rewrite every instance of my functions to include the environment as an argument, just to use it once. Also you misspelled getEquipmentSkill and your implementation for the detection of the skill type of armors is wrong, mine worked correctly. Every armor returns 21 for light armor. Now, you have a test environment so you can figure it out.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Implementing Activation Sounds

Post by Zini »

Thanks! I guess there could be a GMST misspelled or something like that (I copied and pasted them from the wiki). Will look into it as soon as possible.
Post Reply