I'm the author of a needs mod on Nexus (The Bare Necessities), and I'm interested in porting it to work in OpenMW. The mod depends on scripts that detect player actions like eating, drinking, and picking up/dropping items through sound detection (player->getsoundplaying). The mod requires the Code Patch to work, because most of the sounds that it needs to detect apparently didn't attach properly to the player when played in the vanilla engine, so scripts wouldn't recognize them even though the correct sounds were playing - I reached out to the Code Patch author a few years ago who generously implemented the fix, and I'm wondering if you'd consider doing something similar with OpenMW. I tested the mod in OpenMW recently with the stable and nightly versions and found that the the necessary sounds weren't registering with the scripts as is, including:
- Item Ingredient down/up
- Item potion down/up
- swallow
- drink
I don't know if fixing bugs like this would fall under your pre-1.0 scope, but it would be a big help for mod compatibility across vanilla and OpenMW, since sound detection was one of the few ways to handle event detection in the original engine. Is there any chance you would implement this fix in a future version?
Sound recognition for scripts
Re: Sound recognition for scripts
These sounds are not detected because they are from GUI actions, so they are not attached to player.
Feel free to create a feature request on a bugtracker.
Can not tell if the patch will be accepted even if someone will implement it, though.
Feel free to create a feature request on a bugtracker.
Can not tell if the patch will be accepted even if someone will implement it, though.
-
- Posts: 2
- Joined: 04 Feb 2020, 18:08
Re: Sound recognition for scripts
Thanks for the tip - just submitted the request, hope someone will pick it up!
- AnyOldName3
- Posts: 2685
- Joined: 26 Nov 2015, 03:25
Re: Sound recognition for scripts
We tend to avoid merging this kind of thing. It's not something the original engine was supposed to do, so it doesn't count as a bug, and we really don't want to keep hacking new features into MWScript for years, so it's going to be basically frozen and maintenance-only once 1.0 comes along. We'll be adding a new Lua-based scripting system in the future and doing our best to make it as easy to use as possible (potentially providing automated tools to port existing mods). This should make it much easier to add the things modders actually need rather than the hacks they've needed to resort to historically.
This probably means that you're not going to be able to port your mod to OpenMW just yet, but what we end up with will closely resemble TES3MP Lua, so if you want to have a play with that, it should stand you in good stead to get it working in future OpenMW versions. It might be possible to get it working right now in multiplayer.
This probably means that you're not going to be able to port your mod to OpenMW just yet, but what we end up with will closely resemble TES3MP Lua, so if you want to have a play with that, it should stand you in good stead to get it working in future OpenMW versions. It might be possible to get it working right now in multiplayer.