MWEdit v0.5.5 - Using Guide (2024)


1. Introduction
2. Backing Up Plugins
3. What It Can't Do (Yet)
4. Loading Plugins
5. The Main View
6. Record Windows
7. Scripting
8. Dialogue
9. Containers, Levelled Lists
10. Find Text
11. Cleaning Records
12. Submitting Bugs
13. CSV Export/Imports
14. Script Templates

1. Introduction

MWEdit is an alternate editor for the Elder Scrolls: Morrowind RPG from Bethesda. While it is similarin appearance and design to the official Construction Set editor, it introduces new features that makecreating plugins easier.

This document explains some of the new features and the major differences from the official editor.

Comments and suggestions are always welcome...visit the SourceForge site at mwedit.sf.netto add bug/features, contribute to the forums, or simply e-mail me at

2. Backing Up Plugins

A common concern when using any unofficial editor such as MWEdit is the possible corruption of thefile data (plugins in this case), especially for an editor still in alpha/beta release. As when working with any data, it is reccommended that you back up your plugin files regularily.

Fortunately, MWEdit automatically backs up your plugin when you save it. The first time the pluginis backed up, the backup will be named "Plugin.esp.001". Subsequent back ups will be "Plugin.esp.002","Plugin.esp.003", etc... MWEdit will never overwrite an existing plugin which means that if you saveoften, you'll have an almost complete history of changes in your plugin. This is useful if you accidentlysaved something you didn't want or need to revert to an earlier version for debugging.

Note that for large plugins, you may wish to delete the backups occasionally if you are low ondisk space.

3. What It Can't Do (Yet)

MWEdit is by no means a complete plugin editor, and might not ever be depending on the amount of support and feedback I receive. The specific major areas that are currently missing are:
  1. 3D view (so you cannot add/edit cell references)
  2. Region paint
  3. Animations
  4. Path grid
  5. Cell reference information edit

4. Loading Plugins

The load dialog window has been improved slightly as it includes the last modified date of each plugin,can be sorted, and displays ESS save game files as well. It is important to note that all ESM master fileswill only be loaded once each session, greatly increasing the load speed for subsequent loads. If you needto reload a master file simply quit the program and restart it.

It is also possible to load a plugin without having to load the required master files. This is particularhelpful for quickly testing plugins or for debugging. It is important to note that if you do load a pluginwithout it's master(s) it is possible to 'lose' some information. For instance say an item in the plugin usessome script that is in the master file. If you edit and save that item the script field will be reset sincethe script doesn't exist. This may be fixed in a later version.

MWEdit uses a standard Multiple Document Interface (MDI) which allows you to edit several plugins at thesame time. You can use this to copy content from one plugin to another (simply drag records from the mainview from one document to the other).

5. The Main View

MWEdit's main view contains the same large item list but the tab control of record types has been changedinto a list on the left side of the window. The alphabetically sorted list allows you to more quickly select the desired type rather than having to find the type in the tab bar (which tends to keep changingthe tab positions).

You'll also notice that all record types are in the record type list rather than having some items in thelist and some accessed from the menu (like scripts, globals, etc... in TESCS). Currently the only thingnot in the list is the plugin info (author and description text).

The list's columns are also slightly different, such as with the addition of the "Mod" column for all recordtypes. This allows you to easily view all the active and deleted records by simply sorting by "Mod".Other record types have addition columns added as well. The last sort column as well as the column widthsare saved and restored when you switch record types.

The record list is color coded to quickly identify active (green) and deleted (red) records. You can usethe View-View Changed menu item to display only the current active records. Right-click on theitem list to display commands such as Copy, Rename, etc... New, and hopefully clearer, iconshave been created for all record types.

Note that all record lists in the game generally function identically. For instance, in the container itemlist you can double-click to display and edit that item.

6. Record Windows

There are number of important notes to mention in general about the windows used to edit individualrecords. The records are all similarily designed with a Save and a Cancel button inthe same place. Changes to a record are never permanently saved until you press the Save button.If you close the window or pressing the Cancel button you will lose any changes made sinceyou opened that window. This goes for the dialogue record window as well. Changes to any infos ina dialogue will not be recorded until the Save button is pressed. Note that if you save theplugin with open record windows, the changes made in those windows will not be stored in the file.

7. Scripting

One of the major reasons for creating MWEdit is to improve the ease of creating and debugging scripts whichare probably one of the most difficult aspects of plugin creation.

