0 of 0

File information

Last updated

Original upload

Created by

MWSE Team

Uploaded by

NullCascade

Virus scan

Safe to use

Tags for this mod

About this mod

A complete rewrite of Morrowind Script Extender, featuring new functionality and increased performance.

Requirements
Permissions and credits
Mirrors
Changelogs
Morrowind Script Extender
Version 2.0.0
GitHub | Read the Docs | Discord
Submit Bug Report/Feature Request

The Morrowind Script Extender adds new functionality to the scripting language of Morrowind, allowing for new features to be implemented into the game. This release marks a complete rewrite of how MWSE accomplished this, while still retaining (and adding to) the functionality of the extension. The result is a cleaner, faster, and fixed project.

This new version has been tested by volunteers at the Morrowind Modding Community Discord. Please report bugs to NullCascade on Discord, or at GitHub.

Visit the documentation over at mwse.readthedocs.io for a list of functions and a complete changelog.




Installation
Prior to installing, ensure that you have the Morrowind Graphic Extender XE (MGE-XE) 0.10.0 installed. MWSE v2 requires this to attach to the game. Older versions of the Morrowind Graphic Extender do not work with newer versions of MWSE.
  1. Download the latest zip file from the download tabs, or GitHub.
  2. Extract the MWSE.dll file into your Morrowind installation directory.



Recent Changes (v2.0)
Added: 
  • xContentListFiltered: Behaves like xContentList, with an additional filter parameter passed. The filter allows restricting results by object type and/or enchantment state.
  • xEquipmentList: Behaves similar to xContentListFiltered/xContentList, returning inventory information. This function allows looping over equipped items instead of all items, and also returns some subtype information.
  • xGetAlchemyInfo: Allows the fetching the effect count (and flags) for an alchemy object.
  • xGetIngredientEffect: Returns the effect id and skill or attribute id associated with the effect. 
  • xGetItemCount: This function behaves like the vanilla GetItemCount, but accepts a variable input.
  • xGetKeyBind: Obtains the key codes used for input (e.g. what the current activation key is). Also supplies information such as if an input is bound to a keyboard, joystick, or mouse. The returned values can be used in both xKeyPressed and the MGE key functions.
  • xGetMCPFeatureState: The Morrowind Code Patch has become more important with its fixes to the script parser, and other scripting extensions. If the user has the MCP installed and hasn’t deleted the mcpatch folder, this function will let the script know if a MCP feature is enabled or disabled.
  • xGetModel: This function gets the model of either a reference or an object.
  • xGetStackSize: This function returns the size of a stack. If it can’t find the stack information, it returns 0.
  • xSetIngredientEffect: Sets an ingredient’s effect at a given index. 
  • xStartScript, xStopScript and xScriptRunning: These functions are wrappers around their non-MWSE counterparts, and accept a variable input. Additionally, calling xStopScript 0 will effectively call xStopScript on the current script.
  • xStringCapture: Performs a regex match using a given pattern on a given string. Unlike xStringMatch, this function returns the matched groups.

Changed: 
  • Performance improvements across the board. The underlying mechanism used to extend Morrowind’s scripting system has been entirely rewritten to improve performance. Performance gains as high as 90 FPS on heavy MWSE-scripted modlists have been recorded. Mods such as MWSE Containers and MWSE Alchemy Filters should no longer cause (very) long hiccups, and mods like The Bare Necessities should not cause such severe performance hits. This opens new scripting opportunities that previously were not viable due to the old version’s performance issues. Your mileage my vary, depending on your particular bottlenecks. 
  • String storage has changed under the hood. It’s just as reliable as before, but is more recognizable. Strings are stored by ID rather than as string pointers, starting at an index of 40,000. An invalid/empty response is still treated as zero. Scripters do not need to change how they handle strings in any way. This has the added side-benefit that string IDs can more reliably be stored in globals (though they will still not persist through reloading the save).
  • Version information has adapted to something more traditional. MWSE is mature software that has been out for many years. It isn’t in alpha or beta anymore. As such, it is treating pre-2.0 MWSE as version 1, and making the leap to version 2 with this entire rewrite.
  • xStringParse: This function can now be used to determine MWSE’s version number at runtime. This can be useful for ensuring that a feature is available.
  • xGetValue and xSetValue now work on gold without hardcoding values. This allows you to change the value of gold itself.
  • xAddEffect, xDeleteEffect, xGetEffectInfo, and xSetEffectInfo now support ALCH (potion) objects.
  • xGetRef now returns a reference to its caller when given the argument 0.

Fixed:
  • xAITravel, xStartCombat, xDistance, xGetCombat, xInventory, xRefID, and xRefType no longer cause a crash when called by an invalid reference.
  • xGetRace no longer leaks memory. Arrays returned by this function are reused and refreshed with the newest information on each call.
  • xPlace’s returned reference can now be reliably used in the same frame that it was created.
  • xSetBaseEffectInfo correctly functions. Previously it had a bug that prevented it from actually setting any values.
  • xSetName is now safe to use, and no longer rewrites random portions of memory. This function used to cause various issues if the new name was longer than the old name on most object types. This could cause random value changes, and make the game prone to crashing.
  • xSetQuality now works correctly on apparatus.
  • xSetWeight now works correctly on lights.
  • xStringLength now correctly returns 0 when called on an empty string.

Known Issues:
  • xEquipmentList: The count returned is always 1, though more than one ammo item could be equipped.
  • xGetEncumbrance: This function is unreliable and should not be used yet. This is not a regression.

REPORT BUG
Top