Search found 69 matches

by ptmikheev
30 Oct 2020, 12:34
Forum: General Development
Topic: Lua scripting in OpenMW
Replies: 137
Views: 110921

Re: Lua scripting in OpenMW

Using sol2 or sol3 would mean adding more than 20'000 lines of code to OpenMW repo. How is that? Is that just generated interface stuff? Or are you trying to import sol2/3 library into /extern ? Keep in mind, we can add more dep libraries as needed. sol2 and sol3 are header-only libraries. As I und...
by ptmikheev
30 Oct 2020, 05:59
Forum: General Development
Topic: Lua scripting in OpenMW
Replies: 137
Views: 110921

Re: Lua scripting in OpenMW

Here is a prototype of an interface between C++ and Lua: https://gitlab.com/-/snippets/2034622 Using sol2 or sol3 would mean adding more than 20'000 lines of code to OpenMW repo. My prototype uses Lua C API directly and has only 300 lines of code. It has not so many features as sol3, but it seems to...
by ptmikheev
21 Oct 2020, 23:58
Forum: General Development
Topic: Lua scripting in OpenMW
Replies: 137
Views: 110921

Re: Lua scripting in OpenMW

Absolutely follow this information if using sol (and definitely use sol3 over sol2). Also note that support for sol is currently offline as the developer handles some larger C++ community issues. Either way, if using sol expect your binary size to bloat extraordinarily. In my experience, contrary t...
by ptmikheev
18 Oct 2020, 18:14
Forum: General Development
Topic: Lua scripting in OpenMW
Replies: 137
Views: 110921

Re: Lua scripting in OpenMW

My favourite example is a mod that uses an external speech synthesis tool (let's image in a couple of year it has very good quality) to voice all dialogues in the game. Wouldn't be better to implement such a thing directly into the engine? Definitely no. Such tool is a big and complicated thing tha...
by ptmikheev
18 Oct 2020, 16:12
Forum: General Development
Topic: Lua scripting in OpenMW
Replies: 137
Views: 110921

Re: Lua scripting in OpenMW

Obviously, we would still have local scripts. There is no reason not to, to be honest. Current tes3mp server is extremely lightweight, and performs well even despite having many extremely inefficient parts. So I don't think there would be a meaningful performance difference. I would say the main ar...
by ptmikheev
18 Oct 2020, 16:01
Forum: General Development
Topic: Lua scripting in OpenMW
Replies: 137
Views: 110921

Re: Lua scripting in OpenMW

If we allow Lua mods to have dlls (I'd say we should), we have to at least warn players about potential safety issues. With platform compatibility, we could either have every mod provide dlls for multiple platforms, or attempt to build them during installation. There are two existing packet systems...
by ptmikheev
18 Oct 2020, 13:49
Forum: General Development
Topic: Lua scripting in OpenMW
Replies: 137
Views: 110921

Re: Lua scripting in OpenMW

I know at some point there were talks about making OpenMW entirely server-based. So even while playing singleplayer, you'd essentially be playing multiplayer with only 1 player connected. Is that approach abandoned? My arguments against this approach are pretty similar to what I have written in the...
by ptmikheev
17 Oct 2020, 23:25
Forum: General Development
Topic: Lua scripting in OpenMW
Replies: 137
Views: 110921

Re: Lua scripting in OpenMW

It is worth mentioning that there is a pull request that adds custom ui support to TES3MP. It is quite big and can be an example of a “complicated workaround”. I'd argue my PR is not a "workaround". Most of its code has nothing to do with either OpenMW or TES3MP, but with MyGUI. I'd proba...
by ptmikheev
17 Oct 2020, 11:08
Forum: General Development
Topic: Lua scripting in OpenMW
Replies: 137
Views: 110921

Re: Lua scripting in OpenMW

Also client-specific things (GUI, input bindings, scene graph API) logically should work on client side. It can be a local script, attached to the player character. It is quite logical because the input bindings makes sense only for this specific player and shouldn't directly affect other objects. ...
by ptmikheev
17 Oct 2020, 05:30
Forum: General Development
Topic: Lua scripting in OpenMW
Replies: 137
Views: 110921

Lua scripting in OpenMW

Existing scripting systems in Morrowind Scripting in vanilla Morrowind (mwscript) Every active script is executed every frame (i.e. circa 20-60 times a second). If something should be evaluated only once, a control variable should be used. A small example of a script: Begin small_example_script Sho...