A completely new script compiler has been created from scratch which records many more error messages andwarnings than the TESCS compiler. An error message will prevent the script from compiling successfully whilea warning message will not (although the compiler script may not work as expected).Some of what the new compiler checks include:

  1. Object types used in functions are checked more rigourously. If the functionexpects an NPC ID, you'll receive an error/warning if you use another type.
  2. Functions that are known to be broken will result in a compiler message.
  3. Compiler does not permit the use of reserved words as local variables (such asEND, X, Y, etc...).
  4. Required spaces in IF and SET statements (spaces are added if missing)
  5. Checks for missing or extra function arguments.
  6. Does not allow the use of multiple objects references on one line.
  7. Checks the number of buttons/variables used in the MessageBox function.
  8. Warns for missing function commas.
  9. Warns for local/global ID conflicts.
  10. Checks if the function accepts variables or not.
  11. Checks maximum length of variables, IF, SET statements, etc...
  12. Checks for unknown or incorrect syntax.
When you compile a script, all warning and error messages are displayed in a splitter listat the bottom of the script window. You can double-click a message to jump to that point in thescript where the error occurred, or right-click the message to display more options such asviewing details of the message including any function information if available.

There are three levels of recording warning/error messages: Weak, Default, and Strong, allowing you to set how many warning/error messages are recorded during a compile.

The script text is color coded which allows you to easily identify functions, numbers, keywords,etc... A default white or blue color scheme is available or define your own custom colors which aresaved in the registry. The color formatting can also be disabled. The font used in the scriptwindow can also be selected.

Complete help on all the script functions is available from the help menu. The help describesall the function parameters, the return value, and function description as well as any specialfunction notes (such as whether it is a Tribunal function, etc...).

Other script commands include the ability to export and import scripts to/from text files andthe compiling of scripts on save automatically (no warrning/errors displayed). The Import/Exportoption is available from the File menu. Exporting a script will output the entire script(s)to a text file with the same name as the script (existing script files are overwritten). Whenyou import a script the script name will be taken from the script name within the file (i.e., begin scriptname).

8. Dialogue

Editting dialogue topics and INFOs is another difficult part of creating plugins which MWEditattempts to improve upon. Like the other record types, all changes you make to INFOs in a dialogueare not saved until you press the Save button. Otherwise, all additions, deletions, andmodifications are cancelled.

When copying or renaming dialogue topics you will also create a copy of all child INFOs. You cansimilarily create a copy of INFO records within a dialogue topic (select the records and right-clickon the list).

The INFO list in the dialogue window displays more information than that in TESCS. If the INFOuses any functions the entire function description (ex: 'GameHour >= 18') will appear in the listallowing you to more quickly determine which INFO you wish to edit.

Other options include being able to easily change the order of INFO records and the standardfiltering by NPC.

The INFO record IDs are generated slightly differently than in TESCS in a mannerwhich virtually guarantees that the ID is unique. The ID is an up to 30 digit number such as 610641915360541333977 with the following format:

Bytes 0- 9: Current system time in seconds since midnight, January 1, 1970
Bytes 10-19: Drive c: serial number (or clock ticks if serial number is not available)
Bytes 20-29: Incremented counter per application session starting at 1
Thus, it is highly unlikely that two people will ever generate the same INFO ID.

9. Containers and Levelled Lists

MWEdit makes it easier to work with containers and levelled lists. Items can dragged into these listsfrom the main view or from other containers/lists as in TESCS. Records can also be editted directlyfrom the container/list by double-clicking them. You can modify the item count in containers (or thelevel in levelled lists) by selecting one or more items and using the + and - keys toeasily increment/decrement the value.

10. Find Text

MWEdit has the same Find Text command as TESCS in the Edit menu. The command searchesthrough all currently loaded records for an exact match to the given text string (not case sensitive).The find results are improved in that they are all displayed in a single result list along with theirID and type (all of which can be sorted to quickly find the desired record). Double-click any recordin the list to edit that record (including INFO records which will open the parent dialogue topic aswell as the INFO edit window).

11. Cleaning Records

A new command, Clean, is available for most record types (including INFOs) and some sub-record types (such as individual cell references). To access the clean command select and right-click one or more records. The clean command attempts to permanently remove the given record from the current active file. Note that once you clean a record you cannot undo the clean(not yet anyways), other than reloading the plugin. This allows you to easily remove unwantededits/references or revert a record to its original state. Previously this had to be doneby a seperate utility such as TESAME.

