backExamples

XelaG Quality Bots

The Xelagot Chess Script

This chess script, Chess_05.txt, can be used with xelagot bots as from the following versions (minimum bot version):

X1 2.9999958, Av99Bot or SrvcXlgBot 1.73

These bot versions fix a serious bug in the Chess unit: on some occasions, check-mate was announced wrongly.

Known problem in version 2.9999958/1.73: bot names that include spaces will not work. Fixed in version 2.9999959/1.74.

Chess_05.txt has a few minor changes. To upgrade the script if you are running Chess_04.txt, copy only the Chess_05.txt file to your old chess folder, and run this script instead of Chess_04.txt.

The chess package consists of a few files:

Make a folder in your Script folder, call it Chess (or something appropriate). Unzip these files into this Chess folder. You will need to replace the ChessObjects.txt file with the one supplied with the chess objects, and you must edit the ChessBoards.txt file to suite your needs.

Where can this game be played?

Not everywhere... because not all worlds will have the correct objects and the small black and white (or coloured) squares needed to play this game, or they may have them as z-objects and you may not have permission to use them.

You may play in any world that has the chess-piece ojects and the squares, and where you have a piece of land and may build. Your bot will use your citizen number to build and play the game.

How to prepare the game before running Chess_Setup.txt

Chess pieces. The world must have chess pieces on it's object path, and chess squares (not full boards, individual squares are required). A few sets are available with this script:

File ChessObjects.txt. The names of the models used for the chess pieces and for the squares must be in the ChessObjects.txt file. This is an example (the column under 'name in file' has the contents of the file):

name in file   what it means
------------   -------------
bs=chsqb.rwx   black square
ws=chsqw.rwx   white square
sq=1.00        size of the square in metres
wk=chkiw.rwx   white king
wq=chquw.rwx   white queen
wb=chbiw.rwx   white bishop
wn=chknw.rwx   white knight
wr=chrow.rwx   white rook
wp=chpaw.rwx   white pawn
bk=chkir.rwx   black king
bq=chqur.rwx   black queen
bb=chbir.rwx   black bishop
bn=chknr.rwx   black knight
br=chror.rwx   black rook
bp=chpar.rwx   black pawn

Location. The location in the world is very important. Due to limitations imposed by the Building Inspector, each chess board requires 4 cells, which should be empty otherwise (except for a cover and 3 signs). The chess board MUST be located at FULL coordinates (no decimals allowed in the N S W E coordinates), at the intersection of the four cells. To test this, once the boards have been built by the Chess_Setup.txt script, hold down CTRL and right-click on a corner of the chess board. Only 16 squares of the board should get selected, with their corresponding chess pieces, and the ground cover. If you have placed a sign (for example, sign1.rwx) in that cell, it will also get selected. Repeat this operation for each corner of the board.

If you are in doubt whether there may be objects far above or below the chess board, CTRL-select each corner and delete the contents of the cells. Then replace the cover and maybe the sign, and run setup once more. You can also test the capacity of the cell by cloning the chess pieces until they fill the chess board (one piece on each square). If all pieces are built without the Building Inspector interfering, you are safe to leave other objects in the cells.

Spacing. Chess boards must be separated by at least 2 coordinates in the NS or WE direction. See the example file ChessBoards.txt below.

Orientation. The boards must face either North (rotation = 0), West (rotation = 90), South (rotation = 180) or East (rotation = 270).

Altitude. Any altitude is allowed, but the board should be at least 30cm above the ground cover (or way below).

File ChessBoards.txt. As an example, the boards I have in City4All use the following file ChessBoards.txt to create two chess boards:

world=city4all
universe=City4All
scan=28s 10w 8a 0
board1=27s 10w 0.30a 270
board2=29s 10w 0.30a 270

As you see, the world and universe are named in the file. This is because the script runs automatically when loaded, and continues running. If the bot is in the wrong world or universe, it will try to run the script anyway, unless you specify the world and universe names. NB: the universe name must be identical to the one used by the xelagot program for logging the bot. If you never visit another universe with your bot, you may omit the universe name; the same applies for the world.

scan=28s 11w 8a 0 tells the bot to go to that position and to scan that area. The coordinates need not be full aw coordinates, they may contain decimals. Altitudes are in metres, not in aw units. This position must be near the centre of the chess boards, that is: if you have one chess board only, it must be on top of this board (about 8 metres higher); if you have 2 boards, put the scan coordinate in between the two boards (approximately); and so on.

board1 and board2 are the names of the boards (you can call them anything except 'world', 'universe' or 'scan', they may not contain spaces, underscores or special signs). After the equal sign, you must put the coordinates of these boards. See above about the limitations imposed to these coordinates concerning the spacing, location and orientation of the boards.

You may decide to start with one board only: omit the other board names from this file. For example, if your world is called 'santa' (as spelled on the world list) in the 'ActiveWorlds' universe (as spelled in your xelagot program, mind the space!), and you want your board to be called MyChess, situated at 7n 7w, 30 cm above the ground, with the bot 8 m higher:

world=santa
universe=ActiveWorlds
scan=7n 7w 8.30a 0
MyChess=7n 7w 0.30a 0

