MWSE scripting functions

Feedback on past, current, and future development.
User avatar
Jemolk
Posts: 23
Joined: 20 Mar 2017, 02:12
Location: Sadrith Mora

MWSE scripting functions

Post by Jemolk » 25 Oct 2017, 01:22

Would this be really hard to do or otherwise complicate maintaining the code too much? Because there are a bunch of MWSE-using mods out there, and getting to be more all the time, that I and others really want to use. I'm on Linux, so I'm kinda stuck with OpenMW unless I want to screw around with a Windows partition, but I think that would be a huge boon to OpenMW in terms of exposure, playerbase, more mod support and as a consequence new devs.

I'd do it myself, but I haven't really gotten a chance to learn coding yet, and I really would rather not wait until next year to be able to play mods that use MWSE script functions. :oops: I'm sure I'm not alone.

User avatar
AnyOldName3
Posts: 566
Joined: 26 Nov 2015, 03:25

Re: MWSE scripting functions

Post by AnyOldName3 » 25 Oct 2017, 01:43

OpenMW is likely to provide its own script extensions, which will be far more powerful and useful than MWSE but won't be compatible.

MWSE mostly just adds ways to access functions that already exist in the original Morrowind executable from the scripting system, but in OpenMW, these don't necessarily exist. Usually, this is because Bethesda did something either stupid or old-fashioned, and we don't want to repeat their mistakes. The big differences are to do with handling references, as the internal formats used by the engines are different, but I can't remember the details.

It may be possible, however, to build an MWSE compatibility layer on top of any future OpenMW scripting extensions, but it'll probably be better to port old mods to the new system wherever possible.

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

Re: MWSE scripting functions

Post by Jemolk » 25 Oct 2017, 02:39

AnyOldName3 wrote:
25 Oct 2017, 01:43
OpenMW is likely to provide its own script extensions, which will be far more powerful and useful than MWSE but won't be compatible.

MWSE mostly just adds ways to access functions that already exist in the original Morrowind executable from the scripting system, but in OpenMW, these don't necessarily exist. Usually, this is because Bethesda did something either stupid or old-fashioned, and we don't want to repeat their mistakes. The big differences are to do with handling references, as the internal formats used by the engines are different, but I can't remember the details.

It may be possible, however, to build an MWSE compatibility layer on top of any future OpenMW scripting extensions, but it'll probably be better to port old mods to the new system wherever possible.
Understood. Out of curiosity, when do you believe that will happen? The main thing I care about is having the current MWSE functionality available. If I have to alter scripts to port the mods over, that's fine, I just want to see it be possible to do it.

EDIT: Also, if there is a guide on OpenMW scripting functions I could look at somewhere, that would be wonderful. A bunch of mods with scripting seem to break in OpenMW, and a mod author I was talking with on the Nexus was saying it was difficult making his stuff work with OpenMW. Even a list of functions and syntax would be enormously helpful.

Texafornian
Posts: 5
Joined: 15 Sep 2016, 22:32

Re: MWSE scripting functions

Post by Texafornian » 25 Oct 2017, 04:11

It might be beneficial to have that mod author (or you) post some of his issues in the bugtracker, assuming he isn't relying on MWSE functions.

I'm not an OpenMW dev, so take this with a grain of salt, but almost all vanilla functions *should* work. Here's an (older) site that lists them: http://en.uesp.net/morrow/editor/mw_cscommands.shtml

And here is the list of implemented functions in OpenMW to compare against:
https://wiki.openmw.org/index.php?title ... g_(status)

User avatar
AnyOldName3
Posts: 566
Joined: 26 Nov 2015, 03:25

Re: MWSE scripting functions

Post by AnyOldName3 » 25 Oct 2017, 09:45

As for syntactic differences, openmw better matches what Bethesda say the script language does, so, for example, requires that ifs are matched with else ifs, whereas the original system wouldn't require this and would just guess the intended behaviour based on what colour socks the author was wearing that day, but spit out no warnings.

