The new MWSE-Lua interface

Everything about development and the OpenMW source code.
Post Reply
User avatar
SeaFox
Posts: 34
Joined: 29 Feb 2016, 17:30

The new MWSE-Lua interface

Post by SeaFox » 30 Sep 2018, 15:36

While browsing Nexus Mods, I noticed that Tamrielic Lore Tooltips requires MWSE (2.1+) because of the new MWSE-Lua interface.

From the Morrowind Script Extender v2 documentation:
Starting in MWSE 2.1, modders are able to create powerful, event-driven modifications to The Elder Scrolls III: Morrowind using the Lua scripting language.

Unlike traditional mwscript, Lua scripting is responsive. Instead of checking every frame to see if an object is being activated, a mod might register to see if their reference was activated.
It seems to me that Lua scripting may be the future of Morrowind modding now that it is being incorporated into the Morrowind Script Extender (MWSE). I am wondering how much MWSE functionality is being built into OpenMW, including Lua scripting, and how this will effect the availability of mods to users of OpenMW.

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

Re: The new MWSE-Lua interface

Post by akortunov » 30 Sep 2018, 16:20

Currently there is no Lua in OpenMW, only in the TES3MP (but it does not support an MWSE 2.x API).
We just do not have volunteers to implement it.

NullCascade
Posts: 115
Joined: 16 Jan 2012, 07:58
Github profile: https://github.com/NullCascade/

Re: The new MWSE-Lua interface

Post by NullCascade » 30 Sep 2018, 16:42

akortunov wrote:
30 Sep 2018, 16:20
We just do not have volunteers to implement it.
I volunteered to do the work and concurrently work on both OpenMW-Lua/MWSE-Lua at the same time to make a compatible API. You had the volunteers, but the OpenMW project wants a different direction.
MWSE 2.x lead.

User avatar
SeaFox
Posts: 34
Joined: 29 Feb 2016, 17:30

Re: The new MWSE-Lua interface

Post by SeaFox » 30 Sep 2018, 17:11

NullCascade wrote:
30 Sep 2018, 16:42
I volunteered to do the work and concurrently work on both OpenMW-Lua/MWSE-Lua at the same time to make a compatible API. You had the volunteers, but the OpenMW project wants a different direction.
Seems like the best course of action is to create a proof of concept project first. Show people what it can do, convince them of how powerful and important it is to the future of Morrowind modding. When they finally see the light, they will rush to help with the project. I think the success of MWSE-Lua could be a powerful incentive for collaboration between OpenMW-Lua and MWSE-Lua, and that will help move the direction of OpenMW.

User avatar
lysol
Posts: 1070
Joined: 26 Mar 2013, 01:48
Location: Sweden

Re: The new MWSE-Lua interface

Post by lysol » 30 Sep 2018, 17:57

SeaFox wrote:
30 Sep 2018, 17:11
Seems like the best course of action is to create a proof of concept project first. Show people what it can do, convince them of how powerful and important it is to the future of Morrowind modding. When they finally see the light, they will rush to help with the project. I think the success of MWSE-Lua could be a powerful incentive for collaboration between OpenMW-Lua and MWSE-Lua, and that will help move the direction of OpenMW.
This is not the issue. The concensus already is that OpenMW will add Lua scripting.

The difference is that MWSE-Lua is not sandboxed (meaning you can inject code from scripts directly into the game (I'm not a coder, so I can't really elabore on this any more than this), but you also can, theoretically, implement a virus within a mod) and OpenMW lead Zini has said that sandboxing is a must have. Not having sandboxing gives you a new level of freedom in what you features can implement, but Zini's argument is that since OpenMW's source code is free and open, you can implement these same features directly in the engine anyway, and that OpenMW therefore should go for the safer, sandboxed, implementation of Lua.

NullCascade does not agree with this decision, so he will not be the one that implements Lua scripting to OpenMW. Well, unless Zini changes his mind, but he has been very clear about this, so I highly doubt he will.
Normal mapped texture replacers, exclusive for OpenMW:
My Nexus page

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

Re: The new MWSE-Lua interface

Post by akortunov » 30 Sep 2018, 18:19

I wonder which exactly parts of MWSE are blocked by sandboxing.
Direct access to filesystem and ability to run external EXE-files are blocked by fact that OpenMW is a cross-platform project, not just by Lua sandboxing.

User avatar
AnyOldName3
Posts: 1140
Joined: 26 Nov 2015, 03:25

Re: The new MWSE-Lua interface

Post by AnyOldName3 » 30 Sep 2018, 19:08

Both of those can work cross-platform, as long as you actually bother to recompile your mod for all the platforms OpenMW supports (and in a world where sandboxing was something we considered okay, we could offer some kind of fat binary format with binaries for all the architectures and OSes we support contained within the same file).
AnyOldName3, Master of Shadows

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

Re: The new MWSE-Lua interface

Post by akortunov » 30 Sep 2018, 19:31

AnyOldName3 wrote:
30 Sep 2018, 19:08
Both of those can work cross-platform, as long as you actually bother to recompile your mod for all the platforms OpenMW supports (and in a world where sandboxing was something we considered okay, we could offer some kind of fat binary format with binaries for all the architectures and OSes we support contained within the same file).
Does not look good for me. I doubt that most of modders will actually use this feature - they will just make their mods Windows-only.

User avatar
SeaFox
Posts: 34
Joined: 29 Feb 2016, 17:30

Re: The new MWSE-Lua interface

Post by SeaFox » 30 Sep 2018, 21:12

AnyOldName3 wrote:
30 Sep 2018, 19:08
Both of those can work cross-platform, as long as you actually bother to recompile your mod for all the platforms OpenMW supports (and in a world where sandboxing was something we considered okay, we could offer some kind of fat binary format with binaries for all the architectures and OSes we support contained within the same file).
Perhaps something like the java virtual machine could be used. Compiled code would work an all platforms for which a virtual machine is available. Or some sort of JIT compiler could be used. Code would be distributed as source, and would automaticly be compiled when first used, regardless of which platform is used.

User avatar
AnyOldName3
Posts: 1140
Joined: 26 Nov 2015, 03:25

Re: The new MWSE-Lua interface

Post by AnyOldName3 » 30 Sep 2018, 22:23

That's basically how Lua and MWScript and any proposed system works, but the point of calling native code is that you can call native code in addition to the stuff written in a portable language.
AnyOldName3, Master of Shadows

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests