Search found 67 matches

by ptmikheev
24 Aug 2021, 08:12
Forum: General Development
Topic: Lua scripting in OpenMW
Replies: 134
Views: 50374

Re: Lua scripting in OpenMW

When loading or instantiating scripts, you can give each script their own environments, making their data no longer global. Each script already has its own sandboxed environment. Instead of having explicitly defined "OnSave" and "OnLoad" functions that a user will call, you can ...
by ptmikheev
06 Aug 2021, 17:26
Forum: General Development
Topic: Lua scripting in OpenMW
Replies: 134
Views: 50374

Re: Lua scripting in OpenMW

What I meant was that we can use MWScript replacement as a use-case we need for starting the de-hardcoding process. It important because it is a singleplayer use case which should be a priority over multiplayer. Don't get me wrong, multiplayer will come and keeping this in mind is important, but le...
by ptmikheev
06 Aug 2021, 12:21
Forum: General Development
Topic: Lua scripting in OpenMW
Replies: 134
Views: 50374

Re: Lua scripting in OpenMW

My point is that the first step of dehardcoding (design an API that is available via Lua-to-Lua interfaces and will still make sense after dehardcoding) should be done first. We can not just implement "ALL the things that MWScripts support" because if we don't think about dehardcoding now,...
by ptmikheev
06 Aug 2021, 11:25
Forum: General Development
Topic: Lua scripting in OpenMW
Replies: 134
Views: 50374

Re: Lua scripting in OpenMW

Additionaly to the argument about forks it is worth to mention that in distant future we are going to support other games (Oblivion/Fallout/Skyrim) as well. It sounds reasonable if all mechanics that are different in different games are implemented as Lua mods and user can choose which one to use. I...
by ptmikheev
03 Aug 2021, 12:22
Forum: General Development
Topic: Lua scripting in OpenMW
Replies: 134
Views: 50374

Re: Lua scripting in OpenMW

Decide whether we continue to use lua-scripts=something.omwscripts in openmw.cfg , or somehow store it inside omwaddons. I believe it's better to store scripts inside .omwaddon files, for multiple reasons: ... I meant only "*.omwscripts" files that contain list of scripts to run. I am qui...
by ptmikheev
02 Aug 2021, 18:15
Forum: General Development
Topic: Lua scripting in OpenMW
Replies: 134
Views: 50374

Re: Lua scripting in OpenMW

OpenMW Lua roadmap Initial Lua MR was merged some time ago and basic (still very limited) OpenMW Lua is available in latest unreleased builds (can be found here ). Here are plans for further development. Dehardcoding Dehardcoding means reimplementing game mechanics (which are currently implemented ...
by ptmikheev
02 Jul 2021, 20:49
Forum: General Development
Topic: Lua API for GUI
Replies: 30
Views: 9306

Re: Lua API for GUI

So we either need some approach for running some Lua code in the main thread, simultaneously with MyGUI, or restrict creating widgets to C++. I'm leaning towards the latter, I think we can provide all the necessary widgets ourselves. However that is assuming this is the only issue caused by multipl...
by ptmikheev
09 May 2021, 13:31
Forum: Feature Requests and Suggestions
Topic: Thank you for implementing head-bobbing and some suggestions...
Replies: 2
Views: 2914

Re: Thank you for implementing head-bobbing and some suggestions...

Sorry for a late answer, I haven't noticed your post before. I've implemented head-bobbing this way because it was simple and took only a few lines of code. Weapon/arm sway requires non-trivial changes in the animation system. I agree that Stomy's solution looks better, but it was rejected because t...
by ptmikheev
02 May 2021, 00:26
Forum: General Development
Topic: Lua scripting in OpenMW
Replies: 134
Views: 50374

Re: Lua scripting in OpenMW

So it will not work the same as Papyrus in Skyrim. But we will be able to use Lua coroutines in some form. I'm aware our threading model is pretty different to that of Papyrus, but we're eventually going to need to support transpiling papyrus to OpenMW Lua (or write a Papyrus/Papyrus bytecode inter...
by ptmikheev
30 Apr 2021, 16:26
Forum: General Development
Topic: Lua scripting in OpenMW
Replies: 134
Views: 50374

Re: Lua scripting in OpenMW

Lua MR is ready. I hope it will be merged soon (but it will not be included to the 0.47.0 release). Builds for testing: https://gitlab.com/ptmikheev/openmw/-/pipelines/295138173 Documentation: https://openmw-lua-work-in-progress.readthedocs.io Quick start: how to run a script Example mods: https://...