Text Overrides allow you to effectively do a search and replace on any text before it is output to screen. This provides a convenient way of globally changing particular output without having to modify each individual item. It is also useful for changing any "fixed" text, i.e. anything output by the application that is not stored as part of the library. (NB. I am working to reduce this all the time, and hope to eventually store all text within the library.)
ADRIFT Developer must not be in Simple Mode for the Text Overrides button to be visible on the main toolbar.
Text Overrides can also be a useful tool to use as a language resource to convert any English output to other languages.
Text Overrides are applied in order of length. This ensures an override that is a subset of a longer one does not prevent the longer one from overriding. For example, if you had the following overrides:
If the shorter override applied first, "You take the ball." would be output as "You select the ball." rather than "You pick up the ball."
The Text Override editing window looks like this:
Original text is the text that is normally displayed in ADRIFT Runner, that you wish to be replaced with something different.
Replacement text is the text that you want to replace this with. If you do not want the original text to be displayed at all, just leave the bottom window blank.
Remember that you can use an alternative description in the Replacement text box to alter the displayed message using restrictions.
An example of this is that you can, if you wish, define a text override that will apply, for example, in only one location. Let's say you have an object (a rowing boat) that you want the normal description ("Here you see a rowing boat.") to display in one location, but in another location you want the description to read "Tied up at the jetty is a rowing boat." To do this you should leave the default description blank and first of all define an alternative description that is the same as the original text, i.e. "Here you see a rowing boat." Set the restriction for the location that this description applies to and set it to Start description with. Then define a second alternative description, "Tied up at the jetty is a rowing boat." Set the restriction as the location you want this description displayed in and also set this as Start description with.
It is also possible to have a sound play, or show an image, when the replacement text is shown.
If you prefer, you can edit Text Overrides in an external editor, such as Notepad. This allows you to see all the overrides at once.
The format for importing overrides is plain text files with the file extension ALR. Each individual override should be placed on a separate line. The Original text and Replacement text must be separated by the pipe | character. Any lines beginning with the # character will be ignored.
So an example Language Resource file might be as follows:
You can also export all Text Overrides to an ALR file. However, any comments are not retained, so you will just get the raw data output.