To create a Lua script that will run every frame, like a normal Morrowind script, start off by creating your vanilla script. [...]
I don't think this is the kind of hack-kneed support we'd want for Lua. If and when we support Lua, it should be a first-class scripting language that is correctly integrated into the engine. Such a thing will take time to do properly. And even with proper Lua support, there are still benefits to providing some improvements to mwscript as well.
NullCascade wrote: ↑06 Apr 2018, 02:31Do you have any actual factual backing to this? Lua is sandboxed. Lua is shipped in major PC (and console/mobile) games. Where's this giant scandal that Lua is insecure?
Again, you're conflating two separate arguments. No one in this thread has argued against Lua support (Zini has been outspoken against it in the past and prefers to extend mwscript, but I don't imagine he'd ignore if there's a huge push from modders for it). What people have been arguing against is allowing scripts to call system APIs directly, instead of remaining fully sandboxed.
NullCascade wrote: ↑06 Apr 2018, 02:31So let me get this straight. Instead of giving modders enough power that they can in
in 30 minutes or less create a Discord RPC mod like I did with MWSE 2.1, you're advocating... some generic API?
Like I said:
Sometimes it'll take a bit more work to achieve, and sometimes it'll come with compromises, but if the result is a secure, stable mod that everyone can use and will still work in 10 years, then IMO that's better than giving them arbitrary code access that can get it done faster while locking out systems the modder doesn't care about and exposing the mod and users to potential future problems the engine can't help with.
Providing short-term gains (implemented in 30 minutes or less, or your money back!) at the cost of long-term stability (we now have a bunch of mods that don't work on various systems that we can't do anything about, are causing crashes we can't prevent, and there's some running around with viruses and trojans) isn't conducive to the longevity of a project.
NullCascade wrote: ↑06 Apr 2018, 02:31You can't. You have to, at some point, have someone, somewhere, write native code.
OpenMW would implement the necessary native code to talk to Discord. OpenMW would also implement an abstract interface for mods to use. Mods would make the necessary calls to the abstract interface, and OpenMW ensures the appropriate native code runs to have the desired effect. Presuming Discord integration is something modders and users truly want anyway, and not stop caring about the feature after a year or something.