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... ;-)
|