Aurora Toolset

The Dialogue System can convert BioWare's Aurora Toolset (Neverwinter Nights 1 & 2) projects into a Dialogue Database.


Aurora Toolset Projects

Preparing Modules for Conversion

The Dialogue System's Aurora Toolset converter imports data from XML dialogue & journal files. You will need to use ModPacker or the Ruby-based nwn-lib tools to convert your .mod file(s) into XML files.

Note About Special Characters: If your text uses special characters, make sure to save your files as UTF-8 to preserve them. Alternatively, you can set the encoding type in the converter window. You can use a text editor such as Notepad++ to convert to UTF-8, or a command line tool such as iconv, or an online tool such as: https://subtitletools.com/convert-text-files-to-utf8-online

What Is Imported

This data is imported:

  • All conversation trees, including language localization.
  • The ShowOnce flag is observed.
  • All <StartXXX> formatting tags (<StartAction>, <StartCheck>, <StartHighlight>)
  • All predefined tokens (e.g., <FullName>)
  • All custom tokens (e.g., <CUSTOM1234>)
  • Journal entries.

What Is Not Imported

This data is not imported:

  • Scripts (active conditions and action scripts, see Scripts and Quest Updates below)
  • Other types of module files such as areas and module info files

Actors

A dialogue database contains a list of actors. Typically, one actor is the player character and the rest correspond to NPCs in the game. Each conversation has two default actors, referred to as the actor and conversant. Imported conversations will be assigned actors. The converter allows you to add and assign actors to conversations if you don't want to use the defaults.

If your conversations involve multiple actors, overriding the Speaker field for an entry, the speaker's tag should be present as one of the actors listed in this section.

Tokens and Variables

Predefined and custom tokens will be added to the dialogue database's Variable[] Lua table. References to tokens in dialogue text will be replaced with [lua()] tags that return the associated variable.

You are responsible for setting the values of the variables that represent predefined and custom tokens.

<StartXXX> Tags

Formatting tags will be replaced with [em#]...[/em#] emphasis tags (see Dialogue Markup Tags). You can adjust the colors of the emphasis tags in the dialogue database's Emphasis Settings (see Dialogue Editor Database Tab).

By default, the Dialogue System applies the first emphasis tag to the entire line. If you want to use multiple tags in a single line, or have tags affect only a subset of the line, you can tell the Dialogue Manager to convert emphasis tags to rich text codes. To do this, tick Rich Text Emphases in the Dialogue Manager's display settings. Your dialogue UI must support rich text. (The provided Unity GUI prefabs all support rich text.)

Scripts and Quest Updates

Imported entries that have scripts and quest updates will contain the name of the script or quest as a comment inside the corresponding Dialogue System field. You can tick a checkbox in the converter window to get a report of all lines that have unconverted scripts and quest updates.

The Aurora Converter does not import and translate NWN scripts. Instead, the Convert Scripts To pop-up allows you to specify how to handle them:

Setting Description
Lua Comments Add a Lua comment with the script's name
Custom Lua Function Add a call to a Lua function named NWScript() that you must define

The settings are described in more detail below.

Lua Comments

This setting adds scripts as Lua comments inside the corresponding fields of the dialogue entry.

  • Active Condition Scripts: The dialogue entry's Condition field will be set to true with a comment for the name of the NWN script (e.g., true ---gen_cond_01).
  • Action Scripts: The dialogue entry's Script field will be set to a comment containing the name of the NWN script (e.g., ---gen_script_02).
  • Quest Updates: The dialogue entry's Script field will be set to a comment containing the quest name (e.g., ---Kill 5 Rats).

Custom Lua Function

This adds scripts as calls to an external Lua function bool NWScript(string). You are responsible for writing this function and registering it with the Lua environment. See the template in Scripts/Template/Aurora/TemplateNWScript.cs.


Aurora Toolset Converter

To bring your Aurora Toolset XML files into Unity, use the Aurora Toolset Converter. This creates a dialogue database asset out of a set of XML dialogue files.

  1. Generate XML files from your .mod:
    • Using ModPacker:
      ModUnpacker yourfile.mod gffdir
      GffToXml xmldir gffdir\*
    • Using Ruby nwn-lib: ModUnpacker is unable to convert some conversations containing special characters. You can use nwn-lib to generate the intermediate files instead of ModUnpacker:
      ruby nwn-erf -f yourfile.mod -x
  2. In Unity, select Window > Dialogue System > Tools > Converters > Aurora (Neverwinter Nights) Converter. This will open a window similar to the one shown below. You can click the '?' buttons for help on each section.
  3. Open the Actors foldout and click the '+' button to add any actors (NPCs) that you want to assign to conversations. Otherwise they will be assigned the default actor 'NPC'. After assigning dialogue files, you can click Load from Dialogue Files to tell the converter to retrieve actor tokens from all of the dialogue files and automatically populate the actor list. You can reassign conversations' actors in the Dialogue Editor after conversion.
  4. In the Dialog Files foldout, click the '+' button to add dlg.xml files to the list to be converted. You can assign actors or leave them with the defaults. Use the '+*' button to add all of the dlg.xml files in a folder.
  5. In the Journal Files foldout, click the '+' button to add jrl.xml files to the list to be converted. Use the '+*' button to add all of the jrl.xml files in a folder.
  6. Open the Languages foldout if your conversations use localization and you want to use a different language code name for a language ID number. The converter will only add localized fields for languages that are actually used within each conversation.
  7. Open the Variables foldout if your conversations use custom tags. Click Load from Dialog Files. This will identify what custom tags are used and add them to the list. You can then keep the name as defined in the NWN conversation or rename it. These names will be added to the Lua Variable[] table, and imported lines of dialogue will reference them.
  8. (Optional) You can save and load converter settings in the Profiles tab. This makes it convenient to switch between different sets of NWN source files that will be converted into different dialogue databases.
  9. In the Save As section:
    • Set Output Folder and Database Filename to the path and name of the dialogue database asset that you want to create.
    • If you tick Overwrite, the converter will automatically overwrite any existing version of this asset.
    • Set Encoding to the format of the files that you'll be converting.
    • Set Convert Script To to the method you want to use for handling scripts. (See Scripts and Quest Updates.)
    • If you tick Report Scripts/Quests, the conversion process will log any conversations and lines that have Condition scripts, Action scripts, or quest updates.
  10. Click Convert to create the dialogue database, or Clear to clear all settings.

<< articy:draft | CSV Converter >>