The Future of OpenMW Scripting

Everything about development and the OpenMW source code.
monyarm
Posts: 2
Joined: 14 Jun 2018, 18:52
Github profile: https://github.com/monyarm

Re: The Future of OpenMW Scripting

Post by monyarm » 14 Jun 2018, 18:57

I'd personally say go with B), deprecate oldscript, but keep it to support mods that use it, and only update it to fix bugs. Then work together with MWSE-Lua to create a common API.

User avatar
psi29a
Posts: 4267
Joined: 29 Sep 2011, 10:13
Github profile: https://github.com/psi29a/
Contact:

Re: The Future of OpenMW Scripting

Post by psi29a » 14 Jun 2018, 20:22

I'm in favour of newscript, Lua specifically, for a couple of reasons.

Being liberated from something morrowind specific with all the decisions that went into making it what it is. If we are pushing the whole OpenMW is an open-source open-world RPG engine that also happens to support playing Morrowind, then having Lua as the defacto scripting language is agnostic politically and forward thinking for modern game development.

We can support oldscript (and oldscript+) by translation, either before runtime or at runtime to our Lua based API.

MWSE has offered to break API if that meant being compatible with OpenMW in the future. As NullCascade said, better to break early.

As a 3rd-party library, like osg/openal/etc, it is also yet another bit we don't have maintain ourselves and can get help from the community around the library. This includes Lua editors already out there, including those baked into IDEs.

That's my opinion on the matter.

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

Re: The Future of OpenMW Scripting

Post by akortunov » 14 Jun 2018, 20:31

I'd also vote for Lua.
And indeed, if we want to use a common API, it would be better to document it in nearest future. Later MWSE-Lua and TES3MP will have own API, so amount of work to implement a compatible API will be greater.

Jad
Posts: 5
Joined: 18 Nov 2015, 20:22

Re: The Future of OpenMW Scripting

Post by Jad » 14 Jun 2018, 20:44

Not an OpenMW contributer, but I'd also vote for Lua. Morrowind-script itself can barely be considered a language at all, it is literally just the most basic of basics (if/else/while) - to try and expand it into something modern would be essentially writing your own scripting language from scratch. Why bother with that huge effort when there is already a tried, tested, and performant product made specifically for this task. One that your own community is already actively invested in.

Lua is powerful and flexible enough that I don't see any reason why we can't have a high level scripting API that is cross-compatible with all of MWSE/OpenMW/TESMP.

User avatar
Jemolk
Posts: 106
Joined: 20 Mar 2017, 02:12
Location: Sadrith Mora

Re: The Future of OpenMW Scripting

Post by Jemolk » 14 Jun 2018, 20:55

