9.1. Creating and Editing Aliases

The easiest way to create and alter aliases is from the World Editor, the place where all settings of a World are altered (see Chapter 4, Editing a World).

Aliases are defined in the Aliases section inside the Automation section. When you open that section, you'll see a list of the defined aliases and some buttons like this:

Figure 9.1. The graphical Alias editor
The graphical Alias editor.

The main part of the window is the list of defined aliases. The columns are as follows:

9.1.1. Adding Aliases

To add a new alias, press the Add button. This will open a window for you to edit the new alias' parameters:

Figure 9.2. The window to edit aliases
The window to edit aliases.

What can be set represents the columns described above. The only thing that needs explanation is the Eval Substitution as Perl statement option, corresponding to the Eval as Perl column. As mentioned before, aliases are actually a substitution, using Perl's s// construct. It is also possible to have aliases that use a s//e construct, that is, whose substitution is actually composed of Perl statements evaluated when a match is found. When that option is enabled, the substitution is evaluated as a Perl statement.

When you are finished, press OK and the alias will be added. If you change your mind, press Cancel and the alias will not be added.

9.1.2. Editing Aliases

To edit an alias, select it by clicking its line in the list (the line will be highlighted), and press the Edit button. A window like the one used for adding aliases (see Section 9.1.1, “Adding Aliases”) will be opened, filled with the alias' parameters. Change what you want, and press the OK to commit the changes. If, however, you change you mind, press Cancel and the changes will be not be made, the alias will remain as it was before.

Another shorter way to edit an alias is to double click its line in the list.

It is also possible to change the value of the Enabled and Eval as Perl flags directly from the alias list. Make sure that the alias you want to change is selected, and click in the check button. The state will be toggled.

To delete an alias, select it and press the Delete button. You will be asked for confirmation, and can cancel the operation, but once deleted, you cannot recover the alias. If you want, you can disable this confirmation dialog, but if you do so and click the Delete button, the only way to undo your action will be creating the alias again. See Section 4.7, “Advanced”. To delete several aliases at once, select them all and press Delete.

The final thing that needs to be explained with regard to aliases is how to reorder them. Aliases as tried from the first one to the last, so in a few cases the order might matter. To move an alias up or down in the list, select it and press the corresponding button.