I repeat this: the name of the universe must be spelled EXACTLY as it is in your xelagot program. For X1, that is the name you see in the login screen. For Av99Bot and SrvcXlgBot, the name as it appears in the ini file. If in doubt, omit this line!

Once you have your models on the object path, you have cleared space in your world, you have the files ChessObjects.txt (included with the objects you download from this page) and ChessBoards.txt in the same folder as your scripts, you can test run the Chess_Setup.txt script.

Running Chess_Setup.txt

Load Chess_Setup.txt as you would load any other script file (consult the help files if you are not familiar with this). Position your bot near the chosen place (and go there yourself to observe). The area must have been previously cleared as indicated above. Run Chess_Setup.txt. The bot will first scan the area (indicated by your 'scan' entry in the ChessBoards.txt file), and attempt to build the chess sets.

Troubleshooting:

If things went wrong, delete what you must, adjust what you must, and run Chess_Setup.txt again.

Running Chess_05.txt

This is almost the final stage. Load this script, it runs by itself. If all is well, you can start playing when the bot has set up the chess boards.

Troubleshooting:

  1. When you run the script, you hear nothing at all.

    check that your world and universe names are correct in the file ChessBoards.txt: the world name must either be blank (no validation) or be as it appears on your brouwser's and bot's world list; the universe name must either be blank (no validation) or must be exactly as it is used internally by the bot, including spaces between words (check the universe name in the login selector). NOTE: you may delete them temporarily, this disables world and universe validation. Fix all this and re-run the script.
     
  2. When you run the script, you hear first:
      Please wait until I scan the area and prepare the games...
    and then:
      The chess boards are ready!
    and nothing in between.

      Your bot version is too old or has not been installed properly. Look at the top of this page for the minimum bot version.
     
  3. all seems well, but the bot does not react to clicks.

    look at the rotation of your chess boards in the file ChessBoards.txt: it must be exactly 0, 90, 180 or 270. Check also that you have not misspelled the altitude (the "a" is missing) or the coordinates (the "n", "s", "w" or "e" are missing). Fix that, delete your boards, run again Chess_Setup.txt and then Chess_05.txt.
     

Adding signs

Once the chess script is running, you need to add the signs. You can do that without stopping the script. You may add two kinds of signs:

Do this for each board, using the corresponding board name instead of Board1. The boards must each be in a different cell. CTRL-select a board, the cell objects get selected with it. You can test in this way if each sign is in a different cell around the board.

By adding the 'name' to the action field of these boards, the bot recognises the board name and the function of the sign. The signs become activated, and will respond to clicks.

Keep your script running, it will eventually recognise and use the boards :)

Fine-tuning

As from Chess_04.txt, you can fine-tune the behaviour of the chess bot in various ways, using verbal commands through the AW browser. The fine-tuning parameters are kept by the bot in a file called ChessTuning.txt. You can ask the bot not to say aloud but to whisper general announcements, you can set a radius for the bot announcements in whisper, and you can set the number of seconds the bot waits to clear the board after a game finishes.

//silence 0
or
//s 0
allows the bot to say general announcements aloud.

//silence 1
or
//s 1
forces the bot to say general announcements in whisper, and only to persons within the broadcast radius.

//broadcastradius x
or
//br x
where x is the radius in metres (minimum 10) from the centre of each board for the bot to whisper announcements if the bot whispers them. Only people within the broadcast radius of any of the boards will hear them. The default value is 30 metres

//secondstoclear x
or
//stc x
where x is number of seconds (minimum 1) the bot waits before clearing a board after a game ends.

Download the scripts

The chess script files are in Chess_05.zip. Read the instructions on this page to set it up. Note: the first versions of this Chess script (Chess_02.txt onwards) have now been replaced with this version. If you have installed any of the previous versions, download this zip, extract Chess_05.txt (not the other files), put it in your Chess folder. Load it and run it instead of the previous version; your other files are still valid and you do not need to redo the setup. Make sure you have the minimum version, uploaded on 2000, December 22nd.

The Player's Manual

... is situated here, feel free to download this page and use it in your world (do not link it to here, this url might change).

... and do me a favour: put a sign somewhere not too far form the chess games, saying they are xelagot chess games, and pointing to: http://www.imatowns.com/xelagot/

Enjoy.


Aknowledgements

Many universes and people have helped to test this script.

Vectorscape - LordVector has personally helped in beta-testing, and provided accomodation for the chess games in a new world, xelagon, where I set up 6 chess boards.

OuterWorlds - Likeness (FalalalaLike) provided accomodation in Tourist 5n 5w for two chess boards and uploaded the chess objects, and Lord and Lady VanClause o did a great job beta testing.

City4All - JayDee and Nonsi set up a chess ground in their main world City4All 25s 10w 0a 180 for 4 chess boards, and very kindly uploaded the objects and adjusted their registry. Chessboards have also been set up in Holland 10n 2e, under 3DEE custody and sponsorship: thank you BCat and Boom.

ActiveWorlds - provides the sdk, software and permissions that makes all of this possible. Special thanks to Hamfon for his tips :)

Thank you all, and thank you also all beta-testers who have sent in reports: almost all of the reports lead to bug fixes and enhancements.


Alex Grigny de Castro
XelaG
email: xelag@3dee.nl