NullCascade wrote: ↑
06 Apr 2018, 01:25
... what? Incrementally working on potentially breaking changes to mwscript over time is easier than doing...
Code: Select all
lua.open_libraries( sol::lib::base );
lua.do_script( script->code );
If you think that's all that's necessary for OpenMW to recognize Lua code, and provide access to the game state in a way to ensure future compatibility, and
work correctly along side mwscript (the game and preexisting mods will still be using mwscript, so Lua code has to work alongside mwscript), then you apparently don't understand all the issues involved.
So for every new piece of software that comes out, every new API that people want to call to, every piece of custom code modders want... they have to do a pull request.
More than that: they have to ask themselves if it's relevant/necessary to do, if there's other preexisting methods that can already allow what they want, and if it's safe for the user's machine to allow*. Just like not every CPU feature is accessible or relevant to user applications, not every system API needs to be accessible or relevant to mods. 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.
* like it or not, scripts are code, and wanting features to allow your code to do more can have implications far beyond what you want to do. Even if you
don't know of anyone personally that would abuse it, you need to consider the possibility that someone will want to, so the question is, is the short-term benefits worth the potential long-term problems; the security, stability, future-proofing, and platform lock-in issues.
Zini said that things like Discord RPC would be possible with his solution. Without third party extensions or bloating Discord into the project for people that may not even want it, I just don't see how that is possible.
We know (or can figure out) how Discord and such work. We can also design an interface that would allow mods to access Discord-like functionality. Then it's just a matter of getting the two interfaces to work together. It won't be an overnight thing, but it's certainly a doable prospect. As a benefit, an abstract mod-side interface would allow other backends to be plugged in in the future, so instead of being Discord-only, such a mod could work with Discord or something else that provides similar functionality, and work on different platforms since the mod won't rely on a particular platform's RPC methods.