String editor

From Dragon Age Toolset Wiki
Revision as of 17:39, 7 October 2010 by Proleric1 (Talk | contribs) (Creating a string with a specific id)

Jump to: navigation, search

Basics

The string editor can be found under the "Tools" menu.

In Dragon Age, all strings of text that could be seen by the user are stored in a separate table and are refered to by resources by their string ID number. This makes tasks such as spell checking, translation to other languages, and so forth much easier - all of the text that might need this is all stored in one easy-to-process place, and the game can be localized by simply swapping in a substitute talk table.

The string editor is a basic means of accessing this collection of strings.

IMPORTANT - all objects must be checked in if you want to see the latest text.

String editor main screen.png

At the top of the main screen is a set of options to help winnow down the displayed strings to just the set that you want to work with. First you will need to identify which string table you want to edit; this table is generated on a per-module basis, so select the table that's been generated for your module.

If you want to access a single string that you know the ID for, such as a line in a conversation, you can enter it into the "String ID" field to bring it up immediately. (To find the string ID for a line in a conversation, look in the lower left corner of that line's Dialogue tab in the conversation editor).

If you want to load the entire string table into the editor's string display, ensure that the filter button reads "Filter: Off" and check the "Do NOT use Filter" checkbox.

If you aren't sure where the line is, or if you want to look at a whole class of lines, you can filter the displayed list of strings on a wide variety of criteria. Click on the "Filter: Off" button and you'll be presented with a screen where you can add filters:

String editor filters.png

For a string to pass the filters all conditions have to evaluate true - they are "AND" conditions.

Once you've found the string you're interested in editing, double-click to open it:

String editor edit string.png

Creating a string with a specific id

When a string is created, its id is determined by incrementing the String ID Last Used field in the module properties.

Occasionally, it is necessary to use a different range (for example, owing to a bug, smaller numbers are required for some GUI functions).

This can be achieved by temporarily changing the String ID Begin and String ID Last Used module properties to one less than the required number.

It's wise to back up the data base and make a careful note of the original module properties before attempting this!

Editing a checked-out string

The string editor will not allow a string to be edited if it is checked out.

Often, this can be resolved by checking in the associated resource.

However, certain core strings are associated with system components (e.g. GUI) and cannot be checked in.

The normal procedure in such cases is to create a new string, then change the corresponding 2DA to use the new string id (for an example, see Background Tutorial).

There are rare instances in which this cannot be done, because the string id is hard-coded in the game (for example, the gender description used in Character Generation).

Quick-and-dirty fix for hard-coded string id

A quick-and-dirty fix, to be used (at your own risk) only when the string id is hard-coded, is as follows.

Back up your database.

Do a Builder-to-Builder Create for the string you want to change.

The resulting DADBDATA file is a ZIP container in which the string is held as an XML file. By temporarily renaming the container (.zip extension), you can easily extract, edit and replace the XML.

Builder-to-Builder Load will replace the string, even though it already exists.

One glitch is that because the string is in the module's core talk table, it affects the OC and all other campaigns, even when the module is disabled.