backExamples

XelaG Quality Bots

The Xelagot Checkers Script

on an 8x8 board

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

X1, Av99Bot or SrvcXlgBot 3.08

3.07 will work but is buggy

NOTE: the Checkers package and installation are very similar to the Chess ones, but there are subtle differences. The main difference is that they have different pieces and boards, that the pieces are called Reds and Whites instead of Whites and Blacks, and that Reds initiates the game. This affects the names in files and signs.

The Checkers package consists of a few files:

Make a folder in your Script folder, call it Checkers (or something appropriate). Unzip these files into this Checkers folder. You will need to replace the CheckersObjects.txt file with the one supplied with the Checkers objects, and you must edit the CheckersBoards.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 green 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 Checkers-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 Checkers_Setup.txt

Checkers pieces. The world must have Checkers pieces on it's object path, and Checkers squares (not full boards, individual squares are required). The set available with this script is:

File CheckersObjects.txt. The names of the models used for the Checkers pieces and for the squares must be in the CheckersObjects.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=cksqgr.rwx   GREEN or BLACK square
ws=cksqbf.rwx   BUFF or WHITE square
sq=1.00         size of the square in metres
rk=ck_kr.rwx    red king
rp=ck_pr.rwx    red pawn
wk=ck_kw.rwx    white king
wp=ck_pw.rwx    white pawn
rkj=ck_krj.rwx  red king (jumping)
rpj=ck_prj.rwx  red pawn (jumping)
wkj=ck_kwj.rwx  white king (jumping)
wpj=ck_pwj.rwx  white pawn (jumping)

Location. The location in the world is very important. Due to limitations imposed by the Building Inspector, each Checkers board requires 4 cells, which should be empty otherwise (except for a cover and 3 signs). The Checkers 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 Checkers_Setup.txt script, hold down CTRL and right-click on a corner of the Checkers board. Only 16 squares of the board should get selected, with their corresponding Checkers 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 Checkers 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 Checkers pieces until they fill the Checkers 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. Checkers boards must be separated by at least 2 coordinates in the NS or WE direction. See the example file CheckersBoards.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 CheckersBoards.txt. As an example, the boards I have in City4All use the following file CheckersBoards.txt to create two Checkers boards:

world=city4all
universe=City4All
scan=28s 12w 8a 0
board3=27s 12w 0.30a 270
board4=29s 12w 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 Checkers boards, that is: if you have one Checkers 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.

board3 and board4 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. Notice that I called the boards board3 and board4: this is because in City4All I use board1 and board2 for chess (another bot whith the same citizen number, another script), and board names must be unique per citizen number!

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 MyCheckers, 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
MyCheckers=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 CheckersObjects.txt (included with the objects you download from this page) and CheckersBoards.txt in the same folder as your scripts, you can test run the Checkers_Setup.txt script.

Running Checkers_Setup.txt

Load Checkers_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 Checkers_Setup.txt. The bot will first scan the area (indicated by your 'scan' entry in the CheckersBoards.txt file), and attempt to build the Checkers sets.

Troubleshooting:

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

Running Checkers_01.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 Checkers 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 CheckersBoards.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 Checkers 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 Checkers boards in the file CheckersBoards.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 Checkers_Setup.txt and then Checkers_01.txt.
     

Adding signs

Once the Checkers 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

You can fine-tune the behaviour of the Checkers bot in various ways, using verbal commands through the AW browser. The fine-tuning parameters are kept by the bot in a file called CheckersTuning.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 Checkers script files are in checkers_01.zip. Read the instructions on this page to set it up.

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 Checkers games, saying they are xelagot Checkers games, and pointing to: http://www.imatowns.com/xelagot/

Enjoy.


Aknowledgements

Many universes and people have helped to test this script.

OuterWorlds - Likeness provided accomodation in GameZone for Chess and Checkers boards and uploaded the objects.

City4All - JayDee provided space and uploaded the objects for their main world City4All 25s 10w 0a 180 for Chess and Checkers boards.

ActiveWorlds - provides the sdk, software and permissions that makes all of this possible. Special thanks to Brant for the beta testing space in AWTeen :)

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