backIndex

Xelagot topics

Language and chat

Xelagots respond to verbal commands, that is, commands issued during a chat session. These commands can be issued in various languages. The default setting is english, but other language sets are in the make (Spanish is available).

The language definition is kept in files in the Chat directory (folder). One file, Lang.ini, is common to all languages, and contains sections defining key expressions and words in each language.

The default language file is Dialog0.txt. This file is for the english language, and contains all verbal commands the bot will understand.


Translations

Translations of Dialog0.txt can be installed in the following way:

  1. find the name of the translation file. The only one officially available at the moment is for Spanish, and is called Spanish_AMD01.txt.
  2. in the bot menu Uni, open Dialog and Scripts
  3. look in the first section of the selector called Dialog. It contains a combo with a list of languages, a button load, and three buttons default, universe and world.
  4. click load to search for the file you need and load it.
  5. if the file is loaded correctly, its Title (the Title is in the [Common] section of the file) will appear in the combo list. Select it.
  6. then you must decide whether to hit default, universe or world.
    • if you want this language file as default language, hit default
    • if you want it for the universe the bot is in (the bot must be logged in to do this), hit universe
    • if you want the bot to use this language only in the world the bot is in, hit world.
  7. close the selector by hitting done.

If you wish to customise an existing Language file to add your own version of the commands, read here below: Customising the language file.

If you are interested in making your own translation of Dialog0.txt to another language, please note the following:

If you have made a new language file and wish to include it in the standard edition of the bot, contact the author: xelag@3dee.nl.


The sections of the language files

The sections of Dialog0.txt are:


Commands in the language files

The general structure of commands is:
cmd={command code}
arg=arguments
tag=a tag
hear=what the bot hears
say1=what the bot says in normal conditions
say0=what the bot says in case of failure
say2=some commands have more than one result, extra say lines are added
The minimal commands have only the cmd and hear lines, the say lines are required by most commands, tag is optional and stops repetitions, arg may be used to customise commands which require arguments, such as the warp command.

One special command code is the empty command cmd={}, which requires the hear and say1 lines. This code does nothing else than make the bot say the say1 line when it hears the hear line.

Commands use placeholders like {p}, {coords}. Each command code has specific placeholders, but there are placeholders common to all commands, including the empty command. The most frequently used common placeholders in the say line are:

You may specify in the Say line how the bot must answer: secretly through the program interface, in whisper or aloud. The 'target' variations are specific for commands involving a target avatar, like obey or join. You may even split the bot's answer into sections, using for example:
say1=That's my name, {p}!{n}{whisper_speaker}I'm not a HamBot, {p} :o)

The here line has also special placeholders:

The arg line can be explained with the following example:
cmd={do_warp}
hear=>Gardel
arg=aw 9877.4s 5415.762e 0a 350
tag=warp
say1=El dia que me quieras...

The {do_warp} command usually expects the speaker to specify the world and coordinates of the warp. These can also be specified in the arg line. In this example, when the bot hears: >Gardel it will say: El dia que me quieras... and warp to aw 9877.4s 5415.762e 0a 350.


Customising the language file

As from version 3.0, each language file has a series of companion files. For Dialog0.txt these are called: Dialog0_define..txt, Dialog0_hibye.txt and Dialog0_avclick.txt. Once present in your chat directory, these files may be edited by the user. Users may customise them to suit their needs, they will not be written over by new versions.

The various sections in the dialog file may be customised without altering the file. To do so, you need to create one or more text files and name them according to the following pattern, based in this example on dialog0.txt (if you use another file, for instance, a translation, use that filename instead) and the section name:

In these files you put your custom commands, in the same way they would go in the dialog0.txt file. You may not add section headers like [Login_Owner] etc, the section is indicated in the file name itself. These files go in the Chat folder.

Placeholders valid in all strings which are sent to the bot to say

The bot collects information for 'talking' from various sources. All strings the bot receives to speak aloud or whisper, except for the SayText/WisperText chunks, are parsed for certain placeholders, and these are substituted for their values. These 'say' placeholders are:

backIndex