Sillysoft
Lux Alliance: Capture The Flag!

Lux Delux
The Game Of Universal Domination 
Lux Delux
Maps - Forum
Rankings - Buy
Lux Alliance
Maps - Forum
Rankings - Buy
Sillysoft
About - Docs - FAQ
News - Forums - Search
 
RSS feeds  

Wiki -> Writing a Bot

In November 2010 I decided to write a bot for Vox. So I downloaded the SDK and dived into the API first. I Use ubuntu 10.10 over here so I will discuss a Linux implementation but the windows action should be similar to this...

Where are the files located?

Target Directory

When I unpacked CastleVox the first time, I placed it under ~/Desktop/CV/CastleVoxPC - so it still resides there for me. You might use any other directory as well.

Under this VoxRoot we find the Support folder. That one contains all variable stuff, especially a Directory named Agents. In a virgin installation it is empty.

We will place our bot there.

eclipse Workspace

When You open eclipse, it asks about a working directory (usually /home/username/workspace). Just enter /home/username/Vox there. After the eclipse Window comes up, close the Welcome Folder by clicking on the "X".

Now You see an empty workspace.

Fill the workspace with life

Install the SDK

Enter your Firefox and go to http://sillysoft.net/sdk/ Click on "Download the Sillysoft SDK Now" and store the File. I simply put it into my /home/username/Downloads.

open a console now and type

 cd /home/username/Downloads
 unzip SillysoftSDK.zip

This creates the SDK directory under Downloads. You might as well do it anywhere else.

Back into eclipse, click on the Menu: "Window" -> "Show View" -> "Package Explorer"

Right Click into the white Package Folder and select "New" -> "Java Project"

A new Wizard Window opens. Select "Create Project from existing source" and Browse to your download directory. Select the SillysoftSDK Folder and click "OK".

Now returned to the wizard windo clock on "Finish".

On our previously empty Folder "Packages" the SillysoftSDK appeared. Now right click on the first line, choose "Properties". In the new Window select the "Source" folder. Select "SillysoftSDK/src/com/sillysoft/vox/agent" and click on "Remove". under src you find an "Excluded: src/com/sillysoft/vox/agent". Remove this line as well. Then click on "OK".

If anything else is ok, you might find some compilation errors under src.com.sillysoft.vox.agent now. Double click on "Cluster.java" for example. The package definition is missing in the first line. CLick once on the Error Mark in the text editor It will show you up a fix method. Double click on "Add package declaration", save the file using Ctrl-S or your mouse. When you have worked on all red crossed files, you are ready to fire off your own bot.

Create Your Bot class

Right click on "Angry.java" in the "Packages Folder" and select "Copy". Right click again and select "Paste". You get a Name conflict window. Enter Your Bots name now "MyBot" and click on "OK".

All done, now you have created a new Bot named "MyBot". Double click on the "MyBot.java" now. and take a look at the methods. Play around with them...

Testing the new Bot.

To test the new Bot, you must install it under the Target directory of your Vox Installation. Open a terminal window and type

 cd ~/Downloads/SillysoftSDK/bin/com/sillysoft/vox/agent
 cp MyBot.class ~/Desktop/CV/CastleVoxPC/Support/Agents

Close the window again and fire of your Vox. Notice the new Bot under "Other". Enjoy !

Feel Free to complete this tiny help... ;-)

Lux Alliance diplomacy game is a simultaneous-turns team strategy boardgame. Diplomacy meets Axis & Allies game.

Lux Delux advanced Risk game with over 800 maps, hard AI, and online multi-player.

American History Lux takes you through the wars of USA history. — Ancient Empires Lux spans Babylon to the Roman Empire.

Lux Touch iOS risk game, and Lux DLX let you conquer the world on your iPhone, iPod, and iPad. Lux DLX android risk game

Meowzers Action Cats is a feline fun mobile game. Romp with cute cats on your phone and tablet.

Sillysoft makes games for Mac OS X, Windows XP/Vista/7 and Linux. Also mobile games for iPhones, iPads, and iPod Touch.

SitemapDownload GamesMac OS X gamesMapsNewsTerms of UseFAQ

Because taking over the world is fun.
                                 - Lux