User avatar
lysol
Posts: 726
Joined: 26 Mar 2013, 01:48
Location: Sweden

Re: MWSE scripting functions

Post by lysol » 25 Oct 2017, 10:30

AnyOldName3 wrote:
25 Oct 2017, 09:45
whereas the original system wouldn't require this and would just guess the intended behaviour based on what colour socks the author was wearing that day, but spit out no warnings.
Haha, quoted for truth!

I just can't understand why so many on reddit and the like are always going "you need to know that if you run OpenMW, you might run into scripting bugs because their scripting engine is still not working as the vanilla engine does", when it is actually OpenMW's scripting engine that actually works as it should.
Normal mapped texture replacers, exclusive for OpenMW:
My Nexus page

User avatar
Zini
Posts: 5134
Joined: 06 Aug 2011, 15:16

Re: MWSE scripting functions

Post by Zini » 25 Oct 2017, 11:06

I don't have the details at hand right now, but I remember seeing syntactic aspects of MWSE that would screw over our own scripting implementation. So a fully compatible re-implementation of MWSE is pretty much out of the question.

Functionality is of course a different point. We already have some of it and I expect that we will start to put in more almost immediately after we are done with the groundwork for post-1.0 development. How long it will take until we have all of it I can not say. That depends on how much developer activity we have.
EDIT: Also, if there is a guide on OpenMW scripting functions I could look at somewhere, that would be wonderful. A bunch of mods with scripting seem to break in OpenMW, and a mod author I was talking with on the Nexus was saying it was difficult making his stuff work with OpenMW. Even a list of functions and syntax would be enormously helpful.
The OpenMW scripting language works like the original language and removes a bunch of limitations the original language had. Everything else is just better error checking. If your MW scripts don't work properly in OpenMW then there is a good chance that they were broken to begin with.

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

Re: MWSE scripting functions

Post by Jemolk » 25 Oct 2017, 13:54

lysol wrote:
25 Oct 2017, 10:30
AnyOldName3 wrote:
25 Oct 2017, 09:45
whereas the original system wouldn't require this and would just guess the intended behaviour based on what colour socks the author was wearing that day, but spit out no warnings.
Haha, quoted for truth!

I just can't understand why so many on reddit and the like are always going "you need to know that if you run OpenMW, you might run into scripting bugs because their scripting engine is still not working as the vanilla engine does", when it is actually OpenMW's scripting engine that actually works as it should.
*snort* Okay, got it! That's kinda funny, honestly. So the upshot is that broken scripts will still work (at least, for a given value of "work") on the vanilla engine, but you have to make sure they're not broken on OpenMW. And most people don't realize that's their problem. Okay then, I'll make sure to spread the word on that one.

Loriel
Posts: 116
Joined: 28 May 2015, 00:44

Re: MWSE scripting functions

Post by Loriel » 25 Oct 2017, 14:10

Opening the mod in the OpenMW CS then running File/Verify will generate a fairly comprehensive list of warnings and errors (from the OpenMW perspective).

Unfortunately some of the error-reporting is a bit too enthusiastic - empty spell names probably don't deserve such prominence for example. Also there are so many errors and warnings from the base game esms that they tend to drown out the ones from the mod you are testing.

Loriel

onionland
Posts: 47
Joined: 29 Jul 2014, 00:43

Re: MWSE scripting functions

Post by onionland » 25 Oct 2017, 15:34

Loriel wrote:
25 Oct 2017, 14:10
Unfortunately some of the error-reporting is a bit too enthusiastic - empty spell names probably don't deserve such prominence for example. Also there are so many errors and warnings from the base game esms that they tend to drown out the ones from the mod you are testing.
The base game esms really should be silenced by default, more often than not you will only be dealing with your own scripts. You shouldn't be seeing those errors unless actively toggling that on as an option. opencs is like an enthusiastic dog running in from of the door you are trying to open.

edit: grammar

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests