|This article does not cite any references or sources. (May 2008)|
The Electron toolset was developed by Obsidian Entertainment and is included in the role-playing video game Neverwinter Nights 2. It allows people to design their own adventures (known as a module) and distribute them for others who own the game to play. It is an evolution of the Aurora toolset which was created by BioWare and used for the original Neverwinter Nights game and was completely re-written using the C# programming language.
Modules created with the toolset can only be loaded with either the client application or the server application provided and can be used for single-player, multi-player or persistent worlds. However, while modules can be created for persistent worlds, it was never intended for this purpose and is not directly supported by Obsidian. The module itself is stored in a proprietary .mod format which was created for the original and has not significantly changed since then.
The toolset itself consists of a set of components, each of which are responsible for creating or managing a different aspect of the adventure
Visual Terrain Editor
A visual editor which allows the creation of heightmaps for exterior areas or tile-based maps for interior areas of the game world. This editor enables placement and configuration of all of the visual objects that can be seen in the game including:
- Items: Objects which can be held and used by player characters and creatures
- Creatures: Beings which the character can interact with or enter into combat with
- Doors: Objects used for blocking passage to other areas
- Placeables: Objects which characters can interact with or which are used to enhance the appearance of an area
- Triggers: Invisible polygons which run scripts when characters cross their border (including traps)
- Encounters: Invisible polygons which spawn creatures when characters cross their border
- Sounds: Invisible objects which cause a sound to be heard when characters are within the specified range
- Waypoints: Invisible objects used as place markers for important locations within an area (Can be used by scripts)
- Static Cameras: Controls Cameras for use in cut scenes
- Lights: Additional lighting sources
- Trees: Tree objects which are rendered using SpeedTree
- Placed Effects: Places particle effects
- Environment Objects: Yet to be defined
A source code editor used to write scripts using the NWScript language. These scripts can be used to control aspects of the adventure, react to events which occur during play, facilitate actions during conversations and handle requests in the form of callbacks from the user interface.
Almost all objects within the game, including areas and the module itself have a series of events. For each of these events a script can be designated to fire when this event occurs, thus allowing the designer to take appropriate action in response to what is happening in the adventure.
Examples of these events include:
- OnHeartbeat: A script which periodically fires on areas, modules and creatures which can be used to check state. This event is used sparingly due to the frequency of which it is run and the load it places on the server
- OnEnter/OnExit: A script which fires when a character or creature enters or leaves an area or trigger
- OnAttacked/OnDamaged: A script which fires when a placeable, door or creature is attacked or damaged by something
- OnDeath: A script which fires when a placeable, door or creature is destroyed
- OnSpellCastAt: A script which fires when a placeable, door or creature has a spell cast at it
- OnConversation: A script which fires when a character attempts to start a conversation with the target
A Tree view editor used to write dialogs which occur between a player and either an NPC or a placeable/item. Each node of conversation can run a conditional script to determine if it should be displayed, and a second script once a node has been selected as a response from the character.
The conversation editor has several features including:
- Placeholders which are used to replace character specific information at the time the conversation takes place. (i.e. The placeholder boy/girl is replaced with the gender of the character who starts the conversation, firstname is replaced with the characters first name, etc.)
- Tokens which must be set via script prior to being displayed. These allow for anything to be substituted at the time of the conversation.
- Colours which can be used to indicate different accents or inflections during the conversation. These can indicate an action which is taking place, indicate tone or volume (i.e. whispering) or reflect something that is seen instead of actually being spoken.
A tabbed property editor allowing for the creation of items, placeables, creatures and other objects that can be found in the adventure. Each of these objects have a specific set of categorized properties which can be modified and the result saved as a blueprint with a unique Resource Reference (known as a resref). Instances of these blueprints can then be placed in the game world via the Visual Terrain Editor or spawned into the game using scripts from the Script Editor and have their properties modified.
As well as the above mentioned components, the toolset also has several other features which are of note
The core ruleset used by the Electron toolset is a modified version of the Dungeons and Dragons 3.5 edition role-playing game rules. It contains a lot of configuration information as well as provides rules on how to add to those concepts which have already been identified (i.e. races, classes, spells, etc.). The toolset manages a significant portion of this information in text-based .2da (2-Dimensional Array) files which can be manually edited externally and which are loaded by the toolset during start up.
Note: A problem existed with the original engine where information contained in these files was required during character creation and required some of these files to be copied onto the local machine in order for this process to function correctly for the players. It is not yet known if this problem will also exist in the new game.
Developers of the Electron toolset have indicated that a plugin architecture and API will be used. No detailed information or specification has been provided at this stage to indicate what exactly this consists of or how it can be used by developers.
Improvements over the Aurora toolset
The Electron toolset provides several improvements over its predecessor the Aurora toolset, which included:
- Toolset Interface
- Ability to switch between multiple windows (MDI) instead of only working on a single modal window (SDI)
- Improved use of tabs
- Improved visualisation of information by using grids
- Ability to theme the toolset windows
- Ability to dock windows
- Reduction in memory leaks due to advanced garbage collection provided by C#
- Visual Terrain Editor
- Exterior areas now use height maps instead of being tile-based
- Placeables can now be grouped
- Conversation Editor
- Improved how functions are handled for nodes of conversations to accept parameters
- Use of grid to display conversations to greatly improve visualisation of information
- Limited ability to import conversations from the Aurora toolset (Confirmation still required on how this will work)
- Script Editor
- Included all scripting functions which were released with patches for the original game even after development had commensed on the new one
- Visual feedback provided to give you the signature of functions during scripting
- Limited Ability to import scripts from the Aurora toolset (Confirmation still required on how obsolete functions will be handled)
- Inclusion of Intellisense 2 for intuitive scripting