Morrowind Mod:MWSE

The UESPWiki – Your source for The Elder Scrolls since 1995
Jump to: navigation, search


Morrowind Script Extender
(MWSE, MWSE-Lua)
MWSE program icon
Author Authors, Code Contributors.
Current Version 2.x
Supported Games Morrowind
Links
Download GitHub
Project Website GitHub.io
Requirements
Visual Studio x86 2022 Redistributable, Morrowind Code Patch, MGE XE

The add-on MWSE (or Morrowind Script Extender) extends Morrowind by fixing core engine bugs, extending the game's scripting language, and providing a new Lua-based scripting API. This allows modders to create mods that would otherwise have been very difficult, if not impossible, with the functions found in the standard scripting language. MWSE is open-source software.

Documentation for MWSE can be found on its website. For discussion and updates on current MWSE development, follow the #mwse channel on the Morrowind Modding Community Discord.

Installation[edit]

The latest version of MWSE can be found on GitHub. Historical builds can be found on AppVeyor for up to 6 months.

With rapid development from 2017 to 2022, MWSE now comes bundled with an updater program. To ensure that newer mods function, be sure to run MWSE-Updater.exe. This updater downloads the same files from GitHub and extracts them for you.

MWSE requires the Visual Studio x86 2022 Redistributable, Morrowind Code Patch, and Morrowind Graphic Extender XE (MGE XE).

Note: MGE XE comes bundled with MWSE-Updater. You can run this instead of downloading MWSE manually.

Unlike previous versions, MWSE no longer requires the use of a launcher program. Morrowind can be opened normally.

Features[edit]

Engine Patches[edit]

A complete list with more details can be found on MWSE's website.

Similar to the Morrowind Code Patch, MWSE makes changes to the game engine to ensure a more stable and consistent experience. Some of these features can be toggled or configured in the in-game mod configuration menu. Key engine patches are highlighted below.

  • Morrowind creates crash dumps and improved logging, which can be sent to developers to help further improve the game.
  • ESM/ESP mod limit raised from 256 to 1024.
  • Morrowind may now run when not in focus.
  • Movies can play with letterboxing, rather than being stretched.
  • Custom classes may now have their own images, stored in the levelup texture directory.
  • Improved load times, particularly when using Mod Organizer 2.
  • Extended NetImmerse support, including implementation of NiLinesData and fixes to NiFlipController and NiUVController.
  • Performance improvements to the dialogue system and scripting systems.
  • A variety of other bug fixes, crash fixes, and optimizations.

Lua Scripting[edit]

MWSE provides an event-driven scripting API through the Lua programming language. Because this is not dependent on the game's provided scripting language, it opens more modding possibilities. Some new possibilities from this scripting framework include:

  • The ability to modify the game's user interface.
  • The ability to create lua-based engine patches.
  • The ability to change the results of various game functions. This allows the de-hardcoding of various combat, dialogue, bartering, spellcasting, and other mechanics.
  • The ability to offer user-customization in the form of an in-game mod configuration manager.
  • The ability to store arbitrary data in the save game.
  • The ability to manipulate the dialogue system from lua.
  • The ability to directly manipulate the game's scene graph to create new visual effects and dynamic meshes.
  • The ability to provide translations to multiple languages from a single mod download.
  • The ability to interface with MGE XE to change its behavior at runtime.

Many of these features are designed in a way so that any required esp files do not cause crashes if a user does not have MWSE installed, or is using OpenMW.

There are many guides available on the MWSE website.

MWScript Extensions[edit]

Though the MWSE-mwscript API is not under active development, full support is provided for legacy mods that make use of it. Some of the newer mwscript functions provide additional support to interface with newer lua scripting. MGE XE provides additional extensions.

Documentation for the 167 mwscript functions available in mwse-mwscript can be found in the following categories:

Creating mods using the mwse-mwscript interface requires the use of MWEdit. This external editor will allow you to compile and save scripts. Be sure to use the customfunctions.dat found with MWSE to allow this. Running the MWSE updater will ensure that this file is up to date.

Development History[edit]

Original Development[edit]

MWSE (2007)
MWSE program icon
Author cdcooley, MWSE Dev Team
Current Version 0.9.4a
Links
Download MW Modding History
Project Website SourceForge page

MWSE was originally released to SourceForge in 2007, and was the primary development branch until 2014. This version included around 100 custom functions for mwscript.

The original list of MWSE authors include:

  • Charles Cooley (cdcooley)
  • FreshFish
  • Timeslip
  • AnthonyG
  • Tim Peters
  • Grant McDorman
  • Cody Erekson (Fliggerty)

Multiple branches of MWSE existed at this point, though only one was completed and distributed. A stale branch from 2008 by DarkSecond and Grant McDorman would later be used for the 2017 rewrite.

Merzasphor's Fork[edit]

MWSE (2015-2017)
MWSE program icon
Author Merzasphor
Current Version 0.9.5-alpha.20171114
Links
Download GitHub releases
Project Website GitHub page

On November 2014, community member Merzasphor began developing and releasing new versions of MWSE. These new updates are based on the old 0.9.4a release and contain bugfixes and dozens of brand new functions. This development included 56 new functions and a dozen updates to existing functions.

This development was spearheaded on the Bethesda forums. Links to this discussion can be found below, courtesy of the Wayback Machine:

Development of this version continued into 2017, with the last version released November 14th, 2017.

Modern Rewrite[edit]

The current version of MWSE began development on November 17th, 2017 by NullCascade and Merzaphor, and has since continued development into 2022. This version was a complete rewrite of the MWSE codebase, using a stale branch of the original hooks found in a 2008 branch by DarkSecond and Grant McDorman. It has since been worked on by Hrnchamd, Petethegoat, Greatness7, Sephumbra, OperatorJack, Merlord, and others. A website, hosted at GitHub.io, is kept up to date largely by the contributions of C3pa.

On February 8th, 2018 the first version of the rewrite was released to the public. This first version mainly focused on performance improvements and new features desired by mwscript users. A complete changelog can be found here. Some highlights include:

  • Drastically improved performance of running mwse-mwscript functions. This improvement could be as high as 90 FPS on heavily modded installs.
  • Added 14 new mwscript functions: xContentListFiltered, xEquipmentList, xGetAlchemyInfo, xGetIngredientEffect, xGetItemCount, xGetKeyBind, xGetItemCount, xGetMCPFeatureState, xGetModel, xGetStackSize, xSetIngredientEffect, xStartScript, xStopScript, xScriptRunning, xStringCapture.
  • Improvements to 8 other mwscript functions: xStringParse, xGetValue, xSetValue, xAddEffect, xDeleteEffect, xGetEffectInfo, xSetEffectInfo, xGetRef.
  • Bug fixes to 14 mwscript functions: xAITravel, xStartCombat, xDistance, xGetCombat, xInventory, xRefID, xRefType, xGetRace, xPlace, xSetBaseEffectInfo, xSetName, xSetQuality, xSetWeight, xStringLength.
  • Many improvements to underlying storage to prevent crashes.

After this initial rewrite, MWSE shifted focus to Lua-based scripting. There have been over two thousand builds of MWSE since then, the latest always available on the MWSE Updater. Many of the new features can be seen in the main features section of this article.

See Also[edit]