Option B seems by far the optimal choice. Not someone who is able to contribute code at the moment (don't have the skill), but the ability to have crossover between MWSE and OpenMW is HUGE from the standpoint of a user/hopeful modder. And when I say huge, I mean it could very easily be the difference between OpenMW being the optimal engine and most people sticking with vanilla. We have the opportunity to resolve the problem permanently. Let's take advantage of it. It's also not like we have to support the native code executing portion of LUA. I'm absolutely coming around to your position on that, Zini, but please, we could do so much more if the rest could cross over between MWSE and OpenMW!

EDIT: Also, we've already got a volunteer to do it! Remember NullCascade's offer? Please take them up on it!

User avatar
Thunderforge
Posts: 493
Joined: 06 Jun 2017, 05:57
Github profile: https://github.com/Thunderforge

Re: The Future of OpenMW Scripting

Post by Thunderforge » 15 Jun 2018, 00:04

psi29a wrote:
14 Jun 2018, 20:22
If we are pushing the whole OpenMW is an open-source open-world RPG engine that also happens to support playing Morrowind, then having Lua as the defacto scripting language is agnostic politically and forward thinking for modern game development.
I think that you've raised an excellent point. Oldscript or even oldscript+ isn't really desirable for someone creating a new game unrelated to Morrowind. Lua or a similar language seems the natural choice if we want to make the engine appealing to people other than Morrowind enthusiasts.

User avatar
raevol
Posts: 2786
Joined: 07 Aug 2011, 01:12
Location: Caldera

Re: The Future of OpenMW Scripting

Post by raevol » 15 Jun 2018, 04:06

Option C will still let us play Morrowind on OpenMW right? The translator will be able to take the scripts from the original content and convert them into newscript?

davidcernat
Posts: 95
Joined: 19 Jul 2016, 01:02

Re: The Future of OpenMW Scripting

Post by davidcernat » 15 Jun 2018, 04:35

I'm fine with whichever decision is made in this regard, and I'll do my best to make TES3MP work with it.


That being said, TES3MP has been going with option B since the project was first started by Koncord, 7 months before I joined. Oldscript continues to exist and be used as the clientside scripting language, completely unchanged except that certain functions in oldscript now also send multiplayer packets. However, because oldscript is strictly singleplayer-oriented and only assumes the existence of one player in a single area, we need a separate serverside scripting system for multiplayer logic, which – in practice – ends up having most of the same functionality as oldscript.

If we agree that multiplayer will someday be added to OpenMW, what will that mean for the scripting systems? Won't we end up with de facto options D, E and F, where Koncord's option B is added to the A, B or C chosen here?

I'm adaptable enough, so I won't be complaining, but what's the ultimate endgame?

JDGBOLT
Posts: 17
Joined: 05 Apr 2018, 19:52
Github profile: http://github.com/JDGBOLT

Re: The Future of OpenMW Scripting

Post by JDGBOLT » 15 Jun 2018, 07:43

I also vote for a common API that could be developed in conjunction between OpenMW and MWSE, probably lua but really whatever is the best fit. I personally think having compatibility between both would be a pretty major thing, as it would ensure that average Joe player could just install a mod made for either and have it just work. Now I think it would be good to have a lot of back and forth in the design and what works best for both projects, as the Lua support in MWSE is still in it's infancy. Now, whether there would be pure 100% one-to-one identical functionality, that could possibly be a bit more flexible, since if there is some set of instructions that would just not be feasible in either without massive rearchitecting of the entire system, it might be necessary to have one or the other not support that instruction due to the sheer amount of engineering required. Even if you have only 95% coverage of the relating API's, that is still a hell of a lot better than 0% and having two completely incompatible systems. For example, if there is some mod that for whatever reason does 100% need say having compiled DLL's or whatever, it might not be feasible to support that in OpenMW as it is designed to be a multiplatform engine and you can't realistically expect any modder to build binaries for different operating systems. Ideally the API itself would be improved in time so that whatever mod ideas modders can come up with can be supported in a cross platform way, but there may be some that just aren't possible for whatever reason.

I would honestly like to see cooperation rather than rivalry between the two projects in order to make a better modding environment for this beloved 16 year old game and whatever happens in the future if other projects want to build upon it for whatever projects they want to do. I would also definitely support Lua or some other purpose built scripting language rather than trying to engineer one of our own, as lets face it, the Morrowind scripting language is really minimal and basic and I think trying to bolt on new functionality to it could just end up breaking things with the thousands of mods that have come out before. Having a solid break between old script and new script I think is important in ensuring that mods using either system don't become broken for whatever reason. If we have a nice, bug free Morrowind scripting language which is able to run most of the old content and works reliably, and a new, incompatible but much more powerful scripting system that would be the best of both worlds. Also being able to make use of the existing knowledge base for an existing language would be a great boon, as you could say use an external editor when editing scripts or use third party references or libraries or snippets or whatever and be able to hit the ground running faster than you would otherwise. You save a lot of engineering by using something that is already built, and Lua is purpose built for game scripting and does very well at that.

Well, anyway, that is just my opinion as someone who used to hack on the scripting language when there was no such thing as MWSE and encountering crash after crash trying to get it to do things it really wasn't designed to.

User avatar
Ravenwing
Posts: 266
Joined: 02 Jan 2016, 02:51

Re: The Future of OpenMW Scripting

Post by Ravenwing » 15 Jun 2018, 07:55

Based on everything said so far, here’s how I see where things stand. The only advantage to B is that it’s faster than C. C should have a cleaner codebase and the conversion feature can be maintained separately from the main OpenMW codebase apart from the newscript functions it converts to. Therefore, C should be our goal, but there’s no reason that can’t happen a while after B is implemented with minimal additional effort.
The only reasons to go for oldscript+ are that it will be easier and more incrementally implemented, it’s more familiar to modders, and it’s easier to fix small things in mods than rewrite full scripts. Most modders are more familiar with MWSE than oldscript anyway, so using a newscript with an API that aligns with MWSE would make more sense in that case.
Most users are going to be angry that they have to fix anything at all and aren’t willing to touch it. Nice modders are already willing to fix compatibility while grumpy ones aren’t willing to do anything. Good modders should convert their scripts to newscript so that maintaining their own codebase is easier for future updates and features. The only one I think is truly legitimate is that it will be easier for developers. Unfortunately, users and modders don’t really care what’s easier for you, so that’s not going to win OpenMW any users.

The main reasons against B is that it will require scripting rewrites and it will slow post-1.0 development. But B won’t require rewrites for anything that uses oldscript, and oldscript+ was going to require rewrites anyway. Worse, oldscript+ would possibly require rewrites of things that worked with oldscript! To many casual users this would be seen as a regression. The concern that it will slow development is legitimate, however this may not be as large an issue simply because of where we are in development anyway as explained below.
There are two reasons people are not using OpenMW. It’s not as pretty as Morrowind+MGE, and it can’t run all their mods. The first is entirely dependent on OpenMW post-1.0. The second is mostly dependent on the scripting capabilities of OpenCS. At one point it sounded like we decoupled progress between OpenMW and OpenCS, and now it sounds like we’re trying to recouple them. I’m sure I’m overlooking some crucial aspects, but it seems to me that OpenMW is ready for 1.0, at least in the next couple of release cycles. OpenCS is nowhere near that.
The resulting excitement for OpenMW-1.0 should help with promoting better graphical features, for most people this is enough to adopt. That is exciting enough to hold users over until we get newscript sorted out. I would have been more supportive of oldscript+, but since NullCascade is willing to work with us, it seems like we’d be shooting ourselves in the foot to not jump on an opportunity to make migrating to OpenMW easier by doing our best to merge the newscript and MWSE APIs. I’m sure it’s much more complicated than that, but even partial MWSE support would be very helpful for modders as long as the areas they need to fix are well documented.

I just feel like the main reasons for oldscript+ are that it will be easier and potentially better in near and midterm, but it will screw us over long term. Realistically, I don’t think we’ll have “majority market share” of Morrowind users until OpenMW-2.0, so worrying about 1.0 to 2.0 isn’t actually that important. I’m defining 2.0 as when we’ve fully implemented all MGE, MCP, and MWSE features. I know you’re skeptical about supporting MWSE mods natively, but perhaps one of our midterm goals in implementing option C would be converting from oldscript & MWSE, but that is a whoooole other discussion.

Locked

Who is online

Users browsing this forum: No registered users and 5 guests