It may not be possible to clean some INFO records depending on their contents. INFO records use a doubly linked list structure which, if a record is cleaned, can be permanently messed up resultingin lost INFO records or an infinite looping structure. Generally you can clean INFO records unlessyou move or add new ones. You'll receive a warning message if you cannot clean a particular INFO.

12. Submitting Bugs

Bug/error reports and feature requests are gladly welcome and can be either submitted on theMWEdit SourceForge Project Page or by E-mailing Me.You can find handy links in the Help menu as well on the toolbar for quickly displaying the bug reportingpage on the SourceForge project site.

13. CSV Import/Export

Many items have the option of being imported and exported from regular CSV (Comma Seperated Value) text files whichcan be output by most spreadsheet programs. This allows you to easily and quickly create a large number of items.You can import/export files by from the commands under the File menu.

Unlike the files output by the TESCS the supported CSV format is flexible and allows more record data to be importedor exported. The first line in the CSV file gives the column names for the subsequent data. In order for a CSV fileto be successfully imported, these column names much match that as listed in the table below. The columns can appearin any order and all but the ID and ItemType columns are optional.

CommonFields common to all, or most, record types.
IDThe unique item ID. If you specify an existing ID that has the same type as the imported record, the existing record will be overwritten. If the existing record is of a different type, an error will occur.
ItemTypeThe type of record to import. See the list of supported types below:
  • Activator
  • Alchemy
  • Apparatus
  • Armor
  • Book
  • Class
  • Clothing
  • Container
  • Enchantment
  • Global
  • Ingrediant
  • Light
  • Lock
  • Misc
  • NPC
  • Probe
  • Race
  • Repair
  • SoundGen
  • Sound
  • Spell
  • Static
  • Weapon
  • NameFor records that have a displayed object name.
    ModelThe NIF model of the objects that have one.
    IconInventory icon for carryable objects.
    ScriptThe script name for objects that can have them.
    WeightFloating point weight in game units
    ValueItem value, unsigned, usually long (4 billion), sometimes short (65535)
    PersistPersistance flag, True/False, Yes/No
    BlockedBlocked (read-only) record flag, True/False, Yes/No
    ActivatorActivator objects
    AutoCalcYes/No, True/False
    ValueUnsigned long
    ApparatusAlchemy apparatus objects (Retorts, Calcinators, etc...)
    QualityFloating point (1.0 = default)
    ValueUnsigned long
    AutoCalcYes/No, True/False
    ArmorArmor items
    TypeType of armor, one of:
    • Helmet
    • Cuirass
    • Left Pauldron
    • Right Pauldron
    • Greaves
    • Boots
    • Left Gauntlet
    • Right Gauntlet
    • Shield
    • Left Bracer
    • Right Bracer
    RatingArmor value, long
    ValueUnsigned long
    HealthMaximum condition of armor, long
    EnchantEnchantment ID string
    EnchantPtsAvailable enchant points, long
    BookBooks, scrolls, parchments, etc...
    TeachesSkill ID string
    ValueUnsigned long
    EnchantmentEnchantment ID string
    EnchantPtsAvailable enchant points, long
    ClassCustom class description
    DescriptionClass description string
    PlayableTrue/False, Yes/No
    ClothingAll clothing objects
    TypeType of clothing, one of:
    • Pants
    • Shoes
    • Shirt
    • Belt
    • Robe
    • R. Glove
    • L. Glove
    • Skirt
    • Ring
    • Amulet
    ValueUnsigned short
    EnchantPtsAvailable enchant points, long
    EnchantmentEnchantment ID string
    ContainerAny sort of container: chest, barrel, desk, etc...
    OrganicTrue/False, Yes/No
    RespawnTrue/False, Yes/No
    EnchantmentEnchantment description for use with items, potions, spells, etc...
    TypeType of enchantment, one of:
    • Cast Once
    • Cast Strikes
    • Cast When Used
    • Constant Effect
    CostCost to use the enchantment
    ChargeMaximum charge
    AutoCalcTrue/False, Yes/No
    GlobalGlobal variable definition for use in scripts and dialogue
    TypeType of value, one of:
    • short
    • long
    • float
    ValueGlobal variable value
    IngrediantIngrediant and foods
    ValueUnsigned long
    LightLight object, both visible, carrayable, and invisible
    ValueUnsigned long
    SoundSound ID string
    RadiusUnsigned long range in game units
    ValueUnsigned long
    UsesNumber of uses, long
    QualityFloating point quality (default = 1.0)
    MiscMiscellaneous objects
    ValueUnsigned long
    NPCNPC definition
    LevelNPC level, short
    RaceRace ID string
    FemaleTrue/False, Yes/No
    ClassClass ID string
    FactionFaction ID string
    RankFaction rank value, short
    AutoCalcTrue/False, Yes/No
    RespawnTrue/False, Yes/No
    AnimationAlternate animation file
    DispositionDisposition value, short
    BloodBlood type, one of:
    • Default (Red)
    • Skeleton (White)
    • Metal (Gold)
    • Default
    • Skeleton
    • Metal
    • Red)
    • White
    • Gold
    HairHair bodypart ID string
    HeadHead bodypart ID string
    Strength (Str)Attribute value, unsigned char (0-255). Ignored if AutoCalc is true.
    Agility (Agi)Attribute value, unsigned char (0-255). Ignored if AutoCalc is true.
    Speed (Spd)Attribute value, unsigned char (0-255). Ignored if AutoCalc is true.
    Endurance (End)Attribute value, unsigned char (0-255). Ignored if AutoCalc is true.
    Willpower (Wil)Attribute value, unsigned char (0-255). Ignored if AutoCalc is true.
    Intelligence (Int)Attribute value, unsigned char (0-255). Ignored if AutoCalc is true.
    Personality (Per)Attribute value, unsigned char (0-255). Ignored if AutoCalc is true.
    Luck (Luc)Attribute value, unsigned char (0-255). Ignored if AutoCalc is true.
    ItemInventory item ID. If you wish to add multiple items you need to have additional columns (ex: to add ten different items use ten Item columns).
    ItemExIventory item ID with the extended format:


    such as “gold_001=1000” (any spaces are ignored).

    SpellSpell ID string. Similar to the Item field, use multiple Spell columns to add several spells.
    SkillSkill value (unsigned char) with the format:


    such as “Block=54”. Ignored if AutoCalc is true.

    AttributeAttribute value (unsigned char) with the format:


    such as “Str=54”. Ignored if AutoCalc is true.

    GoldAmount of gold carried by the NPC (unsigned long)
    HealthMaximum health value (long, ignore if AutoCalc is true).
    FatigueMaximum fatigue value (long, ignore if AutoCalc is true).
    SpellPts (Magic)Maximum spell points value (long, ignore if AutoCalc is true).
    ProbeTrap disarming probes
    ValueUnsigned long
    UsesNumber of uses
    QualityFloating point quality (default of 1.0)
    RaceCustom race definition
    DescriptionRace description string
    PlayableTrue/False, Yes/No
    RepairArmorer repair item
    ValueUnsigned long
    UsesNumber of uses
    QualityFloating point quality (default of 1.0)
    SoundGenCreature sound generation record
    TypeType of sound, one of:
    • Left Foot
    • Right Foot
    • Swim Left
    • Swim Right
    • Moan
    • Roar
    • Scream
    • Land
    SoundSound ID string
    CreatureRelated created ID string
    SoundSound record
    MinRangeMinimum range of sound in game units (0 to 255)
    MaxRangeMaximum range of sound in game units (0 to 255)
    VolumeVolume of sound (0.0 to 1.0)
    SpellSpell definition
    AutoCalcTrue/False, Yes/No
    PCStartDoes the player start with this spell. True/False, Yes/No
    TypeType of spell, one of:
    • Spell
    • Ability
    • Blight
    • Disease
    • Curse
    • Power
    CostBase cost of spell in spell points (unsigned long)
    StaticStatic object
    WeaponAll weapon types
    ValueUnsigned long
    TypeWeapon type, one of:
    • Short Blades
    • Long Blade
    • Long Blade, 2-Hand
    • Blunt
    • Blunt, 2-Close
    • Blunt, 2-Wide
    • Spear
    • Axe
    • Axe, 2-Hand
    • Bow
    • Crossbow
    • Thrown
    • Arrow
    • Bolt
    ChopMinDamage, unsigned char (0-255)
    ChopMaxDamage, unsigned char (0-255)
    SlashMinDamage, unsigned char (0-255)
    SlashMaxDamage, unsigned char (0-255)
    ThrustMinDamage, unsigned char (0-255)
    ThrustMaxDamage, unsigned char (0-255)
    IgnoreResistIgnore creature resistance, True/False, Yes/No
    SpeedHigher is faster, floating point (default = 1.0)
    ReachLonger is farther, Floating point (default = 1.0)

    More supported records and fields will be added in the future. The easiest way to ensure a correct CSV file format isto export some sample records and load that file into your spreadsheet application. You can import multiple recordtypes but exported files contain only the selected records of the currently displayed type in the main view.

    When importing records, any existing record with the same ID will be overwritten, assuming it is the same item type.This allows you to reimport the same CSV file several times as you fine tune your item list.

    14. Script Templates

    MWEdit v0.5.5 introduced the idea of Script Templates to help modders to quickly create any number of similar scripts from a source script and a CSV (Comma Seperated Value) files. The Script Templatecommand can be found in the Edit menu.

    The script template file is a regular text file that contains the entire source script for thetemplates (from the begin to the end statements). The source script will also containspecial template variables that will be replaced by values in the CSV file. Take the following simplesource script as an example:

    begin [ScriptName]short DoOnceif ( DoOnce == 0 )player->AddItem, [ItemID1], [ItemCount1]set DoOnce to 1endifend
    The template variables are surrounded in square brackets ([]) and in the above example include [ScriptName],[ItemID1], and [ItemCount1]. The [ScriptName] is the only special and required templatevariable and specifies the script name for the new script (otherwise all scripts would be created with the same name and overwrite each other). The other template variables can include any combination of letters/numbers(not case sensitive). When you loading a source script the template variables found in the script will belisted in the template variable list. The source script text can also be modified in the Template Text tab.

    The CSV file in a regular Comma Seperated Value file that can be output by most spreadsheet applications.It contains the values of template variables to insert into the scripts to be created. A sample CSV filematching the above source example is given below:

    ScriptName, ItemID1, ItemCount1dh_itemscr_01, gold_001, 1050dh_itemscr_02, dh_item_test_01, 1dh_itemscr_03, dh_levelist_01, 4
    The first row in the CSV file contains the template variables matching those in the source script (withoutthe surrounding [] brackets). The columns can appear in any order and the template variable name is not case sensitive. When you load a CSV file you can check its contents in the CSV File tab to ensureit has been loaded successfully.

    There are several options available affecting the creation of script templates.

    Keep Quotes (CSV)
    When this option is checked, any quotes in the CSV file will not be removed from theCSV strings. This might be important if some of your IDs contain spaces. Dependingon how your CSV file is created or exported, keeping quotes may result in an incorrectformat for some values (like numbers). This option only takes affect for CSV filesloaded after the setting change.
    Only Complete Rows (CSV)
    With the option checked only complete rows in the CSV file will be considered validfor script creation. Incomplete rows (rows will missing values) will be ignored.
    Auto Script Name
    With this option checked you can specify a script prefix to use when creating new scripts.The Script names will start with your prefix followed by an 4 byte number index(scriptname_0001, scriptname_0002, etc...). If this option is unchecked the script namewill be taken from the ScriptName column in the CSV file.
    The Check button will check the current source script and CSV file and settings to ensureeverything works reasonably well. You will be notified of any errors or warnings. A check isalso automatically performed when you press the Create button which will actually createthe new scripts from the current settings. Note that any existing script name will be overwritten.
    Last Modified: 15 November 2003 by Dave Humphrey
    MWEdit v0.5.5 - Using Guide (2024)


    Top Articles
    Latest Posts
    Article information

    Author: Mrs. Angelic Larkin

    Last Updated:

    Views: 6297

    Rating: 4.7 / 5 (47 voted)

    Reviews: 86% of readers found this page helpful

    Author information

    Name: Mrs. Angelic Larkin

    Birthday: 1992-06-28

    Address: Apt. 413 8275 Mueller Overpass, South Magnolia, IA 99527-6023

    Phone: +6824704719725

    Job: District Real-Estate Facilitator

    Hobby: Letterboxing, Vacation, Poi, Homebrewing, Mountain biking, Slacklining, Cabaret

    Introduction: My name is Mrs. Angelic Larkin, I am a cute, charming, funny, determined, inexpensive, joyous, cheerful person who loves writing and wants to share my knowledge and understanding with you.