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.net to add bug/features, contribute to the forums, or simply e-mail me at uesp@sympatico.ca.
Fortunately, MWEdit automatically backs up your plugin when you save it. The first time the plugin is 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 save often, you'll have an almost complete history of changes in your plugin. This is useful if you accidently saved 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 on disk space.
It is also possible to load a plugin without having to load the required master files. This is particular helpful for quickly testing plugins or for debugging. It is important to note that if you do load a plugin without it's master(s) it is possible to 'lose' some information. For instance say an item in the plugin uses some script that is in the master file. If you edit and save that item the script field will be reset since the 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 the same time. You can use this to copy content from one plugin to another (simply drag records from the main view from one document to the other).
You'll also notice that all record types are in the record type list rather than having some items in the list and some accessed from the menu (like scripts, globals, etc... in TESCS). Currently the only thing not 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 record types. 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 widths are 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 use the View-View Changed menu item to display only the current active records. Right-click on the item list to display commands such as Copy, Rename, etc... New, and hopefully clearer, icons have been created for all record types.
Note that all record lists in the game generally function identically. For instance, in the container item list you can double-click to display and edit that item.
A completely new script compiler has been created from scratch which records many more error messages and warnings than the TESCS compiler. An error message will prevent the script from compiling successfully while a warning message will not (although the compiler script may not work as expected). Some of what the new compiler checks include:
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 are saved in the registry. The color formatting can also be disabled. The font used in the script window can also be selected.
Complete help on all the script functions is available from the help menu. The help describes all the function parameters, the return value, and function description as well as any special function 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 and the compiling of scripts on save automatically (no warrning/errors displayed). The Import/Export option 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). When you import a script the script name will be taken from the script name within the file (i.e., begin scriptname).
When copying or renaming dialogue topics you will also create a copy of all child INFOs. You can similarily create a copy of INFO records within a dialogue topic (select the records and right-click on the list).
The INFO list in the dialogue window displays more information than that in TESCS. If the INFO uses any functions the entire function description (ex: 'GameHour >= 18') will appear in the list allowing 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 standard filtering by NPC.
The INFO record IDs are generated slightly differently than in TESCS in a manner which virtually guarantees that the ID is unique. The ID is an up to 30 digit number such as 610641915360541333977 with the following format:
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 resulting in lost INFO records or an infinite looping structure. Generally you can clean INFO records unless you move or add new ones. You'll receive a warning message if you cannot clean a particular INFO.
Unlike the files output by the TESCS the supported CSV format is flexible and allows more record data to be imported or exported. The first line in the CSV file gives the column names for the subsequent data. In order for a CSV file to be successfully imported, these column names much match that as listed in the table below. The columns can appear in any order and all but the ID and ItemType columns are optional.
Record | Field | Description |
---|---|---|
Common | Fields common to all, or most, record types. | |
ID | The 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. | |
ItemType | The type of record to import. See the list of supported types below:
|
|
Name | For records that have a displayed object name. | |
Model | The NIF model of the objects that have one. | |
Icon | Inventory icon for carryable objects. | |
Script | The script name for objects that can have them. | |
Weight | Floating point weight in game units | |
Value | Item value, unsigned, usually long (4 billion), sometimes short (65535) | |
Persist | Persistance flag, True/False, Yes/No | |
Blocked | Blocked (read-only) record flag, True/False, Yes/No | |
Activator | Activator objects | |
Alchemy | Potions | |
AutoCalc | Yes/No, True/False | |
Weight | ||
Value | Unsigned long | |
Apparatus | Alchemy apparatus objects (Retorts, Calcinators, etc...) | |
Quality | Floating point (1.0 = default) | |
Weight | ||
Value | Unsigned long | |
AutoCalc | Yes/No, True/False | |
Armor | Armor items | |
Type | Type of armor, one of:
|
|
Rating | Armor value, long | |
Weight | ||
Value | Unsigned long | |
Health | Maximum condition of armor, long | |
Enchant | Enchantment ID string | |
EnchantPts | Available enchant points, long | |
Book | Books, scrolls, parchments, etc... | |
Teaches | Skill ID string | |
Value | Unsigned long | |
Weight | ||
Enchantment | Enchantment ID string | |
EnchantPts | Available enchant points, long | |
Class | Custom class description | |
Description | Class description string | |
Playable | True/False, Yes/No | |
Clothing | All clothing objects | |
Type | Type of clothing, one of:
|
|
Value | Unsigned short | |
Weight | ||
EnchantPts | Available enchant points, long | |
Enchantment | Enchantment ID string | |
Container | Any sort of container: chest, barrel, desk, etc... | |
Weight | ||
Organic | True/False, Yes/No | |
Respawn | True/False, Yes/No | |
Enchantment | Enchantment description for use with items, potions, spells, etc... | |
Type | Type of enchantment, one of:
|
|
Cost | Cost to use the enchantment | |
Charge | Maximum charge | |
AutoCalc | True/False, Yes/No | |
Global | Global variable definition for use in scripts and dialogue | |
Type | Type of value, one of:
|
|
Value | Global variable value | |
Ingrediant | Ingrediant and foods | |
Value | Unsigned long | |
Weight | ||
Light | Light object, both visible, carrayable, and invisible | |
Value | Unsigned long | |
Weight | ||
Sound | Sound ID string | |
Radius | Unsigned long range in game units | |
Lock | Lockpicks | |
Value | Unsigned long | |
Weight | ||
Uses | Number of uses, long | |
Quality | Floating point quality (default = 1.0) | |
Misc | Miscellaneous objects | |
Value | Unsigned long | |
Weight | ||
NPC | NPC definition | |
Level | NPC level, short | |
Race | Race ID string | |
Female | True/False, Yes/No | |
Class | Class ID string | |
Faction | Faction ID string | |
Rank | Faction rank value, short | |
AutoCalc | True/False, Yes/No | |
Respawn | True/False, Yes/No | |
Animation | Alternate animation file | |
Disposition | Disposition value, short | |
Blood | Blood type, one of:
|
|
Hair | Hair bodypart ID string | |
Head | Head 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. | |
Item | Inventory 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). | |
ItemEx | Iventory item ID with the extended format: ItemID=Count such as “gold_001=1000” (any spaces are ignored). |
|
Spell | Spell ID string. Similar to the Item field, use multiple Spell columns to add several spells. | |
Skill | Skill value (unsigned char) with the format: Skill=Value such as “Block=54”. Ignored if AutoCalc is true. |
|
Attribute | Attribute value (unsigned char) with the format: Attribute=Value such as “Str=54”. Ignored if AutoCalc is true. |
|
Gold | Amount of gold carried by the NPC (unsigned long) | |
Health | Maximum health value (long, ignore if AutoCalc is true). | |
Fatigue | Maximum fatigue value (long, ignore if AutoCalc is true). | |
SpellPts (Magic) | Maximum spell points value (long, ignore if AutoCalc is true). | |
Probe | Trap disarming probes | |
Value | Unsigned long | |
Weight | ||
Uses | Number of uses | |
Quality | Floating point quality (default of 1.0) | |
Race | Custom race definition | |
Description | Race description string | |
Playable | True/False, Yes/No | |
Repair | Armorer repair item | |
Value | Unsigned long | |
Weight | ||
Uses | Number of uses | |
Quality | Floating point quality (default of 1.0) | |
SoundGen | Creature sound generation record | |
Type | Type of sound, one of:
|
|
Sound | Sound ID string | |
Creature | Related created ID string | |
Sound | Sound record | |
MinRange | Minimum range of sound in game units (0 to 255) | |
MaxRange | Maximum range of sound in game units (0 to 255) | |
Volume | Volume of sound (0.0 to 1.0) | |
Spell | Spell definition | |
AutoCalc | True/False, Yes/No | |
PCStart | Does the player start with this spell. True/False, Yes/No | |
Type | Type of spell, one of:
|
|
Cost | Base cost of spell in spell points (unsigned long) | |
Static | Static object | |
Weapon | All weapon types | |
Value | Unsigned long | |
Weight | ||
Type | Weapon type, one of:
|
|
ChopMin | Damage, unsigned char (0-255) | |
ChopMax | Damage, unsigned char (0-255) | |
SlashMin | Damage, unsigned char (0-255) | |
SlashMax | Damage, unsigned char (0-255) | |
ThrustMin | Damage, unsigned char (0-255) | |
ThrustMax | Damage, unsigned char (0-255) | |
IgnoreResist | Ignore creature resistance, True/False, Yes/No | |
Speed | Higher is faster, floating point (default = 1.0) | |
Reach | Longer 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 is to export some sample records and load that file into your spreadsheet application. You can import multiple record types 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.
The script template file is a regular text file that contains the entire source script for the templates (from the begin to the end statements). The source script will also contain special template variables that will be replaced by values in the CSV file. Take the following simple source script as an example:
begin [ScriptName] short DoOnce if ( DoOnce == 0 ) player->AddItem, [ItemID1], [ItemCount1] set DoOnce to 1 endif endThe 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 template variable 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 be listed 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 file matching the above source example is given below:
ScriptName, ItemID1, ItemCount1 dh_itemscr_01, gold_001, 1050 dh_itemscr_02, dh_item_test_01, 1 dh_itemscr_03, dh_levelist_01, 4The first row in the CSV file contains the template variables matching those in the source script (without the 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 ensure it has been loaded successfully.
There are several options available affecting the creation of script templates.